@@ -605,15 +605,15 @@ struct MirBorrowckCtxt<'a, 'mir, 'cx, 'tcx> {
605605// 2. loans made in overlapping scopes do not conflict
606606// 3. assignments do not affect things loaned out as immutable
607607// 4. moves do not affect things loaned out in any way
608- impl < ' mir , ' tcx , R > rustc_mir_dataflow:: ResultsVisitor < ' mir , ' tcx , R >
609- for MirBorrowckCtxt < ' _ , ' mir , ' _ , ' tcx >
608+ impl < ' a , ' mir , ' tcx , R > rustc_mir_dataflow:: ResultsVisitor < ' mir , ' tcx , R >
609+ for MirBorrowckCtxt < ' a , ' mir , ' _ , ' tcx >
610610{
611- type FlowState = Flows < ' mir , ' tcx > ;
611+ type FlowState = Flows < ' a , ' mir , ' tcx > ;
612612
613613 fn visit_statement_before_primary_effect (
614614 & mut self ,
615615 _results : & mut R ,
616- flow_state : & Flows < ' mir , ' tcx > ,
616+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
617617 stmt : & ' mir Statement < ' tcx > ,
618618 location : Location ,
619619 ) {
@@ -683,7 +683,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
683683 fn visit_terminator_before_primary_effect (
684684 & mut self ,
685685 _results : & mut R ,
686- flow_state : & Flows < ' mir , ' tcx > ,
686+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
687687 term : & ' mir Terminator < ' tcx > ,
688688 loc : Location ,
689689 ) {
@@ -794,7 +794,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
794794 fn visit_terminator_after_primary_effect (
795795 & mut self ,
796796 _results : & mut R ,
797- flow_state : & Flows < ' mir , ' tcx > ,
797+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
798798 term : & ' mir Terminator < ' tcx > ,
799799 loc : Location ,
800800 ) {
@@ -988,7 +988,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
988988 place_span : ( Place < ' tcx > , Span ) ,
989989 kind : ( AccessDepth , ReadOrWrite ) ,
990990 is_local_mutation_allowed : LocalMutationIsAllowed ,
991- flow_state : & Flows < ' mir , ' tcx > ,
991+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
992992 ) {
993993 let ( sd, rw) = kind;
994994
@@ -1038,7 +1038,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
10381038 place_span : ( Place < ' tcx > , Span ) ,
10391039 sd : AccessDepth ,
10401040 rw : ReadOrWrite ,
1041- flow_state : & Flows < ' mir , ' tcx > ,
1041+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
10421042 ) -> bool {
10431043 let mut error_reported = false ;
10441044 let borrow_set = Rc :: clone ( & self . borrow_set ) ;
@@ -1179,7 +1179,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
11791179 location : Location ,
11801180 place_span : ( Place < ' tcx > , Span ) ,
11811181 kind : AccessDepth ,
1182- flow_state : & Flows < ' mir , ' tcx > ,
1182+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
11831183 ) {
11841184 // Write of P[i] or *P requires P init'd.
11851185 self . check_if_assigned_path_is_moved ( location, place_span, flow_state) ;
@@ -1197,7 +1197,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
11971197 & mut self ,
11981198 location : Location ,
11991199 ( rvalue, span) : ( & ' mir Rvalue < ' tcx > , Span ) ,
1200- flow_state : & Flows < ' mir , ' tcx > ,
1200+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
12011201 ) {
12021202 match rvalue {
12031203 & Rvalue :: Ref ( _ /*rgn*/ , bk, place) => {
@@ -1455,7 +1455,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
14551455 & mut self ,
14561456 location : Location ,
14571457 ( operand, span) : ( & ' mir Operand < ' tcx > , Span ) ,
1458- flow_state : & Flows < ' mir , ' tcx > ,
1458+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
14591459 ) {
14601460 match * operand {
14611461 Operand :: Copy ( place) => {
@@ -1579,7 +1579,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
15791579 & mut self ,
15801580 location : Location ,
15811581 span : Span ,
1582- flow_state : & Flows < ' mir , ' tcx > ,
1582+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
15831583 ) {
15841584 // Two-phase borrow support: For each activation that is newly
15851585 // generated at this statement, check if it interferes with
@@ -1743,7 +1743,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
17431743 location : Location ,
17441744 desired_action : InitializationRequiringAction ,
17451745 place_span : ( PlaceRef < ' tcx > , Span ) ,
1746- flow_state : & Flows < ' mir , ' tcx > ,
1746+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
17471747 ) {
17481748 let maybe_uninits = & flow_state. uninits ;
17491749
@@ -1848,7 +1848,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
18481848 location : Location ,
18491849 desired_action : InitializationRequiringAction ,
18501850 place_span : ( PlaceRef < ' tcx > , Span ) ,
1851- flow_state : & Flows < ' mir , ' tcx > ,
1851+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
18521852 ) {
18531853 let maybe_uninits = & flow_state. uninits ;
18541854
@@ -1947,7 +1947,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
19471947 & mut self ,
19481948 location : Location ,
19491949 ( place, span) : ( Place < ' tcx > , Span ) ,
1950- flow_state : & Flows < ' mir , ' tcx > ,
1950+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
19511951 ) {
19521952 debug ! ( "check_if_assigned_path_is_moved place: {:?}" , place) ;
19531953
@@ -2013,7 +2013,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
20132013 location : Location ,
20142014 base : PlaceRef < ' tcx > ,
20152015 span : Span ,
2016- flow_state : & Flows < ' mir , ' tcx > ,
2016+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
20172017 ) {
20182018 // rust-lang/rust#21232: Until Rust allows reads from the
20192019 // initialized parts of partially initialized structs, we
@@ -2104,7 +2104,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
21042104 ( place, span) : ( Place < ' tcx > , Span ) ,
21052105 kind : ReadOrWrite ,
21062106 is_local_mutation_allowed : LocalMutationIsAllowed ,
2107- flow_state : & Flows < ' mir , ' tcx > ,
2107+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
21082108 location : Location ,
21092109 ) -> bool {
21102110 debug ! (
@@ -2220,15 +2220,15 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
22202220 fn is_local_ever_initialized (
22212221 & self ,
22222222 local : Local ,
2223- flow_state : & Flows < ' mir , ' tcx > ,
2223+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
22242224 ) -> Option < InitIndex > {
22252225 let mpi = self . move_data . rev_lookup . find_local ( local) ?;
22262226 let ii = & self . move_data . init_path_map [ mpi] ;
22272227 ii. into_iter ( ) . find ( |& & index| flow_state. ever_inits . contains ( index) ) . copied ( )
22282228 }
22292229
22302230 /// Adds the place into the used mutable variables set
2231- fn add_used_mut ( & mut self , root_place : RootPlace < ' tcx > , flow_state : & Flows < ' mir , ' tcx > ) {
2231+ fn add_used_mut ( & mut self , root_place : RootPlace < ' tcx > , flow_state : & Flows < ' _ , ' mir , ' tcx > ) {
22322232 match root_place {
22332233 RootPlace { place_local : local, place_projection : [ ] , is_local_mutation_allowed } => {
22342234 // If the local may have been initialized, and it is now currently being
0 commit comments