diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 702954884a08..905ab6cb578f 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -600,7 +600,7 @@ fn try_visit_primitive( self.check_safe_pointer(&ptr, "box")?; // Check other fields of Box - self.walk_value(op)?; + self.walk_value(value)?; Ok(true) } ty::FnPtr(_sig) => {