@@ -11,9 +11,8 @@ use crate::elaborate_drops::DropFlagState;
11
11
use crate :: framework:: SwitchIntEdgeEffects ;
12
12
use crate :: move_paths:: { HasMoveData , InitIndex , InitKind , LookupResult , MoveData , MovePathIndex } ;
13
13
use crate :: {
14
- Analysis , AnalysisDomain , GenKill , MaybeReachable , drop_flag_effects,
15
- drop_flag_effects_for_function_entry, drop_flag_effects_for_location, lattice,
16
- on_all_children_bits, on_lookup_result_bits,
14
+ Analysis , GenKill , MaybeReachable , drop_flag_effects, drop_flag_effects_for_function_entry,
15
+ drop_flag_effects_for_location, lattice, on_all_children_bits, on_lookup_result_bits,
17
16
} ;
18
17
19
18
/// `MaybeInitializedPlaces` tracks all places that might be
@@ -270,7 +269,7 @@ impl<'tcx> HasMoveData<'tcx> for EverInitializedPlaces<'_, 'tcx> {
270
269
271
270
impl < ' a , ' tcx > MaybeInitializedPlaces < ' a , ' tcx > {
272
271
fn update_bits (
273
- trans : & mut <Self as AnalysisDomain < ' tcx > >:: Domain ,
272
+ trans : & mut <Self as Analysis < ' tcx > >:: Domain ,
274
273
path : MovePathIndex ,
275
274
state : DropFlagState ,
276
275
) {
@@ -283,7 +282,7 @@ impl<'a, 'tcx> MaybeInitializedPlaces<'a, 'tcx> {
283
282
284
283
impl < ' tcx > MaybeUninitializedPlaces < ' _ , ' tcx > {
285
284
fn update_bits (
286
- trans : & mut <Self as AnalysisDomain < ' tcx > >:: Domain ,
285
+ trans : & mut <Self as Analysis < ' tcx > >:: Domain ,
287
286
path : MovePathIndex ,
288
287
state : DropFlagState ,
289
288
) {
@@ -296,7 +295,7 @@ impl<'tcx> MaybeUninitializedPlaces<'_, 'tcx> {
296
295
297
296
impl < ' a , ' tcx > DefinitelyInitializedPlaces < ' a , ' tcx > {
298
297
fn update_bits (
299
- trans : & mut <Self as AnalysisDomain < ' tcx > >:: Domain ,
298
+ trans : & mut <Self as Analysis < ' tcx > >:: Domain ,
300
299
path : MovePathIndex ,
301
300
state : DropFlagState ,
302
301
) {
@@ -307,7 +306,7 @@ impl<'a, 'tcx> DefinitelyInitializedPlaces<'a, 'tcx> {
307
306
}
308
307
}
309
308
310
- impl < ' tcx > AnalysisDomain < ' tcx > for MaybeInitializedPlaces < ' _ , ' tcx > {
309
+ impl < ' tcx > Analysis < ' tcx > for MaybeInitializedPlaces < ' _ , ' tcx > {
311
310
/// There can be many more `MovePathIndex` than there are locals in a MIR body.
312
311
/// We use a chunked bitset to avoid paying too high a memory footprint.
313
312
type Domain = MaybeReachable < ChunkedBitSet < MovePathIndex > > ;
@@ -327,9 +326,7 @@ impl<'tcx> AnalysisDomain<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
327
326
state. gen_ ( path) ;
328
327
} ) ;
329
328
}
330
- }
331
329
332
- impl < ' tcx > Analysis < ' tcx > for MaybeInitializedPlaces < ' _ , ' tcx > {
333
330
fn apply_statement_effect (
334
331
& mut self ,
335
332
trans : & mut Self :: Domain ,
@@ -436,7 +433,7 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
436
433
}
437
434
}
438
435
439
- impl < ' tcx > AnalysisDomain < ' tcx > for MaybeUninitializedPlaces < ' _ , ' tcx > {
436
+ impl < ' tcx > Analysis < ' tcx > for MaybeUninitializedPlaces < ' _ , ' tcx > {
440
437
/// There can be many more `MovePathIndex` than there are locals in a MIR body.
441
438
/// We use a chunked bitset to avoid paying too high a memory footprint.
442
439
type Domain = ChunkedBitSet < MovePathIndex > ;
@@ -458,9 +455,7 @@ impl<'tcx> AnalysisDomain<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
458
455
state. remove ( path) ;
459
456
} ) ;
460
457
}
461
- }
462
458
463
- impl < ' tcx > Analysis < ' tcx > for MaybeUninitializedPlaces < ' _ , ' tcx > {
464
459
fn apply_statement_effect (
465
460
& mut self ,
466
461
trans : & mut Self :: Domain ,
@@ -559,7 +554,7 @@ impl<'tcx> Analysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx> {
559
554
}
560
555
}
561
556
562
- impl < ' a , ' tcx > AnalysisDomain < ' tcx > for DefinitelyInitializedPlaces < ' a , ' tcx > {
557
+ impl < ' a , ' tcx > Analysis < ' tcx > for DefinitelyInitializedPlaces < ' a , ' tcx > {
563
558
/// Use set intersection as the join operator.
564
559
type Domain = lattice:: Dual < BitSet < MovePathIndex > > ;
565
560
@@ -579,9 +574,7 @@ impl<'a, 'tcx> AnalysisDomain<'tcx> for DefinitelyInitializedPlaces<'a, 'tcx> {
579
574
state. 0 . insert ( path) ;
580
575
} ) ;
581
576
}
582
- }
583
577
584
- impl < ' tcx > Analysis < ' tcx > for DefinitelyInitializedPlaces < ' _ , ' tcx > {
585
578
fn apply_statement_effect (
586
579
& mut self ,
587
580
trans : & mut Self :: Domain ,
@@ -625,7 +618,7 @@ impl<'tcx> Analysis<'tcx> for DefinitelyInitializedPlaces<'_, 'tcx> {
625
618
}
626
619
}
627
620
628
- impl < ' tcx > AnalysisDomain < ' tcx > for EverInitializedPlaces < ' _ , ' tcx > {
621
+ impl < ' tcx > Analysis < ' tcx > for EverInitializedPlaces < ' _ , ' tcx > {
629
622
/// There can be many more `InitIndex` than there are locals in a MIR body.
630
623
/// We use a chunked bitset to avoid paying too high a memory footprint.
631
624
type Domain = ChunkedBitSet < InitIndex > ;
@@ -642,9 +635,7 @@ impl<'tcx> AnalysisDomain<'tcx> for EverInitializedPlaces<'_, 'tcx> {
642
635
state. insert ( InitIndex :: new ( arg_init) ) ;
643
636
}
644
637
}
645
- }
646
638
647
- impl < ' tcx > Analysis < ' tcx > for EverInitializedPlaces < ' _ , ' tcx > {
648
639
#[ instrument( skip( self , trans) , level = "debug" ) ]
649
640
fn apply_statement_effect (
650
641
& mut self ,
0 commit comments