@@ -81,6 +81,7 @@ struct MarkSymbolVisitor<'tcx> {
81
81
worklist : Vec < ( LocalDefId , ComesFromAllowExpect ) > ,
82
82
tcx : TyCtxt < ' tcx > ,
83
83
maybe_typeck_results : Option < & ' tcx ty:: TypeckResults < ' tcx > > ,
84
+ scanned : UnordSet < ( LocalDefId , ComesFromAllowExpect ) > ,
84
85
live_symbols : LocalDefIdSet ,
85
86
repr_unconditionally_treats_fields_as_live : bool ,
86
87
repr_has_repr_simd : bool ,
@@ -323,9 +324,8 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
323
324
}
324
325
325
326
fn mark_live_symbols ( & mut self ) {
326
- let mut scanned = UnordSet :: default ( ) ;
327
327
while let Some ( work) = self . worklist . pop ( ) {
328
- if !scanned. insert ( work) {
328
+ if !self . scanned . insert ( work) {
329
329
continue ;
330
330
}
331
331
@@ -830,6 +830,7 @@ fn live_symbols_and_ignored_derived_traits(
830
830
worklist,
831
831
tcx,
832
832
maybe_typeck_results : None ,
833
+ scanned : Default :: default ( ) ,
833
834
live_symbols : Default :: default ( ) ,
834
835
repr_unconditionally_treats_fields_as_live : false ,
835
836
repr_has_repr_simd : false ,
0 commit comments