]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/types.rs
Auto merge of #29291 - petrochenkov:privacy, r=alexcrichton
[rust.git] / src / librustc_lint / types.rs
index 264228a7052a65af9fe34baae87f69fb712853a9..abbb733d8848da10d40941142d93e820d8e7dabc 100644 (file)
@@ -659,10 +659,8 @@ fn check_foreign_fn(cx: &LateContext, decl: &hir::FnDecl) {
             }
         }
 
-        match it.node {
-            hir::ItemForeignMod(ref nmod)
-                if nmod.abi != abi::RustIntrinsic &&
-                   nmod.abi != abi::PlatformIntrinsic => {
+        if let hir::ItemForeignMod(ref nmod) = it.node {
+            if nmod.abi != abi::RustIntrinsic && nmod.abi != abi::PlatformIntrinsic {
                 for ni in &nmod.items {
                     match ni.node {
                         hir::ForeignItemFn(ref decl, _) => check_foreign_fn(cx, &**decl),
@@ -670,7 +668,6 @@ fn check_foreign_fn(cx: &LateContext, decl: &hir::FnDecl) {
                     }
                 }
             }
-            _ => (),
         }
     }
 }