From 7b30e8d6681b10d6b7ecf92aa52d3085c5218a85 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 30 Oct 2017 04:50:01 -0400 Subject: [PATCH] convert (lexical) region errors to warn when NLL is enabled --- src/librustc/infer/error_reporting/mod.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 33fac8193a6..3fbc7d90354 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -265,17 +265,18 @@ pub fn report_region_errors(&self, if self.tcx.sess.opts.debugging_opts.nll { for error in errors { match *error { - RegionResolutionError::ConcreteFailure(origin, ..) | - RegionResolutionError::GenericBoundFailure(origin, ..) => { - self.tcx.sess.delay_span_bug(origin.span(), - &format!("unreported region error {:?}", - error)); + RegionResolutionError::ConcreteFailure(ref origin, ..) | + RegionResolutionError::GenericBoundFailure(ref origin, ..) => { + self.tcx.sess.span_warn( + origin.span(), + &format!("not reporting region error due to -Znll: {:?}", + error)); } - RegionResolutionError::SubSupConflict(rvo, ..) => { - self.tcx.sess.delay_span_bug(rvo.span(), - &format!("unreported region error {:?}", - error)); + RegionResolutionError::SubSupConflict(ref rvo, ..) => { + self.tcx.sess.span_warn( + rvo.span(), + &format!("not reporting region error due to -Znll: {:?}", error)); } } } -- GitLab