Only prefer Sized candidates, and only if they certainly hold
This commit is contained in:
parent
f9696dda6e
commit
aebbd42460
7 changed files with 89 additions and 23 deletions
|
@ -95,8 +95,11 @@ pub type EvaluationCache<'tcx, ENV> = Cache<(ENV, ty::PolyTraitPredicate<'tcx>),
|
|||
/// parameter environment.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, TypeVisitable)]
|
||||
pub enum SelectionCandidate<'tcx> {
|
||||
/// UwU
|
||||
SizedCandidate,
|
||||
/// A built-in implementation for the `Sized` trait. This is preferred
|
||||
/// over all other candidates.
|
||||
SizedCandidate {
|
||||
has_nested: bool,
|
||||
},
|
||||
|
||||
/// A builtin implementation for some specific traits, used in cases
|
||||
/// where we cannot rely an ordinary library implementations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue