pub struct Queries<'tcx> {
Show 283 fields pub(crate) local_providers: Box<Providers>, pub(crate) extern_providers: Box<ExternProviders>, pub on_disk_cache: Option<OnDiskCache<'tcx>>, pub(crate) jobs: AtomicU64, pub(crate) trigger_delay_span_bug: QueryState<trigger_delay_span_bug<'tcx>>, pub(crate) resolutions: QueryState<resolutions<'tcx>>, pub(crate) resolver_for_lowering: QueryState<resolver_for_lowering<'tcx>>, pub(crate) source_span: QueryState<source_span<'tcx>>, pub(crate) hir_crate: QueryState<hir_crate<'tcx>>, pub(crate) hir_crate_items: QueryState<hir_crate_items<'tcx>>, pub(crate) hir_module_items: QueryState<hir_module_items<'tcx>>, pub(crate) hir_owner: QueryState<hir_owner<'tcx>>, pub(crate) local_def_id_to_hir_id: QueryState<local_def_id_to_hir_id<'tcx>>, pub(crate) hir_owner_parent: QueryState<hir_owner_parent<'tcx>>, pub(crate) hir_owner_nodes: QueryState<hir_owner_nodes<'tcx>>, pub(crate) hir_attrs: QueryState<hir_attrs<'tcx>>, pub(crate) opt_const_param_of: QueryState<opt_const_param_of<'tcx>>, pub(crate) const_param_default: QueryState<const_param_default<'tcx>>, pub(crate) type_of: QueryState<type_of<'tcx>>, pub(crate) analysis: QueryState<analysis<'tcx>>, pub(crate) check_expectations: QueryState<check_expectations<'tcx>>, pub(crate) generics_of: QueryState<generics_of<'tcx>>, pub(crate) predicates_of: QueryState<predicates_of<'tcx>>, pub(crate) explicit_item_bounds: QueryState<explicit_item_bounds<'tcx>>, pub(crate) item_bounds: QueryState<item_bounds<'tcx>>, pub(crate) native_libraries: QueryState<native_libraries<'tcx>>, pub(crate) lint_levels: QueryState<lint_levels<'tcx>>, pub(crate) parent_module_from_def_id: QueryState<parent_module_from_def_id<'tcx>>, pub(crate) expn_that_defined: QueryState<expn_that_defined<'tcx>>, pub(crate) is_panic_runtime: QueryState<is_panic_runtime<'tcx>>, pub(crate) thir_body: QueryState<thir_body<'tcx>>, pub(crate) thir_tree: QueryState<thir_tree<'tcx>>, pub(crate) mir_keys: QueryState<mir_keys<'tcx>>, pub(crate) mir_const_qualif: QueryState<mir_const_qualif<'tcx>>, pub(crate) mir_const_qualif_const_arg: QueryState<mir_const_qualif_const_arg<'tcx>>, pub(crate) mir_built: QueryState<mir_built<'tcx>>, pub(crate) mir_const: QueryState<mir_const<'tcx>>, pub(crate) thir_abstract_const: QueryState<thir_abstract_const<'tcx>>, pub(crate) thir_abstract_const_of_const_arg: QueryState<thir_abstract_const_of_const_arg<'tcx>>, pub(crate) try_unify_abstract_consts: QueryState<try_unify_abstract_consts<'tcx>>, pub(crate) mir_drops_elaborated_and_const_checked: QueryState<mir_drops_elaborated_and_const_checked<'tcx>>, pub(crate) mir_for_ctfe: QueryState<mir_for_ctfe<'tcx>>, pub(crate) mir_for_ctfe_of_const_arg: QueryState<mir_for_ctfe_of_const_arg<'tcx>>, pub(crate) mir_promoted: QueryState<mir_promoted<'tcx>>, pub(crate) symbols_for_closure_captures: QueryState<symbols_for_closure_captures<'tcx>>, pub(crate) optimized_mir: QueryState<optimized_mir<'tcx>>, pub(crate) coverageinfo: QueryState<coverageinfo<'tcx>>, pub(crate) covered_code_regions: QueryState<covered_code_regions<'tcx>>, pub(crate) promoted_mir: QueryState<promoted_mir<'tcx>>, pub(crate) promoted_mir_of_const_arg: QueryState<promoted_mir_of_const_arg<'tcx>>, pub(crate) erase_regions_ty: QueryState<erase_regions_ty<'tcx>>, pub(crate) wasm_import_module_map: QueryState<wasm_import_module_map<'tcx>>, pub(crate) predicates_defined_on: QueryState<predicates_defined_on<'tcx>>, pub(crate) trait_explicit_predicates_and_bounds: QueryState<trait_explicit_predicates_and_bounds<'tcx>>, pub(crate) explicit_predicates_of: QueryState<explicit_predicates_of<'tcx>>, pub(crate) inferred_outlives_of: QueryState<inferred_outlives_of<'tcx>>, pub(crate) super_predicates_of: QueryState<super_predicates_of<'tcx>>, pub(crate) super_predicates_that_define_assoc_type: QueryState<super_predicates_that_define_assoc_type<'tcx>>, pub(crate) type_param_predicates: QueryState<type_param_predicates<'tcx>>, pub(crate) trait_def: QueryState<trait_def<'tcx>>, pub(crate) adt_def: QueryState<adt_def<'tcx>>, pub(crate) adt_destructor: QueryState<adt_destructor<'tcx>>, pub(crate) adt_sized_constraint: QueryState<adt_sized_constraint<'tcx>>, pub(crate) adt_dtorck_constraint: QueryState<adt_dtorck_constraint<'tcx>>, pub(crate) constness: QueryState<constness<'tcx>>, pub(crate) asyncness: QueryState<asyncness<'tcx>>, pub(crate) is_promotable_const_fn: QueryState<is_promotable_const_fn<'tcx>>, pub(crate) is_foreign_item: QueryState<is_foreign_item<'tcx>>, pub(crate) generator_kind: QueryState<generator_kind<'tcx>>, pub(crate) crate_variances: QueryState<crate_variances<'tcx>>, pub(crate) variances_of: QueryState<variances_of<'tcx>>, pub(crate) inferred_outlives_crate: QueryState<inferred_outlives_crate<'tcx>>, pub(crate) associated_item_def_ids: QueryState<associated_item_def_ids<'tcx>>, pub(crate) associated_item: QueryState<associated_item<'tcx>>, pub(crate) associated_items: QueryState<associated_items<'tcx>>, pub(crate) impl_item_implementor_ids: QueryState<impl_item_implementor_ids<'tcx>>, pub(crate) impl_trait_ref: QueryState<impl_trait_ref<'tcx>>, pub(crate) impl_polarity: QueryState<impl_polarity<'tcx>>, pub(crate) issue33140_self_ty: QueryState<issue33140_self_ty<'tcx>>, pub(crate) inherent_impls: QueryState<inherent_impls<'tcx>>, pub(crate) incoherent_impls: QueryState<incoherent_impls<'tcx>>, pub(crate) unsafety_check_result: QueryState<unsafety_check_result<'tcx>>, pub(crate) unsafety_check_result_for_const_arg: QueryState<unsafety_check_result_for_const_arg<'tcx>>, pub(crate) thir_check_unsafety: QueryState<thir_check_unsafety<'tcx>>, pub(crate) thir_check_unsafety_for_const_arg: QueryState<thir_check_unsafety_for_const_arg<'tcx>>, pub(crate) unsafe_derive_on_repr_packed: QueryState<unsafe_derive_on_repr_packed<'tcx>>, pub(crate) fn_sig: QueryState<fn_sig<'tcx>>, pub(crate) lint_mod: QueryState<lint_mod<'tcx>>, pub(crate) check_mod_attrs: QueryState<check_mod_attrs<'tcx>>, pub(crate) check_mod_unstable_api_usage: QueryState<check_mod_unstable_api_usage<'tcx>>, pub(crate) check_mod_const_bodies: QueryState<check_mod_const_bodies<'tcx>>, pub(crate) check_mod_loops: QueryState<check_mod_loops<'tcx>>, pub(crate) check_mod_naked_functions: QueryState<check_mod_naked_functions<'tcx>>, pub(crate) check_mod_item_types: QueryState<check_mod_item_types<'tcx>>, pub(crate) check_mod_privacy: QueryState<check_mod_privacy<'tcx>>, pub(crate) check_mod_liveness: QueryState<check_mod_liveness<'tcx>>, pub(crate) live_symbols_and_ignored_derived_traits: QueryState<live_symbols_and_ignored_derived_traits<'tcx>>, pub(crate) check_mod_deathness: QueryState<check_mod_deathness<'tcx>>, pub(crate) check_mod_impl_wf: QueryState<check_mod_impl_wf<'tcx>>, pub(crate) check_mod_type_wf: QueryState<check_mod_type_wf<'tcx>>, pub(crate) collect_mod_item_types: QueryState<collect_mod_item_types<'tcx>>, pub(crate) coerce_unsized_info: QueryState<coerce_unsized_info<'tcx>>, pub(crate) typeck_item_bodies: QueryState<typeck_item_bodies<'tcx>>, pub(crate) typeck: QueryState<typeck<'tcx>>, pub(crate) typeck_const_arg: QueryState<typeck_const_arg<'tcx>>, pub(crate) diagnostic_only_typeck: QueryState<diagnostic_only_typeck<'tcx>>, pub(crate) used_trait_imports: QueryState<used_trait_imports<'tcx>>, pub(crate) has_typeck_results: QueryState<has_typeck_results<'tcx>>, pub(crate) coherent_trait: QueryState<coherent_trait<'tcx>>, pub(crate) mir_borrowck: QueryState<mir_borrowck<'tcx>>, pub(crate) mir_borrowck_const_arg: QueryState<mir_borrowck_const_arg<'tcx>>, pub(crate) crate_inherent_impls: QueryState<crate_inherent_impls<'tcx>>, pub(crate) crate_inherent_impls_overlap_check: QueryState<crate_inherent_impls_overlap_check<'tcx>>, pub(crate) orphan_check_impl: QueryState<orphan_check_impl<'tcx>>, pub(crate) mir_callgraph_reachable: QueryState<mir_callgraph_reachable<'tcx>>, pub(crate) mir_inliner_callees: QueryState<mir_inliner_callees<'tcx>>, pub(crate) eval_to_allocation_raw: QueryState<eval_to_allocation_raw<'tcx>>, pub(crate) eval_to_const_value_raw: QueryState<eval_to_const_value_raw<'tcx>>, pub(crate) eval_to_valtree: QueryState<eval_to_valtree<'tcx>>, pub(crate) valtree_to_const_val: QueryState<valtree_to_const_val<'tcx>>, pub(crate) destructure_const: QueryState<destructure_const<'tcx>>, pub(crate) try_destructure_mir_constant: QueryState<try_destructure_mir_constant<'tcx>>, pub(crate) deref_mir_constant: QueryState<deref_mir_constant<'tcx>>, pub(crate) const_caller_location: QueryState<const_caller_location<'tcx>>, pub(crate) lit_to_const: QueryState<lit_to_const<'tcx>>, pub(crate) lit_to_mir_constant: QueryState<lit_to_mir_constant<'tcx>>, pub(crate) check_match: QueryState<check_match<'tcx>>, pub(crate) privacy_access_levels: QueryState<privacy_access_levels<'tcx>>, pub(crate) check_private_in_public: QueryState<check_private_in_public<'tcx>>, pub(crate) reachable_set: QueryState<reachable_set<'tcx>>, pub(crate) region_scope_tree: QueryState<region_scope_tree<'tcx>>, pub(crate) mir_shims: QueryState<mir_shims<'tcx>>, pub(crate) symbol_name: QueryState<symbol_name<'tcx>>, pub(crate) opt_def_kind: QueryState<opt_def_kind<'tcx>>, pub(crate) def_span: QueryState<def_span<'tcx>>, pub(crate) def_ident_span: QueryState<def_ident_span<'tcx>>, pub(crate) lookup_stability: QueryState<lookup_stability<'tcx>>, pub(crate) lookup_const_stability: QueryState<lookup_const_stability<'tcx>>, pub(crate) lookup_default_body_stability: QueryState<lookup_default_body_stability<'tcx>>, pub(crate) should_inherit_track_caller: QueryState<should_inherit_track_caller<'tcx>>, pub(crate) lookup_deprecation_entry: QueryState<lookup_deprecation_entry<'tcx>>, pub(crate) is_doc_hidden: QueryState<is_doc_hidden<'tcx>>, pub(crate) item_attrs: QueryState<item_attrs<'tcx>>, pub(crate) codegen_fn_attrs: QueryState<codegen_fn_attrs<'tcx>>, pub(crate) asm_target_features: QueryState<asm_target_features<'tcx>>, pub(crate) fn_arg_names: QueryState<fn_arg_names<'tcx>>, pub(crate) rendered_const: QueryState<rendered_const<'tcx>>, pub(crate) impl_parent: QueryState<impl_parent<'tcx>>, pub(crate) is_ctfe_mir_available: QueryState<is_ctfe_mir_available<'tcx>>, pub(crate) is_mir_available: QueryState<is_mir_available<'tcx>>, pub(crate) own_existential_vtable_entries: QueryState<own_existential_vtable_entries<'tcx>>, pub(crate) vtable_entries: QueryState<vtable_entries<'tcx>>, pub(crate) vtable_trait_upcasting_coercion_new_vptr_slot: QueryState<vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>>, pub(crate) vtable_allocation: QueryState<vtable_allocation<'tcx>>, pub(crate) codegen_fulfill_obligation: QueryState<codegen_fulfill_obligation<'tcx>>, pub(crate) all_local_trait_impls: QueryState<all_local_trait_impls<'tcx>>, pub(crate) trait_impls_of: QueryState<trait_impls_of<'tcx>>, pub(crate) specialization_graph_of: QueryState<specialization_graph_of<'tcx>>, pub(crate) object_safety_violations: QueryState<object_safety_violations<'tcx>>, pub(crate) param_env: QueryState<param_env<'tcx>>, pub(crate) param_env_reveal_all_normalized: QueryState<param_env_reveal_all_normalized<'tcx>>, pub(crate) is_copy_raw: QueryState<is_copy_raw<'tcx>>, pub(crate) is_sized_raw: QueryState<is_sized_raw<'tcx>>, pub(crate) is_freeze_raw: QueryState<is_freeze_raw<'tcx>>, pub(crate) is_unpin_raw: QueryState<is_unpin_raw<'tcx>>, pub(crate) needs_drop_raw: QueryState<needs_drop_raw<'tcx>>, pub(crate) has_significant_drop_raw: QueryState<has_significant_drop_raw<'tcx>>, pub(crate) has_structural_eq_impls: QueryState<has_structural_eq_impls<'tcx>>, pub(crate) adt_drop_tys: QueryState<adt_drop_tys<'tcx>>, pub(crate) adt_significant_drop_tys: QueryState<adt_significant_drop_tys<'tcx>>, pub(crate) layout_of: QueryState<layout_of<'tcx>>, pub(crate) fn_abi_of_fn_ptr: QueryState<fn_abi_of_fn_ptr<'tcx>>, pub(crate) fn_abi_of_instance: QueryState<fn_abi_of_instance<'tcx>>, pub(crate) dylib_dependency_formats: QueryState<dylib_dependency_formats<'tcx>>, pub(crate) dependency_formats: QueryState<dependency_formats<'tcx>>, pub(crate) is_compiler_builtins: QueryState<is_compiler_builtins<'tcx>>, pub(crate) has_global_allocator: QueryState<has_global_allocator<'tcx>>, pub(crate) has_panic_handler: QueryState<has_panic_handler<'tcx>>, pub(crate) is_profiler_runtime: QueryState<is_profiler_runtime<'tcx>>, pub(crate) has_ffi_unwind_calls: QueryState<has_ffi_unwind_calls<'tcx>>, pub(crate) required_panic_strategy: QueryState<required_panic_strategy<'tcx>>, pub(crate) panic_in_drop_strategy: QueryState<panic_in_drop_strategy<'tcx>>, pub(crate) is_no_builtins: QueryState<is_no_builtins<'tcx>>, pub(crate) symbol_mangling_version: QueryState<symbol_mangling_version<'tcx>>, pub(crate) extern_crate: QueryState<extern_crate<'tcx>>, pub(crate) specializes: QueryState<specializes<'tcx>>, pub(crate) in_scope_traits_map: QueryState<in_scope_traits_map<'tcx>>, pub(crate) module_reexports: QueryState<module_reexports<'tcx>>, pub(crate) impl_defaultness: QueryState<impl_defaultness<'tcx>>, pub(crate) check_well_formed: QueryState<check_well_formed<'tcx>>, pub(crate) reachable_non_generics: QueryState<reachable_non_generics<'tcx>>, pub(crate) is_reachable_non_generic: QueryState<is_reachable_non_generic<'tcx>>, pub(crate) is_unreachable_local_definition: QueryState<is_unreachable_local_definition<'tcx>>, pub(crate) upstream_monomorphizations: QueryState<upstream_monomorphizations<'tcx>>, pub(crate) upstream_monomorphizations_for: QueryState<upstream_monomorphizations_for<'tcx>>, pub(crate) upstream_drop_glue_for: QueryState<upstream_drop_glue_for<'tcx>>, pub(crate) foreign_modules: QueryState<foreign_modules<'tcx>>, pub(crate) entry_fn: QueryState<entry_fn<'tcx>>, pub(crate) proc_macro_decls_static: QueryState<proc_macro_decls_static<'tcx>>, pub(crate) crate_hash: QueryState<crate_hash<'tcx>>, pub(crate) crate_host_hash: QueryState<crate_host_hash<'tcx>>, pub(crate) extra_filename: QueryState<extra_filename<'tcx>>, pub(crate) crate_extern_paths: QueryState<crate_extern_paths<'tcx>>, pub(crate) implementations_of_trait: QueryState<implementations_of_trait<'tcx>>, pub(crate) crate_incoherent_impls: QueryState<crate_incoherent_impls<'tcx>>, pub(crate) is_dllimport_foreign_item: QueryState<is_dllimport_foreign_item<'tcx>>, pub(crate) is_statically_included_foreign_item: QueryState<is_statically_included_foreign_item<'tcx>>, pub(crate) native_library_kind: QueryState<native_library_kind<'tcx>>, pub(crate) resolve_lifetimes_trait_definition: QueryState<resolve_lifetimes_trait_definition<'tcx>>, pub(crate) resolve_lifetimes: QueryState<resolve_lifetimes<'tcx>>, pub(crate) named_region_map: QueryState<named_region_map<'tcx>>, pub(crate) is_late_bound_map: QueryState<is_late_bound_map<'tcx>>, pub(crate) object_lifetime_defaults: QueryState<object_lifetime_defaults<'tcx>>, pub(crate) late_bound_vars_map: QueryState<late_bound_vars_map<'tcx>>, pub(crate) visibility: QueryState<visibility<'tcx>>, pub(crate) type_uninhabited_from: QueryState<type_uninhabited_from<'tcx>>, pub(crate) dep_kind: QueryState<dep_kind<'tcx>>, pub(crate) crate_name: QueryState<crate_name<'tcx>>, pub(crate) module_children: QueryState<module_children<'tcx>>, pub(crate) extern_mod_stmt_cnum: QueryState<extern_mod_stmt_cnum<'tcx>>, pub(crate) lib_features: QueryState<lib_features<'tcx>>, pub(crate) defined_lib_features: QueryState<defined_lib_features<'tcx>>, pub(crate) stability_implications: QueryState<stability_implications<'tcx>>, pub(crate) is_intrinsic: QueryState<is_intrinsic<'tcx>>, pub(crate) get_lang_items: QueryState<get_lang_items<'tcx>>, pub(crate) all_diagnostic_items: QueryState<all_diagnostic_items<'tcx>>, pub(crate) defined_lang_items: QueryState<defined_lang_items<'tcx>>, pub(crate) diagnostic_items: QueryState<diagnostic_items<'tcx>>, pub(crate) missing_lang_items: QueryState<missing_lang_items<'tcx>>, pub(crate) visible_parent_map: QueryState<visible_parent_map<'tcx>>, pub(crate) trimmed_def_paths: QueryState<trimmed_def_paths<'tcx>>, pub(crate) missing_extern_crate_item: QueryState<missing_extern_crate_item<'tcx>>, pub(crate) used_crate_source: QueryState<used_crate_source<'tcx>>, pub(crate) debugger_visualizers: QueryState<debugger_visualizers<'tcx>>, pub(crate) postorder_cnums: QueryState<postorder_cnums<'tcx>>, pub(crate) is_private_dep: QueryState<is_private_dep<'tcx>>, pub(crate) allocator_kind: QueryState<allocator_kind<'tcx>>, pub(crate) upvars_mentioned: QueryState<upvars_mentioned<'tcx>>, pub(crate) maybe_unused_trait_imports: QueryState<maybe_unused_trait_imports<'tcx>>, pub(crate) maybe_unused_extern_crates: QueryState<maybe_unused_extern_crates<'tcx>>, pub(crate) names_imported_by_glob_use: QueryState<names_imported_by_glob_use<'tcx>>, pub(crate) stability_index: QueryState<stability_index<'tcx>>, pub(crate) crates: QueryState<crates<'tcx>>, pub(crate) traits_in_crate: QueryState<traits_in_crate<'tcx>>, pub(crate) exported_symbols: QueryState<exported_symbols<'tcx>>, pub(crate) collect_and_partition_mono_items: QueryState<collect_and_partition_mono_items<'tcx>>, pub(crate) is_codegened_item: QueryState<is_codegened_item<'tcx>>, pub(crate) codegened_and_inlined_items: QueryState<codegened_and_inlined_items<'tcx>>, pub(crate) codegen_unit: QueryState<codegen_unit<'tcx>>, pub(crate) unused_generic_params: QueryState<unused_generic_params<'tcx>>, pub(crate) backend_optimization_level: QueryState<backend_optimization_level<'tcx>>, pub(crate) output_filenames: QueryState<output_filenames<'tcx>>, pub(crate) normalize_projection_ty: QueryState<normalize_projection_ty<'tcx>>, pub(crate) try_normalize_generic_arg_after_erasing_regions: QueryState<try_normalize_generic_arg_after_erasing_regions<'tcx>>, pub(crate) try_normalize_mir_const_after_erasing_regions: QueryState<try_normalize_mir_const_after_erasing_regions<'tcx>>, pub(crate) implied_outlives_bounds: QueryState<implied_outlives_bounds<'tcx>>, pub(crate) dropck_outlives: QueryState<dropck_outlives<'tcx>>, pub(crate) evaluate_obligation: QueryState<evaluate_obligation<'tcx>>, pub(crate) evaluate_goal: QueryState<evaluate_goal<'tcx>>, pub(crate) type_op_ascribe_user_type: QueryState<type_op_ascribe_user_type<'tcx>>, pub(crate) type_op_eq: QueryState<type_op_eq<'tcx>>, pub(crate) type_op_subtype: QueryState<type_op_subtype<'tcx>>, pub(crate) type_op_prove_predicate: QueryState<type_op_prove_predicate<'tcx>>, pub(crate) type_op_normalize_ty: QueryState<type_op_normalize_ty<'tcx>>, pub(crate) type_op_normalize_predicate: QueryState<type_op_normalize_predicate<'tcx>>, pub(crate) type_op_normalize_poly_fn_sig: QueryState<type_op_normalize_poly_fn_sig<'tcx>>, pub(crate) type_op_normalize_fn_sig: QueryState<type_op_normalize_fn_sig<'tcx>>, pub(crate) subst_and_check_impossible_predicates: QueryState<subst_and_check_impossible_predicates<'tcx>>, pub(crate) is_impossible_method: QueryState<is_impossible_method<'tcx>>, pub(crate) method_autoderef_steps: QueryState<method_autoderef_steps<'tcx>>, pub(crate) supported_target_features: QueryState<supported_target_features<'tcx>>, pub(crate) instance_def_size_estimate: QueryState<instance_def_size_estimate<'tcx>>, pub(crate) features_query: QueryState<features_query<'tcx>>, pub(crate) resolve_instance: QueryState<resolve_instance<'tcx>>, pub(crate) resolve_instance_of_const_arg: QueryState<resolve_instance_of_const_arg<'tcx>>, pub(crate) normalize_opaque_types: QueryState<normalize_opaque_types<'tcx>>, pub(crate) conservative_is_privately_uninhabited: QueryState<conservative_is_privately_uninhabited<'tcx>>, pub(crate) limits: QueryState<limits<'tcx>>, pub(crate) diagnostic_hir_wf_check: QueryState<diagnostic_hir_wf_check<'tcx>>, pub(crate) global_backend_features: QueryState<global_backend_features<'tcx>>, pub(crate) generator_diagnostic_data: QueryState<generator_diagnostic_data<'tcx>>, pub(crate) permits_uninit_init: QueryState<permits_uninit_init<'tcx>>, pub(crate) permits_zero_init: QueryState<permits_zero_init<'tcx>>,
}

Fields

local_providers: Box<Providers>extern_providers: Box<ExternProviders>on_disk_cache: Option<OnDiskCache<'tcx>>jobs: AtomicU64trigger_delay_span_bug: QueryState<trigger_delay_span_bug<'tcx>>

[query description - consider adding a doc-comment!] trigger a delay span bug

resolutions: QueryState<resolutions<'tcx>>

[query description - consider adding a doc-comment!] get the resolver outputs

resolver_for_lowering: QueryState<resolver_for_lowering<'tcx>>

[query description - consider adding a doc-comment!] get the resolver for lowering

source_span: QueryState<source_span<'tcx>>

Return the span for a definition. Contrary to def_span below, this query returns the full absolute span of the definition. This span is meant for dep-tracking rather than diagnostics. It should not be used outside of rustc_middle::hir::source_map.

hir_crate: QueryState<hir_crate<'tcx>>

Represents crate as a whole (as distinct from the top-level crate module). If you call hir_crate (e.g., indirectly by calling tcx.hir().krate()), we will have to assume that any change means that you need to be recompiled. This is because the hir_crate query gives you access to all other items. To avoid this fate, do not call tcx.hir().krate(); instead, prefer wrappers like tcx.visit_all_items_in_krate().

hir_crate_items: QueryState<hir_crate_items<'tcx>>

