rustc_hir::lang_items

Struct LanguageItems

Source
pub struct LanguageItems {
    items: [Option<DefId>; 185],
    reverse_items: FxIndexMap<DefId, LangItem>,
    pub missing: Vec<LangItem>,
}
Expand description

All of the lang items, defined or not. Defined lang items can come from the current crate or its dependencies.

Fields§

§items: [Option<DefId>; 185]

Mappings from lang items to their possibly found DefIds. The index corresponds to the order in LangItem.

§reverse_items: FxIndexMap<DefId, LangItem>§missing: Vec<LangItem>

Lang items that were not found during collection.

Implementations§

Source§

impl LanguageItems

Source

pub fn new() -> Self

Construct an empty collection of lang items and no missing ones.

Source

pub fn get(&self, item: LangItem) -> Option<DefId>

Source

pub fn set(&mut self, item: LangItem, def_id: DefId)

Source

pub fn from_def_id(&self, def_id: DefId) -> Option<LangItem>

Source

pub fn iter(&self) -> impl Iterator<Item = (LangItem, DefId)> + '_

Source§

impl LanguageItems

Source

pub fn sized_trait(&self) -> Option<DefId>

Returns the DefId of the sized lang item if it is defined.

Source

pub fn unsize_trait(&self) -> Option<DefId>

Returns the DefId of the unsize lang item if it is defined.

Source

pub fn structural_peq_trait(&self) -> Option<DefId>

Returns the DefId of the structural_peq lang item if it is defined.

Source

pub fn copy_trait(&self) -> Option<DefId>

Returns the DefId of the copy lang item if it is defined.

Source

pub fn clone_trait(&self) -> Option<DefId>

Returns the DefId of the clone lang item if it is defined.

Source

pub fn clone_fn(&self) -> Option<DefId>

Returns the DefId of the clone_fn lang item if it is defined.

Source

pub fn sync_trait(&self) -> Option<DefId>

Returns the DefId of the sync lang item if it is defined.

Source

pub fn discriminant_kind_trait(&self) -> Option<DefId>

Returns the DefId of the discriminant_kind lang item if it is defined.

Source

pub fn discriminant_type(&self) -> Option<DefId>

Returns the DefId of the discriminant_type lang item if it is defined.

Source

pub fn pointee_trait(&self) -> Option<DefId>

Returns the DefId of the pointee_trait lang item if it is defined.

Source

pub fn metadata_type(&self) -> Option<DefId>

Returns the DefId of the metadata_type lang item if it is defined.

Source

pub fn dyn_metadata(&self) -> Option<DefId>

Returns the DefId of the dyn_metadata lang item if it is defined.

Source

pub fn freeze_trait(&self) -> Option<DefId>

Returns the DefId of the freeze lang item if it is defined.

Source

pub fn fn_ptr_trait(&self) -> Option<DefId>

Returns the DefId of the fn_ptr_trait lang item if it is defined.

Source

pub fn fn_ptr_addr(&self) -> Option<DefId>

Returns the DefId of the fn_ptr_addr lang item if it is defined.

Source

pub fn drop_trait(&self) -> Option<DefId>

Returns the DefId of the drop lang item if it is defined.

Source

pub fn destruct_trait(&self) -> Option<DefId>

Returns the DefId of the destruct lang item if it is defined.

Source

pub fn async_drop_trait(&self) -> Option<DefId>

Returns the DefId of the async_drop lang item if it is defined.

Source

pub fn async_destruct_trait(&self) -> Option<DefId>

Returns the DefId of the async_destruct lang item if it is defined.

Source

pub fn async_drop_in_place_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_in_place lang item if it is defined.

Source

pub fn surface_async_drop_in_place_fn(&self) -> Option<DefId>

Returns the DefId of the surface_async_drop_in_place lang item if it is defined.

Source

pub fn async_drop_surface_drop_in_place_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_surface_drop_in_place lang item if it is defined.

Source

pub fn async_drop_slice_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_slice lang item if it is defined.

Source

pub fn async_drop_chain_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_chain lang item if it is defined.

Source

pub fn async_drop_noop_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_noop lang item if it is defined.

Source

pub fn async_drop_deferred_drop_in_place_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_deferred_drop_in_place lang item if it is defined.

