@@ -672,7 +672,7 @@ struct MirUsedCollector<'a, 'tcx> {
672
672
visiting_call_terminator : bool ,
673
673
/// Set of functions for which it is OK to move large data into.
674
674
skip_move_check_fns : Option < Vec < DefId > > ,
675
- reachable_blocks : Option < & ' tcx BitSet < mir:: BasicBlock > > ,
675
+ reachable_blocks : Option < BitSet < mir:: BasicBlock > > ,
676
676
}
677
677
678
678
impl < ' a , ' tcx > MirUsedCollector < ' a , ' tcx > {
@@ -836,6 +836,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
836
836
fn visit_basic_block_data ( & mut self , block : mir:: BasicBlock , data : & mir:: BasicBlockData < ' tcx > ) {
837
837
if self
838
838
. reachable_blocks
839
+ . as_ref ( )
839
840
. expect ( "we should only walk blocks with CollectionMode::UsedItems" )
840
841
. contains ( block)
841
842
{
@@ -1414,6 +1415,7 @@ fn collect_items_of_instance<'tcx>(
1414
1415
// added to `used_items` in a hash set, which can efficiently query in the
1415
1416
// `body.mentioned_items` loop below without even having to monomorphize the item.
1416
1417
let mut used_mentioned_items = FxHashSet :: < MentionedItem < ' tcx > > :: default ( ) ;
1418
+
1417
1419
let mut collector = MirUsedCollector {
1418
1420
tcx,
1419
1421
body,
@@ -1424,7 +1426,7 @@ fn collect_items_of_instance<'tcx>(
1424
1426
visiting_call_terminator : false ,
1425
1427
skip_move_check_fns : None ,
1426
1428
reachable_blocks : if mode == CollectionMode :: UsedItems {
1427
- Some ( tcx . reachable_blocks ( instance) )
1429
+ Some ( rustc_middle :: mir :: traversal :: reachable_blocks ( tcx , instance) )
1428
1430
} else {
1429
1431
None
1430
1432
} ,
0 commit comments