Enum rustc_hir::lang_items::LangItem[−][src]

pub enum LangItem {
Show variants Bool, Char, Str, Array, Slice, SliceU8, StrAlloc, SliceAlloc, SliceU8Alloc, ConstPtr, MutPtr, ConstSlicePtr, MutSlicePtr, I8, I16, I32, I64, I128, Isize, U8, U16, U32, U64, U128, Usize, F32, F64, F32Runtime, F64Runtime, Sized, Unsize, StructuralPeq, StructuralTeq, Copy, Clone, Sync, DiscriminantKind, Discriminant, PointeeTrait, Metadata, DynMetadata, Freeze, Drop, CoerceUnsized, DispatchFromDyn, Add, Sub, Mul, Div, Rem, Neg, Not, BitXor, BitAnd, BitOr, Shl, Shr, AddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitXorAssign, BitAndAssign, BitOrAssign, ShlAssign, ShrAssign, Index, IndexMut, UnsafeCell, VaList, Deref, DerefMut, DerefTarget, Receiver, Fn, FnMut, FnOnce, FnOnceOutput, Future, GeneratorState, Generator, Unpin, Pin, PartialEq, PartialOrd, Panic, PanicStr, PanicBoundsCheck, PanicInfo, PanicLocation, PanicImpl, BeginPanic, ExchangeMalloc, BoxFree, DropInPlace, Oom, AllocLayout, Start, EhPersonality, EhCatchTypeinfo, OwnedBox, PhantomData, ManuallyDrop, MaybeUninit, AlignOffset, Termination, Try, TryFromError, TryFromOk, TryIntoResult, PollReady, PollPending, FromGenerator, GetContext, FuturePoll, FromFrom, OptionSome, OptionNone, ResultOk, ResultErr, IntoIterIntoIter, IteratorNext, PinNewUnchecked, RangeFrom, RangeFull, RangeInclusiveStruct, RangeInclusiveNew, Range, RangeToInclusive, RangeTo,
}
Expand description

A representation of all the valid language items in Rust.

Variants

Bool
Expand description

The bool lang item.

Char
Expand description

The char lang item.

Str
Expand description

The str lang item.

Array
Expand description

The array lang item.

Slice
Expand description

The slice lang item.

SliceU8
Expand description

The slice_u8 lang item.

StrAlloc
Expand description

The str_alloc lang item.

SliceAlloc
Expand description

The slice_alloc lang item.

SliceU8Alloc
Expand description

The slice_u8_alloc lang item.

ConstPtr
Expand description

The const_ptr lang item.

MutPtr
Expand description

The mut_ptr lang item.

ConstSlicePtr
Expand description

The const_slice_ptr lang item.

MutSlicePtr
Expand description

The mut_slice_ptr lang item.

I8
Expand description

The i8 lang item.

I16
Expand description

The i16 lang item.

I32
Expand description

The i32 lang item.

I64
Expand description

The i64 lang item.

I128
Expand description

The i128 lang item.

Isize
Expand description

The isize lang item.

U8
Expand description

The u8 lang item.

U16
Expand description

The u16 lang item.

U32
Expand description

The u32 lang item.

U64
Expand description

The u64 lang item.

U128
Expand description

The u128 lang item.

Usize
Expand description

The usize lang item.

F32
Expand description

The f32 lang item.

F64
Expand description

The f64 lang item.

F32Runtime
Expand description

The f32_runtime lang item.

F64Runtime
Expand description

The f64_runtime lang item.

Sized
Expand description

The sized lang item.

Unsize
Expand description

The unsize lang item.

StructuralPeq
Expand description

The structural_peq lang item.

Trait injected by #[derive(PartialEq)], (i.e. “Partial EQ”).

StructuralTeq
Expand description

The structural_teq lang item.

Trait injected by #[derive(Eq)], (i.e. “Total EQ”; no, I will not apologize).

Copy
Expand description

The copy lang item.

Clone
Expand description

The clone lang item.

Sync
Expand description

The sync lang item.

DiscriminantKind
Expand description

The discriminant_kind lang item.

Discriminant
Expand description

The discriminant_type lang item.

The associated item of the [DiscriminantKind] trait.

PointeeTrait
Expand description

The pointee_trait lang item.

Metadata
Expand description

The metadata_type lang item.

DynMetadata
Expand description

The dyn_metadata lang item.

Freeze
Expand description

The freeze lang item.

Drop
Expand description

The drop lang item.

CoerceUnsized
Expand description

The coerce_unsized lang item.

DispatchFromDyn
Expand description

The dispatch_from_dyn lang item.

Add
Expand description

The add lang item.

Sub
Expand description

The sub lang item.

Mul
Expand description

The mul lang item.

Div
Expand description

The div lang item.

Rem
Expand description

The rem lang item.

Neg
Expand description

The neg lang item.

Not
Expand description

The not lang item.

BitXor
Expand description

The bitxor lang item.

BitAnd
Expand description

The bitand lang item.

BitOr
Expand description

The bitor lang item.

Shl
Expand description

The shl lang item.

Shr
Expand description

The shr lang item.

AddAssign
Expand description

The add_assign lang item.

SubAssign
Expand description

The sub_assign lang item.

MulAssign
Expand description

The mul_assign lang item.

DivAssign
Expand description

The div_assign lang item.

RemAssign
Expand description

The rem_assign lang item.

