Remove DefId
from some SelectionCandidate
variants
This commit is contained in:
parent
e42c4d7218
commit
e8a2aee50d
4 changed files with 20 additions and 21 deletions
|
@ -1150,7 +1150,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
// const projection
|
||||
ProjectionCandidate(_, ty::BoundConstness::ConstIfConst) => {}
|
||||
// auto trait impl
|
||||
AutoImplCandidate(..) => {}
|
||||
AutoImplCandidate => {}
|
||||
// generator, this will raise error in other places
|
||||
// or ignore error with const_async_blocks feature
|
||||
GeneratorCandidate => {}
|
||||
|
@ -1568,7 +1568,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
// This is a fix for #53123 and prevents winnowing from accidentally extending the
|
||||
// lifetime of a variable.
|
||||
match (&other.candidate, &victim.candidate) {
|
||||
(_, AutoImplCandidate(..)) | (AutoImplCandidate(..), _) => {
|
||||
(_, AutoImplCandidate) | (AutoImplCandidate, _) => {
|
||||
bug!(
|
||||
"default implementations shouldn't be recorded \
|
||||
when there are other valid candidates"
|
||||
|
@ -1638,7 +1638,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { .. }
|
||||
| TraitAliasCandidate(..)
|
||||
| TraitAliasCandidate
|
||||
| ObjectCandidate(_)
|
||||
| ProjectionCandidate(..),
|
||||
) => !is_global(cand),
|
||||
|
@ -1656,7 +1656,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { has_nested: true }
|
||||
| TraitAliasCandidate(..),
|
||||
| TraitAliasCandidate,
|
||||
ParamCandidate(ref cand),
|
||||
) => {
|
||||
// Prefer these to a global where-clause bound
|
||||
|
@ -1686,7 +1686,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { .. }
|
||||
| TraitAliasCandidate(..),
|
||||
| TraitAliasCandidate,
|
||||
) => true,
|
||||
|
||||
(
|
||||
|
@ -1698,7 +1698,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { .. }
|
||||
| TraitAliasCandidate(..),
|
||||
| TraitAliasCandidate,
|
||||
ObjectCandidate(_) | ProjectionCandidate(..),
|
||||
) => false,
|
||||
|
||||
|
@ -1779,7 +1779,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { has_nested: true }
|
||||
| TraitAliasCandidate(..),
|
||||
| TraitAliasCandidate,
|
||||
ImplCandidate(_)
|
||||
| ClosureCandidate
|
||||
| GeneratorCandidate
|
||||
|
@ -1788,7 +1788,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
| BuiltinUnsizeCandidate
|
||||
| TraitUpcastingUnsizeCandidate(_)
|
||||
| BuiltinCandidate { has_nested: true }
|
||||
| TraitAliasCandidate(..),
|
||||
| TraitAliasCandidate,
|
||||
) => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue