pub struct Queries<'tcx> {
Show 303 fields pub(crate) local_providers: Box<Providers>, pub(crate) extern_providers: Box<ExternProviders>, pub(crate) query_structs: Vec<QueryStruct<'tcx>>, pub on_disk_cache: Option<OnDiskCache<'tcx>>, pub(crate) jobs: AtomicU64, pub(crate) trigger_delay_span_bug: QueryState<DefId, DepKind>, pub(crate) registered_tools: QueryState<(), DepKind>, pub(crate) early_lint_checks: QueryState<(), DepKind>, pub(crate) resolutions: QueryState<(), DepKind>, pub(crate) resolver_for_lowering: QueryState<(), DepKind>, pub(crate) source_span: QueryState<LocalDefId, DepKind>, pub(crate) hir_crate: QueryState<(), DepKind>, pub(crate) hir_crate_items: QueryState<(), DepKind>, pub(crate) hir_module_items: QueryState<LocalDefId, DepKind>, pub(crate) hir_owner: QueryState<OwnerId, DepKind>, pub(crate) opt_local_def_id_to_hir_id: QueryState<LocalDefId, DepKind>, pub(crate) hir_owner_parent: QueryState<OwnerId, DepKind>, pub(crate) hir_owner_nodes: QueryState<OwnerId, DepKind>, pub(crate) hir_attrs: QueryState<OwnerId, DepKind>, pub(crate) opt_const_param_of: QueryState<LocalDefId, DepKind>, pub(crate) const_param_default: QueryState<DefId, DepKind>, pub(crate) type_of: QueryState<DefId, DepKind>, pub(crate) collect_return_position_impl_trait_in_trait_tys: QueryState<DefId, DepKind>, pub(crate) is_type_alias_impl_trait: QueryState<DefId, DepKind>, pub(crate) unsizing_params_for_adt: QueryState<DefId, DepKind>, pub(crate) analysis: QueryState<(), DepKind>, pub(crate) check_expectations: QueryState<Option<Symbol>, DepKind>, pub(crate) generics_of: QueryState<DefId, DepKind>, pub(crate) predicates_of: QueryState<DefId, DepKind>, pub(crate) explicit_item_bounds: QueryState<DefId, DepKind>, pub(crate) item_bounds: QueryState<DefId, DepKind>, pub(crate) native_libraries: QueryState<CrateNum, DepKind>, pub(crate) shallow_lint_levels_on: QueryState<OwnerId, DepKind>, pub(crate) lint_expectations: QueryState<(), DepKind>, pub(crate) parent_module_from_def_id: QueryState<LocalDefId, DepKind>, pub(crate) expn_that_defined: QueryState<DefId, DepKind>, pub(crate) is_panic_runtime: QueryState<CrateNum, DepKind>, pub(crate) representability: QueryState<LocalDefId, DepKind>, pub(crate) representability_adt_ty: QueryState<Ty<'tcx>, DepKind>, pub(crate) params_in_repr: QueryState<DefId, DepKind>, pub(crate) thir_body: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) thir_tree: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) thir_flat: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) mir_keys: QueryState<(), DepKind>, pub(crate) mir_const_qualif: QueryState<DefId, DepKind>, pub(crate) mir_const_qualif_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) mir_built: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) mir_const: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) thir_abstract_const: QueryState<DefId, DepKind>, pub(crate) thir_abstract_const_of_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) mir_drops_elaborated_and_const_checked: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) mir_for_ctfe: QueryState<DefId, DepKind>, pub(crate) mir_for_ctfe_of_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) mir_promoted: QueryState<WithOptConstParam<LocalDefId>, DepKind>, pub(crate) closure_typeinfo: QueryState<LocalDefId, DepKind>, pub(crate) mir_generator_witnesses: QueryState<DefId, DepKind>, pub(crate) check_generator_obligations: QueryState<LocalDefId, DepKind>, pub(crate) optimized_mir: QueryState<DefId, DepKind>, pub(crate) coverageinfo: QueryState<InstanceDef<'tcx>, DepKind>, pub(crate) covered_code_regions: QueryState<DefId, DepKind>, pub(crate) promoted_mir: QueryState<DefId, DepKind>, pub(crate) promoted_mir_of_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) erase_regions_ty: QueryState<Ty<'tcx>, DepKind>, pub(crate) wasm_import_module_map: QueryState<CrateNum, DepKind>, pub(crate) predicates_defined_on: QueryState<DefId, DepKind>, pub(crate) trait_explicit_predicates_and_bounds: QueryState<LocalDefId, DepKind>, pub(crate) explicit_predicates_of: QueryState<DefId, DepKind>, pub(crate) inferred_outlives_of: QueryState<DefId, DepKind>, pub(crate) super_predicates_of: QueryState<DefId, DepKind>, pub(crate) super_predicates_that_define_assoc_type: QueryState<(DefId, Option<Ident>), DepKind>, pub(crate) type_param_predicates: QueryState<(DefId, LocalDefId, Ident), DepKind>, pub(crate) trait_def: QueryState<DefId, DepKind>, pub(crate) adt_def: QueryState<DefId, DepKind>, pub(crate) adt_destructor: QueryState<DefId, DepKind>, pub(crate) adt_sized_constraint: QueryState<DefId, DepKind>, pub(crate) adt_dtorck_constraint: QueryState<DefId, DepKind>, pub(crate) constness: QueryState<DefId, DepKind>, pub(crate) asyncness: QueryState<DefId, DepKind>, pub(crate) is_promotable_const_fn: QueryState<DefId, DepKind>, pub(crate) is_foreign_item: QueryState<DefId, DepKind>, pub(crate) generator_kind: QueryState<DefId, DepKind>, pub(crate) crate_variances: QueryState<(), DepKind>, pub(crate) variances_of: QueryState<DefId, DepKind>, pub(crate) inferred_outlives_crate: QueryState<(), DepKind>, pub(crate) associated_item_def_ids: QueryState<DefId, DepKind>, pub(crate) associated_item: QueryState<DefId, DepKind>, pub(crate) associated_items: QueryState<DefId, DepKind>, pub(crate) impl_item_implementor_ids: QueryState<DefId, DepKind>, pub(crate) associated_types_for_impl_traits_in_associated_fn: QueryState<DefId, DepKind>, pub(crate) associated_type_for_impl_trait_in_trait: QueryState<LocalDefId, DepKind>, pub(crate) impl_trait_ref: QueryState<DefId, DepKind>, pub(crate) impl_polarity: QueryState<DefId, DepKind>, pub(crate) issue33140_self_ty: QueryState<DefId, DepKind>, pub(crate) inherent_impls: QueryState<DefId, DepKind>, pub(crate) incoherent_impls: QueryState<SimplifiedType, DepKind>, pub(crate) unsafety_check_result: QueryState<LocalDefId, DepKind>, pub(crate) unsafety_check_result_for_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) thir_check_unsafety: QueryState<LocalDefId, DepKind>, pub(crate) thir_check_unsafety_for_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) assumed_wf_types: QueryState<DefId, DepKind>, pub(crate) fn_sig: QueryState<DefId, DepKind>, pub(crate) lint_mod: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_attrs: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_unstable_api_usage: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_const_bodies: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_loops: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_naked_functions: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_item_types: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_privacy: QueryState<LocalDefId, DepKind>, pub(crate) check_liveness: QueryState<DefId, DepKind>, pub(crate) live_symbols_and_ignored_derived_traits: QueryState<(), DepKind>, pub(crate) check_mod_deathness: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_impl_wf: QueryState<LocalDefId, DepKind>, pub(crate) check_mod_type_wf: QueryState<LocalDefId, DepKind>, pub(crate) collect_mod_item_types: QueryState<LocalDefId, DepKind>, pub(crate) coerce_unsized_info: QueryState<DefId, DepKind>, pub(crate) typeck_item_bodies: QueryState<(), DepKind>, pub(crate) typeck: QueryState<LocalDefId, DepKind>, pub(crate) typeck_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) diagnostic_only_typeck: QueryState<LocalDefId, DepKind>, pub(crate) used_trait_imports: QueryState<LocalDefId, DepKind>, pub(crate) has_typeck_results: QueryState<DefId, DepKind>, pub(crate) coherent_trait: QueryState<DefId, DepKind>, pub(crate) mir_borrowck: QueryState<LocalDefId, DepKind>, pub(crate) mir_borrowck_const_arg: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) crate_inherent_impls: QueryState<(), DepKind>, pub(crate) crate_inherent_impls_overlap_check: QueryState<(), DepKind>, pub(crate) orphan_check_impl: QueryState<LocalDefId, DepKind>, pub(crate) mir_callgraph_reachable: QueryState<(Instance<'tcx>, LocalDefId), DepKind>, pub(crate) mir_inliner_callees: QueryState<InstanceDef<'tcx>, DepKind>, pub(crate) eval_to_allocation_raw: QueryState<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>, pub(crate) eval_to_const_value_raw: QueryState<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>, pub(crate) eval_to_valtree: QueryState<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>, pub(crate) valtree_to_const_val: QueryState<(Ty<'tcx>, ValTree<'tcx>), DepKind>, pub(crate) destructure_const: QueryState<Const<'tcx>, DepKind>, pub(crate) try_destructure_mir_constant: QueryState<ParamEnvAnd<'tcx, ConstantKind<'tcx>>, DepKind>, pub(crate) deref_mir_constant: QueryState<ParamEnvAnd<'tcx, ConstantKind<'tcx>>, DepKind>, pub(crate) const_caller_location: QueryState<(Symbol, u32, u32), DepKind>, pub(crate) lit_to_const: QueryState<LitToConstInput<'tcx>, DepKind>, pub(crate) lit_to_mir_constant: QueryState<LitToConstInput<'tcx>, DepKind>, pub(crate) check_match: QueryState<DefId, DepKind>, pub(crate) effective_visibilities: QueryState<(), DepKind>, pub(crate) check_private_in_public: QueryState<(), DepKind>, pub(crate) reachable_set: QueryState<(), DepKind>, pub(crate) region_scope_tree: QueryState<DefId, DepKind>, pub(crate) mir_shims: QueryState<InstanceDef<'tcx>, DepKind>, pub(crate) symbol_name: QueryState<Instance<'tcx>, DepKind>, pub(crate) opt_def_kind: QueryState<DefId, DepKind>, pub(crate) def_span: QueryState<DefId, DepKind>, pub(crate) def_ident_span: QueryState<DefId, DepKind>, pub(crate) lookup_stability: QueryState<DefId, DepKind>, pub(crate) lookup_const_stability: QueryState<DefId, DepKind>, pub(crate) lookup_default_body_stability: QueryState<DefId, DepKind>, pub(crate) should_inherit_track_caller: QueryState<DefId, DepKind>, pub(crate) lookup_deprecation_entry: QueryState<DefId, DepKind>, pub(crate) is_doc_hidden: QueryState<DefId, DepKind>, pub(crate) is_doc_notable_trait: QueryState<DefId, DepKind>, pub(crate) item_attrs: QueryState<DefId, DepKind>, pub(crate) codegen_fn_attrs: QueryState<DefId, DepKind>, pub(crate) asm_target_features: QueryState<DefId, DepKind>, pub(crate) fn_arg_names: QueryState<DefId, DepKind>, pub(crate) rendered_const: QueryState<DefId, DepKind>, pub(crate) impl_parent: QueryState<DefId, DepKind>, pub(crate) is_ctfe_mir_available: QueryState<DefId, DepKind>, pub(crate) is_mir_available: QueryState<DefId, DepKind>, pub(crate) own_existential_vtable_entries: QueryState<DefId, DepKind>, pub(crate) vtable_entries: QueryState<Binder<'tcx, TraitRef<'tcx>>, DepKind>, pub(crate) vtable_trait_upcasting_coercion_new_vptr_slot: QueryState<(Ty<'tcx>, Ty<'tcx>), DepKind>, pub(crate) vtable_allocation: QueryState<(Ty<'tcx>, Option<Binder<'tcx, ExistentialTraitRef<'tcx>>>), DepKind>, pub(crate) codegen_select_candidate: QueryState<(ParamEnv<'tcx>, Binder<'tcx, TraitRef<'tcx>>), DepKind>, pub(crate) all_local_trait_impls: QueryState<(), DepKind>, pub(crate) trait_impls_of: QueryState<DefId, DepKind>, pub(crate) specialization_graph_of: QueryState<DefId, DepKind>, pub(crate) object_safety_violations: QueryState<DefId, DepKind>, pub(crate) check_is_object_safe: QueryState<DefId, DepKind>, pub(crate) param_env: QueryState<DefId, DepKind>, pub(crate) param_env_reveal_all_normalized: QueryState<DefId, DepKind>, pub(crate) is_copy_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) is_sized_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) is_freeze_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) is_unpin_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) needs_drop_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) has_significant_drop_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) has_structural_eq_impls: QueryState<Ty<'tcx>, DepKind>, pub(crate) adt_drop_tys: QueryState<DefId, DepKind>, pub(crate) adt_significant_drop_tys: QueryState<DefId, DepKind>, pub(crate) layout_of: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>, pub(crate) fn_abi_of_fn_ptr: QueryState<ParamEnvAnd<'tcx, (Binder<'tcx, FnSig<'tcx>>, &'tcx List<Ty<'tcx>>)>, DepKind>, pub(crate) fn_abi_of_instance: QueryState<ParamEnvAnd<'tcx, (Instance<'tcx>, &'tcx List<Ty<'tcx>>)>, DepKind>, pub(crate) dylib_dependency_formats: QueryState<CrateNum, DepKind>, pub(crate) dependency_formats: QueryState<(), DepKind>, pub(crate) is_compiler_builtins: QueryState<CrateNum, DepKind>, pub(crate) has_global_allocator: QueryState<CrateNum, DepKind>, pub(crate) has_alloc_error_handler: QueryState<CrateNum, DepKind>, pub(crate) has_panic_handler: QueryState<CrateNum, DepKind>, pub(crate) is_profiler_runtime: QueryState<CrateNum, DepKind>, pub(crate) has_ffi_unwind_calls: QueryState<LocalDefId, DepKind>, pub(crate) required_panic_strategy: QueryState<CrateNum, DepKind>, pub(crate) panic_in_drop_strategy: QueryState<CrateNum, DepKind>, pub(crate) is_no_builtins: QueryState<CrateNum, DepKind>, pub(crate) symbol_mangling_version: QueryState<CrateNum, DepKind>, pub(crate) extern_crate: QueryState<DefId, DepKind>, pub(crate) specializes: QueryState<(DefId, DefId), DepKind>, pub(crate) in_scope_traits_map: QueryState<OwnerId, DepKind>, pub(crate) module_reexports: QueryState<LocalDefId, DepKind>, pub(crate) impl_defaultness: QueryState<DefId, DepKind>, pub(crate) check_well_formed: QueryState<OwnerId, DepKind>, pub(crate) reachable_non_generics: QueryState<CrateNum, DepKind>, pub(crate) is_reachable_non_generic: QueryState<DefId, DepKind>, pub(crate) is_unreachable_local_definition: QueryState<LocalDefId, DepKind>, pub(crate) upstream_monomorphizations: QueryState<(), DepKind>, pub(crate) upstream_monomorphizations_for: QueryState<DefId, DepKind>, pub(crate) upstream_drop_glue_for: QueryState<&'tcx List<GenericArg<'tcx>>, DepKind>, pub(crate) foreign_modules: QueryState<CrateNum, DepKind>, pub(crate) entry_fn: QueryState<(), DepKind>, pub(crate) proc_macro_decls_static: QueryState<(), DepKind>, pub(crate) crate_hash: QueryState<CrateNum, DepKind>, pub(crate) crate_host_hash: QueryState<CrateNum, DepKind>, pub(crate) extra_filename: QueryState<CrateNum, DepKind>, pub(crate) crate_extern_paths: QueryState<CrateNum, DepKind>, pub(crate) implementations_of_trait: QueryState<(CrateNum, DefId), DepKind>, pub(crate) crate_incoherent_impls: QueryState<(CrateNum, SimplifiedType), DepKind>, pub(crate) native_library: QueryState<DefId, DepKind>, pub(crate) resolve_bound_vars: QueryState<OwnerId, DepKind>, pub(crate) named_variable_map: QueryState<OwnerId, DepKind>, pub(crate) is_late_bound_map: QueryState<OwnerId, DepKind>, pub(crate) object_lifetime_default: QueryState<DefId, DepKind>, pub(crate) late_bound_vars_map: QueryState<OwnerId, DepKind>, pub(crate) visibility: QueryState<DefId, DepKind>, pub(crate) inhabited_predicate_adt: QueryState<DefId, DepKind>, pub(crate) inhabited_predicate_type: QueryState<Ty<'tcx>, DepKind>, pub(crate) dep_kind: QueryState<CrateNum, DepKind>, pub(crate) crate_name: QueryState<CrateNum, DepKind>, pub(crate) module_children: QueryState<DefId, DepKind>, pub(crate) extern_mod_stmt_cnum: QueryState<LocalDefId, DepKind>, pub(crate) lib_features: QueryState<(), DepKind>, pub(crate) defined_lib_features: QueryState<CrateNum, DepKind>, pub(crate) stability_implications: QueryState<CrateNum, DepKind>, pub(crate) is_intrinsic: QueryState<DefId, DepKind>, pub(crate) get_lang_items: QueryState<(), DepKind>, pub(crate) all_diagnostic_items: QueryState<(), DepKind>, pub(crate) defined_lang_items: QueryState<CrateNum, DepKind>, pub(crate) diagnostic_items: QueryState<CrateNum, DepKind>, pub(crate) missing_lang_items: QueryState<CrateNum, DepKind>, pub(crate) visible_parent_map: QueryState<(), DepKind>, pub(crate) trimmed_def_paths: QueryState<(), DepKind>, pub(crate) missing_extern_crate_item: QueryState<CrateNum, DepKind>, pub(crate) used_crate_source: QueryState<CrateNum, DepKind>, pub(crate) debugger_visualizers: QueryState<CrateNum, DepKind>, pub(crate) postorder_cnums: QueryState<(), DepKind>, pub(crate) is_private_dep: QueryState<CrateNum, DepKind>, pub(crate) allocator_kind: QueryState<(), DepKind>, pub(crate) alloc_error_handler_kind: QueryState<(), DepKind>, pub(crate) upvars_mentioned: QueryState<DefId, DepKind>, pub(crate) maybe_unused_trait_imports: QueryState<(), DepKind>, pub(crate) names_imported_by_glob_use: QueryState<LocalDefId, DepKind>, pub(crate) stability_index: QueryState<(), DepKind>, pub(crate) crates: QueryState<(), DepKind>, pub(crate) traits_in_crate: QueryState<CrateNum, DepKind>, pub(crate) trait_impls_in_crate: QueryState<CrateNum, DepKind>, pub(crate) exported_symbols: QueryState<CrateNum, DepKind>, pub(crate) collect_and_partition_mono_items: QueryState<(), DepKind>, pub(crate) is_codegened_item: QueryState<DefId, DepKind>, pub(crate) codegened_and_inlined_items: QueryState<(), DepKind>, pub(crate) codegen_unit: QueryState<Symbol, DepKind>, pub(crate) unused_generic_params: QueryState<InstanceDef<'tcx>, DepKind>, pub(crate) backend_optimization_level: QueryState<(), DepKind>, pub(crate) output_filenames: QueryState<(), DepKind>, pub(crate) normalize_projection_ty: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, AliasTy<'tcx>>>, DepKind>, pub(crate) try_normalize_generic_arg_after_erasing_regions: QueryState<ParamEnvAnd<'tcx, GenericArg<'tcx>>, DepKind>, pub(crate) implied_outlives_bounds: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>, pub(crate) dropck_outlives: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>, pub(crate) evaluate_obligation: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Predicate<'tcx>>>, DepKind>, pub(crate) evaluate_goal: QueryState<Canonical<'tcx, ChalkEnvironmentAndGoal<'tcx>>, DepKind>, pub(crate) type_op_ascribe_user_type: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, AscribeUserType<'tcx>>>, DepKind>, pub(crate) type_op_eq: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Eq<'tcx>>>, DepKind>, pub(crate) type_op_subtype: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Subtype<'tcx>>>, DepKind>, pub(crate) type_op_prove_predicate: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, ProvePredicate<'tcx>>>, DepKind>, pub(crate) type_op_normalize_ty: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Ty<'tcx>>>>, DepKind>, pub(crate) type_op_normalize_predicate: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Predicate<'tcx>>>>, DepKind>, pub(crate) type_op_normalize_poly_fn_sig: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Binder<'tcx, FnSig<'tcx>>>>>, DepKind>, pub(crate) type_op_normalize_fn_sig: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<FnSig<'tcx>>>>, DepKind>, pub(crate) subst_and_check_impossible_predicates: QueryState<(DefId, &'tcx List<GenericArg<'tcx>>), DepKind>, pub(crate) is_impossible_method: QueryState<(DefId, DefId), DepKind>, pub(crate) method_autoderef_steps: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>, pub(crate) supported_target_features: QueryState<CrateNum, DepKind>, pub(crate) instance_def_size_estimate: QueryState<InstanceDef<'tcx>, DepKind>, pub(crate) features_query: QueryState<(), DepKind>, pub(crate) metadata_loader: QueryState<(), DepKind>, pub(crate) crate_for_resolver: QueryState<(), DepKind>, pub(crate) resolve_instance: QueryState<ParamEnvAnd<'tcx, (DefId, &'tcx List<GenericArg<'tcx>>)>, DepKind>, pub(crate) resolve_instance_of_const_arg: QueryState<ParamEnvAnd<'tcx, (LocalDefId, DefId, &'tcx List<GenericArg<'tcx>>)>, DepKind>, pub(crate) reveal_opaque_types_in_bounds: QueryState<&'tcx List<Predicate<'tcx>>, DepKind>, pub(crate) limits: QueryState<(), DepKind>, pub(crate) diagnostic_hir_wf_check: QueryState<(Predicate<'tcx>, WellFormedLoc), DepKind>, pub(crate) global_backend_features: QueryState<(), DepKind>, pub(crate) generator_diagnostic_data: QueryState<DefId, DepKind>, pub(crate) check_validity_requirement: QueryState<(ValidityRequirement, ParamEnvAnd<'tcx, Ty<'tcx>>), DepKind>, pub(crate) compare_impl_const: QueryState<(LocalDefId, DefId), DepKind>, pub(crate) deduced_param_attrs: QueryState<DefId, DepKind>, pub(crate) doc_link_resolutions: QueryState<DefId, DepKind>, pub(crate) doc_link_traits_in_scope: QueryState<DefId, DepKind>, pub(crate) check_tys_might_be_eq: QueryState<Canonical<'tcx, (ParamEnv<'tcx>, Ty<'tcx>, Ty<'tcx>)>, DepKind>,
}

Fields§

§local_providers: Box<Providers>§extern_providers: Box<ExternProviders>§query_structs: Vec<QueryStruct<'tcx>>§on_disk_cache: Option<OnDiskCache<'tcx>>§jobs: AtomicU64§trigger_delay_span_bug: QueryState<DefId, DepKind>

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

§registered_tools: QueryState<(), DepKind>

[query description - consider adding a doc-comment!] compute registered tools for crate

§early_lint_checks: QueryState<(), DepKind>

[query description - consider adding a doc-comment!] perform lints prior to macro expansion

§resolutions: QueryState<(), DepKind>

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

§resolver_for_lowering: QueryState<(), DepKind>

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

§source_span: QueryState<LocalDefId, DepKind>

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<(), DepKind>

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<(), DepKind>

All items in the crate.

§hir_module_items: QueryState<LocalDefId, DepKind>

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

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.

§opt_local_def_id_to_hir_id: QueryState<LocalDefId, DepKind>

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

Definitions that were generated with no HIR, would be feeded to return None.

§hir_owner_parent: QueryState<OwnerId, DepKind>

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

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

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

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

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

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

§collect_return_position_impl_trait_in_trait_tys: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden impl Trait types in the process

§is_type_alias_impl_trait: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] determine whether the opaque is a type-alias impl trait

