@@ -603,7 +603,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
603603 fn visit_statement_before_primary_effect (
604604 & mut self ,
605605 _results : & mut Results < ' tcx , Borrowck < ' a , ' tcx > > ,
606- state : & BorrowckDomain < ' a , ' tcx > ,
606+ state : & BorrowckDomain ,
607607 stmt : & ' a Statement < ' tcx > ,
608608 location : Location ,
609609 ) {
@@ -677,7 +677,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
677677 fn visit_terminator_before_primary_effect (
678678 & mut self ,
679679 _results : & mut Results < ' tcx , Borrowck < ' a , ' tcx > > ,
680- state : & BorrowckDomain < ' a , ' tcx > ,
680+ state : & BorrowckDomain ,
681681 term : & ' a Terminator < ' tcx > ,
682682 loc : Location ,
683683 ) {
@@ -790,7 +790,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
790790 fn visit_terminator_after_primary_effect (
791791 & mut self ,
792792 _results : & mut Results < ' tcx , Borrowck < ' a , ' tcx > > ,
793- state : & BorrowckDomain < ' a , ' tcx > ,
793+ state : & BorrowckDomain ,
794794 term : & ' a Terminator < ' tcx > ,
795795 loc : Location ,
796796 ) {
@@ -983,7 +983,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
983983 place_span : ( Place < ' tcx > , Span ) ,
984984 kind : ( AccessDepth , ReadOrWrite ) ,
985985 is_local_mutation_allowed : LocalMutationIsAllowed ,
986- state : & BorrowckDomain < ' a , ' tcx > ,
986+ state : & BorrowckDomain ,
987987 ) {
988988 let ( sd, rw) = kind;
989989
@@ -1032,7 +1032,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
10321032 place_span : ( Place < ' tcx > , Span ) ,
10331033 sd : AccessDepth ,
10341034 rw : ReadOrWrite ,
1035- state : & BorrowckDomain < ' a , ' tcx > ,
1035+ state : & BorrowckDomain ,
10361036 ) -> bool {
10371037 let mut error_reported = false ;
10381038
@@ -1172,7 +1172,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
11721172 location : Location ,
11731173 place_span : ( Place < ' tcx > , Span ) ,
11741174 kind : AccessDepth ,
1175- state : & BorrowckDomain < ' a , ' tcx > ,
1175+ state : & BorrowckDomain ,
11761176 ) {
11771177 // Write of P[i] or *P requires P init'd.
11781178 self . check_if_assigned_path_is_moved ( location, place_span, state) ;
@@ -1190,7 +1190,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
11901190 & mut self ,
11911191 location : Location ,
11921192 ( rvalue, span) : ( & ' a Rvalue < ' tcx > , Span ) ,
1193- state : & BorrowckDomain < ' a , ' tcx > ,
1193+ state : & BorrowckDomain ,
11941194 ) {
11951195 match rvalue {
11961196 & Rvalue :: Ref ( _ /*rgn*/ , bk, place) => {
@@ -1448,7 +1448,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
14481448 & mut self ,
14491449 location : Location ,
14501450 ( operand, span) : ( & ' a Operand < ' tcx > , Span ) ,
1451- state : & BorrowckDomain < ' a , ' tcx > ,
1451+ state : & BorrowckDomain ,
14521452 ) {
14531453 match * operand {
14541454 Operand :: Copy ( place) => {
@@ -1568,12 +1568,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
15681568 }
15691569 }
15701570
1571- fn check_activations (
1572- & mut self ,
1573- location : Location ,
1574- span : Span ,
1575- state : & BorrowckDomain < ' a , ' tcx > ,
1576- ) {
1571+ fn check_activations ( & mut self , location : Location , span : Span , state : & BorrowckDomain ) {
15771572 // Two-phase borrow support: For each activation that is newly
15781573 // generated at this statement, check if it interferes with
15791574 // another borrow.
@@ -1731,7 +1726,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
17311726 location : Location ,
17321727 desired_action : InitializationRequiringAction ,
17331728 place_span : ( PlaceRef < ' tcx > , Span ) ,
1734- state : & BorrowckDomain < ' a , ' tcx > ,
1729+ state : & BorrowckDomain ,
17351730 ) {
17361731 let maybe_uninits = & state. uninits ;
17371732
@@ -1836,7 +1831,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
18361831 location : Location ,
18371832 desired_action : InitializationRequiringAction ,
18381833 place_span : ( PlaceRef < ' tcx > , Span ) ,
1839- state : & BorrowckDomain < ' a , ' tcx > ,
1834+ state : & BorrowckDomain ,
18401835 ) {
18411836 let maybe_uninits = & state. uninits ;
18421837
@@ -1935,7 +1930,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
19351930 & mut self ,
19361931 location : Location ,
19371932 ( place, span) : ( Place < ' tcx > , Span ) ,
1938- state : & BorrowckDomain < ' a , ' tcx > ,
1933+ state : & BorrowckDomain ,
19391934 ) {
19401935 debug ! ( "check_if_assigned_path_is_moved place: {:?}" , place) ;
19411936
@@ -2001,7 +1996,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
20011996 location : Location ,
20021997 base : PlaceRef < ' tcx > ,
20031998 span : Span ,
2004- state : & BorrowckDomain < ' a , ' tcx > ,
1999+ state : & BorrowckDomain ,
20052000 ) {
20062001 // rust-lang/rust#21232: Until Rust allows reads from the
20072002 // initialized parts of partially initialized structs, we
@@ -2092,7 +2087,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
20922087 ( place, span) : ( Place < ' tcx > , Span ) ,
20932088 kind : ReadOrWrite ,
20942089 is_local_mutation_allowed : LocalMutationIsAllowed ,
2095- state : & BorrowckDomain < ' a , ' tcx > ,
2090+ state : & BorrowckDomain ,
20962091 location : Location ,
20972092 ) -> bool {
20982093 debug ! (
@@ -2206,18 +2201,14 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
22062201 }
22072202 }
22082203
2209- fn is_local_ever_initialized (
2210- & self ,
2211- local : Local ,
2212- state : & BorrowckDomain < ' a , ' tcx > ,
2213- ) -> Option < InitIndex > {
2204+ fn is_local_ever_initialized ( & self , local : Local , state : & BorrowckDomain ) -> Option < InitIndex > {
22142205 let mpi = self . move_data . rev_lookup . find_local ( local) ?;
22152206 let ii = & self . move_data . init_path_map [ mpi] ;
22162207 ii. into_iter ( ) . find ( |& & index| state. ever_inits . contains ( index) ) . copied ( )
22172208 }
22182209
22192210 /// Adds the place into the used mutable variables set
2220- fn add_used_mut ( & mut self , root_place : RootPlace < ' tcx > , state : & BorrowckDomain < ' a , ' tcx > ) {
2211+ fn add_used_mut ( & mut self , root_place : RootPlace < ' tcx > , state : & BorrowckDomain ) {
22212212 match root_place {
22222213 RootPlace { place_local : local, place_projection : [ ] , is_local_mutation_allowed } => {
22232214 // If the local may have been initialized, and it is now currently being
0 commit comments