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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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 bytes
  • OutputTypeParameterMismatch: 87 bytes
  • TraitNotObjectSafe: 11 bytes
  • NotConstEvaluatable: 1 byte
  • Overflow: 0 bytes
  • ErrorReporting: 0 bytes
  • Ambiguous: 31 bytes