§unsizing_params_for_adt: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] determining what parameters of tcx.def_path_str(key) can participate in unsizing

§analysis: QueryState<(), DepKind>

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

§check_expectations: QueryState<Option<Symbol>, DepKind>

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

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

§predicates_of: QueryState<DefId, DepKind>

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

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

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

Look up all native libraries this crate depends on. These are assembled from the following places:

  • extern blocks (depending on their link attributes)
  • the libs (-l) option
§shallow_lint_levels_on: QueryState<OwnerId, DepKind>

[query description - consider adding a doc-comment!] looking up lint levels for tcx.def_path_str(key.to_def_id())

§lint_expectations: QueryState<(), DepKind>

[query description - consider adding a doc-comment!] computing #[expect]ed lints in this crate

§parent_module_from_def_id: QueryState<LocalDefId, DepKind>

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

§expn_that_defined: QueryState<DefId, DepKind>

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

§is_panic_runtime: QueryState<CrateNum, DepKind>

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

§representability: QueryState<LocalDefId, DepKind>

Checks whether a type is representable or infinitely sized

§representability_adt_ty: QueryState<Ty<'tcx>, DepKind>

An implementation detail for the representability query

§params_in_repr: QueryState<DefId, DepKind>

Set of param indexes for type params that are in the type’s representation

