Struct chalk_solve::rust_ir::TraitFlags
source · pub struct TraitFlags {
pub auto: bool,
pub marker: bool,
pub upstream: bool,
pub fundamental: bool,
pub non_enumerable: bool,
pub coinductive: bool,
}Fields§
§auto: boolAn “auto trait” is one that is “automatically implemented” for every struct, so long as no explicit impl is given.
Examples are Send and Sync.
marker: bool§upstream: boolIndicate that a trait is defined upstream (in a dependency), used during coherence checking.
fundamental: boolA fundamental trait is a trait where adding an impl for an existing type
is considered a breaking change. Examples of fundamental traits are the
closure traits like Fn and FnMut.
As of this writing (2020-03-27), fundamental traits are declared by the
unstable #[fundamental] attribute in rustc, and hence cannot appear
outside of the standard library.
non_enumerable: boolIndicates that chalk cannot list all of the implementations of the given trait, likely because it is a publicly exported trait in a library.
Currently (2020-03-27) rustc and rust-analyzer mark all traits as non_enumerable, and in the future it may become the only option.
coinductive: boolTrait Implementations§
source§impl Clone for TraitFlags
impl Clone for TraitFlags
source§fn clone(&self) -> TraitFlags
fn clone(&self) -> TraitFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TraitFlags
impl Debug for TraitFlags
source§impl Hash for TraitFlags
impl Hash for TraitFlags
source§impl PartialEq for TraitFlags
impl PartialEq for TraitFlags
source§fn eq(&self, other: &TraitFlags) -> bool
fn eq(&self, other: &TraitFlags) -> bool
self and other values to be equal, and is used
by ==.source§impl<I: Interner> TypeVisitable<I> for TraitFlags
impl<I: Interner> TypeVisitable<I> for TraitFlags
source§fn visit_with<B>(
&self,
_visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
_outer_binder: DebruijnIndex,
) -> ControlFlow<B>
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
visitor to self; binders is the
number of binders that are in scope when beginning the
visitor. Typically binders starts as 0, but is adjusted when
we encounter Binders<T> in the IR or other similar
constructs.impl Eq for TraitFlags
impl StructuralPartialEq for TraitFlags
Auto Trait Implementations§
impl Freeze for TraitFlags
impl RefUnwindSafe for TraitFlags
impl Send for TraitFlags
impl Sync for TraitFlags
impl Unpin for TraitFlags
impl UnwindSafe for TraitFlags
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> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
U using CastTo.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)§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.