turn hir::ItemKind::Fn into a named-field variant
This commit is contained in:
parent
c528b8c678
commit
be65012aa3
65 changed files with 158 additions and 111 deletions
|
@ -1030,7 +1030,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
|
|||
}
|
||||
};
|
||||
match it.kind {
|
||||
hir::ItemKind::Fn(.., generics, _) => {
|
||||
hir::ItemKind::Fn { generics, .. } => {
|
||||
if let Some(no_mangle_attr) = attr::find_by_name(attrs, sym::no_mangle) {
|
||||
check_no_mangle_on_generic_fn(no_mangle_attr, None, generics, it.span);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ declare_lint_pass!(
|
|||
impl<'tcx> LateLintPass<'tcx> for ImplTraitOvercaptures {
|
||||
fn check_item(&mut self, cx: &LateContext<'tcx>, it: &'tcx hir::Item<'tcx>) {
|
||||
match &it.kind {
|
||||
hir::ItemKind::Fn(..) => check_fn(cx.tcx, it.owner_id.def_id),
|
||||
hir::ItemKind::Fn { .. } => check_fn(cx.tcx, it.owner_id.def_id),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1561,7 +1561,7 @@ impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDefinitions {
|
|||
);
|
||||
}
|
||||
// See `check_fn`..
|
||||
hir::ItemKind::Fn(..) => {}
|
||||
hir::ItemKind::Fn { .. } => {}
|
||||
// See `check_field_def`..
|
||||
hir::ItemKind::Union(..) | hir::ItemKind::Struct(..) | hir::ItemKind::Enum(..) => {}
|
||||
// Doesn't define something that can contain a external type to be checked.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue