mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
make sure we are checking the size of the right thing
This commit is contained in:
parent
410385dfd0
commit
e619b85776
@ -578,7 +578,7 @@ impl InterpError<'_> {
|
||||
pub fn allocates(&self) -> bool {
|
||||
match self {
|
||||
// Zero-sized boxes do not allocate.
|
||||
InterpError::MachineStop(b) => mem::size_of_val(&**b) > 0,
|
||||
InterpError::MachineStop(b) => mem::size_of_val::<dyn MachineStopType>(&**b) > 0,
|
||||
InterpError::Unsupported(UnsupportedOpInfo::Unsupported(_))
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure(_))
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_))
|
||||
|
Loading…
Reference in New Issue
Block a user