X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_lint%2Fnonstandard_style.rs;h=dceb79fd30985d7aa341d372df2b47993e65a96b;hb=7bc94cc3c2ccef8b4d393910bb978a6487db1202;hp=e1dfe390f19fc7ed935ef3fedb9c77ffca3962cb;hpb=21bf983acbb5d7ac8fb9462cbf2cc4c280abd857;p=rust.git diff --git a/src/librustc_lint/nonstandard_style.rs b/src/librustc_lint/nonstandard_style.rs index e1dfe390f19..dceb79fd309 100644 --- a/src/librustc_lint/nonstandard_style.rs +++ b/src/librustc_lint/nonstandard_style.rs @@ -136,7 +136,7 @@ fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) { return; } - match it.node { + match it.kind { ast::ItemKind::TyAlias(..) | ast::ItemKind::Enum(..) | ast::ItemKind::Struct(..) | @@ -326,7 +326,7 @@ fn check_fn( } fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) { - if let hir::ItemKind::Mod(_) = it.node { + if let hir::ItemKind::Mod(_) = it.kind { self.check_snake_case(cx, "module", &it.ident); } } @@ -387,7 +387,7 @@ fn check_upper_case(cx: &LateContext<'_, '_>, sort: &str, ident: &Ident) { impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals { fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) { - match it.node { + match it.kind { hir::ItemKind::Static(..) if !attr::contains_name(&it.attrs, sym::no_mangle) => { NonUpperCaseGlobals::check_upper_case(cx, "static variable", &it.ident); }