add delay_span_bug to TransmuteSizeDiff, just to be sure
This commit is contained in:
parent
57e1da59cd
commit
4a2d54d07d
1 changed files with 4 additions and 0 deletions
|
|
@ -926,6 +926,10 @@ where
|
|||
// most likey we *are* running `typeck` right now. Investigate whether we can bail out
|
||||
// on `typeck_tables().has_errors` at all const eval entry points.
|
||||
debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.span,
|
||||
"size-changing transmute, should have been caught by transmute checking",
|
||||
);
|
||||
throw_inval!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
|
||||
}
|
||||
// Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue