Skip to content

Commit

Permalink
Don't Create ParamCandidate When Obligation Contains Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
veera-sivarajan committed Mar 12, 2024
1 parent d713174 commit fb5a579
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
) -> Result<(), SelectionError<'tcx>> {
debug!(?stack.obligation);

if stack.obligation.predicate.references_error() {
return Ok(());
}

let all_bounds = stack
.obligation
.param_env
Expand Down

0 comments on commit fb5a579

Please sign in to comment.