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 ab22f55 commit a21a055Copy full SHA for a21a055
compiler/rustc_const_eval/src/transform/promote_consts.rs
@@ -45,11 +45,10 @@ impl<'tcx> MirPass<'tcx> for PromoteTemps<'tcx> {
45
// There's not really any point in promoting errorful MIR.
46
//
47
// This does not include MIR that failed const-checking, which we still try to promote.
48
- if body.return_ty().references_error() {
49
- tcx.sess.delay_span_bug(body.span, "PromoteTemps: MIR had errors");
+ if let Err(_) = body.return_ty().error_reported() {
+ debug!("PromoteTemps: MIR had errors");
50
return;
51
}
52
-
53
if body.source.promoted.is_some() {
54
55
0 commit comments