Skip to content

Commit 8f41b74

Browse files
committed
Completely delay this error checking
1 parent c660609 commit 8f41b74

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/librustc_typeck/check/regionck.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) {
541541
}
542542
Err(..) => {
543543
let tcx = rcx.fcx.tcx();
544-
if tcx.sess.has_errors() {
545-
// cannot run dropck; okay b/c in error state anyway.
546-
} else {
547-
tcx.sess.delay_span_bug(expr.span, "cat_expr_unadjusted Errd");
548-
}
544+
tcx.sess.delay_span_bug(expr.span, "cat_expr_unadjusted Errd");
549545
}
550546
}
551547
}
@@ -562,11 +558,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) {
562558
}
563559
Err(..) => {
564560
let tcx = rcx.fcx.tcx();
565-
if tcx.sess.has_errors() {
566-
// cannot run dropck; okay b/c in error state anyway.
567-
} else {
568-
tcx.sess.delay_span_bug(expr.span, "cat_expr Errd");
569-
}
561+
tcx.sess.delay_span_bug(expr.span, "cat_expr Errd");
570562
}
571563
}
572564

0 commit comments

Comments
 (0)