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

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

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]

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

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

Returns the corresponding DefId for the lang item if it exists.

impl LanguageItems[src]

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

Trait Implementations

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.