Rollup merge of #121322 - compiler-errors:next-solver-fulfillment-ice, r=lcnr
Don't ICE when hitting overflow limit in fulfillment loop in next solver As the title says, let's not ICE when hitting the overflow limit in fulfill. On the other hand, we don't want to treat these as true errors, since it means that whether something is considered a true error or an ambiguity is dependent on overflow handling in the solver, which seems not worth it. Now that we use the presence of true errors in fulfillment for implicit negative coherence, we especially don't want to tie together coherence and overflow. I guess I could also drain these errors out of fulfillment and put them into some `ambiguities` storage so we could return them in `select_all_or_error` without having to re-process them every time we call `select_where_possible`. Let me know if that's desired. r? lcnr
This commit is contained in:
commit
d43fd29bf2
3 changed files with 30 additions and 1 deletions
|
@ -109,7 +109,10 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
|||
let mut errors = Vec::new();
|
||||
for i in 0.. {
|
||||
if !infcx.tcx.recursion_limit().value_within_limit(i) {
|
||||
unimplemented!("overflowed on pending obligations: {:?}", self.obligations);
|
||||
// Only return true errors that we have accumulated while processing;
|
||||
// keep ambiguities around, *including overflows*, because they shouldn't
|
||||
// be considered true errors.
|
||||
return errors;
|
||||
}
|
||||
|
||||
let mut has_changed = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue