Skip to content

Commit a20d54f

Browse files
committed
Make PlaceRef lifetimes of RootPlace be both 'tcx
1 parent 2af5e87 commit a20d54f

File tree

1 file changed

+6
-6
lines changed
  • src/librustc_mir/borrow_check

1 file changed

+6
-6
lines changed

src/librustc_mir/borrow_check/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,9 @@ enum InitializationRequiringAction {
841841
PartialAssignment,
842842
}
843843

844-
struct RootPlace<'d, 'tcx> {
844+
struct RootPlace<'tcx> {
845845
place_local: Local,
846-
place_projection: &'d [PlaceElem<'tcx>],
846+
place_projection: &'tcx [PlaceElem<'tcx>],
847847
is_local_mutation_allowed: LocalMutationIsAllowed,
848848
}
849849

@@ -2029,7 +2029,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
20292029
}
20302030

20312031
/// Adds the place into the used mutable variables set
2032-
fn add_used_mut<'d>(&mut self, root_place: RootPlace<'d, 'tcx>, flow_state: &Flows<'cx, 'tcx>) {
2032+
fn add_used_mut(&mut self, root_place: RootPlace<'tcx>, flow_state: &Flows<'cx, 'tcx>) {
20332033
match root_place {
20342034
RootPlace { place_local: local, place_projection: [], is_local_mutation_allowed } => {
20352035
// If the local may have been initialized, and it is now currently being
@@ -2063,11 +2063,11 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
20632063

20642064
/// Whether this value can be written or borrowed mutably.
20652065
/// Returns the root place if the place passed in is a projection.
2066-
fn is_mutable<'d>(
2066+
fn is_mutable(
20672067
&self,
2068-
place: PlaceRef<'d, 'tcx>,
2068+
place: PlaceRef<'tcx, 'tcx>,
20692069
is_local_mutation_allowed: LocalMutationIsAllowed,
2070-
) -> Result<RootPlace<'d, 'tcx>, PlaceRef<'d, 'tcx>> {
2070+
) -> Result<RootPlace<'tcx>, PlaceRef<'tcx, 'tcx>> {
20712071
match place {
20722072
PlaceRef { local, projection: [] } => {
20732073
let local = &self.body.local_decls[local];

0 commit comments

Comments
 (0)