Enum rustc_hir::lang_items::LangItem [−][src]
pub enum LangItem {
Show 139 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,
PanicFmt,
PanicDisplay,
PanicStr,
ConstPanicFmt,
PanicBoundsCheck,
PanicInfo,
PanicLocation,
PanicImpl,
BeginPanic,
ExchangeMalloc,
BoxFree,
DropInPlace,
Oom,
AllocLayout,
ConstEvalSelect,
ConstConstEvalSelect,
Start,
EhPersonality,
EhCatchTypeinfo,
OwnedBox,
PhantomData,
ManuallyDrop,
MaybeUninit,
AlignOffset,
Termination,
Try,
SliceLen,
TryTraitFromResidual,
TryTraitFromOutput,
TryTraitBranch,
PollReady,
PollPending,
FromGenerator,
GetContext,
FuturePoll,
FromFrom,
OptionSome,
OptionNone,
ResultOk,
ResultErr,
ControlFlowContinue,
ControlFlowBreak,
IntoIterIntoIter,
IteratorNext,
PinNewUnchecked,
RangeFrom,
RangeFull,
RangeInclusiveStruct,
RangeInclusiveNew,
Range,
RangeToInclusive,
RangeTo,
}Expand description
A representation of all the valid language items in Rust.
Variants
The bool lang item.
The char lang item.
The str lang item.
The array lang item.
The slice lang item.
The slice_u8 lang item.
The str_alloc lang item.
The slice_alloc lang item.
The slice_u8_alloc lang item.
The const_ptr lang item.
The mut_ptr lang item.
The const_slice_ptr lang item.
The mut_slice_ptr lang item.
The i8 lang item.
The i16 lang item.
The i32 lang item.
The i64 lang item.
The i128 lang item.
The isize lang item.
The u8 lang item.
The u16 lang item.
The u32 lang item.
The u64 lang item.
The u128 lang item.
The usize lang item.
The f32 lang item.
The f64 lang item.
The f32_runtime lang item.
The f64_runtime lang item.
The sized lang item.
The unsize lang item.
The structural_peq lang item.
Trait injected by #[derive(PartialEq)], (i.e. “Partial EQ”).
The structural_teq lang item.
Trait injected by #[derive(Eq)], (i.e. “Total EQ”; no, I will not apologize).
The copy lang item.
The clone lang item.
The sync lang item.
The discriminant_kind lang item.
The discriminant_type lang item.
The associated item of the [DiscriminantKind] trait.
The pointee_trait lang item.
The metadata_type lang item.
The dyn_metadata lang item.
The freeze lang item.
The drop lang item.
The coerce_unsized lang item.
The dispatch_from_dyn lang item.
The add lang item.
The sub lang item.
The mul lang item.
The div lang item.
The rem lang item.
The neg lang item.
The not lang item.
The bitxor lang item.
The bitand lang item.
The bitor lang item.
The shl lang item.
The shr lang item.
The add_assign lang item.
The sub_assign lang item.
The mul_assign lang item.
The div_assign lang item.
The rem_assign lang item.
The bitxor_assign lang item.
The bitand_assign lang item.
The bitor_assign lang item.
The shl_assign lang item.
The shr_assign lang item.
The index lang item.
The index_mut lang item.
The unsafe_cell lang item.
The va_list lang item.
The deref lang item.
The deref_mut lang item.
The deref_target lang item.
The receiver lang item.
The Fn lang item.
The fn_mut lang item.
The fn_once lang item.
The fn_once_output lang item.
The future_trait lang item.
The generator_state lang item.
The generator lang item.
The unpin lang item.
The pin lang item.
The eq lang item.
The partial_ord lang item.
The panic lang item.
The panic_fmt lang item.
The panic_display lang item.
The panic_str lang item.
The const_panic_fmt lang item.
The panic_bounds_check lang item.
The panic_info lang item.
The panic_location lang item.
The panic_impl lang item.
The begin_panic lang item.
libstd panic entry point. Necessary for const eval to be able to catch it
The exchange_malloc lang item.
The box_free lang item.
The drop_in_place lang item.
The oom lang item.
The alloc_layout lang item.
The const_eval_select lang item.
The const_eval_select_ct lang item.
The start lang item.
The eh_personality lang item.
The eh_catch_typeinfo lang item.
The owned_box lang item.
The phantom_data lang item.
The manually_drop lang item.
The maybe_uninit lang item.
The align_offset lang item.
Align offset for stride != 1; must not panic.
The termination lang item.
The Try lang item.
The slice_len_fn lang item.
The from_residual lang item.
The from_output lang item.
The branch lang item.
The Ready lang item.
The Pending lang item.
The from_generator lang item.
The get_context lang item.
The poll lang item.
The from lang item.
The Some lang item.
The None lang item.
The Ok lang item.
The Err lang item.
The Continue lang item.
The Break lang item.
The into_iter lang item.
The next lang item.
The new_unchecked lang item.
The RangeFrom lang item.
The RangeFull lang item.
The RangeInclusive lang item.
The range_inclusive_new lang item.
The Range lang item.
The RangeToInclusive lang item.
The RangeTo lang item.
Implementations
Returns the name symbol in #[lang = "$name"].
For example, LangItem::PartialEq.name()
would result in sym::eq since it is #[lang = "eq"].
The group that this lang item belongs to,
or None if it doesn’t belong to a group.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LangItem
impl UnwindSafe for LangItem
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Bool: 0 bytesChar: 0 bytesStr: 0 bytesArray: 0 bytesSlice: 0 bytesSliceU8: 0 bytesStrAlloc: 0 bytesSliceAlloc: 0 bytesSliceU8Alloc: 0 bytesConstPtr: 0 bytesMutPtr: 0 bytesConstSlicePtr: 0 bytesMutSlicePtr: 0 bytesI8: 0 bytesI16: 0 bytesI32: 0 bytesI64: 0 bytesI128: 0 bytesIsize: 0 bytesU8: 0 bytesU16: 0 bytesU32: 0 bytesU64: 0 bytesU128: 0 bytesUsize: 0 bytesF32: 0 bytesF64: 0 bytesF32Runtime: 0 bytesF64Runtime: 0 bytesSized: 0 bytesUnsize: 0 bytesStructuralPeq: 0 bytesStructuralTeq: 0 bytesCopy: 0 bytesClone: 0 bytesSync: 0 bytesDiscriminantKind: 0 bytesDiscriminant: 0 bytesPointeeTrait: 0 bytesMetadata: 0 bytesDynMetadata: 0 bytesFreeze: 0 bytesDrop: 0 bytesCoerceUnsized: 0 bytesDispatchFromDyn: 0 bytesAdd: 0 bytesSub: 0 bytesMul: 0 bytesDiv: 0 bytesRem: 0 bytesNeg: 0 bytesNot: 0 bytesBitXor: 0 bytesBitAnd: 0 bytesBitOr: 0 bytesShl: 0 bytesShr: 0 bytesAddAssign: 0 bytesSubAssign: 0 bytesMulAssign: 0 bytesDivAssign: 0 bytesRemAssign: 0 bytesBitXorAssign: 0 bytesBitAndAssign: 0 bytesBitOrAssign: 0 bytesShlAssign: 0 bytesShrAssign: 0 bytesIndex: 0 bytesIndexMut: 0 bytesUnsafeCell: 0 bytesVaList: 0 bytesDeref: 0 bytesDerefMut: 0 bytesDerefTarget: 0 bytesReceiver: 0 bytesFn: 0 bytesFnMut: 0 bytesFnOnce: 0 bytesFnOnceOutput: 0 bytesFuture: 0 bytesGeneratorState: 0 bytesGenerator: 0 bytesUnpin: 0 bytesPin: 0 bytesPartialEq: 0 bytesPartialOrd: 0 bytesPanic: 0 bytesPanicFmt: 0 bytesPanicDisplay: 0 bytesPanicStr: 0 bytesConstPanicFmt: 0 bytesPanicBoundsCheck: 0 bytesPanicInfo: 0 bytesPanicLocation: 0 bytesPanicImpl: 0 bytesBeginPanic: 0 bytesExchangeMalloc: 0 bytesBoxFree: 0 bytesDropInPlace: 0 bytesOom: 0 bytesAllocLayout: 0 bytesConstEvalSelect: 0 bytesConstConstEvalSelect: 0 bytesStart: 0 bytesEhPersonality: 0 bytesEhCatchTypeinfo: 0 bytesOwnedBox: 0 bytesPhantomData: 0 bytesManuallyDrop: 0 bytesMaybeUninit: 0 bytesAlignOffset: 0 bytesTermination: 0 bytesTry: 0 bytesSliceLen: 0 bytesTryTraitFromResidual: 0 bytesTryTraitFromOutput: 0 bytesTryTraitBranch: 0 bytesPollReady: 0 bytesPollPending: 0 bytesFromGenerator: 0 bytesGetContext: 0 bytesFuturePoll: 0 bytesFromFrom: 0 bytesOptionSome: 0 bytesOptionNone: 0 bytesResultOk: 0 bytesResultErr: 0 bytesControlFlowContinue: 0 bytesControlFlowBreak: 0 bytesIntoIterIntoIter: 0 bytesIteratorNext: 0 bytesPinNewUnchecked: 0 bytesRangeFrom: 0 bytesRangeFull: 0 bytesRangeInclusiveStruct: 0 bytesRangeInclusiveNew: 0 bytesRange: 0 bytesRangeToInclusive: 0 bytesRangeTo: 0 bytes