diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-23 11:03:39 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-23 11:03:39 +0100 |
| commit | e619b85776feca7ae484c42dff1e37e0844aa06c (patch) | |
| tree | a4167fced4fa7bad6c6be17594ba1b3484527ad8 | |
| parent | 410385dfd0532f3e8867afaaa4b89c315b0e84b1 (diff) | |
| download | rust-e619b85776feca7ae484c42dff1e37e0844aa06c.tar.gz rust-e619b85776feca7ae484c42dff1e37e0844aa06c.zip | |
make sure we are checking the size of the right thing
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index 010b73db9ac..bd7d2c57509 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -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(_)) |