All items in the crate.

hir_module_items: QueryState<hir_module_items<'tcx>>

The items in a module.

This can be conveniently accessed by tcx.hir().visit_item_likes_in_module. Avoid calling this query directly.

hir_owner: QueryState<hir_owner<'tcx>>

Gives access to the HIR node for the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

local_def_id_to_hir_id: QueryState<local_def_id_to_hir_id<'tcx>>

Gives access to the HIR ID for the given LocalDefId owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

hir_owner_parent: QueryState<hir_owner_parent<'tcx>>

Gives access to the HIR node’s parent for the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

hir_owner_nodes: QueryState<hir_owner_nodes<'tcx>>

Gives access to the HIR nodes and bodies inside the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

hir_attrs: QueryState<hir_attrs<'tcx>>

Gives access to the HIR attributes inside the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

opt_const_param_of: QueryState<opt_const_param_of<'tcx>>

Computes the DefId of the corresponding const parameter in case the key is a const argument and returns None otherwise.

let a = foo::<7>();
//            ^ Calling `opt_const_param_of` for this argument,

fn foo<const N: usize>()
//           ^ returns this `DefId`.

fn bar() {
// ^ While calling `opt_const_param_of` for other bodies returns `None`.
}
const_param_default: QueryState<const_param_default<'tcx>>

Given the def_id of a const-generic parameter, computes the associated default const parameter. e.g. fn example<const N: usize=3> called on N would return 3.

type_of: QueryState<type_of<'tcx>>

Returns the Ty of the given DefId. If the DefId points to an alias, it will “skip” this alias to return the aliased type.

analysis: QueryState<analysis<'tcx>>

[query description - consider adding a doc-comment!] running analysis passes on this crate

check_expectations: QueryState<check_expectations<'tcx>>

This query checks the fulfillment of collected lint expectations. All lint emitting queries have to be done before this is executed to ensure that all expectations can be fulfilled.

This is an extra query to enable other drivers (like rustdoc) to only execute a small subset of the analysis query, while allowing lints to be expected. In rustc, this query will be executed as part of the analysis query and doesn’t have to be called a second time.

Tools can additionally pass in a tool filter. That will restrict the expectations to only trigger for lints starting with the listed tool name. This is useful for cases were not all linting code from rustc was called. With the default None all registered lints will also be checked for expectation fulfillment.

generics_of: QueryState<generics_of<'tcx>>

Maps from the DefId of an item (trait/struct/enum/fn) to its associated generics.

predicates_of: QueryState<predicates_of<'tcx>>

Maps from the DefId of an item (trait/struct/enum/fn) to the predicates (where-clauses) that must be proven true in order to reference it. This is almost always the “predicates query” that you want.

predicates_of builds on predicates_defined_on – in fact, it is almost always the same as that query, except for the case of traits. For traits, predicates_of contains an additional Self: Trait<...> predicate that users don’t actually write. This reflects the fact that to invoke the trait (e.g., via Default::default) you must supply types that actually implement the trait. (However, this extra predicate gets in the way of some checks, which are intended to operate over only the actual where-clauses written by the user.)

explicit_item_bounds: QueryState<explicit_item_bounds<'tcx>>

Returns the list of bounds that can be used for SelectionCandidate::ProjectionCandidate(_) and ProjectionTyCandidate::TraitDef. Specifically this is the bounds written on the trait’s type definition, or those after the impl keyword

type X: Bound + 'lt
//      ^^^^^^^^^^^
impl Debug + Display
//   ^^^^^^^^^^^^^^^

key is the DefId of the associated type or opaque type.

Bounds from the parent (e.g. with nested impl trait) are not included.

item_bounds: QueryState<item_bounds<'tcx>>

Elaborated version of the predicates from explicit_item_bounds.

For example:

trait MyTrait {
    type MyAType: Eq + ?Sized;
}

explicit_item_bounds returns [<Self as MyTrait>::MyAType: Eq], and item_bounds returns

[
    <Self as Trait>::MyAType: Eq,
    <Self as Trait>::MyAType: PartialEq<<Self as Trait>::MyAType>
]

Bounds from the parent (e.g. with nested impl trait) are not included.

native_libraries: QueryState<native_libraries<'tcx>>

[query description - consider adding a doc-comment!] looking up the native libraries of a linked crate

lint_levels: QueryState<lint_levels<'tcx>>

[query description - consider adding a doc-comment!] computing the lint levels for items in this crate

parent_module_from_def_id: QueryState<parent_module_from_def_id<'tcx>>

[query description - consider adding a doc-comment!] parent module of tcx.def_path_str(key.to_def_id())

expn_that_defined: QueryState<expn_that_defined<'tcx>>

[query description - consider adding a doc-comment!] expansion that defined tcx.def_path_str(key)

is_panic_runtime: QueryState<is_panic_runtime<'tcx>>

[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime

thir_body: QueryState<thir_body<'tcx>>

Fetch the THIR for a given body. If typeck for that body failed, returns an empty Thir.

thir_tree: QueryState<thir_tree<'tcx>>

Create a THIR tree for debugging.

mir_keys: QueryState<mir_keys<'tcx>>

Set of all the DefIds in this crate that have MIR associated with them. This includes all the body owners, but also things like struct constructors.

mir_const_qualif: QueryState<mir_const_qualif<'tcx>>

Maps DefId’s that have an associated mir::Body to the result of the MIR const-checking pass. This is the set of qualifs in the final value of a const.

mir_const_qualif_const_arg: QueryState<mir_const_qualif_const_arg<'tcx>>

[query description - consider adding a doc-comment!] const checking the const argument tcx.def_path_str(key.0.to_def_id())

mir_built: QueryState<mir_built<'tcx>>

Fetch the MIR for a given DefId right after it’s built - this includes unreachable code.

mir_const: QueryState<mir_const<'tcx>>

Fetch the MIR for a given DefId up till the point where it is ready for const qualification.

See the README for the mir module for details.

thir_abstract_const: QueryState<thir_abstract_const<'tcx>>

Try to build an abstract representation of the given constant.

thir_abstract_const_of_const_arg: QueryState<thir_abstract_const_of_const_arg<'tcx>>

Try to build an abstract representation of the given constant.

try_unify_abstract_consts: QueryState<try_unify_abstract_consts<'tcx>>

[query description - consider adding a doc-comment!] trying to unify the generic constants tcx.def_path_str(key.value.0.def.did) and tcx.def_path_str(key.value.1.def.did)

mir_drops_elaborated_and_const_checked: QueryState<mir_drops_elaborated_and_const_checked<'tcx>>

[query description - consider adding a doc-comment!] elaborating drops for tcx.def_path_str(key.did.to_def_id())

mir_for_ctfe: QueryState<mir_for_ctfe<'tcx>>

[query description - consider adding a doc-comment!] caching mir of tcx.def_path_str(key) for CTFE

mir_for_ctfe_of_const_arg: QueryState<mir_for_ctfe_of_const_arg<'tcx>>

[query description - consider adding a doc-comment!] MIR for CTFE of the const argument tcx.def_path_str(key.0.to_def_id())

mir_promoted: QueryState<mir_promoted<'tcx>>

[query description - consider adding a doc-comment!] processing if key.const_param_did.is_some() { "the const argument " } else { "" } tcx.def_path_str(key.did.to_def_id())

symbols_for_closure_captures: QueryState<symbols_for_closure_captures<'tcx>>

[query description - consider adding a doc-comment!] symbols for captures of closure tcx.def_path_str(key.1.to_def_id()) in tcx.def_path_str(key.0.to_def_id())

optimized_mir: QueryState<optimized_mir<'tcx>>

MIR after our optimization passes have run. This is MIR that is ready for codegen. This is also the only query that can fetch non-local MIR, at present.

coverageinfo: QueryState<coverageinfo<'tcx>>

Returns coverage summary info for a function, after executing the InstrumentCoverage MIR pass (assuming the -Cinstrument-coverage option is enabled).

covered_code_regions: QueryState<covered_code_regions<'tcx>>

Returns the CodeRegions for a function that has instrumented coverage, in case the function was optimized out before codegen, and before being added to the Coverage Map.

promoted_mir: QueryState<promoted_mir<'tcx>>

The DefId is the DefId of the containing MIR body. Promoteds do not have their own DefId. This function returns all promoteds in the specified body. The body references promoteds by the DefId and the mir::Promoted index. This is necessary, because after inlining a body may refer to promoteds from other bodies. In that case you still need to use the DefId of the original body.

promoted_mir_of_const_arg: QueryState<promoted_mir_of_const_arg<'tcx>>

[query description - consider adding a doc-comment!] optimizing promoted MIR for the const argument tcx.def_path_str(key.0.to_def_id())

erase_regions_ty: QueryState<erase_regions_ty<'tcx>>

Erases regions from ty to yield a new type. Normally you would just use tcx.erase_regions(value), however, which uses this query as a kind of cache.

wasm_import_module_map: QueryState<wasm_import_module_map<'tcx>>

[query description - consider adding a doc-comment!] wasm import module map

predicates_defined_on: QueryState<predicates_defined_on<'tcx>>

Maps from the DefId of an item (trait/struct/enum/fn) to the predicates (where-clauses) directly defined on it. This is equal to the explicit_predicates_of predicates plus the inferred_outlives_of predicates.

trait_explicit_predicates_and_bounds: QueryState<trait_explicit_predicates_and_bounds<'tcx>>

Returns everything that looks like a predicate written explicitly by the user on a trait item.

Traits are unusual, because predicates on associated types are converted into bounds on that type for backwards compatibility:

trait X where Self::U: Copy { type U; }

becomes

trait X { type U: Copy; }

explicit_predicates_of and explicit_item_bounds will then take the appropriate subsets of the predicates here.

explicit_predicates_of: QueryState<explicit_predicates_of<'tcx>>

Returns the predicates written explicitly by the user.

inferred_outlives_of: QueryState<inferred_outlives_of<'tcx>>

Returns the inferred outlives predicates (e.g., for struct Foo<'a, T> { x: &'a T }, this would return T: 'a).

super_predicates_of: QueryState<super_predicates_of<'tcx>>

Maps from the DefId of a trait to the list of super-predicates. This is a subset of the full list of predicates. We store these in a separate map because we must evaluate them even during type conversion, often before the full predicates are available (note that supertraits have additional acyclicity requirements).

super_predicates_that_define_assoc_type: QueryState<super_predicates_that_define_assoc_type<'tcx>>

The Option<Ident> is the name of an associated type. If it is None, then this query returns the full set of predicates. If Some<Ident>, then the query returns only the subset of super-predicates that reference traits that define the given associated type. This is used to avoid cycles in resolving types like T::Item.

type_param_predicates: QueryState<type_param_predicates<'tcx>>

To avoid cycles within the predicates of a single item we compute per-type-parameter predicates for resolving T::AssocTy.

trait_def: QueryState<trait_def<'tcx>>

[query description - consider adding a doc-comment!] computing trait definition for tcx.def_path_str(key)

adt_def: QueryState<adt_def<'tcx>>

[query description - consider adding a doc-comment!] computing ADT definition for tcx.def_path_str(key)

adt_destructor: QueryState<adt_destructor<'tcx>>

[query description - consider adding a doc-comment!] computing Drop impl for tcx.def_path_str(key)

adt_sized_constraint: QueryState<adt_sized_constraint<'tcx>>

[query description - consider adding a doc-comment!] computing Sized constraints for tcx.def_path_str(key)

adt_dtorck_constraint: QueryState<adt_dtorck_constraint<'tcx>>

[query description - consider adding a doc-comment!] computing drop-check constraints for tcx.def_path_str(key)

constness: QueryState<constness<'tcx>>

Returns true if this is a const fn, use the is_const_fn to know whether your crate actually sees it as const fn (e.g., the const-fn-ness might be unstable and you might not have the feature gate active).

Do not call this function manually. It is only meant to cache the base data for the is_const_fn function. Consider using is_const_fn or is_const_fn_raw instead.

asyncness: QueryState<asyncness<'tcx>>

[query description - consider adding a doc-comment!] checking if the function is async: tcx.def_path_str(key)

is_promotable_const_fn: QueryState<is_promotable_const_fn<'tcx>>

Returns true if calls to the function may be promoted.

This is either because the function is e.g., a tuple-struct or tuple-variant constructor, or because it has the #[rustc_promotable] attribute. The attribute should be removed in the future in favour of some form of check which figures out whether the function does not inspect the bits of any of its arguments (so is essentially just a constructor function).

is_foreign_item: QueryState<is_foreign_item<'tcx>>

Returns true if this is a foreign item (i.e., linked via extern { ... }).

generator_kind: QueryState<generator_kind<'tcx>>

Returns Some(generator_kind) if the node pointed to by def_id is a generator.

crate_variances: QueryState<crate_variances<'tcx>>

Gets a map with the variance of every item; use item_variance instead.

variances_of: QueryState<variances_of<'tcx>>

Maps from the DefId of a type or region parameter to its (inferred) variance.

inferred_outlives_crate: QueryState<inferred_outlives_crate<'tcx>>

Maps from thee DefId of a type to its (inferred) outlives.

associated_item_def_ids: QueryState<associated_item_def_ids<'tcx>>

Maps from an impl/trait DefId to a list of the DefIds of its items.

associated_item: QueryState<associated_item<'tcx>>

Maps from a trait item to the trait item “descriptor”.

associated_items: QueryState<associated_items<'tcx>>

Collects the associated items defined on a trait or impl.

impl_item_implementor_ids: QueryState<impl_item_implementor_ids<'tcx>>

Maps from associated items on a trait to the corresponding associated item on the impl specified by impl_id.

For example, with the following code

struct Type {}
                        // DefId
trait Trait {           // trait_id
    fn f();             // trait_f
    fn g() {}           // trait_g
}

impl Trait for Type {   // impl_id
    fn f() {}           // impl_f
    fn g() {}           // impl_g
}

The map returned for tcx.impl_item_implementor_ids(impl_id) would be { trait_f: impl_f, trait_g: impl_g }

impl_trait_ref: QueryState<impl_trait_ref<'tcx>>

Given an impl_id, return the trait it implements. Return None if this is an inherent impl.

impl_polarity: QueryState<impl_polarity<'tcx>>

[query description - consider adding a doc-comment!] computing implementation polarity of tcx.def_path_str(impl_id)

issue33140_self_ty: QueryState<issue33140_self_ty<'tcx>>

[query description - consider adding a doc-comment!] computing Self type wrt issue #33140 tcx.def_path_str(key)

inherent_impls: QueryState<inherent_impls<'tcx>>

Maps a DefId of a type to a list of its inherent impls. Contains implementations of methods that are inherent to a type. Methods in these implementations don’t need to be exported.

incoherent_impls: QueryState<incoherent_impls<'tcx>>

[query description - consider adding a doc-comment!] collecting all inherent impls for {:?}

unsafety_check_result: QueryState<unsafety_check_result<'tcx>>

The result of unsafety-checking this LocalDefId.

unsafety_check_result_for_const_arg: QueryState<unsafety_check_result_for_const_arg<'tcx>>

[query description - consider adding a doc-comment!] unsafety-checking the const argument tcx.def_path_str(key.0.to_def_id())

thir_check_unsafety: QueryState<thir_check_unsafety<'tcx>>

Unsafety-check this LocalDefId with THIR unsafeck. This should be used with -Zthir-unsafeck.

thir_check_unsafety_for_const_arg: QueryState<thir_check_unsafety_for_const_arg<'tcx>>

[query description - consider adding a doc-comment!] unsafety-checking the const argument tcx.def_path_str(key.0.to_def_id())

unsafe_derive_on_repr_packed: QueryState<unsafe_derive_on_repr_packed<'tcx>>

HACK: when evaluated, this reports an “unsafe derive on repr(packed)” error.

Unsafety checking is executed for each method separately, but we only want to emit this error once per derive. As there are some impls with multiple methods, we use a query for deduplication.

fn_sig: QueryState<fn_sig<'tcx>>

Computes the signature of the function.

lint_mod: QueryState<lint_mod<'tcx>>

Performs lint checking for the module.

check_mod_attrs: QueryState<check_mod_attrs<'tcx>>

Checks the attributes in the module.

check_mod_unstable_api_usage: QueryState<check_mod_unstable_api_usage<'tcx>>

Checks for uses of unstable APIs in the module.

check_mod_const_bodies: QueryState<check_mod_const_bodies<'tcx>>

Checks the const bodies in the module for illegal operations (e.g. if or loop).

check_mod_loops: QueryState<check_mod_loops<'tcx>>

Checks the loops in the module.

check_mod_naked_functions: QueryState<check_mod_naked_functions<'tcx>>

[query description - consider adding a doc-comment!] checking naked functions in describe_as_module(key, tcx)

check_mod_item_types: QueryState<check_mod_item_types<'tcx>>

[query description - consider adding a doc-comment!] checking item types in describe_as_module(key, tcx)

check_mod_privacy: QueryState<check_mod_privacy<'tcx>>

[query description - consider adding a doc-comment!] checking privacy in describe_as_module(key, tcx)

check_mod_liveness: QueryState<check_mod_liveness<'tcx>>

[query description - consider adding a doc-comment!] checking liveness of variables in describe_as_module(key, tcx)

live_symbols_and_ignored_derived_traits: QueryState<live_symbols_and_ignored_derived_traits<'tcx>>

Return the live symbols in the crate for dead code check.

The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone) and their respective impl (i.e., part of the derive macro)

