@@ -605,15 +605,15 @@ struct MirBorrowckCtxt<'a, 'mir, 'cx, 'tcx> {
605
605
// 2. loans made in overlapping scopes do not conflict
606
606
// 3. assignments do not affect things loaned out as immutable
607
607
// 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 >
610
610
{
611
- type FlowState = Flows < ' mir , ' tcx > ;
611
+ type FlowState = Flows < ' a , ' mir , ' tcx > ;
612
612
613
613
fn visit_statement_before_primary_effect (
614
614
& mut self ,
615
615
_results : & mut R ,
616
- flow_state : & Flows < ' mir , ' tcx > ,
616
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
617
617
stmt : & ' mir Statement < ' tcx > ,
618
618
location : Location ,
619
619
) {
@@ -683,7 +683,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
683
683
fn visit_terminator_before_primary_effect (
684
684
& mut self ,
685
685
_results : & mut R ,
686
- flow_state : & Flows < ' mir , ' tcx > ,
686
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
687
687
term : & ' mir Terminator < ' tcx > ,
688
688
loc : Location ,
689
689
) {
@@ -794,7 +794,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
794
794
fn visit_terminator_after_primary_effect (
795
795
& mut self ,
796
796
_results : & mut R ,
797
- flow_state : & Flows < ' mir , ' tcx > ,
797
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
798
798
term : & ' mir Terminator < ' tcx > ,
799
799
loc : Location ,
800
800
) {
@@ -988,7 +988,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
988
988
place_span : ( Place < ' tcx > , Span ) ,
989
989
kind : ( AccessDepth , ReadOrWrite ) ,
990
990
is_local_mutation_allowed : LocalMutationIsAllowed ,
991
- flow_state : & Flows < ' mir , ' tcx > ,
991
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
992
992
) {
993
993
let ( sd, rw) = kind;
994
994
@@ -1038,7 +1038,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1038
1038
place_span : ( Place < ' tcx > , Span ) ,
1039
1039
sd : AccessDepth ,
1040
1040
rw : ReadOrWrite ,
1041
- flow_state : & Flows < ' mir , ' tcx > ,
1041
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1042
1042
) -> bool {
1043
1043
let mut error_reported = false ;
1044
1044
let borrow_set = Rc :: clone ( & self . borrow_set ) ;
@@ -1179,7 +1179,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1179
1179
location : Location ,
1180
1180
place_span : ( Place < ' tcx > , Span ) ,
1181
1181
kind : AccessDepth ,
1182
- flow_state : & Flows < ' mir , ' tcx > ,
1182
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1183
1183
) {
1184
1184
// Write of P[i] or *P requires P init'd.
1185
1185
self . check_if_assigned_path_is_moved ( location, place_span, flow_state) ;
@@ -1197,7 +1197,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1197
1197
& mut self ,
1198
1198
location : Location ,
1199
1199
( rvalue, span) : ( & ' mir Rvalue < ' tcx > , Span ) ,
1200
- flow_state : & Flows < ' mir , ' tcx > ,
1200
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1201
1201
) {
1202
1202
match rvalue {
1203
1203
& Rvalue :: Ref ( _ /*rgn*/ , bk, place) => {
@@ -1455,7 +1455,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1455
1455
& mut self ,
1456
1456
location : Location ,
1457
1457
( operand, span) : ( & ' mir Operand < ' tcx > , Span ) ,
1458
- flow_state : & Flows < ' mir , ' tcx > ,
1458
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1459
1459
) {
1460
1460
match * operand {
1461
1461
Operand :: Copy ( place) => {
@@ -1579,7 +1579,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1579
1579
& mut self ,
1580
1580
location : Location ,
1581
1581
span : Span ,
1582
- flow_state : & Flows < ' mir , ' tcx > ,
1582
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1583
1583
) {
1584
1584
// Two-phase borrow support: For each activation that is newly
1585
1585
// generated at this statement, check if it interferes with
@@ -1743,7 +1743,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1743
1743
location : Location ,
1744
1744
desired_action : InitializationRequiringAction ,
1745
1745
place_span : ( PlaceRef < ' tcx > , Span ) ,
1746
- flow_state : & Flows < ' mir , ' tcx > ,
1746
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1747
1747
) {
1748
1748
let maybe_uninits = & flow_state. uninits ;
1749
1749
@@ -1848,7 +1848,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1848
1848
location : Location ,
1849
1849
desired_action : InitializationRequiringAction ,
1850
1850
place_span : ( PlaceRef < ' tcx > , Span ) ,
1851
- flow_state : & Flows < ' mir , ' tcx > ,
1851
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1852
1852
) {
1853
1853
let maybe_uninits = & flow_state. uninits ;
1854
1854
@@ -1947,7 +1947,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
1947
1947
& mut self ,
1948
1948
location : Location ,
1949
1949
( place, span) : ( Place < ' tcx > , Span ) ,
1950
- flow_state : & Flows < ' mir , ' tcx > ,
1950
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
1951
1951
) {
1952
1952
debug ! ( "check_if_assigned_path_is_moved place: {:?}" , place) ;
1953
1953
@@ -2013,7 +2013,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
2013
2013
location : Location ,
2014
2014
base : PlaceRef < ' tcx > ,
2015
2015
span : Span ,
2016
- flow_state : & Flows < ' mir , ' tcx > ,
2016
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
2017
2017
) {
2018
2018
// rust-lang/rust#21232: Until Rust allows reads from the
2019
2019
// initialized parts of partially initialized structs, we
@@ -2104,7 +2104,7 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
2104
2104
( place, span) : ( Place < ' tcx > , Span ) ,
2105
2105
kind : ReadOrWrite ,
2106
2106
is_local_mutation_allowed : LocalMutationIsAllowed ,
2107
- flow_state : & Flows < ' mir , ' tcx > ,
2107
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
2108
2108
location : Location ,
2109
2109
) -> bool {
2110
2110
debug ! (
@@ -2220,15 +2220,15 @@ impl<'mir, 'tcx> MirBorrowckCtxt<'_, 'mir, '_, 'tcx> {
2220
2220
fn is_local_ever_initialized (
2221
2221
& self ,
2222
2222
local : Local ,
2223
- flow_state : & Flows < ' mir , ' tcx > ,
2223
+ flow_state : & Flows < ' _ , ' mir , ' tcx > ,
2224
2224
) -> Option < InitIndex > {
2225
2225
let mpi = self . move_data . rev_lookup . find_local ( local) ?;
2226
2226
let ii = & self . move_data . init_path_map [ mpi] ;
2227
2227
ii. into_iter ( ) . find ( |& & index| flow_state. ever_inits . contains ( index) ) . copied ( )
2228
2228
}
2229
2229
2230
2230
/// 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 > ) {
2232
2232
match root_place {
2233
2233
RootPlace { place_local : local, place_projection : [ ] , is_local_mutation_allowed } => {
2234
2234
// If the local may have been initialized, and it is now currently being
0 commit comments