1
Fork 0

Rollup merge of #102786 - compiler-errors:no-tuple-candidate, r=lcnr

Remove tuple candidate, nothing special about it

r? `@lcnr` you mentioned this during the talk you gave i think
This commit is contained in:
Dylan DPC 2022-10-10 13:43:41 +05:30 committed by GitHub
commit 58d533dfc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 28 deletions

View file

@ -1562,7 +1562,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
};
// (*) Prefer `BuiltinCandidate { has_nested: false }`, `PointeeCandidate`,
// `DiscriminantKindCandidate`, `ConstDestructCandidate`, and `TupleCandidate`
// `DiscriminantKindCandidate`, `ConstDestructCandidate`
// to anything else.
//
// This is a fix for #53123 and prevents winnowing from accidentally extending the
@ -1583,8 +1583,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
BuiltinCandidate { has_nested: false }
| DiscriminantKindCandidate
| PointeeCandidate
| ConstDestructCandidate(_)
| TupleCandidate,
| ConstDestructCandidate(_),
_,
) => true,
(
@ -1592,8 +1591,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
BuiltinCandidate { has_nested: false }
| DiscriminantKindCandidate
| PointeeCandidate
| ConstDestructCandidate(_)
| TupleCandidate,
| ConstDestructCandidate(_),
) => false,
(ParamCandidate(other), ParamCandidate(victim)) => {