check_mod_deathness: QueryState<check_mod_deathness<'tcx>>

[query description - consider adding a doc-comment!] checking deathness of variables in describe_as_module(key, tcx)

check_mod_impl_wf: QueryState<check_mod_impl_wf<'tcx>>

[query description - consider adding a doc-comment!] checking that impls are well-formed in describe_as_module(key, tcx)

check_mod_type_wf: QueryState<check_mod_type_wf<'tcx>>

[query description - consider adding a doc-comment!] checking that types are well-formed in describe_as_module(key, tcx)

collect_mod_item_types: QueryState<collect_mod_item_types<'tcx>>

[query description - consider adding a doc-comment!] collecting item types in describe_as_module(key, tcx)

coerce_unsized_info: QueryState<coerce_unsized_info<'tcx>>

Caches CoerceUnsized kinds for impls on custom types.

typeck_item_bodies: QueryState<typeck_item_bodies<'tcx>>

[query description - consider adding a doc-comment!] type-checking all item bodies

typeck: QueryState<typeck<'tcx>>

[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())

typeck_const_arg: QueryState<typeck_const_arg<'tcx>>

[query description - consider adding a doc-comment!] type-checking the const argument tcx.def_path_str(key.0.to_def_id())

diagnostic_only_typeck: QueryState<diagnostic_only_typeck<'tcx>>

[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())

used_trait_imports: QueryState<used_trait_imports<'tcx>>

[query description - consider adding a doc-comment!] used_trait_imports tcx.def_path_str(key.to_def_id())

has_typeck_results: QueryState<has_typeck_results<'tcx>>

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) has a body

coherent_trait: QueryState<coherent_trait<'tcx>>

[query description - consider adding a doc-comment!] coherence checking all impls of trait tcx.def_path_str(def_id)

mir_borrowck: QueryState<mir_borrowck<'tcx>>

Borrow-checks the function body. If this is a closure, returns additional requirements that the closure’s creator must verify.

mir_borrowck_const_arg: QueryState<mir_borrowck_const_arg<'tcx>>

[query description - consider adding a doc-comment!] borrow-checking the const argument tcx.def_path_str(key.0.to_def_id())

crate_inherent_impls: QueryState<crate_inherent_impls<'tcx>>

Gets a complete map from all types to their inherent impls. Not meant to be used directly outside of coherence.

crate_inherent_impls_overlap_check: QueryState<crate_inherent_impls_overlap_check<'tcx>>

Checks all types in the crate for overlap in their inherent impls. Reports errors. Not meant to be used directly outside of coherence.

orphan_check_impl: QueryState<orphan_check_impl<'tcx>>

Checks whether all impls in the crate pass the overlap check, returning which impls fail it. If all impls are correct, the returned slice is empty.

mir_callgraph_reachable: QueryState<mir_callgraph_reachable<'tcx>>

Check whether the function has any recursion that could cause the inliner to trigger a cycle. Returns the call stack causing the cycle. The call stack does not contain the current function, just all intermediate functions.

mir_inliner_callees: QueryState<mir_inliner_callees<'tcx>>

Obtain all the calls into other local functions

eval_to_allocation_raw: QueryState<eval_to_allocation_raw<'tcx>>

Evaluates a constant and returns the computed allocation.

Do not use this directly, use the tcx.eval_static_initializer wrapper.

eval_to_const_value_raw: QueryState<eval_to_const_value_raw<'tcx>>

Evaluates const items or anonymous constants (such as enum variant explicit discriminants or array lengths) into a representation suitable for the type system and const generics.

Do not use this directly, use one of the following wrappers: tcx.const_eval_poly, tcx.const_eval_resolve, tcx.const_eval_instance, or tcx.const_eval_global_id.

eval_to_valtree: QueryState<eval_to_valtree<'tcx>>

Evaluate a constant and convert it to a type level constant or return None if that is not possible.

valtree_to_const_val: QueryState<valtree_to_const_val<'tcx>>

Converts a type level constant value into ConstValue

destructure_const: QueryState<destructure_const<'tcx>>

Destructures array, ADT or tuple constants into the constants of their fields.

try_destructure_mir_constant: QueryState<try_destructure_mir_constant<'tcx>>

Tries to destructure an mir::ConstantKind ADT or array into its variant index and its field values.

deref_mir_constant: QueryState<deref_mir_constant<'tcx>>

Dereference a constant reference or raw pointer and turn the result into a constant again.

const_caller_location: QueryState<const_caller_location<'tcx>>

[query description - consider adding a doc-comment!] get a &core::panic::Location referring to a span

lit_to_const: QueryState<lit_to_const<'tcx>>

[query description - consider adding a doc-comment!] converting literal to const

lit_to_mir_constant: QueryState<lit_to_mir_constant<'tcx>>

[query description - consider adding a doc-comment!] converting literal to mir constant

check_match: QueryState<check_match<'tcx>>

[query description - consider adding a doc-comment!] match-checking tcx.def_path_str(key)

privacy_access_levels: QueryState<privacy_access_levels<'tcx>>

Performs part of the privacy check and computes “access levels”.

check_private_in_public: QueryState<check_private_in_public<'tcx>>

[query description - consider adding a doc-comment!] checking for private elements in public interfaces

reachable_set: QueryState<reachable_set<'tcx>>

[query description - consider adding a doc-comment!] reachability

region_scope_tree: QueryState<region_scope_tree<'tcx>>

Per-body region::ScopeTree. The DefId should be the owner DefId for the body; in the case of closures, this will be redirected to the enclosing function.

mir_shims: QueryState<mir_shims<'tcx>>

Generates a MIR body for the shim.

symbol_name: QueryState<symbol_name<'tcx>>

The symbol_name query provides the symbol name for calling a given instance from the local crate. In particular, it will also look up the correct symbol name of instances from upstream crates.

opt_def_kind: QueryState<opt_def_kind<'tcx>>

[query description - consider adding a doc-comment!] looking up definition kind of tcx.def_path_str(def_id)

def_span: QueryState<def_span<'tcx>>

Gets the span for the definition.

def_ident_span: QueryState<def_ident_span<'tcx>>

Gets the span for the identifier of the definition.

lookup_stability: QueryState<lookup_stability<'tcx>>

[query description - consider adding a doc-comment!] looking up stability of tcx.def_path_str(def_id)

lookup_const_stability: QueryState<lookup_const_stability<'tcx>>

[query description - consider adding a doc-comment!] looking up const stability of tcx.def_path_str(def_id)

lookup_default_body_stability: QueryState<lookup_default_body_stability<'tcx>>

[query description - consider adding a doc-comment!] looking up default body stability of tcx.def_path_str(def_id)

should_inherit_track_caller: QueryState<should_inherit_track_caller<'tcx>>

[query description - consider adding a doc-comment!] computing should_inherit_track_caller of tcx.def_path_str(def_id)

lookup_deprecation_entry: QueryState<lookup_deprecation_entry<'tcx>>

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) is deprecated

is_doc_hidden: QueryState<is_doc_hidden<'tcx>>

Determines whether an item is annotated with doc(hidden).

item_attrs: QueryState<item_attrs<'tcx>>

Returns the attributes on the item at def_id.

Do not use this directly, use tcx.get_attrs instead.

codegen_fn_attrs: QueryState<codegen_fn_attrs<'tcx>>

[query description - consider adding a doc-comment!] computing codegen attributes of tcx.def_path_str(def_id)

asm_target_features: QueryState<asm_target_features<'tcx>>

[query description - consider adding a doc-comment!] computing target features for inline asm of tcx.def_path_str(def_id)

fn_arg_names: QueryState<fn_arg_names<'tcx>>

[query description - consider adding a doc-comment!] looking up function parameter names for tcx.def_path_str(def_id)

rendered_const: QueryState<rendered_const<'tcx>>

Gets the rendered value of the specified constant or associated constant. Used by rustdoc.

impl_parent: QueryState<impl_parent<'tcx>>

[query description - consider adding a doc-comment!] computing specialization parent impl of tcx.def_path_str(def_id)

is_ctfe_mir_available: QueryState<is_ctfe_mir_available<'tcx>>

[query description - consider adding a doc-comment!] checking if item has ctfe mir available: tcx.def_path_str(key)

is_mir_available: QueryState<is_mir_available<'tcx>>

[query description - consider adding a doc-comment!] checking if item has mir available: tcx.def_path_str(key)

own_existential_vtable_entries: QueryState<own_existential_vtable_entries<'tcx>>

[query description - consider adding a doc-comment!] finding all existential vtable entries for trait tcx.def_path_str(key.def_id())

