Skip to content

Commit e619b85

Browse files
committed
make sure we are checking the size of the right thing
1 parent 410385d commit e619b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/mir/interpret/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ impl InterpError<'_> {
578578
pub fn allocates(&self) -> bool {
579579
match self {
580580
// Zero-sized boxes do not allocate.
581-
InterpError::MachineStop(b) => mem::size_of_val(&**b) > 0,
581+
InterpError::MachineStop(b) => mem::size_of_val::<dyn MachineStopType>(&**b) > 0,
582582
InterpError::Unsupported(UnsupportedOpInfo::Unsupported(_))
583583
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure(_))
584584
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_))

0 commit comments

Comments
 (0)