Skip to content

Commit 4a2d54d

Browse files
committedMar 19, 2020
add delay_span_bug to TransmuteSizeDiff, just to be sure
1 parent 57e1da5 commit 4a2d54d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/librustc_mir/interpret/place.rs

+4
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@ where
926926
// most likey we *are* running `typeck` right now. Investigate whether we can bail out
927927
// on `typeck_tables().has_errors` at all const eval entry points.
928928
debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
929+
self.tcx.sess.delay_span_bug(
930+
self.tcx.span,
931+
"size-changing transmute, should have been caught by transmute checking",
932+
);
929933
throw_inval!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
930934
}
931935
// Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want

0 commit comments

Comments
 (0)
Please sign in to comment.