]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/redundant_pub_crate.rs
Rollup merge of #105123 - BlackHoleFox:fixing-the-macos-deployment, r=oli-obk
[rust.git] / src / tools / clippy / clippy_lints / src / redundant_pub_crate.rs
index 26075e9f70faa498d456dde4b9fbff350ab27b71..d612d249c2f000ab3c869952f1806ff491ac2450 100644 (file)
@@ -70,7 +70,8 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) {
         }
 
         if let ItemKind::Mod { .. } = item.kind {
-            self.is_exported.push(cx.effective_visibilities.is_exported(item.owner_id.def_id));
+            self.is_exported
+                .push(cx.effective_visibilities.is_exported(item.owner_id.def_id));
         }
     }
 
@@ -83,7 +84,7 @@ fn check_item_post(&mut self, _cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) {
 
 fn is_not_macro_export<'tcx>(item: &'tcx Item<'tcx>) -> bool {
     if let ItemKind::Use(path, _) = item.kind {
-        if let Res::Def(DefKind::Macro(MacroKind::Bang), _) = path.res {
+        if path.res.iter().all(|res| matches!(res, Res::Def(DefKind::Macro(MacroKind::Bang), _))) {
             return false;
         }
     } else if let ItemKind::Macro(..) = item.kind {