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,
}

A representation of all the valid language items in Rust.

Variants

Bool

The bool lang item.

Char

The char lang item.

Str

The str lang item.

Array

The array lang item.

Slice

The slice lang item.

SliceU8

The slice_u8 lang item.

StrAlloc

The str_alloc lang item.

SliceAlloc

The slice_alloc lang item.

SliceU8Alloc

The slice_u8_alloc lang item.

ConstPtr

The const_ptr lang item.

MutPtr

The mut_ptr lang item.

ConstSlicePtr

The const_slice_ptr lang item.

MutSlicePtr

The mut_slice_ptr lang item.

I8

The i8 lang item.

I16

The i16 lang item.

I32

The i32 lang item.

I64

The i64 lang item.

I128

The i128 lang item.

Isize

The isize lang item.

U8

The u8 lang item.

U16

The u16 lang item.

U32

The u32 lang item.

U64

The u64 lang item.

U128

The u128 lang item.

Usize

The usize lang item.

F32

The f32 lang item.

F64

The f64 lang item.

F32Runtime

The f32_runtime lang item.

F64Runtime

The f64_runtime lang item.

Sized

The sized lang item.

Unsize

The unsize lang item.

StructuralPeq

The structural_peq lang item.

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

StructuralTeq

The structural_teq lang item.

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

Copy

The copy lang item.

Clone

The clone lang item.

Sync

The sync lang item.

DiscriminantKind

The discriminant_kind lang item.

Discriminant

The discriminant_type lang item.

The associated item of the [DiscriminantKind] trait.

PointeeTrait

The pointee_trait lang item.

Metadata

The metadata_type lang item.

DynMetadata

The dyn_metadata lang item.

Freeze

The freeze lang item.

Drop

The drop lang item.

CoerceUnsized

The coerce_unsized lang item.

DispatchFromDyn

The dispatch_from_dyn lang item.

Add

The add lang item.

Sub

The sub lang item.

Mul

The mul lang item.

Div

The div lang item.

Rem

The rem lang item.

Neg

The neg lang item.

Not

The not lang item.

BitXor

The bitxor lang item.

BitAnd

The bitand lang item.

BitOr

The bitor lang item.

Shl

The shl lang item.

Shr

The shr lang item.

AddAssign

The add_assign lang item.

SubAssign

The sub_assign lang item.

MulAssign

The mul_assign lang item.

DivAssign

The div_assign lang item.

RemAssign

The rem_assign lang item.

BitXorAssign

The bitxor_assign lang item.

BitAndAssign

The bitand_assign lang item.

BitOrAssign

The bitor_assign lang item.

ShlAssign

The shl_assign lang item.

ShrAssign

The shr_assign lang item.

Index

The index lang item.

IndexMut

The index_mut lang item.

UnsafeCell

The unsafe_cell lang item.

VaList

The va_list lang item.

Deref

The deref lang item.

DerefMut

The deref_mut lang item.

DerefTarget

The deref_target lang item.

Receiver

The receiver lang item.

Fn

The Fn lang item.

FnMut

The fn_mut lang item.

FnOnce

The fn_once lang item.

FnOnceOutput

The fn_once_output lang item.

Future

The future_trait lang item.

GeneratorState

The generator_state lang item.

Generator

The generator lang item.

Unpin

The unpin lang item.

Pin

The pin lang item.

PartialEq

The eq lang item.

PartialOrd

The partial_ord lang item.

Panic

The panic lang item.

PanicStr

The panic_str lang item.

PanicBoundsCheck

The panic_bounds_check lang item.

PanicInfo

The panic_info lang item.

PanicLocation

The panic_location lang item.

PanicImpl

The panic_impl lang item.

BeginPanic

The begin_panic lang item.

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

ExchangeMalloc

The exchange_malloc lang item.

BoxFree

The box_free lang item.

DropInPlace

The drop_in_place lang item.

Oom

The oom lang item.

AllocLayout

The alloc_layout lang item.

Start

The start lang item.

EhPersonality

The eh_personality lang item.

EhCatchTypeinfo

The eh_catch_typeinfo lang item.

OwnedBox

The owned_box lang item.

PhantomData

The phantom_data lang item.

ManuallyDrop

The manually_drop lang item.

MaybeUninit

The maybe_uninit lang item.

AlignOffset

The align_offset lang item.

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

Termination

The termination lang item.

Try

The Try lang item.

TryFromError

The from_error lang item.

TryFromOk

The from_ok lang item.

TryIntoResult

The into_result lang item.

PollReady

The Ready lang item.

PollPending

The Pending lang item.

FromGenerator

The from_generator lang item.

GetContext

The get_context lang item.

FuturePoll

The poll lang item.

FromFrom

The from lang item.

OptionSome

The Some lang item.

OptionNone

The None lang item.

ResultOk

The Ok lang item.

ResultErr

The Err lang item.

IntoIterIntoIter

The into_iter lang item.

IteratorNext

The next lang item.

PinNewUnchecked

The new_unchecked lang item.

RangeFrom

The RangeFrom lang item.

RangeFull

The RangeFull lang item.

RangeInclusiveStruct

The RangeInclusive lang item.

RangeInclusiveNew

The range_inclusive_new lang item.

Range

The Range lang item.

RangeToInclusive

The RangeToInclusive lang item.

RangeTo

The RangeTo lang item.

Implementations

impl LangItem[src]

pub fn from_u32(u: u32) -> Option<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]

impl Copy for LangItem[src]

impl Debug for LangItem[src]

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

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

impl Eq for LangItem[src]

impl Hash for LangItem[src]

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

impl PartialEq<LangItem> 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]

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.