about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/validity.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-30 08:52:35 +0000
committerbors <bors@rust-lang.org>2022-10-30 08:52:35 +0000
commit962bf63dbfcb190bd752e2dbff7d133ab1101f5c (patch)
tree0d0567de3defda59316b51e53e7687b36025df6f /compiler/rustc_const_eval/src/interpret/validity.rs
parentc162fd36d250f1a76e00ffa55b9d827d0db7e0bc (diff)
parent0b49a5d17354c3b0980c3148f8291e429fc9a194 (diff)
downloadrust-962bf63dbfcb190bd752e2dbff7d133ab1101f5c.tar.gz
rust-962bf63dbfcb190bd752e2dbff7d133ab1101f5c.zip
Auto merge of #2639 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/validity.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/validity.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs
index d4146c24241..8aa56c275d9 100644
--- a/compiler/rustc_const_eval/src/interpret/validity.rs
+++ b/compiler/rustc_const_eval/src/interpret/validity.rs
@@ -15,7 +15,6 @@ use rustc_middle::mir::interpret::InterpError;
 use rustc_middle::ty;
 use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
 use rustc_span::symbol::{sym, Symbol};
-use rustc_span::DUMMY_SP;
 use rustc_target::abi::{Abi, Scalar as ScalarAbi, Size, VariantIdx, Variants, WrappingRange};
 
 use std::hash::Hash;
@@ -726,7 +725,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
     ) -> InterpResult<'tcx> {
         // Special check preventing `UnsafeCell` inside unions in the inner part of constants.
         if matches!(self.ctfe_mode, Some(CtfeValidationMode::Const { inner: true, .. })) {
-            if !op.layout.ty.is_freeze(self.ecx.tcx.at(DUMMY_SP), self.ecx.param_env) {
+            if !op.layout.ty.is_freeze(*self.ecx.tcx, self.ecx.param_env) {
                 throw_validation_failure!(self.path, { "`UnsafeCell` in a `const`" });
             }
         }