Source

pub fn async_drop_fuse_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_fuse lang item if it is defined.

Source

pub fn async_drop_defer_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_defer lang item if it is defined.

Source

pub fn async_drop_either_fn(&self) -> Option<DefId>

Returns the DefId of the async_drop_either lang item if it is defined.

Source

pub fn coerce_unsized_trait(&self) -> Option<DefId>

Returns the DefId of the coerce_unsized lang item if it is defined.

Source

pub fn dispatch_from_dyn_trait(&self) -> Option<DefId>

Returns the DefId of the dispatch_from_dyn lang item if it is defined.

Source

pub fn transmute_opts(&self) -> Option<DefId>

Returns the DefId of the transmute_opts lang item if it is defined.

Source

pub fn transmute_trait(&self) -> Option<DefId>

Returns the DefId of the transmute_trait lang item if it is defined.

Source

pub fn add_trait(&self) -> Option<DefId>

Returns the DefId of the add lang item if it is defined.

Source

pub fn sub_trait(&self) -> Option<DefId>

Returns the DefId of the sub lang item if it is defined.

Source

pub fn mul_trait(&self) -> Option<DefId>

Returns the DefId of the mul lang item if it is defined.

Source

pub fn div_trait(&self) -> Option<DefId>

Returns the DefId of the div lang item if it is defined.

Source

pub fn rem_trait(&self) -> Option<DefId>

Returns the DefId of the rem lang item if it is defined.

Source

pub fn neg_trait(&self) -> Option<DefId>

Returns the DefId of the neg lang item if it is defined.

Source

pub fn not_trait(&self) -> Option<DefId>

Returns the DefId of the not lang item if it is defined.

Source

pub fn bitxor_trait(&self) -> Option<DefId>

Returns the DefId of the bitxor lang item if it is defined.

Source

pub fn bitand_trait(&self) -> Option<DefId>

Returns the DefId of the bitand lang item if it is defined.

Source

pub fn bitor_trait(&self) -> Option<DefId>

Returns the DefId of the bitor lang item if it is defined.

Source

pub fn shl_trait(&self) -> Option<DefId>

Returns the DefId of the shl lang item if it is defined.

Source

pub fn shr_trait(&self) -> Option<DefId>

Returns the DefId of the shr lang item if it is defined.

Source

pub fn add_assign_trait(&self) -> Option<DefId>

Returns the DefId of the add_assign lang item if it is defined.

Source

pub fn sub_assign_trait(&self) -> Option<DefId>

Returns the DefId of the sub_assign lang item if it is defined.

Source

pub fn mul_assign_trait(&self) -> Option<DefId>

Returns the DefId of the mul_assign lang item if it is defined.

Source

pub fn div_assign_trait(&self) -> Option<DefId>

Returns the DefId of the div_assign lang item if it is defined.

Source

pub fn rem_assign_trait(&self) -> Option<DefId>

Returns the DefId of the rem_assign lang item if it is defined.

Source

pub fn bitxor_assign_trait(&self) -> Option<DefId>

Returns the DefId of the bitxor_assign lang item if it is defined.

Source

pub fn bitand_assign_trait(&self) -> Option<DefId>

Returns the DefId of the bitand_assign lang item if it is defined.

Source

pub fn bitor_assign_trait(&self) -> Option<DefId>

Returns the DefId of the bitor_assign lang item if it is defined.

Source

pub fn shl_assign_trait(&self) -> Option<DefId>

Returns the DefId of the shl_assign lang item if it is defined.

Source

pub fn shr_assign_trait(&self) -> Option<DefId>

Returns the DefId of the shr_assign lang item if it is defined.

Source

pub fn index_trait(&self) -> Option<DefId>

Returns the DefId of the index lang item if it is defined.

Source

pub fn index_mut_trait(&self) -> Option<DefId>

Returns the DefId of the index_mut lang item if it is defined.

Source

pub fn unsafe_cell_type(&self) -> Option<DefId>

Returns the DefId of the unsafe_cell lang item if it is defined.

Source

pub fn va_list(&self) -> Option<DefId>

Returns the DefId of the va_list lang item if it is defined.

Source

pub fn deref_trait(&self) -> Option<DefId>

