Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Oct 27, 2023
1 parent 2b2c4af commit 8315095
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions compiler/rustc_trait_selection/src/solve/project_goals/opaques.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,19 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
}

let expected = match self.try_normalize_ty(goal.param_env, expected) {
Some(ty) => if ty.is_ty_var() {
return self.evaluate_added_goals_and_make_canonical_response(
Certainty::AMBIGUOUS,
)
} else {
ty
},
None => return self.evaluate_added_goals_and_make_canonical_response(
Certainty::OVERFLOW,
),
Some(ty) => {
if ty.is_ty_var() {
return self.evaluate_added_goals_and_make_canonical_response(
Certainty::AMBIGUOUS,
);
} else {
ty
}
}
None => {
return self
.evaluate_added_goals_and_make_canonical_response(Certainty::OVERFLOW);
}
};

// Otherwise, define a new opaque type
Expand Down

0 comments on commit 8315095

Please sign in to comment.