Skip to content

Commit

Permalink
Delay bug; this sidesteps ICE'ing when compiler is just doing error-r…
Browse files Browse the repository at this point in the history
…ecovery.
  • Loading branch information
pnkfelix committed Jul 9, 2019
1 parent 8895384 commit 50840ee
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/librustc/infer/lexical_region_resolve/mod.rs
Expand Up @@ -764,16 +764,17 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
}
}

span_bug!(
// Errors in earlier passes can yield error variables without
// resolution errors here; delay ICE in favor of those errors.
self.tcx().sess.delay_span_bug(
self.var_infos[node_idx].origin.span(),
"collect_error_for_expanding_node() could not find \
error for var {:?} in universe {:?}, lower_bounds={:#?}, \
upper_bounds={:#?}",
node_idx,
node_universe,
lower_bounds,
upper_bounds
);
&format!("collect_error_for_expanding_node() could not find \
error for var {:?} in universe {:?}, lower_bounds={:#?}, \
upper_bounds={:#?}",
node_idx,
node_universe,
lower_bounds,
upper_bounds));
}

fn collect_concrete_regions(
Expand Down

0 comments on commit 50840ee

Please sign in to comment.