[−][src]Enum rustc_middle::ty::error::TypeError

pub enum TypeError<'tcx> {
    Mismatch,
    UnsafetyMismatch(ExpectedFound<Unsafety>),
    AbiMismatch(ExpectedFound<Abi>),
    Mutability,
    TupleSize(ExpectedFound<usize>),
    FixedArraySize(ExpectedFound<u64>),
    ArgCount,
    RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>),
    RegionsInsufficientlyPolymorphic(BoundRegion, Region<'tcx>),
    RegionsOverlyPolymorphic(BoundRegion, Region<'tcx>),
    RegionsPlaceholderMismatch,
    Sorts(ExpectedFound<Ty<'tcx>>),
    IntMismatch(ExpectedFound<IntVarValue>),
    FloatMismatch(ExpectedFound<FloatTy>),
    Traits(ExpectedFound<DefId>),
    VariadicMismatch(ExpectedFound<bool>),
    CyclicTy(Ty<'tcx>),
    CyclicConst(&'tcx Const<'tcx>),
    ProjectionMismatched(ExpectedFound<DefId>),
    ExistentialMismatch(ExpectedFound<&'tcx List<ExistentialPredicate<'tcx>>>),
    ObjectUnsafeCoercion(DefId),
    ConstMismatch(ExpectedFound<&'tcx Const<'tcx>>),
    IntrinsicCast,
    TargetFeatureCast(DefId),
}

Variants

Mismatch
UnsafetyMismatch(ExpectedFound<Unsafety>)
AbiMismatch(ExpectedFound<Abi>)
Mutability
TupleSize(ExpectedFound<usize>)
FixedArraySize(ExpectedFound<u64>)
ArgCount
RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>)
RegionsInsufficientlyPolymorphic(BoundRegion, Region<'tcx>)
RegionsOverlyPolymorphic(BoundRegion, Region<'tcx>)
RegionsPlaceholderMismatch
Sorts(ExpectedFound<Ty<'tcx>>)
IntMismatch(ExpectedFound<IntVarValue>)
FloatMismatch(ExpectedFound<FloatTy>)
Traits(ExpectedFound<DefId>)
VariadicMismatch(ExpectedFound<bool>)
CyclicTy(Ty<'tcx>)

Instantiating a type variable with the given type would have created a cycle (because it appears somewhere within that type).

CyclicConst(&'tcx Const<'tcx>)
ProjectionMismatched(ExpectedFound<DefId>)
ExistentialMismatch(ExpectedFound<&'tcx List<ExistentialPredicate<'tcx>>>)
ObjectUnsafeCoercion(DefId)
ConstMismatch(ExpectedFound<&'tcx Const<'tcx>>)
IntrinsicCast
TargetFeatureCast(DefId)

Safe #[target_feature] functions are not assignable to safe function pointers.

Implementations

impl<'tcx> TypeError<'tcx>[src]

pub fn must_include_note(&self) -> bool[src]

Trait Implementations

impl<'tcx> Clone for TypeError<'tcx>[src]

impl<'tcx> Debug for TypeError<'tcx>[src]

impl<'tcx> Display for TypeError<'tcx>[src]

Explains the source of a type err in a short, human readable way. This is meant to be placed in parentheses after some larger message. You should also invoke note_and_explain_type_err() afterwards to present additional details, particularly when it comes to lifetime-related errors.

impl<'tcx> From<TypeError<'tcx>> for NoSolution[src]

impl<'a, 'tcx> Lift<'tcx> for TypeError<'a>[src]

type Lifted = TypeError<'tcx>

impl<'tcx> TypeFoldable<'tcx> for TypeError<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for TypeError<'tcx>

impl<'tcx> !Send for TypeError<'tcx>

impl<'tcx> !Sync for TypeError<'tcx>

impl<'tcx> Unpin for TypeError<'tcx>

impl<'tcx> !UnwindSafe for TypeError<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]