Returns the DefId of the deref lang item if it is defined.

Source

pub fn deref_mut_trait(&self) -> Option<DefId>

Returns the DefId of the deref_mut lang item if it is defined.

Source

pub fn deref_pure_trait(&self) -> Option<DefId>

Returns the DefId of the deref_pure lang item if it is defined.

Source

pub fn deref_target(&self) -> Option<DefId>

Returns the DefId of the deref_target lang item if it is defined.

Source

pub fn legacy_receiver_trait(&self) -> Option<DefId>

Returns the DefId of the legacy_receiver lang item if it is defined.

Source

pub fn fn_trait(&self) -> Option<DefId>

Returns the DefId of the Fn lang item if it is defined.

Source

pub fn fn_mut_trait(&self) -> Option<DefId>

Returns the DefId of the fn_mut lang item if it is defined.

Source

pub fn fn_once_trait(&self) -> Option<DefId>

Returns the DefId of the fn_once lang item if it is defined.

Source

pub fn async_fn_trait(&self) -> Option<DefId>

Returns the DefId of the async_fn lang item if it is defined.

Source

pub fn async_fn_mut_trait(&self) -> Option<DefId>

Returns the DefId of the async_fn_mut lang item if it is defined.

Source

pub fn async_fn_once_trait(&self) -> Option<DefId>

Returns the DefId of the async_fn_once lang item if it is defined.

Source

pub fn async_fn_once_output(&self) -> Option<DefId>

Returns the DefId of the async_fn_once_output lang item if it is defined.

Source

pub fn call_once_future(&self) -> Option<DefId>

Returns the DefId of the call_once_future lang item if it is defined.

Source

pub fn call_ref_future(&self) -> Option<DefId>

Returns the DefId of the call_ref_future lang item if it is defined.

Source

pub fn async_fn_kind_helper(&self) -> Option<DefId>

Returns the DefId of the async_fn_kind_helper lang item if it is defined.

Source

pub fn async_fn_kind_upvars(&self) -> Option<DefId>

Returns the DefId of the async_fn_kind_upvars lang item if it is defined.

Source

pub fn fn_once_output(&self) -> Option<DefId>

Returns the DefId of the fn_once_output lang item if it is defined.

Source

pub fn iterator_trait(&self) -> Option<DefId>

Returns the DefId of the iterator lang item if it is defined.

Source

pub fn fused_iterator_trait(&self) -> Option<DefId>

Returns the DefId of the fused_iterator lang item if it is defined.

Source

pub fn future_trait(&self) -> Option<DefId>

Returns the DefId of the future_trait lang item if it is defined.

Source

pub fn future_output(&self) -> Option<DefId>

Returns the DefId of the future_output lang item if it is defined.

Source

pub fn async_iterator_trait(&self) -> Option<DefId>

Returns the DefId of the async_iterator lang item if it is defined.

Source

pub fn coroutine_state(&self) -> Option<DefId>

Returns the DefId of the coroutine_state lang item if it is defined.

Source

pub fn coroutine_trait(&self) -> Option<DefId>

Returns the DefId of the coroutine lang item if it is defined.

Source

pub fn coroutine_return(&self) -> Option<DefId>

Returns the DefId of the coroutine_return lang item if it is defined.

Source

pub fn coroutine_yield(&self) -> Option<DefId>

Returns the DefId of the coroutine_yield lang item if it is defined.

Source

pub fn coroutine_resume(&self) -> Option<DefId>

Returns the DefId of the coroutine_resume lang item if it is defined.

Source

pub fn unpin_trait(&self) -> Option<DefId>

Returns the DefId of the unpin lang item if it is defined.

Source

pub fn pin_type(&self) -> Option<DefId>

Returns the DefId of the pin lang item if it is defined.

Source

pub fn ordering_enum(&self) -> Option<DefId>

Returns the DefId of the Ordering lang item if it is defined.

Source

pub fn eq_trait(&self) -> Option<DefId>

Returns the DefId of the eq lang item if it is defined.

Source

pub fn partial_ord_trait(&self) -> Option<DefId>

Returns the DefId of the partial_ord lang item if it is defined.

Source

pub fn c_void(&self) -> Option<DefId>

Returns the DefId of the c_void lang item if it is defined.

