diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-04-14 12:07:36 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-24 16:28:57 +0000 |
| commit | 0d88631059742db30c44edadd1c8a2f51c8eb971 (patch) | |
| tree | 2e4a074d805667c3b65c686e29b2bf40a5805ae7 /compiler/rustc_const_eval/src/interpret | |
| parent | 0fdaaadb36e0d25825cc01effbd923c3edf9d284 (diff) | |
| download | rust-0d88631059742db30c44edadd1c8a2f51c8eb971.tar.gz rust-0d88631059742db30c44edadd1c8a2f51c8eb971.zip | |
Add the transmute and asm checks to typeck as deferred checks
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index dc49a45fe73..4cd9fb1cb7e 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -910,12 +910,12 @@ where // array length computation, `typeck` may not have yet been run and errored out. In fact // most likely we *are* running `typeck` right now. Investigate whether we can bail out // on `typeck_results().has_errors` at all const eval entry points. - debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest); - self.tcx.sess.delay_span_bug( + span_bug!( self.cur_span(), - "size-changing transmute, should have been caught by transmute checking", + "size-changing transmute, should have been caught by transmute checking: {:#?}\ndest: {:#?}", + src, + dest ); - throw_inval!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty)); } // Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want // to avoid that here. |