§thir_body: QueryState<WithOptConstParam<LocalDefId>, DepKind>

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

§thir_tree: QueryState<WithOptConstParam<LocalDefId>, DepKind>

Create a THIR tree for debugging.

§thir_flat: QueryState<WithOptConstParam<LocalDefId>, DepKind>

Create a list-like THIR representation for debugging.

§mir_keys: QueryState<(), DepKind>

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

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<(LocalDefId, DefId), DepKind>

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

§mir_built: QueryState<WithOptConstParam<LocalDefId>, DepKind>

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

§mir_const: QueryState<WithOptConstParam<LocalDefId>, DepKind>

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

Try to build an abstract representation of the given constant.

§thir_abstract_const_of_const_arg: QueryState<(LocalDefId, DefId), DepKind>

Try to build an abstract representation of the given constant.

§mir_drops_elaborated_and_const_checked: QueryState<WithOptConstParam<LocalDefId>, DepKind>

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

§mir_for_ctfe: QueryState<DefId, DepKind>

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

§mir_for_ctfe_of_const_arg: QueryState<(LocalDefId, DefId), DepKind>

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

§mir_promoted: QueryState<WithOptConstParam<LocalDefId>, DepKind>

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

§closure_typeinfo: QueryState<LocalDefId, DepKind>

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

