[−][src]Enum rustc_hir::hir::ConstContext
The kind of an item that requires const-checking.
Variants
A const fn.
Static(Mutability)A static or static mut.
A const, associated const, or other const context.
Other contexts include:
- Array length expressions
- Enum discriminants
- Const generics
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]
pub fn clone(&self) -> ConstContext[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[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]
pub fn eq(&self, other: &ConstContext) -> bool[src]
pub fn ne(&self, other: &ConstContext) -> bool[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,