[−][src]Enum rustc_hir::ConstContext

pub enum ConstContext {
    ConstFn,
    Static(Mutability),
    Const,
}

The kind of an item that requires const-checking.

Variants

ConstFn

A const fn.

Static(Mutability)

A static or static mut.

Const

A const, associated const, or other const context.

Other contexts include:

For the most part, other contexts are treated just like a regular const, so they are lumped into the same category.

Implementations

impl ConstContext[src]

pub fn keyword_name(self) -> &'static str[src]

A description of this const context that can appear between backticks in an error message.

E.g. const or static mut.

Trait Implementations

impl Clone for ConstContext[src]

impl Copy for ConstContext[src]

impl Debug for ConstContext[src]

impl Display for ConstContext[src]

A colloquial, trivially pluralizable description of this const context for use in error messages.

impl Eq for ConstContext[src]

impl PartialEq<ConstContext> for ConstContext[src]

impl StructuralEq for ConstContext[src]

impl StructuralPartialEq for ConstContext[src]

Auto Trait Implementations

impl RefUnwindSafe for ConstContext

impl Send for ConstContext

impl Sync for ConstContext

impl Unpin for ConstContext

impl UnwindSafe for ConstContext

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> 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.