mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 14:02:57 +00:00
remove 'delay_span_bug' following 'references_error'
This commit is contained in:
parent
ab22f5521b
commit
a21a055ca6
@ -45,11 +45,10 @@ impl<'tcx> MirPass<'tcx> for PromoteTemps<'tcx> {
|
||||
// There's not really any point in promoting errorful MIR.
|
||||
//
|
||||
// This does not include MIR that failed const-checking, which we still try to promote.
|
||||
if body.return_ty().references_error() {
|
||||
tcx.sess.delay_span_bug(body.span, "PromoteTemps: MIR had errors");
|
||||
if let Err(_) = body.return_ty().error_reported() {
|
||||
debug!("PromoteTemps: MIR had errors");
|
||||
return;
|
||||
}
|
||||
|
||||
if body.source.promoted.is_some() {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user