@@ -278,9 +278,8 @@ impl<'a, 'ra, 'tcx> EffectiveVisibilitiesVisitor<'a, 'ra, 'tcx> {
278278 // all the parents in the loop below are also guaranteed to be modules.
279279 let mut module_def_id = macro_module_def_id;
280280 loop {
281- let changed_reachability =
282- self . update_macro_reachable ( module_def_id, macro_module_def_id, macro_ev) ;
283- if changed_reachability || module_def_id == CRATE_DEF_ID {
281+ self . update_macro_reachable ( module_def_id, macro_module_def_id, macro_ev) ;
282+ if module_def_id == CRATE_DEF_ID {
284283 break ;
285284 }
286285 module_def_id = self . r . tcx . local_parent ( module_def_id) ;
@@ -294,7 +293,7 @@ impl<'a, 'ra, 'tcx> EffectiveVisibilitiesVisitor<'a, 'ra, 'tcx> {
294293 module_def_id : LocalDefId ,
295294 defining_mod : LocalDefId ,
296295 macro_ev : EffectiveVisibility ,
297- ) -> bool {
296+ ) {
298297 if self . macro_reachable . insert ( ( module_def_id, defining_mod) ) {
299298 let module = self . r . expect_module ( module_def_id. to_def_id ( ) ) ;
300299 for ( _, name_resolution) in self . r . resolutions ( module) . borrow ( ) . iter ( ) {
@@ -311,9 +310,6 @@ impl<'a, 'ra, 'tcx> EffectiveVisibilitiesVisitor<'a, 'ra, 'tcx> {
311310 self . update_macro_reachable_def ( def_id, def_kind, vis, defining_mod, macro_ev) ;
312311 }
313312 }
314- true
315- } else {
316- false
317313 }
318314 }
319315
0 commit comments