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.
1 parent 5aab62d commit fec9c70Copy full SHA for fec9c70
1 file changed
compiler/rustc_mir_transform/src/lib.rs
@@ -827,6 +827,11 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
827
return body;
828
}
829
830
+ // If check_transmutes found faulty transmutes, then return early to avoid ICEs during optimizations
831
+ if !tcx.is_typeck_child(did.to_def_id()) && tcx.check_transmutes(did).is_err() {
832
+ return body;
833
+ }
834
+
835
run_optimization_passes(tcx, &mut body);
836
837
body
0 commit comments