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:
@@ -1021,7 +1021,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
let self_ty = self.infcx().shallow_resolve(obligation.self_ty().skip_binder());
|
||||
match self_ty.kind() {
|
||||
ty::Tuple(_) => {
|
||||
candidates.vec.push(TupleCandidate);
|
||||
candidates.vec.push(BuiltinCandidate { has_nested: false });
|
||||
}
|
||||
ty::Infer(ty::TyVar(_)) => {
|
||||
candidates.ambiguous = true;
|
||||
|
||||
@@ -126,8 +126,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
let data = self.confirm_const_destruct_candidate(obligation, def_id)?;
|
||||
ImplSource::ConstDestruct(data)
|
||||
}
|
||||
|
||||
TupleCandidate => ImplSource::Tuple,
|
||||
};
|
||||
|
||||
if !obligation.predicate.is_const_if_const() {
|
||||
|
||||
@@ -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)) => {
|
||||
|
||||
Reference in New Issue
Block a user