about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-06-28 02:19:52 -0700
committerDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-06-28 02:19:52 -0700
commit9f9c31171888150912487d97dba19c6586007310 (patch)
treecd8ad0bf2fda1d8c64344aa6edf09aefc0fe2dc5 /compiler/rustc_const_eval/src
parentd317988505cade110cc8c9f1d03e6a98622f10bd (diff)
downloadrust-9f9c31171888150912487d97dba19c6586007310.tar.gz
rust-9f9c31171888150912487d97dba19c6586007310.zip
Validate all fields of box instead of validating allocator specifically
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/validity.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs
index 00e4472721f..702954884a0 100644
--- a/compiler/rustc_const_eval/src/interpret/validity.rs
+++ b/compiler/rustc_const_eval/src/interpret/validity.rs
@@ -599,8 +599,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
                 let ptr = self.ecx.operand_field(&nonnull, 0)?;
                 self.check_safe_pointer(&ptr, "box")?;
 
-                let allocator = self.ecx.operand_field(value, 1)?;
-                self.visit_field(value, 1, &allocator)?;
+                // Check other fields of Box
+                self.walk_value(op)?;
                 Ok(true)
             }
             ty::FnPtr(_sig) => {