Skip to content

Commit

Permalink
hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jul 21, 2023
1 parent e82dcc0 commit 6508c9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
&& has_changed
&& is_normalizes_to_hack == IsNormalizesToHack::No
&& !self.search_graph.in_cycle()
&& false
{
debug!("rerunning goal to check result is stable");
let (_orig_values, canonical_goal) = self.canonicalize_goal(goal);
Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_trait_selection/src/solve/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ 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);
let obligation = self.obligations.first().cloned().unwrap();
return vec![FulfillmentError {
root_obligation: obligation.clone(),
obligation,
code: FulfillmentErrorCode::CodeAmbiguity { overflow: true },
}];
}

let mut has_changed = false;
Expand Down

0 comments on commit 6508c9b

Please sign in to comment.