Source

pub fn panic_fn(&self) -> Option<DefId>

Returns the DefId of the panic lang item if it is defined.

Source

pub fn panic_nounwind(&self) -> Option<DefId>

Returns the DefId of the panic_nounwind lang item if it is defined.

Source

pub fn panic_fmt(&self) -> Option<DefId>

Returns the DefId of the panic_fmt lang item if it is defined.

Source

pub fn const_panic_fmt(&self) -> Option<DefId>

Returns the DefId of the const_panic_fmt lang item if it is defined.

Source

pub fn panic_bounds_check_fn(&self) -> Option<DefId>

Returns the DefId of the panic_bounds_check lang item if it is defined.

Source

pub fn panic_misaligned_pointer_dereference_fn(&self) -> Option<DefId>

Returns the DefId of the panic_misaligned_pointer_dereference lang item if it is defined.

Source

pub fn panic_info(&self) -> Option<DefId>

Returns the DefId of the panic_info lang item if it is defined.

Source

pub fn panic_location(&self) -> Option<DefId>

Returns the DefId of the panic_location lang item if it is defined.

Source

pub fn panic_impl(&self) -> Option<DefId>

Returns the DefId of the panic_impl lang item if it is defined.

Source

pub fn panic_cannot_unwind(&self) -> Option<DefId>

Returns the DefId of the panic_cannot_unwind lang item if it is defined.

Source

pub fn panic_in_cleanup(&self) -> Option<DefId>

Returns the DefId of the panic_in_cleanup lang item if it is defined.

Source

pub fn panic_const_add_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_add_overflow lang item if it is defined.

Source

pub fn panic_const_sub_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_sub_overflow lang item if it is defined.

Source

pub fn panic_const_mul_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_mul_overflow lang item if it is defined.

Source

pub fn panic_const_div_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_div_overflow lang item if it is defined.

Source

pub fn panic_const_rem_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_rem_overflow lang item if it is defined.

Source

pub fn panic_const_neg_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_neg_overflow lang item if it is defined.

Source

pub fn panic_const_shr_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_shr_overflow lang item if it is defined.

Source

pub fn panic_const_shl_overflow(&self) -> Option<DefId>

Returns the DefId of the panic_const_shl_overflow lang item if it is defined.

Source

pub fn panic_const_div_by_zero(&self) -> Option<DefId>

Returns the DefId of the panic_const_div_by_zero lang item if it is defined.

Source

pub fn panic_const_rem_by_zero(&self) -> Option<DefId>

Returns the DefId of the panic_const_rem_by_zero lang item if it is defined.

Source

pub fn panic_const_coroutine_resumed(&self) -> Option<DefId>

Returns the DefId of the panic_const_coroutine_resumed lang item if it is defined.

Source

pub fn panic_const_async_fn_resumed(&self) -> Option<DefId>

Returns the DefId of the panic_const_async_fn_resumed lang item if it is defined.

Source

pub fn panic_const_async_gen_fn_resumed(&self) -> Option<DefId>

Returns the DefId of the panic_const_async_gen_fn_resumed lang item if it is defined.

Source

pub fn panic_const_gen_fn_none(&self) -> Option<DefId>

Returns the DefId of the panic_const_gen_fn_none lang item if it is defined.

Source

pub fn panic_const_coroutine_resumed_panic(&self) -> Option<DefId>

Returns the DefId of the panic_const_coroutine_resumed_panic lang item if it is defined.

Source

pub fn panic_const_async_fn_resumed_panic(&self) -> Option<DefId>

Returns the DefId of the panic_const_async_fn_resumed_panic lang item if it is defined.

Source

pub fn panic_const_async_gen_fn_resumed_panic(&self) -> Option<DefId>

Returns the DefId of the panic_const_async_gen_fn_resumed_panic lang item if it is defined.

Source

pub fn panic_const_gen_fn_none_panic(&self) -> Option<DefId>

Returns the DefId of the panic_const_gen_fn_none_panic lang item if it is defined.

Source

pub fn begin_panic_fn(&self) -> Option<DefId>

Returns the DefId of the begin_panic lang item if it is defined.

Source

pub fn format_alignment(&self) -> Option<DefId>