vtable_entries: QueryState<vtable_entries<'tcx>>

[query description - consider adding a doc-comment!] finding all vtable entries for trait tcx.def_path_str(key.def_id())

vtable_trait_upcasting_coercion_new_vptr_slot: QueryState<vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>>

[query description - consider adding a doc-comment!] finding the slot within vtable for trait object key.1 vtable ptr during trait upcasting coercion from key.0 vtable

vtable_allocation: QueryState<vtable_allocation<'tcx>>

[query description - consider adding a doc-comment!] vtable const allocation for < key.0 as key.1.map(| trait_ref | format! ("{}", trait_ref)).unwrap_or("_".to_owned()) >

codegen_fulfill_obligation: QueryState<codegen_fulfill_obligation<'tcx>>

[query description - consider adding a doc-comment!] checking if tcx.def_path_str(key.1.def_id()) fulfills its obligations

all_local_trait_impls: QueryState<all_local_trait_impls<'tcx>>

Return all impl blocks in the current crate.

trait_impls_of: QueryState<trait_impls_of<'tcx>>

Given a trait trait_id, return all known impl blocks.

specialization_graph_of: QueryState<specialization_graph_of<'tcx>>

[query description - consider adding a doc-comment!] building specialization graph of trait tcx.def_path_str(trait_id)

object_safety_violations: QueryState<object_safety_violations<'tcx>>

[query description - consider adding a doc-comment!] determine object safety of trait tcx.def_path_str(trait_id)

param_env: QueryState<param_env<'tcx>>

Gets the ParameterEnvironment for a given item; this environment will be in “user-facing” mode, meaning that it is suitable for type-checking etc, and it does not normalize specializable associated types. This is almost always what you want, unless you are doing MIR optimizations, in which case you might want to use reveal_all() method to change modes.

param_env_reveal_all_normalized: QueryState<param_env_reveal_all_normalized<'tcx>>

Like param_env, but returns the ParamEnv in Reveal::All mode. Prefer this over tcx.param_env(def_id).with_reveal_all_normalized(tcx), as this method is more efficient.

is_copy_raw: QueryState<is_copy_raw<'tcx>>

Trait selection queries. These are best used by invoking ty.is_copy_modulo_regions(), ty.is_copy(), etc, since that will prune the environment where possible.

is_sized_raw: QueryState<is_sized_raw<'tcx>>

Query backing Ty::is_sized.

is_freeze_raw: QueryState<is_freeze_raw<'tcx>>

Query backing Ty::is_freeze.

is_unpin_raw: QueryState<is_unpin_raw<'tcx>>

Query backing Ty::is_unpin.

needs_drop_raw: QueryState<needs_drop_raw<'tcx>>

Query backing Ty::needs_drop.

has_significant_drop_raw: QueryState<has_significant_drop_raw<'tcx>>

Query backing Ty::has_significant_drop_raw.

has_structural_eq_impls: QueryState<has_structural_eq_impls<'tcx>>

Query backing Ty::is_structural_eq_shallow.

This is only correct for ADTs. Call is_structural_eq_shallow to handle all types correctly.

adt_drop_tys: QueryState<adt_drop_tys<'tcx>>

A list of types where the ADT requires drop if and only if any of those types require drop. If the ADT is known to always need drop then Err(AlwaysRequiresDrop) is returned.

adt_significant_drop_tys: QueryState<adt_significant_drop_tys<'tcx>>

A list of types where the ADT requires drop if and only if any of those types has significant drop. A type marked with the attribute rustc_insignificant_dtor is considered to not be significant. A drop is significant if it is implemented by the user or does anything that will have any observable behavior (other than freeing up memory). If the ADT is known to have a significant destructor then Err(AlwaysRequiresDrop) is returned.

layout_of: QueryState<layout_of<'tcx>>

Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type.

fn_abi_of_fn_ptr: QueryState<fn_abi_of_fn_ptr<'tcx>>

Compute a FnAbi suitable for indirect calls, i.e. to fn pointers.

NB: this doesn’t handle virtual calls - those should use fn_abi_of_instance instead, where the instance is an InstanceDef::Virtual.

fn_abi_of_instance: QueryState<fn_abi_of_instance<'tcx>>

Compute a FnAbi suitable for declaring/defining an fn instance, and for direct calls to an fn.

NB: that includes virtual calls, which are represented by “direct calls” to an InstanceDef::Virtual instance (of <dyn Trait as Trait>::fn).

dylib_dependency_formats: QueryState<dylib_dependency_formats<'tcx>>

[query description - consider adding a doc-comment!] dylib dependency formats of crate

dependency_formats: QueryState<dependency_formats<'tcx>>

[query description - consider adding a doc-comment!] get the linkage format of all dependencies

is_compiler_builtins: QueryState<is_compiler_builtins<'tcx>>

[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins

has_global_allocator: QueryState<has_global_allocator<'tcx>>

[query description - consider adding a doc-comment!] checking if the crate has_global_allocator

has_panic_handler: QueryState<has_panic_handler<'tcx>>

[query description - consider adding a doc-comment!] checking if the crate has_panic_handler

is_profiler_runtime: QueryState<is_profiler_runtime<'tcx>>

[query description - consider adding a doc-comment!] query a crate is #![profiler_runtime]

has_ffi_unwind_calls: QueryState<has_ffi_unwind_calls<'tcx>>

[query description - consider adding a doc-comment!] check if tcx.def_path_str(key.to_def_id()) contains FFI-unwind calls

required_panic_strategy: QueryState<required_panic_strategy<'tcx>>

[query description - consider adding a doc-comment!] query a crate’s required panic strategy

panic_in_drop_strategy: QueryState<panic_in_drop_strategy<'tcx>>

[query description - consider adding a doc-comment!] query a crate’s configured panic-in-drop strategy

is_no_builtins: QueryState<is_no_builtins<'tcx>>

[query description - consider adding a doc-comment!] test whether a crate has #![no_builtins]

symbol_mangling_version: QueryState<symbol_mangling_version<'tcx>>

[query description - consider adding a doc-comment!] query a crate’s symbol mangling version

extern_crate: QueryState<extern_crate<'tcx>>

[query description - consider adding a doc-comment!] getting crate’s ExternCrateData

specializes: QueryState<specializes<'tcx>>

[query description - consider adding a doc-comment!] computing whether impls specialize one another

in_scope_traits_map: QueryState<in_scope_traits_map<'tcx>>

[query description - consider adding a doc-comment!] traits in scope at a block

module_reexports: QueryState<module_reexports<'tcx>>

[query description - consider adding a doc-comment!] looking up reexports of module tcx.def_path_str(def_id.to_def_id())

impl_defaultness: QueryState<impl_defaultness<'tcx>>

[query description - consider adding a doc-comment!] looking up whether tcx.def_path_str(def_id) is a default impl

check_well_formed: QueryState<check_well_formed<'tcx>>

[query description - consider adding a doc-comment!] checking that tcx.def_path_str(key.to_def_id()) is well-formed

reachable_non_generics: QueryState<reachable_non_generics<'tcx>>

[query description - consider adding a doc-comment!] looking up the exported symbols of a crate

is_reachable_non_generic: QueryState<is_reachable_non_generic<'tcx>>

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) is an exported symbol

is_unreachable_local_definition: QueryState<is_unreachable_local_definition<'tcx>>

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id.to_def_id()) is reachable from outside the crate

upstream_monomorphizations: QueryState<upstream_monomorphizations<'tcx>>

The entire set of monomorphizations the local crate can safely link to because they are exported from upstream crates. Do not depend on this directly, as its value changes anytime a monomorphization gets added or removed in any upstream crate. Instead use the narrower upstream_monomorphizations_for, upstream_drop_glue_for, or, even better, Instance::upstream_monomorphization().

upstream_monomorphizations_for: QueryState<upstream_monomorphizations_for<'tcx>>

Returns the set of upstream monomorphizations available for the generic function identified by the given def_id. The query makes sure to make a stable selection if the same monomorphization is available in multiple upstream crates.

You likely want to call Instance::upstream_monomorphization() instead of invoking this query directly.

upstream_drop_glue_for: QueryState<upstream_drop_glue_for<'tcx>>

Returns the upstream crate that exports drop-glue for the given type (substs is expected to be a single-item list containing the type one wants drop-glue for).

This is a subset of upstream_monomorphizations_for in order to increase dep-tracking granularity. Otherwise adding or removing any type with drop-glue in any upstream crate would invalidate all functions calling drop-glue of an upstream type.

You likely want to call Instance::upstream_monomorphization() instead of invoking this query directly.

NOTE: This query could easily be extended to also support other common functions that have are large set of monomorphizations (like Clone::clone for example).

foreign_modules: QueryState<foreign_modules<'tcx>>

[query description - consider adding a doc-comment!] looking up the foreign modules of a linked crate

entry_fn: QueryState<entry_fn<'tcx>>

Identifies the entry-point (e.g., the main function) for a given crate, returning None if there is no entry point (such as for library crates).

proc_macro_decls_static: QueryState<proc_macro_decls_static<'tcx>>

[query description - consider adding a doc-comment!] looking up the derive registrar for a crate

crate_hash: QueryState<crate_hash<'tcx>>

[query description - consider adding a doc-comment!] looking up the hash a crate

crate_host_hash: QueryState<crate_host_hash<'tcx>>

[query description - consider adding a doc-comment!] looking up the hash of a host version of a crate

extra_filename: QueryState<extra_filename<'tcx>>

[query description - consider adding a doc-comment!] looking up the extra filename for a crate

crate_extern_paths: QueryState<crate_extern_paths<'tcx>>

[query description - consider adding a doc-comment!] looking up the paths for extern crates

implementations_of_trait: QueryState<implementations_of_trait<'tcx>>

Given a crate and a trait, look up all impls of that trait in the crate. Return (impl_id, self_ty).

crate_incoherent_impls: QueryState<crate_incoherent_impls<'tcx>>

Collects all incoherent impls for the given crate and type.

Do not call this directly, but instead use the incoherent_impls query. This query is only used to get the data necessary for that query.

is_dllimport_foreign_item: QueryState<is_dllimport_foreign_item<'tcx>>

[query description - consider adding a doc-comment!] is_dllimport_foreign_item( tcx.def_path_str(def_id) )

is_statically_included_foreign_item: QueryState<is_statically_included_foreign_item<'tcx>>

[query description - consider adding a doc-comment!] is_statically_included_foreign_item( tcx.def_path_str(def_id) )

native_library_kind: QueryState<native_library_kind<'tcx>>

[query description - consider adding a doc-comment!] native_library_kind( tcx.def_path_str(def_id) )

resolve_lifetimes_trait_definition: QueryState<resolve_lifetimes_trait_definition<'tcx>>

Does lifetime resolution, but does not descend into trait items. This should only be used for resolving lifetimes of on trait definitions, and is used to avoid cycles. Importantly, resolve_lifetimes still visits the same lifetimes and is responsible for diagnostics. See `rustc_resolve::late::lifetimes for details.

resolve_lifetimes: QueryState<resolve_lifetimes<'tcx>>

Does lifetime resolution on items. Importantly, we can’t resolve lifetimes directly on things like trait methods, because of trait params. See `rustc_resolve::late::lifetimes for details.

named_region_map: QueryState<named_region_map<'tcx>>

[query description - consider adding a doc-comment!] looking up a named region

is_late_bound_map: QueryState<is_late_bound_map<'tcx>>

[query description - consider adding a doc-comment!] testing if a region is late bound

object_lifetime_defaults: QueryState<object_lifetime_defaults<'tcx>>

For a given item (like a struct), gets the default lifetimes to be used for each parameter if a trait object were to be passed for that parameter. For example, for struct Foo<'a, T, U>, this would be ['static, 'static]. For struct Foo<'a, T: 'a, U>, this would instead be ['a, 'static].

late_bound_vars_map: QueryState<late_bound_vars_map<'tcx>>

[query description - consider adding a doc-comment!] looking up late bound vars

visibility: QueryState<visibility<'tcx>>

[query description - consider adding a doc-comment!] computing visibility of tcx.def_path_str(def_id)

type_uninhabited_from: QueryState<type_uninhabited_from<'tcx>>

Computes the set of modules from which this type is visibly uninhabited. To check whether a type is uninhabited at all (not just from a given module), you could check whether the forest is empty.

dep_kind: QueryState<dep_kind<'tcx>>

[query description - consider adding a doc-comment!] fetching what a dependency looks like

crate_name: QueryState<crate_name<'tcx>>

Gets the name of the crate.

module_children: QueryState<module_children<'tcx>>

[query description - consider adding a doc-comment!] collecting child items of module tcx.def_path_str(def_id)

extern_mod_stmt_cnum: QueryState<extern_mod_stmt_cnum<'tcx>>

[query description - consider adding a doc-comment!] computing crate imported by tcx.def_path_str(def_id.to_def_id())

lib_features: QueryState<lib_features<'tcx>>

[query description - consider adding a doc-comment!] calculating the lib features map

defined_lib_features: QueryState<defined_lib_features<'tcx>>

[query description - consider adding a doc-comment!] calculating the lib features defined in a crate

stability_implications: QueryState<stability_implications<'tcx>>

