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

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

Fields§

§items: [Option<DefId>; 144]

Mappings from lang items to their possibly found DefIds. The index corresponds to the order in 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 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 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 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 receiver_trait(&self) -> Option<DefId>

Returns the DefId of the 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_kind_helper(&self) -> Option<DefId>

Returns the DefId of the async_fn_kind_helper 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 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_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 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 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 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 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> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

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

§

type Output = T

Should always be Self
source§

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

§

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

§

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