[][src]Enum rusttyc::TcErr

pub enum TcErr<AbsTy: Abstract> {
    KeyEquation(TcKeyTcKey, AbsTy::Err),
    TypeBound(TcKey, AbsTy::Err),
    ChildAccessOutOfBound(TcKey, AbsTy, usize),
}

Represents an error during the type check procedure.

Variants

KeyEquation(TcKeyTcKey, AbsTy::Err)

Two keys were attempted to be equated and their underlying types turned out to be incompatible. Contains the two keys and the error that occurred when attempting to meet their abstract types.

TypeBound(TcKey, AbsTy::Err)

An explicit type bound imposed on a key turned out to be incompatible with the type inferred based on remaining information on the key. Contains the key and the error that occurred when meeting the explicit bound with the inferred type.

ChildAccessOutOfBound(TcKey, AbsTy, usize)

This error occurs when a constraint accesses the nth child of a type and its variant turns out to only have k < n sub-types. Contains the affected key, its inferred or explicitly assigned variant, and the index of the child that was attempted to be accessed.

Trait Implementations

impl<AbsTy: Clone + Abstract> Clone for TcErr<AbsTy> where
    AbsTy::Err: Clone,
    AbsTy::Err: Clone
[src]

impl<AbsTy: Debug + Abstract> Debug for TcErr<AbsTy> where
    AbsTy::Err: Debug,
    AbsTy::Err: Debug
[src]

Auto Trait Implementations

impl<AbsTy> RefUnwindSafe for TcErr<AbsTy> where
    AbsTy: RefUnwindSafe,
    <AbsTy as Abstract>::Err: RefUnwindSafe

impl<AbsTy> Send for TcErr<AbsTy> where
    AbsTy: Send,
    <AbsTy as Abstract>::Err: Send

impl<AbsTy> Sync for TcErr<AbsTy> where
    AbsTy: Sync,
    <AbsTy as Abstract>::Err: Sync

impl<AbsTy> Unpin for TcErr<AbsTy> where
    AbsTy: Unpin,
    <AbsTy as Abstract>::Err: Unpin

impl<AbsTy> UnwindSafe for TcErr<AbsTy> where
    AbsTy: UnwindSafe,
    <AbsTy as Abstract>::Err: UnwindSafe

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<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.