Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f468f9b

Browse files
authoredMar 21, 2020
Rollup merge of rust-lang#70139 - RalfJung:delay, r=eddyb
add delay_span_bug to TransmuteSizeDiff, just to be sure See rust-lang#69839 (comment). r? @eddyb
2 parents 79cb6b9 + 4a2d54d commit f468f9b

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
@@ -920,6 +920,10 @@ where
920920
// most likey we *are* running `typeck` right now. Investigate whether we can bail out
921921
// on `typeck_tables().has_errors` at all const eval entry points.
922922
debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
923+
self.tcx.sess.delay_span_bug(
924+
self.tcx.span,
925+
"size-changing transmute, should have been caught by transmute checking",
926+
);
923927
throw_inval!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
924928
}
925929
// Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want

0 commit comments

Comments
 (0)
Please sign in to comment.