[query description - consider adding a doc-comment!] calculating the implications between #[unstable] features defined in a crate

is_intrinsic: QueryState<is_intrinsic<'tcx>>

Whether the function is an intrinsic

get_lang_items: QueryState<get_lang_items<'tcx>>

Returns the lang items defined in another crate by loading it from metadata.

all_diagnostic_items: QueryState<all_diagnostic_items<'tcx>>

Returns all diagnostic items defined in all crates.

defined_lang_items: QueryState<defined_lang_items<'tcx>>

Returns the lang items defined in another crate by loading it from metadata.

diagnostic_items: QueryState<diagnostic_items<'tcx>>

Returns the diagnostic items defined in a crate.

missing_lang_items: QueryState<missing_lang_items<'tcx>>

[query description - consider adding a doc-comment!] calculating the missing lang items in a crate

visible_parent_map: QueryState<visible_parent_map<'tcx>>

[query description - consider adding a doc-comment!] calculating the visible parent map

trimmed_def_paths: QueryState<trimmed_def_paths<'tcx>>

[query description - consider adding a doc-comment!] calculating trimmed def paths

missing_extern_crate_item: QueryState<missing_extern_crate_item<'tcx>>

[query description - consider adding a doc-comment!] seeing if we’re missing an extern crate item for this crate

used_crate_source: QueryState<used_crate_source<'tcx>>

[query description - consider adding a doc-comment!] looking at the source for a crate

debugger_visualizers: QueryState<debugger_visualizers<'tcx>>

Returns the debugger visualizers defined for this crate.

postorder_cnums: QueryState<postorder_cnums<'tcx>>

[query description - consider adding a doc-comment!] generating a postorder list of CrateNums

is_private_dep: QueryState<is_private_dep<'tcx>>

Returns whether or not the crate with CrateNum ‘cnum’ is marked as a private dependency

allocator_kind: QueryState<allocator_kind<'tcx>>

[query description - consider adding a doc-comment!] allocator kind for the current crate

upvars_mentioned: QueryState<upvars_mentioned<'tcx>>

[query description - consider adding a doc-comment!] collecting upvars mentioned in tcx.def_path_str(def_id)

maybe_unused_trait_imports: QueryState<maybe_unused_trait_imports<'tcx>>

[query description - consider adding a doc-comment!] fetching potentially unused trait imports

maybe_unused_extern_crates: QueryState<maybe_unused_extern_crates<'tcx>>

[query description - consider adding a doc-comment!] looking up all possibly unused extern crates

names_imported_by_glob_use: QueryState<names_imported_by_glob_use<'tcx>>

[query description - consider adding a doc-comment!] names_imported_by_glob_use for tcx.def_path_str(def_id.to_def_id())

stability_index: QueryState<stability_index<'tcx>>

[query description - consider adding a doc-comment!] calculating the stability index for the local crate

crates: QueryState<crates<'tcx>>

[query description - consider adding a doc-comment!] fetching all foreign CrateNum instances

traits_in_crate: QueryState<traits_in_crate<'tcx>>

A list of all traits in a crate, used by rustdoc and error reporting. NOTE: Not named just traits due to a naming conflict.

exported_symbols: QueryState<exported_symbols<'tcx>>

The list of symbols exported from the given crate.

  • All names contained in exported_symbols(cnum) are guaranteed to correspond to a publicly visible symbol in cnum machine code.
  • The exported_symbols sets of different crates do not intersect.
collect_and_partition_mono_items: QueryState<collect_and_partition_mono_items<'tcx>>

[query description - consider adding a doc-comment!] collect_and_partition_mono_items

is_codegened_item: QueryState<is_codegened_item<'tcx>>

[query description - consider adding a doc-comment!] determining whether tcx.def_path_str(def_id) needs codegen

codegened_and_inlined_items: QueryState<codegened_and_inlined_items<'tcx>>

All items participating in code generation together with items inlined into them.

codegen_unit: QueryState<codegen_unit<'tcx>>

[query description - consider adding a doc-comment!] codegen_unit

unused_generic_params: QueryState<unused_generic_params<'tcx>>

[query description - consider adding a doc-comment!] determining which generic parameters are unused by tcx.def_path_str(key.def_id())

backend_optimization_level: QueryState<backend_optimization_level<'tcx>>

[query description - consider adding a doc-comment!] optimization level used by backend

output_filenames: QueryState<output_filenames<'tcx>>

Return the filenames where output artefacts shall be stored.

This query returns an &Arc because codegen backends need the value even after the TyCtxt has been destroyed.

normalize_projection_ty: QueryState<normalize_projection_ty<'tcx>>

Do not call this query directly: invoke normalize instead.

try_normalize_generic_arg_after_erasing_regions: QueryState<try_normalize_generic_arg_after_erasing_regions<'tcx>>

Do not call this query directly: invoke try_normalize_erasing_regions instead.

try_normalize_mir_const_after_erasing_regions: QueryState<try_normalize_mir_const_after_erasing_regions<'tcx>>

Do not call this query directly: invoke try_normalize_erasing_regions instead.

implied_outlives_bounds: QueryState<implied_outlives_bounds<'tcx>>

[query description - consider adding a doc-comment!] computing implied outlives bounds for {:?}

dropck_outlives: QueryState<dropck_outlives<'tcx>>

Do not call this query directly: invoke DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx) instead.

evaluate_obligation: QueryState<evaluate_obligation<'tcx>>

Do not call this query directly: invoke infcx.predicate_may_hold() or infcx.predicate_must_hold() instead.

evaluate_goal: QueryState<evaluate_goal<'tcx>>

[query description - consider adding a doc-comment!] evaluating trait selection obligation goal.value

type_op_ascribe_user_type: QueryState<type_op_ascribe_user_type<'tcx>>

Do not call this query directly: part of the Eq type-op

type_op_eq: QueryState<type_op_eq<'tcx>>

Do not call this query directly: part of the Eq type-op

type_op_subtype: QueryState<type_op_subtype<'tcx>>

Do not call this query directly: part of the Subtype type-op

type_op_prove_predicate: QueryState<type_op_prove_predicate<'tcx>>

Do not call this query directly: part of the ProvePredicate type-op

type_op_normalize_ty: QueryState<type_op_normalize_ty<'tcx>>

Do not call this query directly: part of the Normalize type-op

type_op_normalize_predicate: QueryState<type_op_normalize_predicate<'tcx>>

Do not call this query directly: part of the Normalize type-op

type_op_normalize_poly_fn_sig: QueryState<type_op_normalize_poly_fn_sig<'tcx>>

Do not call this query directly: part of the Normalize type-op

type_op_normalize_fn_sig: QueryState<type_op_normalize_fn_sig<'tcx>>

Do not call this query directly: part of the Normalize type-op

subst_and_check_impossible_predicates: QueryState<subst_and_check_impossible_predicates<'tcx>>

[query description - consider adding a doc-comment!] impossible substituted predicates: tcx.def_path_str(key.0)

is_impossible_method: QueryState<is_impossible_method<'tcx>>

[query description - consider adding a doc-comment!] checking if tcx.def_path_str(key.1) is impossible to call within tcx.def_path_str(key.0)

method_autoderef_steps: QueryState<method_autoderef_steps<'tcx>>

[query description - consider adding a doc-comment!] computing autoderef types for {:?}

supported_target_features: QueryState<supported_target_features<'tcx>>

[query description - consider adding a doc-comment!] looking up supported target features

instance_def_size_estimate: QueryState<instance_def_size_estimate<'tcx>>

Get an estimate of the size of an InstanceDef based on its MIR for CGU partitioning.

features_query: QueryState<features_query<'tcx>>

[query description - consider adding a doc-comment!] looking up enabled feature gates

resolve_instance: QueryState<resolve_instance<'tcx>>

Attempt to resolve the given DefId to an Instance, for the given generics args (SubstsRef), returning one of:

  • Ok(Some(instance)) on success
  • Ok(None) when the SubstsRef are still too generic, and therefore don’t allow finding the final Instance
  • Err(ErrorGuaranteed) when the Instance resolution process couldn’t complete due to errors elsewhere - this is distinct from Ok(None) to avoid misleading diagnostics when an error has already been/will be emitted, for the original cause
resolve_instance_of_const_arg: QueryState<resolve_instance_of_const_arg<'tcx>>

[query description - consider adding a doc-comment!] resolving instance of the const argument ty :: Instance :: new(key.value.0.to_def_id(), key.value.2)

normalize_opaque_types: QueryState<normalize_opaque_types<'tcx>>

[query description - consider adding a doc-comment!] normalizing opaque types in {:?}

conservative_is_privately_uninhabited: QueryState<conservative_is_privately_uninhabited<'tcx>>

