Enum rustc_trait_selection::traits::util::traits::SelectionError
source · [−]pub enum SelectionError<'tcx> {
Unimplemented,
OutputTypeParameterMismatch(Binder<'tcx, TraitRef<'tcx>>, Binder<'tcx, TraitRef<'tcx>>, TypeError<'tcx>),
TraitNotObjectSafe(DefId),
NotConstEvaluatable(NotConstEvaluatable),
Overflow,
ErrorReporting,
Ambiguous(Vec<DefId, Global>),
}Variants
Unimplemented
The trait is not implemented.
OutputTypeParameterMismatch(Binder<'tcx, TraitRef<'tcx>>, Binder<'tcx, TraitRef<'tcx>>, TypeError<'tcx>)
After a closure impl has selected, its “outputs” were evaluated
(which for closures includes the “input” type params) and they
didn’t resolve. See confirm_poly_trait_refs for more.
TraitNotObjectSafe(DefId)
The trait pointed by DefId is not object safe.
NotConstEvaluatable(NotConstEvaluatable)
A given constant couldn’t be evaluated.
Overflow
Exceeded the recursion depth during type projection.
ErrorReporting
Signaling that an error has already been emitted, to avoid multiple errors being shown.
Ambiguous(Vec<DefId, Global>)
Multiple applicable impls where found. The DefIds correspond to
all the impls’ Items.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for SelectionError<'tcx>
impl<'tcx> Send for SelectionError<'tcx>
impl<'tcx> Sync for SelectionError<'tcx>
impl<'tcx> Unpin for SelectionError<'tcx>
impl<'tcx> !UnwindSafe for SelectionError<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'tcx, T> Subst<'tcx> for T where
T: TypeFoldable<'tcx>,
impl<'tcx, T> Subst<'tcx> for T where
T: TypeFoldable<'tcx>,
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
fn subst(self, tcx: TyCtxt<'tcx>, substs: &[GenericArg<'tcx>]) -> Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes
Size for each variant:
Unimplemented: 0 bytesOutputTypeParameterMismatch: 87 bytesTraitNotObjectSafe: 11 bytesNotConstEvaluatable: 1 byteOverflow: 0 bytesErrorReporting: 0 bytesAmbiguous: 31 bytes