]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/nonstandard_style.rs
Rename `Item.node` to `Item.kind`
[rust.git] / src / librustc_lint / nonstandard_style.rs
index e1dfe390f19fc7ed935ef3fedb9c77ffca3962cb..dceb79fd30985d7aa341d372df2b47993e65a96b 100644 (file)
@@ -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);
             }