Skip to content

Commit 6508c9b

Browse files
hacks
1 parent e82dcc0 commit 6508c9b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

compiler/rustc_trait_selection/src/solve/eval_ctxt.rs

+1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
373373
&& has_changed
374374
&& is_normalizes_to_hack == IsNormalizesToHack::No
375375
&& !self.search_graph.in_cycle()
376+
&& false
376377
{
377378
debug!("rerunning goal to check result is stable");
378379
let (_orig_values, canonical_goal) = self.canonicalize_goal(goal);

compiler/rustc_trait_selection/src/solve/fulfill.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
8989
let mut errors = Vec::new();
9090
for i in 0.. {
9191
if !infcx.tcx.recursion_limit().value_within_limit(i) {
92-
unimplemented!("overflowed on pending obligations: {:?}", self.obligations);
92+
let obligation = self.obligations.first().cloned().unwrap();
93+
return vec![FulfillmentError {
94+
root_obligation: obligation.clone(),
95+
obligation,
96+
code: FulfillmentErrorCode::CodeAmbiguity { overflow: true },
97+
}];
9398
}
9499

95100
let mut has_changed = false;

0 commit comments

Comments
 (0)