From 8f41b74dba4c440dd55e6871407448a9478d5e24 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 13 Apr 2015 14:19:26 -0600 Subject: [PATCH] Completely delay this error checking --- src/librustc_typeck/check/regionck.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 682aa6e6ee7d..3c8ad3613852 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -541,11 +541,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) { } Err(..) => { let tcx = rcx.fcx.tcx(); - if tcx.sess.has_errors() { - // cannot run dropck; okay b/c in error state anyway. - } else { - tcx.sess.delay_span_bug(expr.span, "cat_expr_unadjusted Errd"); - } + tcx.sess.delay_span_bug(expr.span, "cat_expr_unadjusted Errd"); } } } @@ -562,11 +558,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) { } Err(..) => { let tcx = rcx.fcx.tcx(); - if tcx.sess.has_errors() { - // cannot run dropck; okay b/c in error state anyway. - } else { - tcx.sess.delay_span_bug(expr.span, "cat_expr Errd"); - } + tcx.sess.delay_span_bug(expr.span, "cat_expr Errd"); } }