rust
rust copied to clipboard
Don't Create `ParamCandidate` When Obligation Contains Errors
Fixes #121941
I'm not sure if I understand this correctly but this bug was caused by an error type incorrectly matching against ParamCandidate. This was introduced by the changes made in #72621 (figured using cargo-bisect-rustc).
This PR fixes it by skipping ParamCandidate generation when an error type is involved. Also, this is similar to #73005 but addresses ParamCandidate instead of ImplCandidate.
r? @compiler-errors
rustbot has assigned @compiler-errors. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Please squash this into one commit. Please also leave a comment that explains what this special case is for, preferably referencing an issue and explaining some motivation behind why the fix works.
@rustbot atuhor
@rustbot author
@rustbot ready
@bors r+
:pushpin: Commit 96b8225d8dd971bc2ecc7aa12068adcda9a9f20f has been approved by compiler-errors
It is now in the queue for this repository.