pub enum ImplExprAtom<'tcx> {
Concrete {
def_id: DefId,
generics: GenericArgsRef<'tcx>,
},
LocalBound {
predicate: Predicate<'tcx>,
index: usize,
trait: PolyTraitRef<'tcx>,
path: Vec<PathChunk<'tcx>>,
},
SelfImpl {
trait: PolyTraitRef<'tcx>,
path: Vec<PathChunk<'tcx>>,
},
Dyn,
Builtin {
trait: PolyTraitRef<'tcx>,
},
Error(String),
}
Variants§
Concrete
A concrete impl Trait for Type {}
item.
LocalBound
A context-bound clause like where T: Trait
.
Fields
§
index: usize
The nth (non-self) predicate found for this item. We use predicates from
required_predicates
starting from the parentmost item.
§
trait: PolyTraitRef<'tcx>
SelfImpl
The automatic clause Self: Trait
present inside a impl Trait for Type {}
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 Sync
.
Fields
§
trait: PolyTraitRef<'tcx>
Error(String)
An error happened while resolving traits.
Trait Implementations§
source§impl<'tcx> Clone for ImplExprAtom<'tcx>
impl<'tcx> Clone for ImplExprAtom<'tcx>
source§fn clone(&self) -> ImplExprAtom<'tcx>
fn clone(&self) -> ImplExprAtom<'tcx>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'tcx> Debug for ImplExprAtom<'tcx>
impl<'tcx> Debug for ImplExprAtom<'tcx>
source§impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ImplExprAtom> for ImplExprAtom<'tcx>
impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ImplExprAtom> for ImplExprAtom<'tcx>
fn sinto(&self, s: &S) -> ImplExprAtom
Auto Trait Implementations§
impl<'tcx> Freeze for ImplExprAtom<'tcx>
impl<'tcx> !RefUnwindSafe for ImplExprAtom<'tcx>
impl<'tcx> Send for ImplExprAtom<'tcx>
impl<'tcx> Sync for ImplExprAtom<'tcx>
impl<'tcx> Unpin for ImplExprAtom<'tcx>
impl<'tcx> !UnwindSafe for ImplExprAtom<'tcx>
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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