diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-10-30 04:50:01 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-11-02 04:40:50 -0400 |
| commit | 7b30e8d6681b10d6b7ecf92aa52d3085c5218a85 (patch) | |
| tree | bd56072e52b2747fc979fe8930347453e4c9832e | |
| parent | 87c0c327685ba32120151622d0c56c89b5903f0f (diff) | |
| download | rust-7b30e8d6681b10d6b7ecf92aa52d3085c5218a85.tar.gz rust-7b30e8d6681b10d6b7ecf92aa52d3085c5218a85.zip | |
convert (lexical) region errors to warn when NLL is enabled
| -rw-r--r-- | src/librustc/infer/error_reporting/mod.rs | 19 |
1 files 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 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { 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)); } } } |