Checks whether a type is definitely uninhabited. This is conservative: for some types that are uninhabited we return false, but we only return true for types that are definitely uninhabited. ty.conservative_is_privately_uninhabited implies that any value of type ty will be Abi::Uninhabited. (Note that uninhabited types may have nonzero size, to account for partial initialisation. See #49298 for details.)

limits: QueryState<limits<'tcx>>

[query description - consider adding a doc-comment!] looking up limits

diagnostic_hir_wf_check: QueryState<diagnostic_hir_wf_check<'tcx>>

Performs an HIR-based well-formed check on the item with the given HirId. If we get an Unimplemented error that matches the provided Predicate, return the cause of the newly created obligation.

This is only used by error-reporting code to get a better cause (in particular, a better span) for an existing error. Therefore, it is best-effort, and may never handle all of the cases that the normal ty::Ty-based wfcheck does. This is fine, because the ty::Ty-based wfcheck is always run.

global_backend_features: QueryState<global_backend_features<'tcx>>

The list of backend features computed from CLI flags (-Ctarget-cpu, -Ctarget-feature, --target and similar).

generator_diagnostic_data: QueryState<generator_diagnostic_data<'tcx>>

[query description - consider adding a doc-comment!] looking up generator diagnostic data of tcx.def_path_str(key)

permits_uninit_init: QueryState<permits_uninit_init<'tcx>>

[query description - consider adding a doc-comment!] checking to see if {:?} permits being left uninit

permits_zero_init: QueryState<permits_zero_init<'tcx>>

[query description - consider adding a doc-comment!] checking to see if {:?} permits being left zeroed

Implementations

Trait Implementations

[query description - consider adding a doc-comment!] trigger a delay span bug

[query description - consider adding a doc-comment!] get the resolver outputs

[query description - consider adding a doc-comment!] get the resolver for lowering

Return the span for a definition. Contrary to def_span below, this query returns the full absolute span of the definition. This span is meant for dep-tracking rather than diagnostics. It should not be used outside of rustc_middle::hir::source_map.

Represents crate as a whole (as distinct from the top-level crate module). If you call hir_crate (e.g., indirectly by calling tcx.hir().krate()), we will have to assume that any change means that you need to be recompiled. This is because the hir_crate query gives you access to all other items. To avoid this fate, do not call tcx.hir().krate(); instead, prefer wrappers like tcx.visit_all_items_in_krate().

All items in the crate.

The items in a module.

This can be conveniently accessed by tcx.hir().visit_item_likes_in_module. Avoid calling this query directly.

Gives access to the HIR node for the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

Gives access to the HIR ID for the given LocalDefId owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

Gives access to the HIR node’s parent for the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

Gives access to the HIR nodes and bodies inside the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

Gives access to the HIR attributes inside the HIR owner key.

This can be conveniently accessed by methods on tcx.hir(). Avoid calling this query directly.

Computes the DefId of the corresponding const parameter in case the key is a const argument and returns None otherwise.

let a = foo::<7>();
//            ^ Calling `opt_const_param_of` for this argument,

fn foo<const N: usize>()
//           ^ returns this `DefId`.

fn bar() {
// ^ While calling `opt_const_param_of` for other bodies returns `None`.
}

Given the def_id of a const-generic parameter, computes the associated default const parameter. e.g. fn example<const N: usize=3> called on N would return 3.

Returns the Ty of the given DefId. If the DefId points to an alias, it will “skip” this alias to return the aliased type.

[query description - consider adding a doc-comment!] running analysis passes on this crate

This query checks the fulfillment of collected lint expectations. All lint emitting queries have to be done before this is executed to ensure that all expectations can be fulfilled.

This is an extra query to enable other drivers (like rustdoc) to only execute a small subset of the analysis query, while allowing lints to be expected. In rustc, this query will be executed as part of the analysis query and doesn’t have to be called a second time.

Tools can additionally pass in a tool filter. That will restrict the expectations to only trigger for lints starting with the listed tool name. This is useful for cases were not all linting code from rustc was called. With the default None all registered lints will also be checked for expectation fulfillment.

Maps from the DefId of an item (trait/struct/enum/fn) to its associated generics.

Maps from the DefId of an item (trait/struct/enum/fn) to the predicates (where-clauses) that must be proven true in order to reference it. This is almost always the “predicates query” that you want.

predicates_of builds on predicates_defined_on – in fact, it is almost always the same as that query, except for the case of traits. For traits, predicates_of contains an additional Self: Trait<...> predicate that users don’t actually write. This reflects the fact that to invoke the trait (e.g., via Default::default) you must supply types that actually implement the trait. (However, this extra predicate gets in the way of some checks, which are intended to operate over only the actual where-clauses written by the user.)

Returns the list of bounds that can be used for SelectionCandidate::ProjectionCandidate(_) and ProjectionTyCandidate::TraitDef. Specifically this is the bounds written on the trait’s type definition, or those after the impl keyword

type X: Bound + 'lt
//      ^^^^^^^^^^^
impl Debug + Display
//   ^^^^^^^^^^^^^^^

key is the DefId of the associated type or opaque type.

Bounds from the parent (e.g. with nested impl trait) are not included.

Elaborated version of the predicates from explicit_item_bounds.

For example:

trait MyTrait {
    type MyAType: Eq + ?Sized;
}

explicit_item_bounds returns [<Self as MyTrait>::MyAType: Eq], and item_bounds returns

[
    <Self as Trait>::MyAType: Eq,
    <Self as Trait>::MyAType: PartialEq<<Self as Trait>::MyAType>
]

Bounds from the parent (e.g. with nested impl trait) are not included.

[query description - consider adding a doc-comment!] looking up the native libraries of a linked crate

[query description - consider adding a doc-comment!] computing the lint levels for items in this crate

[query description - consider adding a doc-comment!] parent module of tcx.def_path_str(key.to_def_id())

[query description - consider adding a doc-comment!] expansion that defined tcx.def_path_str(key)

[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime

Fetch the THIR for a given body. If typeck for that body failed, returns an empty Thir.

Create a THIR tree for debugging.

Set of all the DefIds in this crate that have MIR associated with them. This includes all the body owners, but also things like struct constructors.

Maps DefId’s that have an associated mir::Body to the result of the MIR const-checking pass. This is the set of qualifs in the final value of a const.

[query description - consider adding a doc-comment!] const checking the const argument tcx.def_path_str(key.0.to_def_id())

Fetch the MIR for a given DefId right after it’s built - this includes unreachable code.

Fetch the MIR for a given DefId up till the point where it is ready for const qualification.

See the README for the mir module for details.

Try to build an abstract representation of the given constant.

Try to build an abstract representation of the given constant.

[query description - consider adding a doc-comment!] trying to unify the generic constants tcx.def_path_str(key.value.0.def.did) and tcx.def_path_str(key.value.1.def.did)

[query description - consider adding a doc-comment!] elaborating drops for tcx.def_path_str(key.did.to_def_id())

[query description - consider adding a doc-comment!] caching mir of tcx.def_path_str(key) for CTFE

[query description - consider adding a doc-comment!] MIR for CTFE of the const argument tcx.def_path_str(key.0.to_def_id())

[query description - consider adding a doc-comment!] processing if key.const_param_did.is_some() { "the const argument " } else { "" } tcx.def_path_str(key.did.to_def_id())

[query description - consider adding a doc-comment!] symbols for captures of closure tcx.def_path_str(key.1.to_def_id()) in tcx.def_path_str(key.0.to_def_id())

MIR after our optimization passes have run. This is MIR that is ready for codegen. This is also the only query that can fetch non-local MIR, at present.

Returns coverage summary info for a function, after executing the InstrumentCoverage MIR pass (assuming the -Cinstrument-coverage option is enabled).

Returns the CodeRegions for a function that has instrumented coverage, in case the function was optimized out before codegen, and before being added to the Coverage Map.

The DefId is the DefId of the containing MIR body. Promoteds do not have their own DefId. This function returns all promoteds in the specified body. The body references promoteds by the DefId and the mir::Promoted index. This is necessary, because after inlining a body may refer to promoteds from other bodies. In that case you still need to use the DefId of the original body.

[query description - consider adding a doc-comment!] optimizing promoted MIR for the const argument tcx.def_path_str(key.0.to_def_id())

Erases regions from ty to yield a new type. Normally you would just use tcx.erase_regions(value), however, which uses this query as a kind of cache.

[query description - consider adding a doc-comment!] wasm import module map

Maps from the DefId of an item (trait/struct/enum/fn) to the predicates (where-clauses) directly defined on it. This is equal to the explicit_predicates_of predicates plus the inferred_outlives_of predicates.

Returns everything that looks like a predicate written explicitly by the user on a trait item.

Traits are unusual, because predicates on associated types are converted into bounds on that type for backwards compatibility:

trait X where Self::U: Copy { type U; }

becomes

trait X { type U: Copy; }

explicit_predicates_of and explicit_item_bounds will then take the appropriate subsets of the predicates here.

Returns the predicates written explicitly by the user.

Returns the inferred outlives predicates (e.g., for struct Foo<'a, T> { x: &'a T }, this would return T: 'a).

Maps from the DefId of a trait to the list of super-predicates. This is a subset of the full list of predicates. We store these in a separate map because we must evaluate them even during type conversion, often before the full predicates are available (note that supertraits have additional acyclicity requirements).

The Option<Ident> is the name of an associated type. If it is None, then this query returns the full set of predicates. If Some<Ident>, then the query returns only the subset of super-predicates that reference traits that define the given associated type. This is used to avoid cycles in resolving types like T::Item.

To avoid cycles within the predicates of a single item we compute per-type-parameter predicates for resolving T::AssocTy.

[query description - consider adding a doc-comment!] computing trait definition for tcx.def_path_str(key)

[query description - consider adding a doc-comment!] computing ADT definition for tcx.def_path_str(key)

[query description - consider adding a doc-comment!] computing Drop impl for tcx.def_path_str(key)

[query description - consider adding a doc-comment!] computing Sized constraints for tcx.def_path_str(key)

[query description - consider adding a doc-comment!] computing drop-check constraints for tcx.def_path_str(key)

Returns true if this is a const fn, use the is_const_fn to know whether your crate actually sees it as const fn (e.g., the const-fn-ness might be unstable and you might not have the feature gate active).

Do not call this function manually. It is only meant to cache the base data for the is_const_fn function. Consider using is_const_fn or is_const_fn_raw instead.

[query description - consider adding a doc-comment!] checking if the function is async: tcx.def_path_str(key)

Returns true if calls to the function may be promoted.

This is either because the function is e.g., a tuple-struct or tuple-variant constructor, or because it has the #[rustc_promotable] attribute. The attribute should be removed in the future in favour of some form of check which figures out whether the function does not inspect the bits of any of its arguments (so is essentially just a constructor function).

Returns true if this is a foreign item (i.e., linked via extern { ... }).

Returns Some(generator_kind) if the node pointed to by def_id is a generator.

Gets a map with the variance of every item; use item_variance instead.

Maps from the DefId of a type or region parameter to its (inferred) variance.

Maps from thee DefId of a type to its (inferred) outlives.

Maps from an impl/trait DefId to a list of the DefIds of its items.

Maps from a trait item to the trait item “descriptor”.

Collects the associated items defined on a trait or impl.

Maps from associated items on a trait to the corresponding associated item on the impl specified by impl_id.

For example, with the following code

struct Type {}
                        // DefId
trait Trait {           // trait_id
    fn f();             // trait_f
    fn g() {}           // trait_g
}

impl Trait for Type {   // impl_id
    fn f() {}           // impl_f
    fn g() {}           // impl_g
}

The map returned for tcx.impl_item_implementor_ids(impl_id) would be { trait_f: impl_f, trait_g: impl_g }

Given an impl_id, return the trait it implements. Return None if this is an inherent impl.

[query description - consider adding a doc-comment!] computing implementation polarity of tcx.def_path_str(impl_id)

[query description - consider adding a doc-comment!] computing Self type wrt issue #33140 tcx.def_path_str(key)

Maps a DefId of a type to a list of its inherent impls. Contains implementations of methods that are inherent to a type. Methods in these implementations don’t need to be exported.

[query description - consider adding a doc-comment!] collecting all inherent impls for {:?}

The result of unsafety-checking this LocalDefId.

[query description - consider adding a doc-comment!] unsafety-checking the const argument tcx.def_path_str(key.0.to_def_id())

Unsafety-check this LocalDefId with THIR unsafeck. This should be used with -Zthir-unsafeck.

[query description - consider adding a doc-comment!] unsafety-checking the const argument tcx.def_path_str(key.0.to_def_id())

HACK: when evaluated, this reports an “unsafe derive on repr(packed)” error.

Unsafety checking is executed for each method separately, but we only want to emit this error once per derive. As there are some impls with multiple methods, we use a query for deduplication.

Computes the signature of the function.

Performs lint checking for the module.

Checks the attributes in the module.

Checks for uses of unstable APIs in the module.

Checks the const bodies in the module for illegal operations (e.g. if or loop).

Checks the loops in the module.

[query description - consider adding a doc-comment!] checking naked functions in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] checking item types in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] checking privacy in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] checking liveness of variables in describe_as_module(key, tcx)

Return the live symbols in the crate for dead code check.

The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone) and their respective impl (i.e., part of the derive macro)

[query description - consider adding a doc-comment!] checking deathness of variables in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] checking that impls are well-formed in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] checking that types are well-formed in describe_as_module(key, tcx)

[query description - consider adding a doc-comment!] collecting item types in describe_as_module(key, tcx)

Caches CoerceUnsized kinds for impls on custom types.

[query description - consider adding a doc-comment!] type-checking all item bodies

[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())

[query description - consider adding a doc-comment!] type-checking the const argument tcx.def_path_str(key.0.to_def_id())

[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())

[query description - consider adding a doc-comment!] used_trait_imports tcx.def_path_str(key.to_def_id())

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) has a body

[query description - consider adding a doc-comment!] coherence checking all impls of trait tcx.def_path_str(def_id)

Borrow-checks the function body. If this is a closure, returns additional requirements that the closure’s creator must verify.

[query description - consider adding a doc-comment!] borrow-checking the const argument tcx.def_path_str(key.0.to_def_id())

Gets a complete map from all types to their inherent impls. Not meant to be used directly outside of coherence.

Checks all types in the crate for overlap in their inherent impls. Reports errors. Not meant to be used directly outside of coherence.

Checks whether all impls in the crate pass the overlap check, returning which impls fail it. If all impls are correct, the returned slice is empty.

Check whether the function has any recursion that could cause the inliner to trigger a cycle. Returns the call stack causing the cycle. The call stack does not contain the current function, just all intermediate functions.

Obtain all the calls into other local functions

Evaluates a constant and returns the computed allocation.

Do not use this directly, use the tcx.eval_static_initializer wrapper.

Evaluates const items or anonymous constants (such as enum variant explicit discriminants or array lengths) into a representation suitable for the type system and const generics.

Do not use this directly, use one of the following wrappers: tcx.const_eval_poly, tcx.const_eval_resolve, tcx.const_eval_instance, or tcx.const_eval_global_id.

Evaluate a constant and convert it to a type level constant or return None if that is not possible.

Converts a type level constant value into ConstValue

Destructures array, ADT or tuple constants into the constants of their fields.

Tries to destructure an mir::ConstantKind ADT or array into its variant index and its field values.

Dereference a constant reference or raw pointer and turn the result into a constant again.

[query description - consider adding a doc-comment!] get a &core::panic::Location referring to a span

[query description - consider adding a doc-comment!] converting literal to const

[query description - consider adding a doc-comment!] converting literal to mir constant

[query description - consider adding a doc-comment!] match-checking tcx.def_path_str(key)

Performs part of the privacy check and computes “access levels”.

[query description - consider adding a doc-comment!] checking for private elements in public interfaces

[query description - consider adding a doc-comment!] reachability

Per-body region::ScopeTree. The DefId should be the owner DefId for the body; in the case of closures, this will be redirected to the enclosing function.

Generates a MIR body for the shim.

The symbol_name query provides the symbol name for calling a given instance from the local crate. In particular, it will also look up the correct symbol name of instances from upstream crates.

[query description - consider adding a doc-comment!] looking up definition kind of tcx.def_path_str(def_id)

Gets the span for the definition.

Gets the span for the identifier of the definition.

[query description - consider adding a doc-comment!] looking up stability of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] looking up const stability of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] looking up default body stability of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] computing should_inherit_track_caller of tcx.def_path_str(def_id)

source

fn lookup_deprecation_entry(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lookup_deprecation_entry<'tcx>,
    mode: QueryMode
) -> Option<lookup_deprecation_entry<'tcx>>

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) is deprecated

Determines whether an item is annotated with doc(hidden).

Returns the attributes on the item at def_id.

Do not use this directly, use tcx.get_attrs instead.

[query description - consider adding a doc-comment!] computing codegen attributes of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] computing target features for inline asm of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] looking up function parameter names for tcx.def_path_str(def_id)

Gets the rendered value of the specified constant or associated constant. Used by rustdoc.

[query description - consider adding a doc-comment!] computing specialization parent impl of tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] checking if item has ctfe mir available: tcx.def_path_str(key)

[query description - consider adding a doc-comment!] checking if item has mir available: tcx.def_path_str(key)

[query description - consider adding a doc-comment!] finding all existential vtable entries for trait tcx.def_path_str(key.def_id())

[query description - consider adding a doc-comment!] finding all vtable entries for trait tcx.def_path_str(key.def_id())