Returns the DefId of the format_alignment lang item if it is defined.

Source

pub fn format_argument(&self) -> Option<DefId>

Returns the DefId of the format_argument lang item if it is defined.

Source

pub fn format_arguments(&self) -> Option<DefId>

Returns the DefId of the format_arguments lang item if it is defined.

Source

pub fn format_count(&self) -> Option<DefId>

Returns the DefId of the format_count lang item if it is defined.

Source

pub fn format_placeholder(&self) -> Option<DefId>

Returns the DefId of the format_placeholder lang item if it is defined.

Source

pub fn format_unsafe_arg(&self) -> Option<DefId>

Returns the DefId of the format_unsafe_arg lang item if it is defined.

Source

pub fn exchange_malloc_fn(&self) -> Option<DefId>

Returns the DefId of the exchange_malloc lang item if it is defined.

Source

pub fn drop_in_place_fn(&self) -> Option<DefId>

Returns the DefId of the drop_in_place lang item if it is defined.

Source

pub fn fallback_surface_drop_fn(&self) -> Option<DefId>

Returns the DefId of the fallback_surface_drop lang item if it is defined.

Source

pub fn alloc_layout(&self) -> Option<DefId>

Returns the DefId of the alloc_layout lang item if it is defined.

Source

pub fn start_fn(&self) -> Option<DefId>

Returns the DefId of the start lang item if it is defined.

Source

pub fn eh_personality(&self) -> Option<DefId>

Returns the DefId of the eh_personality lang item if it is defined.

Source

pub fn eh_catch_typeinfo(&self) -> Option<DefId>

Returns the DefId of the eh_catch_typeinfo lang item if it is defined.

Source

pub fn owned_box(&self) -> Option<DefId>

Returns the DefId of the owned_box lang item if it is defined.

Source

pub fn global_alloc_ty(&self) -> Option<DefId>

Returns the DefId of the global_alloc_ty lang item if it is defined.

Source

pub fn ptr_unique(&self) -> Option<DefId>

Returns the DefId of the ptr_unique lang item if it is defined.

Source

pub fn phantom_data(&self) -> Option<DefId>

Returns the DefId of the phantom_data lang item if it is defined.

Source

pub fn manually_drop(&self) -> Option<DefId>

Returns the DefId of the manually_drop lang item if it is defined.

Source

pub fn maybe_uninit(&self) -> Option<DefId>

Returns the DefId of the maybe_uninit lang item if it is defined.

Source

pub fn align_offset_fn(&self) -> Option<DefId>

Returns the DefId of the align_offset lang item if it is defined.

Source

pub fn termination(&self) -> Option<DefId>

Returns the DefId of the termination lang item if it is defined.

Source

pub fn try_trait(&self) -> Option<DefId>

Returns the DefId of the Try lang item if it is defined.

Source

pub fn tuple_trait(&self) -> Option<DefId>

Returns the DefId of the tuple_trait lang item if it is defined.

Source

pub fn slice_len_fn(&self) -> Option<DefId>

Returns the DefId of the slice_len_fn lang item if it is defined.

Source

pub fn from_residual_fn(&self) -> Option<DefId>

Returns the DefId of the from_residual lang item if it is defined.

Source

pub fn from_output_fn(&self) -> Option<DefId>

Returns the DefId of the from_output lang item if it is defined.

Source

pub fn branch_fn(&self) -> Option<DefId>

Returns the DefId of the branch lang item if it is defined.

Source

pub fn from_yeet_fn(&self) -> Option<DefId>

Returns the DefId of the from_yeet lang item if it is defined.

Source

pub fn pointer_like(&self) -> Option<DefId>

Returns the DefId of the pointer_like lang item if it is defined.

Source

pub fn const_param_ty_trait(&self) -> Option<DefId>

Returns the DefId of the const_param_ty lang item if it is defined.

Source

pub fn unsized_const_param_ty_trait(&self) -> Option<DefId>

Returns the DefId of the unsized_const_param_ty lang item if it is defined.

Source

pub fn poll(&self) -> Option<DefId>

Returns the DefId of the Poll lang item if it is defined.

Source

pub fn poll_ready_variant(&self) -> Option<DefId>

Returns the DefId of the Ready lang item if it is defined.

