Skip to content

Commit

Permalink
make sure we are checking the size of the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 23, 2020
1 parent 410385d commit e619b85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/mir/interpret/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_))
Expand Down

0 comments on commit e619b85

Please sign in to comment.