]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/nonstandard_style.rs
Fix rebase fallout.
[rust.git] / src / librustc_lint / nonstandard_style.rs
index ec4201570b16201c528a2e1d40d94d55d4bc57c2..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(..) |
@@ -258,7 +258,7 @@ fn check_mod(&mut self, cx: &LateContext<'_, '_>, _: &'tcx hir::Mod, _: Span, id
                 .and_then(|attr| attr.meta())
                 .and_then(|meta| {
                     meta.name_value_literal().and_then(|lit| {
-                        if let ast::LitKind::Str(name, ..) = lit.node {
+                        if let ast::LitKind::Str(name, ..) = lit.kind {
                             // Discard the double quotes surrounding the literal.
                             let sp = cx.sess().source_map().span_to_snippet(lit.span)
                                 .ok()
@@ -326,13 +326,13 @@ 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);
         }
     }
 
     fn check_trait_item(&mut self, cx: &LateContext<'_, '_>, item: &hir::TraitItem) {
-        if let hir::TraitItemKind::Method(_, hir::TraitMethod::Required(pnames)) = &item.node {
+        if let hir::TraitItemKind::Method(_, hir::TraitMethod::Required(pnames)) = &item.kind {
             self.check_snake_case(cx, "trait method", &item.ident);
             for param_name in pnames {
                 self.check_snake_case(cx, "variable", param_name);
@@ -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);
             }
@@ -399,7 +399,7 @@ fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) {
     }
 
     fn check_trait_item(&mut self, cx: &LateContext<'_, '_>, ti: &hir::TraitItem) {
-        if let hir::TraitItemKind::Const(..) = ti.node {
+        if let hir::TraitItemKind::Const(..) = ti.kind {
             NonUpperCaseGlobals::check_upper_case(cx, "associated constant", &ti.ident);
         }
     }