Skip to content

Commit a8efbc4

Browse files
Simply do not ICE
1 parent 0395fa3 commit a8efbc4

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_trait_selection/src/solve

1 file changed

+4
-1
lines changed

compiler/rustc_trait_selection/src/solve/fulfill.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
109109
let mut errors = Vec::new();
110110
for i in 0.. {
111111
if !infcx.tcx.recursion_limit().value_within_limit(i) {
112-
unimplemented!("overflowed on pending obligations: {:?}", self.obligations);
112+
// Only return true errors that we have accumulated while processing;
113+
// keep ambiguities around, *including overflows*, because they shouldn't
114+
// be considered true errors.
115+
return errors;
113116
}
114117

115118
let mut has_changed = false;

0 commit comments

Comments
 (0)