@@ -468,11 +468,10 @@ crate struct MirBorrowckCtxt<'cx, 'tcx> {
468
468
/// `BTreeMap` is used to preserve the order of insertions when iterating. This is necessary
469
469
/// when errors in the map are being re-added to the error buffer so that errors with the
470
470
/// same primary span come out in a consistent order.
471
- move_error_reported :
472
- BTreeMap < Vec < MoveOutIndex > , ( PlaceRef < ' tcx , ' tcx > , DiagnosticBuilder < ' cx > ) > ,
471
+ move_error_reported : BTreeMap < Vec < MoveOutIndex > , ( PlaceRef < ' tcx > , DiagnosticBuilder < ' cx > ) > ,
473
472
/// This field keeps track of errors reported in the checking of uninitialized variables,
474
473
/// so that we don't report seemingly duplicate errors.
475
- uninitialized_error_reported : FxHashSet < PlaceRef < ' tcx , ' tcx > > ,
474
+ uninitialized_error_reported : FxHashSet < PlaceRef < ' tcx > > ,
476
475
/// Errors to be reported buffer
477
476
errors_buffer : Vec < Diagnostic > ,
478
477
/// This field keeps track of all the local variables that are declared mut and are mutated.
@@ -1528,7 +1527,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1528
1527
& mut self ,
1529
1528
location : Location ,
1530
1529
desired_action : InitializationRequiringAction ,
1531
- place_span : ( PlaceRef < ' tcx , ' tcx > , Span ) ,
1530
+ place_span : ( PlaceRef < ' tcx > , Span ) ,
1532
1531
flow_state : & Flows < ' cx , ' tcx > ,
1533
1532
) {
1534
1533
let maybe_uninits = & flow_state. uninits ;
@@ -1594,7 +1593,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1594
1593
& mut self ,
1595
1594
location : Location ,
1596
1595
desired_action : InitializationRequiringAction ,
1597
- place_span : ( PlaceRef < ' tcx , ' tcx > , Span ) ,
1596
+ place_span : ( PlaceRef < ' tcx > , Span ) ,
1598
1597
maybe_uninits : & BitSet < MovePathIndex > ,
1599
1598
from : u32 ,
1600
1599
to : u32 ,
@@ -1633,7 +1632,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1633
1632
& mut self ,
1634
1633
location : Location ,
1635
1634
desired_action : InitializationRequiringAction ,
1636
- place_span : ( PlaceRef < ' tcx , ' tcx > , Span ) ,
1635
+ place_span : ( PlaceRef < ' tcx > , Span ) ,
1637
1636
flow_state : & Flows < ' cx , ' tcx > ,
1638
1637
) {
1639
1638
let maybe_uninits = & flow_state. uninits ;
@@ -1711,10 +1710,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1711
1710
/// An Err result includes a tag indicated why the search failed.
1712
1711
/// Currently this can only occur if the place is built off of a
1713
1712
/// static variable, as we do not track those in the MoveData.
1714
- fn move_path_closest_to (
1715
- & mut self ,
1716
- place : PlaceRef < ' tcx , ' tcx > ,
1717
- ) -> ( PlaceRef < ' tcx , ' tcx > , MovePathIndex ) {
1713
+ fn move_path_closest_to ( & mut self , place : PlaceRef < ' tcx > ) -> ( PlaceRef < ' tcx > , MovePathIndex ) {
1718
1714
match self . move_data . rev_lookup . find ( place) {
1719
1715
LookupResult :: Parent ( Some ( mpi) ) | LookupResult :: Exact ( mpi) => {
1720
1716
( self . move_data . move_paths [ mpi] . place . as_ref ( ) , mpi)
@@ -1723,7 +1719,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1723
1719
}
1724
1720
}
1725
1721
1726
- fn move_path_for_place ( & mut self , place : PlaceRef < ' tcx , ' tcx > ) -> Option < MovePathIndex > {
1722
+ fn move_path_for_place ( & mut self , place : PlaceRef < ' tcx > ) -> Option < MovePathIndex > {
1727
1723
// If returns None, then there is no move path corresponding
1728
1724
// to a direct owner of `place` (which means there is nothing
1729
1725
// that borrowck tracks for its analysis).
@@ -1818,7 +1814,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1818
1814
fn check_parent_of_field < ' cx , ' tcx > (
1819
1815
this : & mut MirBorrowckCtxt < ' cx , ' tcx > ,
1820
1816
location : Location ,
1821
- base : PlaceRef < ' tcx , ' tcx > ,
1817
+ base : PlaceRef < ' tcx > ,
1822
1818
span : Span ,
1823
1819
flow_state : & Flows < ' cx , ' tcx > ,
1824
1820
) {
@@ -2067,9 +2063,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2067
2063
/// Returns the root place if the place passed in is a projection.
2068
2064
fn is_mutable (
2069
2065
& self ,
2070
- place : PlaceRef < ' tcx , ' tcx > ,
2066
+ place : PlaceRef < ' tcx > ,
2071
2067
is_local_mutation_allowed : LocalMutationIsAllowed ,
2072
- ) -> Result < RootPlace < ' tcx > , PlaceRef < ' tcx , ' tcx > > {
2068
+ ) -> Result < RootPlace < ' tcx > , PlaceRef < ' tcx > > {
2073
2069
match place {
2074
2070
PlaceRef { local, projection : [ ] } => {
2075
2071
let local = & self . body . local_decls [ local] ;
@@ -2220,7 +2216,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
2220
2216
/// then returns the index of the field being projected. Note that this closure will always
2221
2217
/// be `self` in the current MIR, because that is the only time we directly access the fields
2222
2218
/// of a closure type.
2223
- pub fn is_upvar_field_projection ( & self , place_ref : PlaceRef < ' tcx , ' tcx > ) -> Option < Field > {
2219
+ pub fn is_upvar_field_projection ( & self , place_ref : PlaceRef < ' tcx > ) -> Option < Field > {
2224
2220
let mut place_projection = place_ref. projection ;
2225
2221
let mut by_ref = false ;
2226
2222
0 commit comments