Source

pub fn poll_pending_variant(&self) -> Option<DefId>

Returns the DefId of the Pending lang item if it is defined.

Source

pub fn async_gen_ready(&self) -> Option<DefId>

Returns the DefId of the AsyncGenReady lang item if it is defined.

Source

pub fn async_gen_pending(&self) -> Option<DefId>

Returns the DefId of the AsyncGenPending lang item if it is defined.

Source

pub fn async_gen_finished(&self) -> Option<DefId>

Returns the DefId of the AsyncGenFinished lang item if it is defined.

Source

pub fn resume_ty(&self) -> Option<DefId>

Returns the DefId of the ResumeTy lang item if it is defined.

Source

pub fn get_context_fn(&self) -> Option<DefId>

Returns the DefId of the get_context lang item if it is defined.

Source

pub fn context(&self) -> Option<DefId>

Returns the DefId of the Context lang item if it is defined.

Source

pub fn future_poll_fn(&self) -> Option<DefId>

Returns the DefId of the poll lang item if it is defined.

Source

pub fn async_iterator_poll_next(&self) -> Option<DefId>

Returns the DefId of the async_iterator_poll_next lang item if it is defined.

Source

pub fn into_async_iter_into_iter(&self) -> Option<DefId>

Returns the DefId of the into_async_iter_into_iter lang item if it is defined.

Source

pub fn option_type(&self) -> Option<DefId>

Returns the DefId of the Option lang item if it is defined.

Source

pub fn option_some_variant(&self) -> Option<DefId>

Returns the DefId of the Some lang item if it is defined.

Source

pub fn option_none_variant(&self) -> Option<DefId>

Returns the DefId of the None lang item if it is defined.

Source

pub fn result_ok_variant(&self) -> Option<DefId>

Returns the DefId of the Ok lang item if it is defined.

Source

pub fn result_err_variant(&self) -> Option<DefId>

Returns the DefId of the Err lang item if it is defined.

Source

pub fn cf_continue_variant(&self) -> Option<DefId>

Returns the DefId of the Continue lang item if it is defined.

Source

pub fn cf_break_variant(&self) -> Option<DefId>

Returns the DefId of the Break lang item if it is defined.

Source

pub fn into_future_fn(&self) -> Option<DefId>

Returns the DefId of the into_future lang item if it is defined.

Source

pub fn into_iter_fn(&self) -> Option<DefId>

Returns the DefId of the into_iter lang item if it is defined.

Source

pub fn next_fn(&self) -> Option<DefId>

Returns the DefId of the next lang item if it is defined.

Source

pub fn new_unchecked_fn(&self) -> Option<DefId>

Returns the DefId of the new_unchecked lang item if it is defined.

Source

pub fn range_from_struct(&self) -> Option<DefId>

Returns the DefId of the RangeFrom lang item if it is defined.

Source

pub fn range_full_struct(&self) -> Option<DefId>

Returns the DefId of the RangeFull lang item if it is defined.

Source

pub fn range_inclusive_struct(&self) -> Option<DefId>

Returns the DefId of the RangeInclusive lang item if it is defined.

Source

pub fn range_inclusive_new_method(&self) -> Option<DefId>

Returns the DefId of the range_inclusive_new lang item if it is defined.

Source

pub fn range_struct(&self) -> Option<DefId>

Returns the DefId of the Range lang item if it is defined.

Source

pub fn range_to_inclusive_struct(&self) -> Option<DefId>

Returns the DefId of the RangeToInclusive lang item if it is defined.

Source

pub fn range_to_struct(&self) -> Option<DefId>

Returns the DefId of the RangeTo lang item if it is defined.

Source

pub fn string(&self) -> Option<DefId>

Returns the DefId of the String lang item if it is defined.

Source

pub fn c_str(&self) -> Option<DefId>

Returns the DefId of the CStr lang item if it is defined.

Trait Implementations§

Source§

impl Debug for LanguageItems

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<__CTX> HashStable<__CTX> for LanguageItems
where __CTX: HashStableContext,

Source§

fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Aligned for T

Source§

const ALIGN: Alignment = _

Alignment of Self.
Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<'a, T> Captures<'a> for T
where T: ?Sized,

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: 1560 bytes