Built-in implementation of Tuple trait
This commit is contained in:
parent
6b2eab2310
commit
d0e4c679ff
8 changed files with 72 additions and 8 deletions
|
@ -1618,7 +1618,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
};
|
||||
|
||||
// (*) Prefer `BuiltinCandidate { has_nested: false }`, `PointeeCandidate`,
|
||||
// `DiscriminantKindCandidate`, and `ConstDestructCandidate` to anything else.
|
||||
// `DiscriminantKindCandidate`, `ConstDestructCandidate`, and `TupleCandidate`
|
||||
// to anything else.
|
||||
//
|
||||
// This is a fix for #53123 and prevents winnowing from accidentally extending the
|
||||
// lifetime of a variable.
|
||||
|
@ -1638,7 +1639,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
BuiltinCandidate { has_nested: false }
|
||||
| DiscriminantKindCandidate
|
||||
| PointeeCandidate
|
||||
| ConstDestructCandidate(_),
|
||||
| ConstDestructCandidate(_)
|
||||
| TupleCandidate,
|
||||
_,
|
||||
) => true,
|
||||
(
|
||||
|
@ -1646,7 +1648,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
BuiltinCandidate { has_nested: false }
|
||||
| DiscriminantKindCandidate
|
||||
| PointeeCandidate
|
||||
| ConstDestructCandidate(_),
|
||||
| ConstDestructCandidate(_)
|
||||
| TupleCandidate,
|
||||
) => false,
|
||||
|
||||
(ParamCandidate(other), ParamCandidate(victim)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue