Delay bug; this sidesteps ICE'ing when compiler is just doing error-recovery.

This commit is contained in:
Felix S. Klock II 2019-07-09 13:49:20 +02:00
parent 88953840ac
commit 50840ee851

View file

@ -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(