about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/terminator.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-21 17:33:10 -0400
committerMichael Goulet <michael@errs.io>2024-03-22 11:13:29 -0400
commit7be0dbe77292de955da02fe1de1626bdd2e4cc0a (patch)
treebe790699979e783668fcaca21d48c6982983b13e /compiler/rustc_const_eval/src/interpret/terminator.rs
parentff0c31e6b9bc8e847c3b1b9d61793325edfacf47 (diff)
downloadrust-7be0dbe77292de955da02fe1de1626bdd2e4cc0a.tar.gz
rust-7be0dbe77292de955da02fe1de1626bdd2e4cc0a.zip
Make RawPtr take Ty and Mutbl separately
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/terminator.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/terminator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs
index 82fb7ff1840..c0e27e86d50 100644
--- a/compiler/rustc_const_eval/src/interpret/terminator.rs
+++ b/compiler/rustc_const_eval/src/interpret/terminator.rs
@@ -375,7 +375,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
             // We cannot use `builtin_deref` here since we need to reject `Box<T, MyAlloc>`.
             Ok(Some(match ty.kind() {
                 ty::Ref(_, ty, _) => *ty,
-                ty::RawPtr(mt) => mt.ty,
+                ty::RawPtr(ty, _) => *ty,
                 // We only accept `Box` with the default allocator.
                 _ if ty.is_box_global(*self.tcx) => ty.boxed_ty(),
                 _ => return Ok(None),