File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/tools/clippy/clippy_lints/src 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 {
49
49
if cx. tcx . visibility ( item. owner_id . def_id ) == ty:: Visibility :: Restricted ( CRATE_DEF_ID . to_def_id ( ) )
50
50
&& !cx. effective_visibilities . is_exported ( item. owner_id . def_id )
51
51
&& self . is_exported . last ( ) == Some ( & false )
52
- && is_not_macro_export ( item)
52
+ && ! is_macro_export ( item)
53
53
&& !item. span . in_external_macro ( cx. sess ( ) . source_map ( ) )
54
54
{
55
55
let span = item
@@ -86,18 +86,18 @@ impl<'tcx> LateLintPass<'tcx> for RedundantPubCrate {
86
86
}
87
87
}
88
88
89
- fn is_not_macro_export < ' tcx > ( item : & ' tcx Item < ' tcx > ) -> bool {
89
+ fn is_macro_export < ' tcx > ( item : & ' tcx Item < ' tcx > ) -> bool {
90
90
if let ItemKind :: Use ( path, _) = item. kind {
91
91
if path
92
92
. res
93
93
. iter ( )
94
94
. all ( |res| matches ! ( res, Res :: Def ( DefKind :: Macro ( MacroKind :: Bang ) , _) ) )
95
95
{
96
- return false ;
96
+ return true ;
97
97
}
98
98
} else if let ItemKind :: Macro ( ..) = item. kind {
99
- return false ;
99
+ return true ;
100
100
}
101
101
102
- true
102
+ false
103
103
}
You can’t perform that action at this time.
0 commit comments