mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
Bring back ParamEnv deduplication
This commit is contained in:
parent
29f5c699b1
commit
f297f56e76
@ -142,8 +142,11 @@ impl<'tcx> ProjectionTyCandidateSet<'tcx> {
|
||||
true
|
||||
}
|
||||
Single(current) => {
|
||||
// No duplicates are expected.
|
||||
assert_ne!(current, &candidate);
|
||||
// Duplicates can happen inside ParamEnv. In the case, we
|
||||
// perform a lazy deduplication.
|
||||
if current == &candidate {
|
||||
return false;
|
||||
}
|
||||
// Prefer where-clauses. As in select, if there are multiple
|
||||
// candidates, we prefer where-clause candidates over impls. This
|
||||
// may seem a bit surprising, since impls are the source of
|
||||
|
Loading…
Reference in New Issue
Block a user