pub enum TraitProofKind {
Concrete(ItemRef),
LocalBound(GenericPredicateId),
SelfProof,
Dyn,
Builtin {
trait_data: BuiltinTraitData,
proofs: Vec<TraitProof>,
types: Vec<(DefId, Ty, Vec<TraitProof>)>,
},
Derived {
base: TraitProof,
path: TraitProofImpliedPredicate,
},
Error(String),
}Expand description
The source of a particular trait implementation. Most often this is either Concrete for a
concrete impl Trait for Type {} item, or LocalBound for a context-bound where T: Trait.
Variants§
Concrete(ItemRef)
A concrete impl Trait for Type {} item.
LocalBound(GenericPredicateId)
A context-bound clause like where T: Trait.
SelfProof
The implicit Self: Trait clause present inside a trait Trait {} item.
Dyn
dyn Trait is a wrapped value with a virtual table for trait
Trait. In other words, a value dyn Trait is a dependent
triple that gathers a type τ, a value of type τ and an
instance of type Trait.
dyn Trait implements Trait using a built-in implementation; this refers to that
built-in implementation.
Builtin
A built-in trait whose implementation is computed by the compiler, such as FnMut. This
morally points to an invisible impl block; as such it contains the information we may
need from one.
Fields
trait_data: BuiltinTraitDataExtra data for the given trait.
proofs: Vec<TraitProof>The trait proofs required to satisfy the implied predicates on the trait declaration.
E.g. since FnMut: FnOnce, a built-in T: FnMut impl would have a proof for
T: FnOnce.
Derived
A predicate implied by base by following path.
Error(String)
An error happened while resolving traits.
Trait Implementations§
Source§impl Clone for TraitProofKind
impl Clone for TraitProofKind
Source§fn clone(&self) -> TraitProofKind
fn clone(&self) -> TraitProofKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TraitProofKind
impl Debug for TraitProofKind
Source§impl Hash for TraitProofKind
impl Hash for TraitProofKind
Source§impl PartialEq for TraitProofKind
impl PartialEq for TraitProofKind
Source§fn eq(&self, other: &TraitProofKind) -> bool
fn eq(&self, other: &TraitProofKind) -> bool
self and other values to be equal, and is used by ==.Source§impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, TraitProofKind> for TraitProofKind<'tcx, DefId>
impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, TraitProofKind> for TraitProofKind<'tcx, DefId>
fn sinto(&self, s: &S) -> TraitProofKind
impl Eq for TraitProofKind
impl StructuralPartialEq for TraitProofKind
Auto Trait Implementations§
impl Freeze for TraitProofKind
impl RefUnwindSafe for TraitProofKind
impl Send for TraitProofKind
impl Sync for TraitProofKind
impl Unpin for TraitProofKind
impl UnsafeUnpin for TraitProofKind
impl UnwindSafe for TraitProofKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more