BitXorAssign
Expand description

The bitxor_assign lang item.

BitAndAssign
Expand description

The bitand_assign lang item.

BitOrAssign
Expand description

The bitor_assign lang item.

ShlAssign
Expand description

The shl_assign lang item.

ShrAssign
Expand description

The shr_assign lang item.

Index
Expand description

The index lang item.

IndexMut
Expand description

The index_mut lang item.

UnsafeCell
Expand description

The unsafe_cell lang item.

VaList
Expand description

The va_list lang item.

Deref
Expand description

The deref lang item.

DerefMut
Expand description

The deref_mut lang item.

DerefTarget
Expand description

The deref_target lang item.

Receiver
Expand description

The receiver lang item.

Fn
Expand description

The Fn lang item.

FnMut
Expand description

The fn_mut lang item.

FnOnce
Expand description

The fn_once lang item.

FnOnceOutput
Expand description

The fn_once_output lang item.

Future
Expand description

The future_trait lang item.

GeneratorState
Expand description

The generator_state lang item.

Generator
Expand description

The generator lang item.

Unpin
Expand description

The unpin lang item.

Pin
Expand description

The pin lang item.

PartialEq
Expand description

The eq lang item.

PartialOrd
Expand description

The partial_ord lang item.

Panic
Expand description

The panic lang item.

PanicStr
Expand description

The panic_str lang item.

PanicBoundsCheck
Expand description

The panic_bounds_check lang item.

PanicInfo
Expand description

The panic_info lang item.

PanicLocation
Expand description

The panic_location lang item.

PanicImpl
Expand description

The panic_impl lang item.

BeginPanic
Expand description

The begin_panic lang item.

libstd panic entry point. Necessary for const eval to be able to catch it

ExchangeMalloc
Expand description

The exchange_malloc lang item.

BoxFree
Expand description

The box_free lang item.

DropInPlace
Expand description

The drop_in_place lang item.

Oom
Expand description

The oom lang item.

AllocLayout
Expand description

The alloc_layout lang item.

Start
Expand description

The start lang item.

EhPersonality
Expand description

The eh_personality lang item.

EhCatchTypeinfo
Expand description

The eh_catch_typeinfo lang item.

OwnedBox
Expand description

The owned_box lang item.

PhantomData
Expand description

The phantom_data lang item.

ManuallyDrop
Expand description

The manually_drop lang item.

MaybeUninit
Expand description

The maybe_uninit lang item.

AlignOffset
Expand description

The align_offset lang item.

Align offset for stride != 1; must not panic.

Termination
Expand description

The termination lang item.

Try
Expand description

The Try lang item.

TryFromError
Expand description

The from_error lang item.

TryFromOk
Expand description

The from_ok lang item.

TryIntoResult
Expand description

The into_result lang item.

PollReady
Expand description

The Ready lang item.

PollPending
Expand description

The Pending lang item.

FromGenerator
Expand description

The from_generator lang item.

GetContext
Expand description

The get_context lang item.

FuturePoll
Expand description

The poll lang item.

FromFrom
Expand description

The from lang item.

OptionSome
Expand description

The Some lang item.

OptionNone
Expand description

The None lang item.

ResultOk
Expand description

The Ok lang item.

ResultErr
Expand description

The Err lang item.

IntoIterIntoIter
Expand description

The into_iter lang item.

IteratorNext
Expand description

The next lang item.

PinNewUnchecked
Expand description

The new_unchecked lang item.

RangeFrom
Expand description

The RangeFrom lang item.

RangeFull
Expand description

The RangeFull lang item.

RangeInclusiveStruct
Expand description

The RangeInclusive lang item.

RangeInclusiveNew
Expand description

The range_inclusive_new lang item.

Range
Expand description

The Range lang item.

RangeToInclusive
Expand description

The RangeToInclusive lang item.

RangeTo
Expand description

The RangeTo lang item.

Implementations

impl LangItem[src]

impl LangItem[src]

pub fn name(self) -> Symbol[src]

Returns the name symbol in #[lang = "$name"]. For example, LangItem::PartialEq.name() would result in sym::eq since it is #[lang = "eq"].

pub fn group(self) -> Option<LangItemGroup>[src]

The group that this lang item belongs to, or None if it doesn’t belong to a group.

Trait Implementations

impl Clone for LangItem[src]

fn clone(&self) -> LangItem[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for LangItem[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<__D: Decoder> Decodable<__D> for LangItem[src]

fn decode(__decoder: &mut __D) -> Result<Self, <__D as Decoder>::Error>[src]

impl<__E: Encoder> Encodable<__E> for LangItem[src]

fn encode(&self, __encoder: &mut __E) -> Result<(), <__E as Encoder>::Error>[src]

impl Hash for LangItem[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher, 
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<CTX> HashStable<CTX> for LangItem[src]

fn hash_stable(&self, _: &mut CTX, hasher: &mut StableHasher)[src]

impl PartialEq<LangItem> for LangItem[src]

fn eq(&self, other: &LangItem) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for LangItem[src]

impl Eq for LangItem[src]

impl StructuralEq for LangItem[src]

impl StructuralPartialEq for LangItem[src]

Auto Trait Implementations

impl RefUnwindSafe for LangItem

impl Send for LangItem

impl Sync for LangItem

impl Unpin for LangItem

impl UnwindSafe for LangItem

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.