[query description - consider adding a doc-comment!] finding the slot within vtable for trait object key.1 vtable ptr during trait upcasting coercion from key.0 vtable

[query description - consider adding a doc-comment!] vtable const allocation for < key.0 as key.1.map(| trait_ref | format! ("{}", trait_ref)).unwrap_or("_".to_owned()) >

[query description - consider adding a doc-comment!] checking if tcx.def_path_str(key.1.def_id()) fulfills its obligations

Return all impl blocks in the current crate.

Given a trait trait_id, return all known impl blocks.

[query description - consider adding a doc-comment!] building specialization graph of trait tcx.def_path_str(trait_id)

[query description - consider adding a doc-comment!] determine object safety of trait tcx.def_path_str(trait_id)

Gets the ParameterEnvironment for a given item; this environment will be in “user-facing” mode, meaning that it is suitable for type-checking etc, and it does not normalize specializable associated types. This is almost always what you want, unless you are doing MIR optimizations, in which case you might want to use reveal_all() method to change modes.

Like param_env, but returns the ParamEnv in Reveal::All mode. Prefer this over tcx.param_env(def_id).with_reveal_all_normalized(tcx), as this method is more efficient.

Trait selection queries. These are best used by invoking ty.is_copy_modulo_regions(), ty.is_copy(), etc, since that will prune the environment where possible.

Query backing Ty::is_sized.

Query backing Ty::is_freeze.

Query backing Ty::is_unpin.

Query backing Ty::needs_drop.

Query backing Ty::has_significant_drop_raw.

Query backing Ty::is_structural_eq_shallow.

This is only correct for ADTs. Call is_structural_eq_shallow to handle all types correctly.

A list of types where the ADT requires drop if and only if any of those types require drop. If the ADT is known to always need drop then Err(AlwaysRequiresDrop) is returned.

A list of types where the ADT requires drop if and only if any of those types has significant drop. A type marked with the attribute rustc_insignificant_dtor is considered to not be significant. A drop is significant if it is implemented by the user or does anything that will have any observable behavior (other than freeing up memory). If the ADT is known to have a significant destructor then Err(AlwaysRequiresDrop) is returned.

Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type.

Compute a FnAbi suitable for indirect calls, i.e. to fn pointers.

NB: this doesn’t handle virtual calls - those should use fn_abi_of_instance instead, where the instance is an InstanceDef::Virtual.

Compute a FnAbi suitable for declaring/defining an fn instance, and for direct calls to an fn.

NB: that includes virtual calls, which are represented by “direct calls” to an InstanceDef::Virtual instance (of <dyn Trait as Trait>::fn).

[query description - consider adding a doc-comment!] dylib dependency formats of crate

[query description - consider adding a doc-comment!] get the linkage format of all dependencies

[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins

[query description - consider adding a doc-comment!] checking if the crate has_global_allocator

[query description - consider adding a doc-comment!] checking if the crate has_panic_handler

[query description - consider adding a doc-comment!] query a crate is #![profiler_runtime]

[query description - consider adding a doc-comment!] check if tcx.def_path_str(key.to_def_id()) contains FFI-unwind calls

[query description - consider adding a doc-comment!] query a crate’s required panic strategy

[query description - consider adding a doc-comment!] query a crate’s configured panic-in-drop strategy

[query description - consider adding a doc-comment!] test whether a crate has #![no_builtins]

[query description - consider adding a doc-comment!] query a crate’s symbol mangling version

[query description - consider adding a doc-comment!] getting crate’s ExternCrateData

[query description - consider adding a doc-comment!] computing whether impls specialize one another

[query description - consider adding a doc-comment!] traits in scope at a block

[query description - consider adding a doc-comment!] looking up reexports of module tcx.def_path_str(def_id.to_def_id())

[query description - consider adding a doc-comment!] looking up whether tcx.def_path_str(def_id) is a default impl

[query description - consider adding a doc-comment!] checking that tcx.def_path_str(key.to_def_id()) is well-formed

[query description - consider adding a doc-comment!] looking up the exported symbols of a crate

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id) is an exported symbol

[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id.to_def_id()) is reachable from outside the crate

The entire set of monomorphizations the local crate can safely link to because they are exported from upstream crates. Do not depend on this directly, as its value changes anytime a monomorphization gets added or removed in any upstream crate. Instead use the narrower upstream_monomorphizations_for, upstream_drop_glue_for, or, even better, Instance::upstream_monomorphization().

Returns the set of upstream monomorphizations available for the generic function identified by the given def_id. The query makes sure to make a stable selection if the same monomorphization is available in multiple upstream crates.

You likely want to call Instance::upstream_monomorphization() instead of invoking this query directly.

Returns the upstream crate that exports drop-glue for the given type (substs is expected to be a single-item list containing the type one wants drop-glue for).

This is a subset of upstream_monomorphizations_for in order to increase dep-tracking granularity. Otherwise adding or removing any type with drop-glue in any upstream crate would invalidate all functions calling drop-glue of an upstream type.

You likely want to call Instance::upstream_monomorphization() instead of invoking this query directly.

NOTE: This query could easily be extended to also support other common functions that have are large set of monomorphizations (like Clone::clone for example).

[query description - consider adding a doc-comment!] looking up the foreign modules of a linked crate

Identifies the entry-point (e.g., the main function) for a given crate, returning None if there is no entry point (such as for library crates).

[query description - consider adding a doc-comment!] looking up the derive registrar for a crate

[query description - consider adding a doc-comment!] looking up the hash a crate

[query description - consider adding a doc-comment!] looking up the hash of a host version of a crate

[query description - consider adding a doc-comment!] looking up the extra filename for a crate

[query description - consider adding a doc-comment!] looking up the paths for extern crates

Given a crate and a trait, look up all impls of that trait in the crate. Return (impl_id, self_ty).

Collects all incoherent impls for the given crate and type.

Do not call this directly, but instead use the incoherent_impls query. This query is only used to get the data necessary for that query.

[query description - consider adding a doc-comment!] is_dllimport_foreign_item( tcx.def_path_str(def_id) )

[query description - consider adding a doc-comment!] is_statically_included_foreign_item( tcx.def_path_str(def_id) )

[query description - consider adding a doc-comment!] native_library_kind( tcx.def_path_str(def_id) )

Does lifetime resolution, but does not descend into trait items. This should only be used for resolving lifetimes of on trait definitions, and is used to avoid cycles. Importantly, resolve_lifetimes still visits the same lifetimes and is responsible for diagnostics. See `rustc_resolve::late::lifetimes for details.

Does lifetime resolution on items. Importantly, we can’t resolve lifetimes directly on things like trait methods, because of trait params. See `rustc_resolve::late::lifetimes for details.

[query description - consider adding a doc-comment!] looking up a named region

[query description - consider adding a doc-comment!] testing if a region is late bound

For a given item (like a struct), gets the default lifetimes to be used for each parameter if a trait object were to be passed for that parameter. For example, for struct Foo<'a, T, U>, this would be ['static, 'static]. For struct Foo<'a, T: 'a, U>, this would instead be ['a, 'static].

[query description - consider adding a doc-comment!] looking up late bound vars

[query description - consider adding a doc-comment!] computing visibility of tcx.def_path_str(def_id)

Computes the set of modules from which this type is visibly uninhabited. To check whether a type is uninhabited at all (not just from a given module), you could check whether the forest is empty.

[query description - consider adding a doc-comment!] fetching what a dependency looks like

Gets the name of the crate.

[query description - consider adding a doc-comment!] collecting child items of module tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] computing crate imported by tcx.def_path_str(def_id.to_def_id())

[query description - consider adding a doc-comment!] calculating the lib features map

[query description - consider adding a doc-comment!] calculating the lib features defined in a crate

[query description - consider adding a doc-comment!] calculating the implications between #[unstable] features defined in a crate

Whether the function is an intrinsic

Returns the lang items defined in another crate by loading it from metadata.

Returns all diagnostic items defined in all crates.

Returns the lang items defined in another crate by loading it from metadata.

Returns the diagnostic items defined in a crate.

[query description - consider adding a doc-comment!] calculating the missing lang items in a crate

[query description - consider adding a doc-comment!] calculating the visible parent map

[query description - consider adding a doc-comment!] calculating trimmed def paths

[query description - consider adding a doc-comment!] seeing if we’re missing an extern crate item for this crate

[query description - consider adding a doc-comment!] looking at the source for a crate

Returns the debugger visualizers defined for this crate.

[query description - consider adding a doc-comment!] generating a postorder list of CrateNums

Returns whether or not the crate with CrateNum ‘cnum’ is marked as a private dependency

[query description - consider adding a doc-comment!] allocator kind for the current crate

[query description - consider adding a doc-comment!] collecting upvars mentioned in tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] fetching potentially unused trait imports

[query description - consider adding a doc-comment!] looking up all possibly unused extern crates

[query description - consider adding a doc-comment!] names_imported_by_glob_use for tcx.def_path_str(def_id.to_def_id())

[query description - consider adding a doc-comment!] calculating the stability index for the local crate

[query description - consider adding a doc-comment!] fetching all foreign CrateNum instances

A list of all traits in a crate, used by rustdoc and error reporting. NOTE: Not named just traits due to a naming conflict.

The list of symbols exported from the given crate.

  • All names contained in exported_symbols(cnum) are guaranteed to correspond to a publicly visible symbol in cnum machine code.
  • The exported_symbols sets of different crates do not intersect.

[query description - consider adding a doc-comment!] collect_and_partition_mono_items

[query description - consider adding a doc-comment!] determining whether tcx.def_path_str(def_id) needs codegen

All items participating in code generation together with items inlined into them.

[query description - consider adding a doc-comment!] codegen_unit

[query description - consider adding a doc-comment!] determining which generic parameters are unused by tcx.def_path_str(key.def_id())

[query description - consider adding a doc-comment!] optimization level used by backend

Return the filenames where output artefacts shall be stored.

This query returns an &Arc because codegen backends need the value even after the TyCtxt has been destroyed.

Do not call this query directly: invoke normalize instead.

Do not call this query directly: invoke try_normalize_erasing_regions instead.

Do not call this query directly: invoke try_normalize_erasing_regions instead.

[query description - consider adding a doc-comment!] computing implied outlives bounds for {:?}

Do not call this query directly: invoke DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx) instead.

Do not call this query directly: invoke infcx.predicate_may_hold() or infcx.predicate_must_hold() instead.

[query description - consider adding a doc-comment!] evaluating trait selection obligation goal.value

Do not call this query directly: part of the Eq type-op

Do not call this query directly: part of the Eq type-op

Do not call this query directly: part of the Subtype type-op

Do not call this query directly: part of the ProvePredicate type-op

Do not call this query directly: part of the Normalize type-op

Do not call this query directly: part of the Normalize type-op

Do not call this query directly: part of the Normalize type-op

Do not call this query directly: part of the Normalize type-op

[query description - consider adding a doc-comment!] impossible substituted predicates: tcx.def_path_str(key.0)

[query description - consider adding a doc-comment!] checking if tcx.def_path_str(key.1) is impossible to call within tcx.def_path_str(key.0)

[query description - consider adding a doc-comment!] computing autoderef types for {:?}

[query description - consider adding a doc-comment!] looking up supported target features

Get an estimate of the size of an InstanceDef based on its MIR for CGU partitioning.

[query description - consider adding a doc-comment!] looking up enabled feature gates

Attempt to resolve the given DefId to an Instance, for the given generics args (SubstsRef), returning one of:

  • Ok(Some(instance)) on success
  • Ok(None) when the SubstsRef are still too generic, and therefore don’t allow finding the final Instance
  • Err(ErrorGuaranteed) when the Instance resolution process couldn’t complete due to errors elsewhere - this is distinct from Ok(None) to avoid misleading diagnostics when an error has already been/will be emitted, for the original cause

[query description - consider adding a doc-comment!] resolving instance of the const argument ty :: Instance :: new(key.value.0.to_def_id(), key.value.2)

[query description - consider adding a doc-comment!] normalizing opaque types in {:?}

Checks whether a type is definitely uninhabited. This is conservative: for some types that are uninhabited we return false, but we only return true for types that are definitely uninhabited. ty.conservative_is_privately_uninhabited implies that any value of type ty will be Abi::Uninhabited. (Note that uninhabited types may have nonzero size, to account for partial initialisation. See #49298 for details.)

[query description - consider adding a doc-comment!] looking up limits

Performs an HIR-based well-formed check on the item with the given HirId. If we get an Unimplemented error that matches the provided Predicate, return the cause of the newly created obligation.

This is only used by error-reporting code to get a better cause (in particular, a better span) for an existing error. Therefore, it is best-effort, and may never handle all of the cases that the normal ty::Ty-based wfcheck does. This is fine, because the ty::Ty-based wfcheck is always run.

The list of backend features computed from CLI flags (-Ctarget-cpu, -Ctarget-feature, --target and similar).

[query description - consider adding a doc-comment!] looking up generator diagnostic data of tcx.def_path_str(key)

[query description - consider adding a doc-comment!] checking to see if {:?} permits being left uninit

[query description - consider adding a doc-comment!] checking to see if {:?} permits being left zeroed

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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