Skip to content

Commit de201b4

Browse files
committed
ignore region errors if NLL is enabled
This way, NLL can report them later.
1 parent 81f6ce5 commit de201b4

File tree

1 file changed

+21
-0
lines changed
  • src/librustc/infer/error_reporting

1 file changed

+21
-0
lines changed

src/librustc/infer/error_reporting/mod.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,27 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
262262
errors: &Vec<RegionResolutionError<'tcx>>) {
263263
debug!("report_region_errors(): {} errors to start", errors.len());
264264

265+
if self.tcx.sess.opts.debugging_opts.nll {
266+
for error in errors {
267+
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));
273+
}
274+
275+
RegionResolutionError::SubSupConflict(rvo, ..) => {
276+
self.tcx.sess.delay_span_bug(rvo.span(),
277+
&format!("unreported region error {:?}",
278+
error));
279+
}
280+
}
281+
}
282+
283+
return;
284+
}
285+
265286
// try to pre-process the errors, which will group some of them
266287
// together into a `ProcessedErrors` group:
267288
let errors = self.process_errors(errors);

0 commit comments

Comments
 (0)