§mir_generator_witnesses: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] generator witness types for tcx.def_path_str(key)

§check_generator_obligations: QueryState<LocalDefId, DepKind>

[query description - consider adding a doc-comment!] verify auto trait bounds for generator interior type tcx.def_path_str(key.to_def_id())

§optimized_mir: QueryState<DefId, DepKind>

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<InstanceDef<'tcx>, DepKind>

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

§covered_code_regions: QueryState<DefId, DepKind>

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

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<(LocalDefId, DefId), DepKind>

[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<Ty<'tcx>, DepKind>

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

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

§predicates_defined_on: QueryState<DefId, DepKind>

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

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

Returns the predicates written explicitly by the user.

§inferred_outlives_of: QueryState<DefId, DepKind>

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

§super_predicates_of: QueryState<DefId, DepKind>

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<(DefId, Option<Ident>), DepKind>

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<(DefId, LocalDefId, Ident), DepKind>

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

§trait_def: QueryState<DefId, DepKind>

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

§adt_def: QueryState<DefId, DepKind>

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

§adt_destructor: QueryState<DefId, DepKind>

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

§adt_sized_constraint: QueryState<DefId, DepKind>

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

§adt_dtorck_constraint: QueryState<DefId, DepKind>

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

§constness: QueryState<DefId, DepKind>

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

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

§is_promotable_const_fn: QueryState<DefId, DepKind>

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

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

§generator_kind: QueryState<DefId, DepKind>

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

§crate_variances: QueryState<(), DepKind>

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

§variances_of: QueryState<DefId, DepKind>

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

§inferred_outlives_crate: QueryState<(), DepKind>

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

§associated_item_def_ids: QueryState<DefId, DepKind>

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

§associated_item: QueryState<DefId, DepKind>

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

§associated_items: QueryState<DefId, DepKind>

Collects the associated items defined on a trait or impl.

§impl_item_implementor_ids: QueryState<DefId, DepKind>

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 }

§associated_types_for_impl_traits_in_associated_fn: QueryState<DefId, DepKind>

Given fn_def_id of a trait or of an impl that implements a given trait: if fn_def_id is the def id of a function defined inside a trait, then it creates and returns the associated items that correspond to each impl trait in return position for that trait. if fn_def_id is the def id of a function defined inside an impl that implements a trait, then it creates and returns the associated items that correspond to each impl trait in return position of the implemented trait.

§associated_type_for_impl_trait_in_trait: QueryState<LocalDefId, DepKind>

Given an impl trait in trait opaque_ty_def_id, create and return the corresponding associated item.

§impl_trait_ref: QueryState<DefId, DepKind>

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

§impl_polarity: QueryState<DefId, DepKind>

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

§issue33140_self_ty: QueryState<DefId, DepKind>

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

§inherent_impls: QueryState<DefId, DepKind>

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

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

§unsafety_check_result: QueryState<LocalDefId, DepKind>

The result of unsafety-checking this LocalDefId.

§unsafety_check_result_for_const_arg: QueryState<(LocalDefId, DefId), DepKind>

