Skip to content

Commit 7b30e8d

Browse files
committed
convert (lexical) region errors to warn when NLL is enabled
1 parent 87c0c32 commit 7b30e8d

File tree

1 file changed

+10
-9
lines changed
  • src/librustc/infer/error_reporting

1 file changed

+10
-9
lines changed

src/librustc/infer/error_reporting/mod.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,18 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
265265
if self.tcx.sess.opts.debugging_opts.nll {
266266
for error in errors {
267267
match *error {
268-
RegionResolutionError::ConcreteFailure(origin, ..) |
269-
RegionResolutionError::GenericBoundFailure(origin, ..) => {
270-
self.tcx.sess.delay_span_bug(origin.span(),
271-
&format!("unreported region error {:?}",
272-
error));
268+
RegionResolutionError::ConcreteFailure(ref origin, ..) |
269+
RegionResolutionError::GenericBoundFailure(ref origin, ..) => {
270+
self.tcx.sess.span_warn(
271+
origin.span(),
272+
&format!("not reporting region error due to -Znll: {:?}",
273+
error));
273274
}
274275

275-
RegionResolutionError::SubSupConflict(rvo, ..) => {
276-
self.tcx.sess.delay_span_bug(rvo.span(),
277-
&format!("unreported region error {:?}",
278-
error));
276+
RegionResolutionError::SubSupConflict(ref rvo, ..) => {
277+
self.tcx.sess.span_warn(
278+
rvo.span(),
279+
&format!("not reporting region error due to -Znll: {:?}", error));
279280
}
280281
}
281282
}

0 commit comments

Comments
 (0)