[][src]Enum oakc::hir::HirError

pub enum HirError {
    MemorySizeTooSmall(i32),
    ConstantNotDefined(Identifier),
    ConflictingStdReqs,
    FailedAssertion(HirConstant),
    UserError(String),
    TypeNotDefined(String),
    CastLiteralAsPointer(HirType),
}

Variants

MemorySizeTooSmall(i32)

There are some programs that can't possibly run on a minimum amount of memory. To reduce the incidence of this happening, we check against a minimum memory size.

ConstantNotDefined(Identifier)

If a constant is used without it being defined, then throw this error.

ConflictingStdReqs

If BOTH the std and no_std flags are used in a program, then there are conflicting requirements for including the standard library. Throw this error if that is the case.

FailedAssertion(HirConstant)

If a compile time assertion fails, throw an error

UserError(String)

This is a user defined error using the error flag

TypeNotDefined(String)

This returns an error if a type is not defined. This was specifically implemented for defining the sizeof operator.

CastLiteralAsPointer(HirType)

This occurs when a literal expression is cast as a pointer. This isn't ACTUALLY bad, but it's intended to promote type correctness.

Trait Implementations

impl Clone for HirError[src]

impl Debug for HirError[src]

impl Display for HirError[src]

Auto Trait Implementations

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> Colorize for T where
    T: Display
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.