[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<LocalDefId, DepKind>

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

§thir_check_unsafety_for_const_arg: QueryState<(LocalDefId, DefId), DepKind>

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

§assumed_wf_types: QueryState<DefId, DepKind>

Returns the types assumed to be well formed while “inside” of the given item.

Note that we’ve liberated the late bound regions of function signatures, so this can not be used to check whether these types are well formed.

§fn_sig: QueryState<DefId, DepKind>

Computes the signature of the function.

§lint_mod: QueryState<LocalDefId, DepKind>

Performs lint checking for the module.

§check_mod_attrs: QueryState<LocalDefId, DepKind>

Checks the attributes in the module.

§check_mod_unstable_api_usage: QueryState<LocalDefId, DepKind>

Checks for uses of unstable APIs in the module.

§check_mod_const_bodies: QueryState<LocalDefId, DepKind>

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

§check_mod_loops: QueryState<LocalDefId, DepKind>

Checks the loops in the module.

§check_mod_naked_functions: QueryState<LocalDefId, DepKind>

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

§check_mod_item_types: QueryState<LocalDefId, DepKind>

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

§check_mod_privacy: QueryState<LocalDefId, DepKind>

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

§check_liveness: QueryState<DefId, DepKind>

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

§live_symbols_and_ignored_derived_traits: QueryState<(), DepKind>

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

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

§check_mod_impl_wf: QueryState<LocalDefId, DepKind>

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

§check_mod_type_wf: QueryState<LocalDefId, DepKind>

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

§collect_mod_item_types: QueryState<LocalDefId, DepKind>

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

§coerce_unsized_info: QueryState<DefId, DepKind>

Caches CoerceUnsized kinds for impls on custom types.

§typeck_item_bodies: QueryState<(), DepKind>

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

§typeck: QueryState<LocalDefId, DepKind>

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

§typeck_const_arg: QueryState<(LocalDefId, DefId), DepKind>

[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<LocalDefId, DepKind>

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

§used_trait_imports: QueryState<LocalDefId, DepKind>

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

§has_typeck_results: QueryState<DefId, DepKind>

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

§coherent_trait: QueryState<DefId, DepKind>

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

§mir_borrowck: QueryState<LocalDefId, DepKind>

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<(LocalDefId, DefId), DepKind>

[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<(), DepKind>

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<(), DepKind>

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

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<(Instance<'tcx>, LocalDefId), DepKind>

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<InstanceDef<'tcx>, DepKind>

Obtain all the calls into other local functions

§eval_to_allocation_raw: QueryState<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>

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<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>

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<ParamEnvAnd<'tcx, GlobalId<'tcx>>, DepKind>

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

§valtree_to_const_val: QueryState<(Ty<'tcx>, ValTree<'tcx>), DepKind>

Converts a type level constant value into ConstValue

§destructure_const: QueryState<Const<'tcx>, DepKind>

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

§try_destructure_mir_constant: QueryState<ParamEnvAnd<'tcx, ConstantKind<'tcx>>, DepKind>

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

§deref_mir_constant: QueryState<ParamEnvAnd<'tcx, ConstantKind<'tcx>>, DepKind>

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

§const_caller_location: QueryState<(Symbol, u32, u32), DepKind>

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

§lit_to_const: QueryState<LitToConstInput<'tcx>, DepKind>

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

§lit_to_mir_constant: QueryState<LitToConstInput<'tcx>, DepKind>

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

§check_match: QueryState<DefId, DepKind>

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

§effective_visibilities: QueryState<(), DepKind>

Performs part of the privacy check and computes effective visibilities.

§check_private_in_public: QueryState<(), DepKind>

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

§reachable_set: QueryState<(), DepKind>

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

§region_scope_tree: QueryState<DefId, DepKind>

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<InstanceDef<'tcx>, DepKind>

Generates a MIR body for the shim.

§symbol_name: QueryState<Instance<'tcx>, DepKind>

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

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

§def_span: QueryState<DefId, DepKind>

Gets the span for the definition.

§def_ident_span: QueryState<DefId, DepKind>

Gets the span for the identifier of the definition.

§lookup_stability: QueryState<DefId, DepKind>

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

§lookup_const_stability: QueryState<DefId, DepKind>

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

§lookup_default_body_stability: QueryState<DefId, DepKind>

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

§should_inherit_track_caller: QueryState<DefId, DepKind>

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

§lookup_deprecation_entry: QueryState<DefId, DepKind>

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

§is_doc_hidden: QueryState<DefId, DepKind>

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

§is_doc_notable_trait: QueryState<DefId, DepKind>

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

§item_attrs: QueryState<DefId, DepKind>

Returns the attributes on the item at def_id.

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

§codegen_fn_attrs: QueryState<DefId, DepKind>

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

§asm_target_features: QueryState<DefId, DepKind>

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

§fn_arg_names: QueryState<DefId, DepKind>

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

§rendered_const: QueryState<DefId, DepKind>

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

§impl_parent: QueryState<DefId, DepKind>

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

§is_ctfe_mir_available: QueryState<DefId, DepKind>

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

§is_mir_available: QueryState<DefId, DepKind>

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

§own_existential_vtable_entries: QueryState<DefId, DepKind>

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

§vtable_entries: QueryState<Binder<'tcx, TraitRef<'tcx>>, DepKind>

[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<(Ty<'tcx>, Ty<'tcx>), DepKind>

[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<(Ty<'tcx>, Option<Binder<'tcx, ExistentialTraitRef<'tcx>>>), DepKind>

[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_select_candidate: QueryState<(ParamEnv<'tcx>, Binder<'tcx, TraitRef<'tcx>>), DepKind>

[query description - consider adding a doc-comment!] computing candidate for key.1

§all_local_trait_impls: QueryState<(), DepKind>

Return all impl blocks in the current crate.

§trait_impls_of: QueryState<DefId, DepKind>

Given a trait trait_id, return all known impl blocks.

§specialization_graph_of: QueryState<DefId, DepKind>

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

§object_safety_violations: QueryState<DefId, DepKind>

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

§check_is_object_safe: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] checking if trait tcx.def_path_str(trait_id) is object safe

§param_env: QueryState<DefId, DepKind>

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

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<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

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<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

Query backing Ty::is_sized.

§is_freeze_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

Query backing Ty::is_freeze.

§is_unpin_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

Query backing Ty::is_unpin.

§needs_drop_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

Query backing Ty::needs_drop.

§has_significant_drop_raw: QueryState<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

Query backing Ty::has_significant_drop_raw.

§has_structural_eq_impls: QueryState<Ty<'tcx>, DepKind>

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

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

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<ParamEnvAnd<'tcx, Ty<'tcx>>, DepKind>

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<ParamEnvAnd<'tcx, (Binder<'tcx, FnSig<'tcx>>, &'tcx List<Ty<'tcx>>)>, DepKind>

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<ParamEnvAnd<'tcx, (Instance<'tcx>, &'tcx List<Ty<'tcx>>)>, DepKind>

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

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

§dependency_formats: QueryState<(), DepKind>

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

§is_compiler_builtins: QueryState<CrateNum, DepKind>

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

§has_global_allocator: QueryState<CrateNum, DepKind>

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

§has_alloc_error_handler: QueryState<CrateNum, DepKind>

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

§has_panic_handler: QueryState<CrateNum, DepKind>

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

§is_profiler_runtime: QueryState<CrateNum, DepKind>

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

§has_ffi_unwind_calls: QueryState<LocalDefId, DepKind>

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

§required_panic_strategy: QueryState<CrateNum, DepKind>

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

§panic_in_drop_strategy: QueryState<CrateNum, DepKind>

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

§is_no_builtins: QueryState<CrateNum, DepKind>

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

§symbol_mangling_version: QueryState<CrateNum, DepKind>

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

§extern_crate: QueryState<DefId, DepKind>

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

§specializes: QueryState<(DefId, DefId), DepKind>

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

§in_scope_traits_map: QueryState<OwnerId, DepKind>

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

§module_reexports: QueryState<LocalDefId, DepKind>

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

§impl_defaultness: QueryState<DefId, DepKind>

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

§check_well_formed: QueryState<OwnerId, DepKind>

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

§reachable_non_generics: QueryState<CrateNum, DepKind>

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

§is_reachable_non_generic: QueryState<DefId, DepKind>

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

§is_unreachable_local_definition: QueryState<LocalDefId, DepKind>

[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<(), DepKind>

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

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<&'tcx List<GenericArg<'tcx>>, DepKind>

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

Returns a list of all extern blocks of a crate.

§entry_fn: QueryState<(), DepKind>

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<(), DepKind>

Finds the rustc_proc_macro_decls item of a crate.

§crate_hash: QueryState<CrateNum, DepKind>

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

§crate_host_hash: QueryState<CrateNum, DepKind>

Gets the hash for the host proc macro. Used to support -Z dual-proc-macro.

§extra_filename: QueryState<CrateNum, DepKind>

Gets the extra data to put in each output filename for a crate. For example, compiling the foo crate with extra-filename=-a creates a libfoo-b.rlib file.

§crate_extern_paths: QueryState<CrateNum, DepKind>

Gets the paths where the crate came from in the file system.

§implementations_of_trait: QueryState<(CrateNum, DefId), DepKind>

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<(CrateNum, SimplifiedType), DepKind>

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.

§native_library: QueryState<DefId, DepKind>

Get the corresponding native library from the native_libraries query

§resolve_bound_vars: QueryState<OwnerId, DepKind>

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_variable_map: QueryState<OwnerId, DepKind>

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

§is_late_bound_map: QueryState<OwnerId, DepKind>

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

§object_lifetime_default: QueryState<DefId, DepKind>

For a given item’s generic parameter, gets the default lifetimes to be used for each parameter if a trait object were to be passed for that parameter. For example, for T in struct Foo<'a, T>, this would be 'static. For T in struct Foo<'a, T: 'a>, this would instead be 'a. This query will panic if passed something that is not a type parameter.

§late_bound_vars_map: QueryState<OwnerId, DepKind>

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

§visibility: QueryState<DefId, DepKind>

Computes the visibility of the provided def_id.

If the item from the def_id doesn’t have a visibility, it will panic. For example a generic type parameter will panic if you call this method on it:

use std::fmt::Debug;

pub trait Foo<T: Debug> {}

In here, if you call visibility on T, it’ll panic.

§inhabited_predicate_adt: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] computing the uninhabited predicate of {:?}

§inhabited_predicate_type: QueryState<Ty<'tcx>, DepKind>

Do not call this query directly: invoke Ty::inhabited_predicate instead.

§dep_kind: QueryState<CrateNum, DepKind>

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

§crate_name: QueryState<CrateNum, DepKind>

Gets the name of the crate.

§module_children: QueryState<DefId, DepKind>

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

§extern_mod_stmt_cnum: QueryState<LocalDefId, DepKind>

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

§lib_features: QueryState<(), DepKind>

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

§defined_lib_features: QueryState<CrateNum, DepKind>

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

§stability_implications: QueryState<CrateNum, DepKind>

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

§is_intrinsic: QueryState<DefId, DepKind>

Whether the function is an intrinsic

§get_lang_items: QueryState<(), DepKind>

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

§all_diagnostic_items: QueryState<(), DepKind>

Returns all diagnostic items defined in all crates.

§defined_lang_items: QueryState<CrateNum, DepKind>

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

§diagnostic_items: QueryState<CrateNum, DepKind>

Returns the diagnostic items defined in a crate.

§missing_lang_items: QueryState<CrateNum, DepKind>

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

§visible_parent_map: QueryState<(), DepKind>

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

§trimmed_def_paths: QueryState<(), DepKind>

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

§missing_extern_crate_item: QueryState<CrateNum, DepKind>

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

§used_crate_source: QueryState<CrateNum, DepKind>

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

§debugger_visualizers: QueryState<CrateNum, DepKind>

Returns the debugger visualizers defined for this crate.

§postorder_cnums: QueryState<(), DepKind>

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

§is_private_dep: QueryState<CrateNum, DepKind>

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

§allocator_kind: QueryState<(), DepKind>

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

§alloc_error_handler_kind: QueryState<(), DepKind>

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

§upvars_mentioned: QueryState<DefId, DepKind>

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

§maybe_unused_trait_imports: QueryState<(), DepKind>

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

§names_imported_by_glob_use: QueryState<LocalDefId, DepKind>

[query description - consider adding a doc-comment!] finding names imported by glob use for tcx.def_path_str(def_id.to_def_id())

§stability_index: QueryState<(), DepKind>

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

§crates: QueryState<(), DepKind>

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

§traits_in_crate: QueryState<CrateNum, DepKind>

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

§trait_impls_in_crate: QueryState<CrateNum, DepKind>

[query description - consider adding a doc-comment!] fetching all trait impls in a crate

§exported_symbols: QueryState<CrateNum, DepKind>

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<(), DepKind>

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

§is_codegened_item: QueryState<DefId, DepKind>

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

§codegened_and_inlined_items: QueryState<(), DepKind>

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

§codegen_unit: QueryState<Symbol, DepKind>

[query description - consider adding a doc-comment!] getting codegen unit {sym}

§unused_generic_params: QueryState<InstanceDef<'tcx>, DepKind>

[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<(), DepKind>

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

§output_filenames: QueryState<(), DepKind>

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<Canonical<'tcx, ParamEnvAnd<'tcx, AliasTy<'tcx>>>, DepKind>

Do not call this query directly: invoke normalize instead.

§try_normalize_generic_arg_after_erasing_regions: QueryState<ParamEnvAnd<'tcx, GenericArg<'tcx>>, DepKind>

Do not call this query directly: invoke try_normalize_erasing_regions instead.

§implied_outlives_bounds: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>

[query description - consider adding a doc-comment!] computing implied outlives bounds for goal.value.value

§dropck_outlives: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>

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

§evaluate_obligation: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Predicate<'tcx>>>, DepKind>

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

§evaluate_goal: QueryState<Canonical<'tcx, ChalkEnvironmentAndGoal<'tcx>>, DepKind>

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

§type_op_ascribe_user_type: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, AscribeUserType<'tcx>>>, DepKind>

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

§type_op_eq: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Eq<'tcx>>>, DepKind>

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

§type_op_subtype: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Subtype<'tcx>>>, DepKind>

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

§type_op_prove_predicate: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, ProvePredicate<'tcx>>>, DepKind>

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

§type_op_normalize_ty: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Ty<'tcx>>>>, DepKind>

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

§type_op_normalize_predicate: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Predicate<'tcx>>>>, DepKind>

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

§type_op_normalize_poly_fn_sig: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Binder<'tcx, FnSig<'tcx>>>>>, DepKind>

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

§type_op_normalize_fn_sig: QueryState<Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<FnSig<'tcx>>>>, DepKind>

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

§subst_and_check_impossible_predicates: QueryState<(DefId, &'tcx List<GenericArg<'tcx>>), DepKind>

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

§is_impossible_method: QueryState<(DefId, DefId), DepKind>

[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<Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, DepKind>

[query description - consider adding a doc-comment!] computing autoderef types for goal.value.value

§supported_target_features: QueryState<CrateNum, DepKind>

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

§instance_def_size_estimate: QueryState<InstanceDef<'tcx>, DepKind>

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

§features_query: QueryState<(), DepKind>

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

§metadata_loader: QueryState<(), DepKind>

[query description - consider adding a doc-comment!] raw operations for metadata file access

§crate_for_resolver: QueryState<(), DepKind>

[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution

§resolve_instance: QueryState<ParamEnvAnd<'tcx, (DefId, &'tcx List<GenericArg<'tcx>>)>, DepKind>

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<ParamEnvAnd<'tcx, (LocalDefId, DefId, &'tcx List<GenericArg<'tcx>>)>, DepKind>

[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)

§reveal_opaque_types_in_bounds: QueryState<&'tcx List<Predicate<'tcx>>, DepKind>

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

§limits: QueryState<(), DepKind>

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

§diagnostic_hir_wf_check: QueryState<(Predicate<'tcx>, WellFormedLoc), DepKind>

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<(), DepKind>

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

§generator_diagnostic_data: QueryState<DefId, DepKind>

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

§check_validity_requirement: QueryState<(ValidityRequirement, ParamEnvAnd<'tcx, Ty<'tcx>>), DepKind>

[query description - consider adding a doc-comment!] checking validity requirement for key.1.value : key.0

§compare_impl_const: QueryState<(LocalDefId, DefId), DepKind>

[query description - consider adding a doc-comment!] checking assoc const tcx.def_path_str(key.0.to_def_id()) has the same type as trait item

§deduced_param_attrs: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] deducing parameter attributes for tcx.def_path_str(def_id)

§doc_link_resolutions: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] resolutions for documentation links for a module

§doc_link_traits_in_scope: QueryState<DefId, DepKind>

[query description - consider adding a doc-comment!] traits in scope for documentation links for a module

§check_tys_might_be_eq: QueryState<Canonical<'tcx, (ParamEnv<'tcx>, Ty<'tcx>, Ty<'tcx>)>, DepKind>

Used in super_combine_consts to ICE if the type of the two consts are definitely not going to end up being equal to eachother. This might return Ok even if the types are not equal, but will never return Err if the types might be equal.

Implementations§

source§

impl<'tcx> Queries<'tcx>

source

pub fn new( local_providers: Providers, extern_providers: ExternProviders, on_disk_cache: Option<OnDiskCache<'tcx>> ) -> Self

source§

impl<'tcx> Queries<'tcx>

source

pub(crate) fn try_collect_active_jobs( &'tcx self, tcx: TyCtxt<'tcx> ) -> Option<QueryMap<DepKind>>

source§

impl<'tcx> Queries<'tcx>

source

pub fn as_dyn(&'tcx self) -> &'tcx dyn QueryEngine<'tcx>

Trait Implementations§

source§

impl<'tcx> Default for Queries<'tcx>

source§

fn default() -> Queries<'tcx>

Returns the “default value” for a type. Read more
source§

impl<'tcx> QueryEngine<'tcx> for Queries<'tcx>

source§

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

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

source§

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

[query description - consider adding a doc-comment!] compute registered tools for crate

source§

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

[query description - consider adding a doc-comment!] perform lints prior to macro expansion

source§

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

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

source§

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

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

source§

fn source_span( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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.

source§

fn hir_crate( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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().

source§

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

All items in the crate.

source§

fn hir_module_items( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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.

source§

fn hir_owner( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: OwnerId, mode: QueryMode ) -> Option<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.

source§

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

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

Definitions that were generated with no HIR, would be feeded to return None.

source§

fn hir_owner_parent( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: OwnerId, mode: QueryMode ) -> Option<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.

source§

fn hir_owner_nodes( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: OwnerId, mode: QueryMode ) -> Option<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.

source§

fn hir_attrs( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: OwnerId, mode: QueryMode ) -> Option<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.

source§

fn opt_const_param_of( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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`.
}
source§

fn const_param_default( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn type_of( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden impl Trait types in the process

source§

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

[query description - consider adding a doc-comment!] determine whether the opaque is a type-alias impl trait

source§

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

[query description - consider adding a doc-comment!] determining what parameters of tcx.def_path_str(key) can participate in unsizing

source§

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

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

source§

fn check_expectations( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Option<Symbol>, mode: QueryMode ) -> Option<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.

source§

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

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

source§

fn predicates_of( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.)

source§

fn explicit_item_bounds( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn item_bounds( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

Look up all native libraries this crate depends on. These are assembled from the following places:

  • extern blocks (depending on their link attributes)
  • the libs (-l) option
source§

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

[query description - consider adding a doc-comment!] looking up lint levels for tcx.def_path_str(key.to_def_id())

source§

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

[query description - consider adding a doc-comment!] computing #[expect]ed lints in this crate

source§

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

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

source§

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

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

source§

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

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

source§

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

Checks whether a type is representable or infinitely sized

source§

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

An implementation detail for the representability query

source§

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

Set of param indexes for type params that are in the type’s representation

source§

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

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

source§

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

Create a THIR tree for debugging.

source§

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

Create a list-like THIR representation for debugging.

source§

fn mir_keys( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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.

source§

fn mir_const_qualif( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn mir_const_qualif_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

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

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

source§

fn mir_const( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: WithOptConstParam<LocalDefId>, mode: QueryMode ) -> Option<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.

source§

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

Try to build an abstract representation of the given constant.

source§

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

Try to build an abstract representation of the given constant.

source§

fn mir_drops_elaborated_and_const_checked( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: WithOptConstParam<LocalDefId>, mode: QueryMode ) -> Option<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())

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

[query description - consider adding a doc-comment!] generator witness types for tcx.def_path_str(key)

source§

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

[query description - consider adding a doc-comment!] verify auto trait bounds for generator interior type tcx.def_path_str(key.to_def_id())

source§

fn optimized_mir( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

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

source§

fn covered_code_regions( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn promoted_mir( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn promoted_mir_of_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

fn erase_regions_ty( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Ty<'tcx>, mode: QueryMode ) -> Option<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.

source§

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

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

source§

fn predicates_defined_on( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn trait_explicit_predicates_and_bounds( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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.

source§

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

Returns the predicates written explicitly by the user.

source§

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

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

source§

fn super_predicates_of( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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).

source§

fn super_predicates_that_define_assoc_type( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (DefId, Option<Ident>), mode: QueryMode ) -> Option<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.

source§

fn type_param_predicates( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (DefId, LocalDefId, Ident), mode: QueryMode ) -> Option<type_param_predicates<'tcx>>

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

fn constness( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

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

source§

fn is_promotable_const_fn( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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).

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

Collects the associated items defined on a trait or impl.

source§

fn impl_item_implementor_ids( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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 }

source§

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

Given fn_def_id of a trait or of an impl that implements a given trait: if fn_def_id is the def id of a function defined inside a trait, then it creates and returns the associated items that correspond to each impl trait in return position for that trait. if fn_def_id is the def id of a function defined inside an impl that implements a trait, then it creates and returns the associated items that correspond to each impl trait in return position of the implemented trait.

source§

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

Given an impl trait in trait opaque_ty_def_id, create and return the corresponding associated item.

source§

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

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

source§

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

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

source§

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

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

source§

fn inherent_impls( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

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

source§

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

The result of unsafety-checking this LocalDefId.

source§

fn unsafety_check_result_for_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

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

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

source§

fn thir_check_unsafety_for_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

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

Returns the types assumed to be well formed while “inside” of the given item.

Note that we’ve liberated the late bound regions of function signatures, so this can not be used to check whether these types are well formed.

source§

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

Computes the signature of the function.

source§

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

Performs lint checking for the module.

source§

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

Checks the attributes in the module.

source§

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

Checks for uses of unstable APIs in the module.

source§

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

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

source§

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

Checks the loops in the module.

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

fn live_symbols_and_ignored_derived_traits( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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)

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

Caches CoerceUnsized kinds for impls on custom types.

source§

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

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

source§

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

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

source§

fn typeck_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

fn mir_borrowck_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (LocalDefId, DefId), mode: QueryMode ) -> Option<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())

source§

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

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

source§

fn crate_inherent_impls_overlap_check( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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.

source§

fn orphan_check_impl( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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.

source§

fn mir_callgraph_reachable( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (Instance<'tcx>, LocalDefId), mode: QueryMode ) -> Option<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.

source§

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

Obtain all the calls into other local functions

source§

fn eval_to_allocation_raw( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, GlobalId<'tcx>>, mode: QueryMode ) -> Option<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.

source§

fn eval_to_const_value_raw( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, GlobalId<'tcx>>, mode: QueryMode ) -> Option<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.

source§

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

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

source§

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

Converts a type level constant value into ConstValue

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

Performs part of the privacy check and computes effective visibilities.

source§

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

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

source§

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

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

source§

fn region_scope_tree( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

Generates a MIR body for the shim.

source§

fn symbol_name( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Instance<'tcx>, mode: QueryMode ) -> Option<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.

source§

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

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

source§

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

Gets the span for the definition.

source§

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

Gets the span for the identifier of the definition.

source§

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

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

source§

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

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

source§

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

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

source§

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

[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: DefId, mode: QueryMode ) -> Option<lookup_deprecation_entry<'tcx>>

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

source§

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

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

source§

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

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

source§

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

Returns the attributes on the item at def_id.

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

fn vtable_trait_upcasting_coercion_new_vptr_slot( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (Ty<'tcx>, Ty<'tcx>), mode: QueryMode ) -> Option<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

source§

fn vtable_allocation( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (Ty<'tcx>, Option<Binder<'tcx, ExistentialTraitRef<'tcx>>>), mode: QueryMode ) -> Option<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()) >

source§

fn codegen_select_candidate( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (ParamEnv<'tcx>, Binder<'tcx, TraitRef<'tcx>>), mode: QueryMode ) -> Option<codegen_select_candidate<'tcx>>

[query description - consider adding a doc-comment!] computing candidate for key.1

source§

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

Return all impl blocks in the current crate.

source§

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

Given a trait trait_id, return all known impl blocks.

source§

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

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

source§

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

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

source§

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

[query description - consider adding a doc-comment!] checking if trait tcx.def_path_str(trait_id) is object safe

source§

fn param_env( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn param_env_reveal_all_normalized( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn is_copy_raw( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, Ty<'tcx>>, mode: QueryMode ) -> Option<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.

source§

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

Query backing Ty::is_sized.

source§

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

Query backing Ty::is_freeze.

source§

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

Query backing Ty::is_unpin.

source§

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

Query backing Ty::needs_drop.

source§

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

Query backing Ty::has_significant_drop_raw.

source§

fn has_structural_eq_impls( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Ty<'tcx>, mode: QueryMode ) -> Option<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.

source§

fn adt_drop_tys( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn adt_significant_drop_tys( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

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

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

source§

fn fn_abi_of_fn_ptr( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, (Binder<'tcx, FnSig<'tcx>>, &'tcx List<Ty<'tcx>>)>, mode: QueryMode ) -> Option<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.

source§

fn fn_abi_of_instance( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, (Instance<'tcx>, &'tcx List<Ty<'tcx>>)>, mode: QueryMode ) -> Option<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).

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

fn is_unreachable_local_definition( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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

source§

fn upstream_monomorphizations( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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().

source§

fn upstream_monomorphizations_for( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: DefId, mode: QueryMode ) -> Option<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.

source§

fn upstream_drop_glue_for( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: &'tcx List<GenericArg<'tcx>>, mode: QueryMode ) -> Option<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).

source§

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

Returns a list of all extern blocks of a crate.

source§

fn entry_fn( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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).

source§

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

Finds the rustc_proc_macro_decls item of a crate.

source§

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

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

source§

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

Gets the hash for the host proc macro. Used to support -Z dual-proc-macro.

source§

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

Gets the extra data to put in each output filename for a crate. For example, compiling the foo crate with extra-filename=-a creates a libfoo-b.rlib file.

source§

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

Gets the paths where the crate came from in the file system.

source§

fn implementations_of_trait( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (CrateNum, DefId), mode: QueryMode ) -> Option<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).

source§

fn crate_incoherent_impls( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (CrateNum, SimplifiedType), mode: QueryMode ) -> Option<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.

source§

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

Get the corresponding native library from the native_libraries query

source§

fn resolve_bound_vars( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: OwnerId, mode: QueryMode ) -> Option<resolve_bound_vars<'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.

source§

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

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

source§

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

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

source§

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

For a given item’s generic parameter, gets the default lifetimes to be used for each parameter if a trait object were to be passed for that parameter. For example, for T in struct Foo<'a, T>, this would be 'static. For T in struct Foo<'a, T: 'a>, this would instead be 'a. This query will panic if passed something that is not a type parameter.

source§

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

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

source§

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

Computes the visibility of the provided def_id.

If the item from the def_id doesn’t have a visibility, it will panic. For example a generic type parameter will panic if you call this method on it:

use std::fmt::Debug;

pub trait Foo<T: Debug> {}

In here, if you call visibility on T, it’ll panic.

source§

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

[query description - consider adding a doc-comment!] computing the uninhabited predicate of {:?}

source§

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

Do not call this query directly: invoke Ty::inhabited_predicate instead.

source§

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

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

source§

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

Gets the name of the crate.

source§

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

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

source§

fn extern_mod_stmt_cnum( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: LocalDefId, mode: QueryMode ) -> Option<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())

source§

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

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

source§

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

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

source§

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

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

source§

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

Whether the function is an intrinsic

source§

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

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

source§

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

Returns all diagnostic items defined in all crates.

source§

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

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

source§

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

Returns the diagnostic items defined in a crate.

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

Returns the debugger visualizers defined for this crate.

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

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

source§

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

[query description - consider adding a doc-comment!] finding names imported by glob use for tcx.def_path_str(def_id.to_def_id())

source§

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

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

source§

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

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

source§

fn traits_in_crate( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: CrateNum, mode: QueryMode ) -> Option<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.

source§

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

[query description - consider adding a doc-comment!] fetching all trait impls in a crate

source§

fn exported_symbols( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: CrateNum, mode: QueryMode ) -> Option<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.
source§

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

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

source§

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

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

source§

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

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

source§

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

[query description - consider adding a doc-comment!] getting codegen unit {sym}

source§

fn unused_generic_params( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: InstanceDef<'tcx>, mode: QueryMode ) -> Option<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())

source§

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

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

source§

fn output_filenames( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (), mode: QueryMode ) -> Option<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.

source§

fn normalize_projection_ty( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, AliasTy<'tcx>>>, mode: QueryMode ) -> Option<normalize_projection_ty<'tcx>>

Do not call this query directly: invoke normalize instead.

source§

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

Do not call this query directly: invoke try_normalize_erasing_regions instead.

source§

fn implied_outlives_bounds( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, mode: QueryMode ) -> Option<implied_outlives_bounds<'tcx>>

[query description - consider adding a doc-comment!] computing implied outlives bounds for goal.value.value

source§

fn dropck_outlives( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, mode: QueryMode ) -> Option<dropck_outlives<'tcx>>

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

source§

fn evaluate_obligation( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Predicate<'tcx>>>, mode: QueryMode ) -> Option<evaluate_obligation<'tcx>>

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

source§

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

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

source§

fn type_op_ascribe_user_type( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, AscribeUserType<'tcx>>>, mode: QueryMode ) -> Option<type_op_ascribe_user_type<'tcx>>

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

source§

fn type_op_eq( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Eq<'tcx>>>, mode: QueryMode ) -> Option<type_op_eq<'tcx>>

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

source§

fn type_op_subtype( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Subtype<'tcx>>>, mode: QueryMode ) -> Option<type_op_subtype<'tcx>>

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

source§

fn type_op_prove_predicate( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, ProvePredicate<'tcx>>>, mode: QueryMode ) -> Option<type_op_prove_predicate<'tcx>>

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

source§

fn type_op_normalize_ty( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Ty<'tcx>>>>, mode: QueryMode ) -> Option<type_op_normalize_ty<'tcx>>

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

source§

fn type_op_normalize_predicate( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Predicate<'tcx>>>>, mode: QueryMode ) -> Option<type_op_normalize_predicate<'tcx>>

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

source§

fn type_op_normalize_poly_fn_sig( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<Binder<'tcx, FnSig<'tcx>>>>>, mode: QueryMode ) -> Option<type_op_normalize_poly_fn_sig<'tcx>>

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

source§

fn type_op_normalize_fn_sig( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Normalize<FnSig<'tcx>>>>, mode: QueryMode ) -> Option<type_op_normalize_fn_sig<'tcx>>

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

source§

fn subst_and_check_impossible_predicates( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (DefId, &'tcx List<GenericArg<'tcx>>), mode: QueryMode ) -> Option<subst_and_check_impossible_predicates<'tcx>>

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

source§

fn is_impossible_method( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (DefId, DefId), mode: QueryMode ) -> Option<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)

source§

fn method_autoderef_steps( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>, mode: QueryMode ) -> Option<method_autoderef_steps<'tcx>>

[query description - consider adding a doc-comment!] computing autoderef types for goal.value.value

source§

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

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

source§

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

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

source§

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

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

source§

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

[query description - consider adding a doc-comment!] raw operations for metadata file access

source§

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

[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution

source§

fn resolve_instance( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, (DefId, &'tcx List<GenericArg<'tcx>>)>, mode: QueryMode ) -> Option<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
source§

fn resolve_instance_of_const_arg( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: ParamEnvAnd<'tcx, (LocalDefId, DefId, &'tcx List<GenericArg<'tcx>>)>, mode: QueryMode ) -> Option<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)

source§

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

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

source§

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

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

source§

fn diagnostic_hir_wf_check( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (Predicate<'tcx>, WellFormedLoc), mode: QueryMode ) -> Option<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.

source§

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

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

source§

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

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

source§

fn check_validity_requirement( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: (ValidityRequirement, ParamEnvAnd<'tcx, Ty<'tcx>>), mode: QueryMode ) -> Option<check_validity_requirement<'tcx>>

[query description - consider adding a doc-comment!] checking validity requirement for key.1.value : key.0

source§

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

[query description - consider adding a doc-comment!] checking assoc const tcx.def_path_str(key.0.to_def_id()) has the same type as trait item

source§

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

[query description - consider adding a doc-comment!] deducing parameter attributes for tcx.def_path_str(def_id)

[query description - consider adding a doc-comment!] resolutions for documentation links for a module

[query description - consider adding a doc-comment!] traits in scope for documentation links for a module

source§

fn check_tys_might_be_eq( &'tcx self, tcx: TyCtxt<'tcx>, span: Span, key: Canonical<'tcx, (ParamEnv<'tcx>, Ty<'tcx>, Ty<'tcx>)>, mode: QueryMode ) -> Option<check_tys_might_be_eq<'tcx>>

Used in super_combine_consts to ICE if the type of the two consts are definitely not going to end up being equal to eachother. This might return Ok even if the types are not equal, but will never return Err if the types might be equal.

source§

fn as_any(&'tcx self) -> &'tcx dyn Any

source§

fn try_mark_green(&'tcx self, tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool

Auto Trait Implementations§

§

impl<'tcx> !RefUnwindSafe for Queries<'tcx>

§

impl<'tcx> !Send for Queries<'tcx>

§

impl<'tcx> !Sync for Queries<'tcx>

§

impl<'tcx> Unpin for Queries<'tcx>

§

impl<'tcx> !UnwindSafe for Queries<'tcx>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::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: 12360 bytes