We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TransmuteSizeDiff
1 parent cb8d1c3 commit 6937ca2Copy full SHA for 6937ca2
src/librustc_mir/interpret/place.rs
@@ -924,6 +924,10 @@ where
924
}
925
// We still require the sizes to match.
926
if src.layout.size != dest.layout.size {
927
+ // FIXME: This should be an assert instead of an error, but if we transmute within an
928
+ // array length computation, `typeck` may not have yet been run and errored out. In fact
929
+ // most likey we *are* running `typeck` right now. Investigate whether we can bail out
930
+ // on `typeck_tables().has_errors` at all const eval entry points.
931
error!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
932
throw_unsup!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
933
0 commit comments