Skip to content

Commit fbc1a63

Browse files
committed
Auto merge of #3014 - RalfJung:rustup, r=RalfJung
Rustup
2 parents af441ee + 1c3808a commit fbc1a63

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a7caaae9fbef81325887aea060fc551da4589c6f
1+
fca59ab5f0e7df7d816bed77a32abc0045ebe80b

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ use log::trace;
1313

1414
use rustc_data_structures::fx::FxHashSet;
1515
use rustc_middle::mir::{Mutability, RetagKind};
16-
use rustc_middle::ty::{
17-
self,
18-
layout::{HasParamEnv, LayoutOf},
19-
Ty,
20-
};
16+
use rustc_middle::ty::{self, layout::HasParamEnv, Ty};
2117
use rustc_target::abi::{Abi, Align, Size};
2218

2319
use crate::borrow_tracker::{
@@ -993,8 +989,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
993989

994990
// We have to turn the place into a pointer to use the usual retagging logic.
995991
// (The pointer type does not matter, so we use a raw pointer.)
996-
let ptr_layout = this.layout_of(Ty::new_mut_ptr(this.tcx.tcx, place.layout.ty))?;
997-
let ptr = ImmTy::from_immediate(place.to_ref(this), ptr_layout);
992+
let ptr = this.mplace_to_ref(place)?;
998993
// Reborrow it. With protection! That is the entire point.
999994
let new_perm = NewPermission::Uniform {
1000995
perm: Permission::Unique,

src/borrow_tracker/tree_borrows/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ use rustc_target::abi::{Abi, Align, Size};
55
use crate::borrow_tracker::{AccessKind, GlobalStateInner, ProtectorKind, RetagFields};
66
use rustc_middle::{
77
mir::{Mutability, RetagKind},
8-
ty::{
9-
self,
10-
layout::{HasParamEnv, LayoutOf},
11-
Ty,
12-
},
8+
ty::{self, layout::HasParamEnv, Ty},
139
};
1410
use rustc_span::def_id::DefId;
1511

@@ -493,8 +489,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
493489

494490
// We have to turn the place into a pointer to use the usual retagging logic.
495491
// (The pointer type does not matter, so we use a raw pointer.)
496-
let ptr_layout = this.layout_of(Ty::new_mut_ptr(this.tcx.tcx, place.layout.ty))?;
497-
let ptr = ImmTy::from_immediate(place.to_ref(this), ptr_layout);
492+
let ptr = this.mplace_to_ref(place)?;
498493
// Reborrow it. With protection! That is the entire point.
499494
let new_perm = NewPermission {
500495
initial_state: Permission::new_active(),

0 commit comments

Comments
 (0)