Struct rustc_hir::lang_items::LanguageItems[−][src]

pub struct LanguageItems {
    pub items: Vec<Option<DefId>>,
    pub missing: Vec<LangItem>,
    pub groups: [Vec<DefId>; 1],
}

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

Fields

items: Vec<Option<DefId>>

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.

groups: [Vec<DefId>; 1]

Mapping from LangItemGroup discriminants to all DefIds of lang items in that group.

Implementations

impl LanguageItems[src]

pub fn new() -> Self[src]

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

pub fn items(&self) -> &[Option<DefId>][src]

Returns the mappings to the possibly found DefIds for each lang item.

pub fn require(&self, it: LangItem) -> Result<DefId, String>[src]

Requires that a given LangItem was bound and returns the corresponding DefId. If it wasn’t bound, e.g. due to a missing #[lang = "<it.name()>"], returns an error message as a string.

pub fn group(&self, group: LangItemGroup) -> &[DefId][src]

Returns the DefIds of all lang items in a group.

pub fn bool_impl(&self) -> Option<DefId>[src]

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

pub fn char_impl(&self) -> Option<DefId>[src]

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

pub fn str_impl(&self) -> Option<DefId>[src]

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

pub fn array_impl(&self) -> Option<DefId>[src]

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

pub fn slice_impl(&self) -> Option<DefId>[src]

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

pub fn slice_u8_impl(&self) -> Option<DefId>[src]

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

pub fn str_alloc_impl(&self) -> Option<DefId>[src]

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

pub fn slice_alloc_impl(&self) -> Option<DefId>[src]

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

pub fn slice_u8_alloc_impl(&self) -> Option<DefId>[src]

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

pub fn const_ptr_impl(&self) -> Option<DefId>[src]

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

pub fn mut_ptr_impl(&self) -> Option<DefId>[src]

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

pub fn const_slice_ptr_impl(&self) -> Option<DefId>[src]

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

pub fn mut_slice_ptr_impl(&self) -> Option<DefId>[src]

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

pub fn i8_impl(&self) -> Option<DefId>[src]

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

pub fn i16_impl(&self) -> Option<DefId>[src]

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

pub fn i32_impl(&self) -> Option<DefId>[src]

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

pub fn i64_impl(&self) -> Option<DefId>[src]

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

pub fn i128_impl(&self) -> Option<DefId>[src]

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

pub fn isize_impl(&self) -> Option<DefId>[src]

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

pub fn u8_impl(&self) -> Option<DefId>[src]

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

pub fn u16_impl(&self) -> Option<DefId>[src]

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

pub fn u32_impl(&self) -> Option<DefId>[src]

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

pub fn u64_impl(&self) -> Option<DefId>[src]

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

pub fn u128_impl(&self) -> Option<DefId>[src]

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

pub fn usize_impl(&self) -> Option<DefId>[src]

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

pub fn f32_impl(&self) -> Option<DefId>[src]

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

pub fn f64_impl(&self) -> Option<DefId>[src]

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

pub fn f32_runtime_impl(&self) -> Option<DefId>[src]

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

pub fn f64_runtime_impl(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

pub fn structural_teq_trait(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub fn receiver_trait(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

pub fn gen_state(&self) -> Option<DefId>[src]

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

pub fn gen_trait(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

pub fn panic_str(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

pub fn box_free_fn(&self) -> Option<DefId>[src]

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

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

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

pub fn oom(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub fn from_error_fn(&self) -> Option<DefId>[src]

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

pub fn from_ok_fn(&self) -> Option<DefId>[src]

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

pub fn into_result_fn(&self) -> Option<DefId>[src]

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

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

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

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

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

pub fn from_generator_fn(&self) -> Option<DefId>[src]

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

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

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

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

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

pub fn from_fn(&self) -> Option<DefId>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl LanguageItems[src]

pub fn is_weak_lang_item(&self, item_def_id: DefId) -> bool[src]

Trait Implementations

impl Debug for LanguageItems[src]

impl<__CTX> HashStable<__CTX> for LanguageItems where
    __CTX: HashStableContext, 
[src]

Auto Trait Implementations

impl RefUnwindSafe for LanguageItems

impl Send for LanguageItems

impl Sync for LanguageItems

impl Unpin for LanguageItems

impl UnwindSafe for LanguageItems

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