Skip to content

Commit 89fa3e7

Browse files
committed
Auto merge of rust-lang#103727 - GuillaumeGomez:rollup-hfyxccr, r=GuillaumeGomez
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
2 parents fc6741c + 42a33ad commit 89fa3e7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/stacked_borrows/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc_middle::ty::{
1616
layout::{HasParamEnv, LayoutOf},
1717
Ty,
1818
};
19-
use rustc_span::DUMMY_SP;
2019
use rustc_target::abi::Abi;
2120
use rustc_target::abi::Size;
2221
use smallvec::SmallVec;
@@ -714,12 +713,12 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
714713
let mut kind_str = format!("{kind}");
715714
match kind {
716715
RefKind::Unique { two_phase: false }
717-
if !ty.is_unpin(this.tcx.at(DUMMY_SP), this.param_env()) =>
716+
if !ty.is_unpin(*this.tcx, this.param_env()) =>
718717
{
719718
write!(kind_str, " (!Unpin pointee type {ty})").unwrap()
720719
},
721720
RefKind::Shared
722-
if !ty.is_freeze(this.tcx.at(DUMMY_SP), this.param_env()) =>
721+
if !ty.is_freeze(*this.tcx, this.param_env()) =>
723722
{
724723
write!(kind_str, " (!Freeze pointee type {ty})").unwrap()
725724
},
@@ -834,7 +833,7 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
834833
// There could be existing unique pointers reborrowed from them that should remain valid!
835834
let perm = match kind {
836835
RefKind::Unique { two_phase: false }
837-
if place.layout.ty.is_unpin(this.tcx.at(DUMMY_SP), this.param_env()) =>
836+
if place.layout.ty.is_unpin(*this.tcx, this.param_env()) =>
838837
{
839838
// Only if the type is unpin do we actually enforce uniqueness
840839
Permission::Unique

0 commit comments

Comments
 (0)