File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantPubCrate {
4949 if cx. tcx . visibility ( item. owner_id . def_id ) == ty:: Visibility :: Restricted ( CRATE_DEF_ID . to_def_id ( ) )
5050 && !cx. effective_visibilities . is_exported ( item. owner_id . def_id )
5151 && self . is_exported . last ( ) == Some ( & false )
52- && is_not_macro_export ( item)
52+ && ! is_macro_export ( item)
5353 && !item. span . in_external_macro ( cx. sess ( ) . source_map ( ) )
5454 {
5555 let span = item
@@ -86,18 +86,18 @@ impl<'tcx> LateLintPass<'tcx> for RedundantPubCrate {
8686 }
8787}
8888
89- fn is_not_macro_export < ' tcx > ( item : & ' tcx Item < ' tcx > ) -> bool {
89+ fn is_macro_export < ' tcx > ( item : & ' tcx Item < ' tcx > ) -> bool {
9090 if let ItemKind :: Use ( path, _) = item. kind {
9191 if path
9292 . res
9393 . iter ( )
9494 . all ( |res| matches ! ( res, Res :: Def ( DefKind :: Macro ( MacroKind :: Bang ) , _) ) )
9595 {
96- return false ;
96+ return true ;
9797 }
9898 } else if let ItemKind :: Macro ( ..) = item. kind {
99- return false ;
99+ return true ;
100100 }
101101
102- true
102+ false
103103}
You can’t perform that action at this time.
0 commit comments