Skip to content

Commit

Permalink
Auto merge of rust-lang#103727 - GuillaumeGomez:rollup-hfyxccr, r=Gui…
Browse files Browse the repository at this point in the history
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#102634 (compiletest: Refactor test rustcflags)
 - rust-lang#102721 (Prevent foreign Rust exceptions from being caught)
 - rust-lang#103415 (filter candidates in pick probe for diagnostics)
 - rust-lang#103618 (Rename some `OwnerId` fields.)
 - rust-lang#103625 (Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions)
 - rust-lang#103653 (Add missing impl blocks for item reexported from private mod in JSON output)
 - rust-lang#103699 (Emit proper error when casting to `dyn*`)
 - rust-lang#103719 (fix typo in `try_reserve` method from `HashMap` and `HashSet`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Oct 29, 2022
2 parents fc6741c + 42a33ad commit 89fa3e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/stacked_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use rustc_middle::ty::{
layout::{HasParamEnv, LayoutOf},
Ty,
};
use rustc_span::DUMMY_SP;
use rustc_target::abi::Abi;
use rustc_target::abi::Size;
use smallvec::SmallVec;
Expand Down Expand Up @@ -714,12 +713,12 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
let mut kind_str = format!("{kind}");
match kind {
RefKind::Unique { two_phase: false }
if !ty.is_unpin(this.tcx.at(DUMMY_SP), this.param_env()) =>
if !ty.is_unpin(*this.tcx, this.param_env()) =>
{
write!(kind_str, " (!Unpin pointee type {ty})").unwrap()
},
RefKind::Shared
if !ty.is_freeze(this.tcx.at(DUMMY_SP), this.param_env()) =>
if !ty.is_freeze(*this.tcx, this.param_env()) =>
{
write!(kind_str, " (!Freeze pointee type {ty})").unwrap()
},
Expand Down Expand Up @@ -834,7 +833,7 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
// There could be existing unique pointers reborrowed from them that should remain valid!
let perm = match kind {
RefKind::Unique { two_phase: false }
if place.layout.ty.is_unpin(this.tcx.at(DUMMY_SP), this.param_env()) =>
if place.layout.ty.is_unpin(*this.tcx, this.param_env()) =>
{
// Only if the type is unpin do we actually enforce uniqueness
Permission::Unique
Expand Down

0 comments on commit 89fa3e7

Please sign in to comment.