Trait rustc_middle::ty::query::QueryEngine
source · pub trait QueryEngine<'tcx>: Sync {
Show 287 methods
fn as_any(&'tcx self) -> &'tcx dyn Any;
fn try_mark_green(&'tcx self, tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool;
fn trigger_delay_span_bug(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trigger_delay_span_bug<'tcx>,
mode: QueryMode
) -> Option<trigger_delay_span_bug<'tcx>>;
fn resolutions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolutions<'tcx>,
mode: QueryMode
) -> Option<resolutions<'tcx>>;
fn resolver_for_lowering(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolver_for_lowering<'tcx>,
mode: QueryMode
) -> Option<resolver_for_lowering<'tcx>>;
fn source_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: source_span<'tcx>,
mode: QueryMode
) -> Option<source_span<'tcx>>;
fn hir_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate<'tcx>,
mode: QueryMode
) -> Option<hir_crate<'tcx>>;
fn hir_crate_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate_items<'tcx>,
mode: QueryMode
) -> Option<hir_crate_items<'tcx>>;
fn hir_module_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_module_items<'tcx>,
mode: QueryMode
) -> Option<hir_module_items<'tcx>>;
fn hir_owner(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner<'tcx>,
mode: QueryMode
) -> Option<hir_owner<'tcx>>;
fn local_def_id_to_hir_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: local_def_id_to_hir_id<'tcx>,
mode: QueryMode
) -> Option<local_def_id_to_hir_id<'tcx>>;
fn hir_owner_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_parent<'tcx>,
mode: QueryMode
) -> Option<hir_owner_parent<'tcx>>;
fn hir_owner_nodes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_nodes<'tcx>,
mode: QueryMode
) -> Option<hir_owner_nodes<'tcx>>;
fn hir_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_attrs<'tcx>,
mode: QueryMode
) -> Option<hir_attrs<'tcx>>;
fn opt_const_param_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_const_param_of<'tcx>,
mode: QueryMode
) -> Option<opt_const_param_of<'tcx>>;
fn const_param_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_param_default<'tcx>,
mode: QueryMode
) -> Option<const_param_default<'tcx>>;
fn type_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_of<'tcx>,
mode: QueryMode
) -> Option<type_of<'tcx>>;
fn collect_trait_impl_trait_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_trait_impl_trait_tys<'tcx>,
mode: QueryMode
) -> Option<collect_trait_impl_trait_tys<'tcx>>;
fn analysis(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: analysis<'tcx>,
mode: QueryMode
) -> Option<analysis<'tcx>>;
fn check_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_expectations<'tcx>,
mode: QueryMode
) -> Option<check_expectations<'tcx>>;
fn generics_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generics_of<'tcx>,
mode: QueryMode
) -> Option<generics_of<'tcx>>;
fn predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_of<'tcx>,
mode: QueryMode
) -> Option<predicates_of<'tcx>>;
fn explicit_item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_item_bounds<'tcx>,
mode: QueryMode
) -> Option<explicit_item_bounds<'tcx>>;
fn item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_bounds<'tcx>,
mode: QueryMode
) -> Option<item_bounds<'tcx>>;
fn native_libraries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_libraries<'tcx>,
mode: QueryMode
) -> Option<native_libraries<'tcx>>;
fn shallow_lint_levels_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: shallow_lint_levels_on<'tcx>,
mode: QueryMode
) -> Option<shallow_lint_levels_on<'tcx>>;
fn lint_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_expectations<'tcx>,
mode: QueryMode
) -> Option<lint_expectations<'tcx>>;
fn parent_module_from_def_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: parent_module_from_def_id<'tcx>,
mode: QueryMode
) -> Option<parent_module_from_def_id<'tcx>>;
fn expn_that_defined(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: expn_that_defined<'tcx>,
mode: QueryMode
) -> Option<expn_that_defined<'tcx>>;
fn is_panic_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_panic_runtime<'tcx>,
mode: QueryMode
) -> Option<is_panic_runtime<'tcx>>;
fn representability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability<'tcx>,
mode: QueryMode
) -> Option<representability<'tcx>>;
fn representability_adt_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability_adt_ty<'tcx>,
mode: QueryMode
) -> Option<representability_adt_ty<'tcx>>;
fn params_in_repr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: params_in_repr<'tcx>,
mode: QueryMode
) -> Option<params_in_repr<'tcx>>;
fn thir_body(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_body<'tcx>,
mode: QueryMode
) -> Option<thir_body<'tcx>>;
fn thir_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_tree<'tcx>,
mode: QueryMode
) -> Option<thir_tree<'tcx>>;
fn mir_keys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_keys<'tcx>,
mode: QueryMode
) -> Option<mir_keys<'tcx>>;
fn mir_const_qualif(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif<'tcx>,
mode: QueryMode
) -> Option<mir_const_qualif<'tcx>>;
fn mir_const_qualif_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_const_qualif_const_arg<'tcx>>;
fn mir_built(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_built<'tcx>,
mode: QueryMode
) -> Option<mir_built<'tcx>>;
fn mir_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const<'tcx>,
mode: QueryMode
) -> Option<mir_const<'tcx>>;
fn thir_abstract_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const<'tcx>>;
fn thir_abstract_const_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const_of_const_arg<'tcx>>;
fn mir_drops_elaborated_and_const_checked(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_drops_elaborated_and_const_checked<'tcx>,
mode: QueryMode
) -> Option<mir_drops_elaborated_and_const_checked<'tcx>>;
fn mir_for_ctfe(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe<'tcx>,
mode: QueryMode
) -> Option<mir_for_ctfe<'tcx>>;
fn mir_for_ctfe_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_for_ctfe_of_const_arg<'tcx>>;
fn mir_promoted(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_promoted<'tcx>,
mode: QueryMode
) -> Option<mir_promoted<'tcx>>;
fn symbols_for_closure_captures(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbols_for_closure_captures<'tcx>,
mode: QueryMode
) -> Option<symbols_for_closure_captures<'tcx>>;
fn optimized_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: optimized_mir<'tcx>,
mode: QueryMode
) -> Option<optimized_mir<'tcx>>;
fn coverageinfo(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coverageinfo<'tcx>,
mode: QueryMode
) -> Option<coverageinfo<'tcx>>;
fn covered_code_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: covered_code_regions<'tcx>,
mode: QueryMode
) -> Option<covered_code_regions<'tcx>>;
fn promoted_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir<'tcx>,
mode: QueryMode
) -> Option<promoted_mir<'tcx>>;
fn promoted_mir_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<promoted_mir_of_const_arg<'tcx>>;
fn erase_regions_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: erase_regions_ty<'tcx>,
mode: QueryMode
) -> Option<erase_regions_ty<'tcx>>;
fn wasm_import_module_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: wasm_import_module_map<'tcx>,
mode: QueryMode
) -> Option<wasm_import_module_map<'tcx>>;
fn predicates_defined_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_defined_on<'tcx>,
mode: QueryMode
) -> Option<predicates_defined_on<'tcx>>;
fn trait_explicit_predicates_and_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_explicit_predicates_and_bounds<'tcx>,
mode: QueryMode
) -> Option<trait_explicit_predicates_and_bounds<'tcx>>;
fn explicit_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_predicates_of<'tcx>,
mode: QueryMode
) -> Option<explicit_predicates_of<'tcx>>;
fn inferred_outlives_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_of<'tcx>,
mode: QueryMode
) -> Option<inferred_outlives_of<'tcx>>;
fn super_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_of<'tcx>,
mode: QueryMode
) -> Option<super_predicates_of<'tcx>>;
fn super_predicates_that_define_assoc_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_that_define_assoc_type<'tcx>,
mode: QueryMode
) -> Option<super_predicates_that_define_assoc_type<'tcx>>;
fn type_param_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_param_predicates<'tcx>,
mode: QueryMode
) -> Option<type_param_predicates<'tcx>>;
fn trait_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_def<'tcx>,
mode: QueryMode
) -> Option<trait_def<'tcx>>;
fn adt_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_def<'tcx>,
mode: QueryMode
) -> Option<adt_def<'tcx>>;
fn adt_destructor(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_destructor<'tcx>,
mode: QueryMode
) -> Option<adt_destructor<'tcx>>;
fn adt_sized_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_sized_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_sized_constraint<'tcx>>;
fn adt_dtorck_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_dtorck_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_dtorck_constraint<'tcx>>;
fn constness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: constness<'tcx>,
mode: QueryMode
) -> Option<constness<'tcx>>;
fn asyncness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asyncness<'tcx>,
mode: QueryMode
) -> Option<asyncness<'tcx>>;
fn is_promotable_const_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_promotable_const_fn<'tcx>,
mode: QueryMode
) -> Option<is_promotable_const_fn<'tcx>>;
fn is_foreign_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_foreign_item<'tcx>,
mode: QueryMode
) -> Option<is_foreign_item<'tcx>>;
fn generator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_kind<'tcx>,
mode: QueryMode
) -> Option<generator_kind<'tcx>>;
fn crate_variances(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_variances<'tcx>,
mode: QueryMode
) -> Option<crate_variances<'tcx>>;
fn variances_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: variances_of<'tcx>,
mode: QueryMode
) -> Option<variances_of<'tcx>>;
fn inferred_outlives_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_crate<'tcx>,
mode: QueryMode
) -> Option<inferred_outlives_crate<'tcx>>;
fn associated_item_def_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item_def_ids<'tcx>,
mode: QueryMode
) -> Option<associated_item_def_ids<'tcx>>;
fn associated_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item<'tcx>,
mode: QueryMode
) -> Option<associated_item<'tcx>>;
fn associated_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_items<'tcx>,
mode: QueryMode
) -> Option<associated_items<'tcx>>;
fn impl_item_implementor_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_item_implementor_ids<'tcx>,
mode: QueryMode
) -> Option<impl_item_implementor_ids<'tcx>>;
fn impl_trait_ref(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_trait_ref<'tcx>,
mode: QueryMode
) -> Option<impl_trait_ref<'tcx>>;
fn impl_polarity(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_polarity<'tcx>,
mode: QueryMode
) -> Option<impl_polarity<'tcx>>;
fn issue33140_self_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: issue33140_self_ty<'tcx>,
mode: QueryMode
) -> Option<issue33140_self_ty<'tcx>>;
fn inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inherent_impls<'tcx>,
mode: QueryMode
) -> Option<inherent_impls<'tcx>>;
fn incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: incoherent_impls<'tcx>,
mode: QueryMode
) -> Option<incoherent_impls<'tcx>>;
fn unsafety_check_result(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result<'tcx>,
mode: QueryMode
) -> Option<unsafety_check_result<'tcx>>;
fn unsafety_check_result_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result_for_const_arg<'tcx>,
mode: QueryMode
) -> Option<unsafety_check_result_for_const_arg<'tcx>>;
fn thir_check_unsafety(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety<'tcx>,
mode: QueryMode
) -> Option<thir_check_unsafety<'tcx>>;
fn thir_check_unsafety_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety_for_const_arg<'tcx>,
mode: QueryMode
) -> Option<thir_check_unsafety_for_const_arg<'tcx>>;
fn unsafe_derive_on_repr_packed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafe_derive_on_repr_packed<'tcx>,
mode: QueryMode
) -> Option<unsafe_derive_on_repr_packed<'tcx>>;
fn assumed_wf_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: assumed_wf_types<'tcx>,
mode: QueryMode
) -> Option<assumed_wf_types<'tcx>>;
fn fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_sig<'tcx>,
mode: QueryMode
) -> Option<fn_sig<'tcx>>;
fn lint_mod(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_mod<'tcx>,
mode: QueryMode
) -> Option<lint_mod<'tcx>>;
fn check_mod_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_attrs<'tcx>,
mode: QueryMode
) -> Option<check_mod_attrs<'tcx>>;
fn check_mod_unstable_api_usage(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_unstable_api_usage<'tcx>,
mode: QueryMode
) -> Option<check_mod_unstable_api_usage<'tcx>>;
fn check_mod_const_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_const_bodies<'tcx>,
mode: QueryMode
) -> Option<check_mod_const_bodies<'tcx>>;
fn check_mod_loops(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_loops<'tcx>,
mode: QueryMode
) -> Option<check_mod_loops<'tcx>>;
fn check_mod_naked_functions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_naked_functions<'tcx>,
mode: QueryMode
) -> Option<check_mod_naked_functions<'tcx>>;
fn check_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<check_mod_item_types<'tcx>>;
fn check_mod_privacy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_privacy<'tcx>,
mode: QueryMode
) -> Option<check_mod_privacy<'tcx>>;
fn check_liveness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_liveness<'tcx>,
mode: QueryMode
) -> Option<check_liveness<'tcx>>;
fn live_symbols_and_ignored_derived_traits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: live_symbols_and_ignored_derived_traits<'tcx>,
mode: QueryMode
) -> Option<live_symbols_and_ignored_derived_traits<'tcx>>;
fn check_mod_deathness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_deathness<'tcx>,
mode: QueryMode
) -> Option<check_mod_deathness<'tcx>>;
fn check_mod_impl_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_impl_wf<'tcx>,
mode: QueryMode
) -> Option<check_mod_impl_wf<'tcx>>;
fn check_mod_type_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_type_wf<'tcx>,
mode: QueryMode
) -> Option<check_mod_type_wf<'tcx>>;
fn collect_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<collect_mod_item_types<'tcx>>;
fn coerce_unsized_info(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coerce_unsized_info<'tcx>,
mode: QueryMode
) -> Option<coerce_unsized_info<'tcx>>;
fn typeck_item_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_item_bodies<'tcx>,
mode: QueryMode
) -> Option<typeck_item_bodies<'tcx>>;
fn typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck<'tcx>,
mode: QueryMode
) -> Option<typeck<'tcx>>;
fn typeck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_const_arg<'tcx>,
mode: QueryMode
) -> Option<typeck_const_arg<'tcx>>;
fn diagnostic_only_typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_only_typeck<'tcx>,
mode: QueryMode
) -> Option<diagnostic_only_typeck<'tcx>>;
fn used_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_trait_imports<'tcx>,
mode: QueryMode
) -> Option<used_trait_imports<'tcx>>;
fn has_typeck_results(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_typeck_results<'tcx>,
mode: QueryMode
) -> Option<has_typeck_results<'tcx>>;
fn coherent_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coherent_trait<'tcx>,
mode: QueryMode
) -> Option<coherent_trait<'tcx>>;
fn mir_borrowck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck<'tcx>,
mode: QueryMode
) -> Option<mir_borrowck<'tcx>>;
fn mir_borrowck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_borrowck_const_arg<'tcx>>;
fn crate_inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls<'tcx>,
mode: QueryMode
) -> Option<crate_inherent_impls<'tcx>>;
fn crate_inherent_impls_overlap_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls_overlap_check<'tcx>,
mode: QueryMode
) -> Option<crate_inherent_impls_overlap_check<'tcx>>;
fn orphan_check_impl(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: orphan_check_impl<'tcx>,
mode: QueryMode
) -> Option<orphan_check_impl<'tcx>>;
fn mir_callgraph_reachable(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_callgraph_reachable<'tcx>,
mode: QueryMode
) -> Option<mir_callgraph_reachable<'tcx>>;
fn mir_inliner_callees(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_inliner_callees<'tcx>,
mode: QueryMode
) -> Option<mir_inliner_callees<'tcx>>;
fn eval_to_allocation_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_allocation_raw<'tcx>,
mode: QueryMode
) -> Option<eval_to_allocation_raw<'tcx>>;
fn eval_to_const_value_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_const_value_raw<'tcx>,
mode: QueryMode
) -> Option<eval_to_const_value_raw<'tcx>>;
fn eval_to_valtree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_valtree<'tcx>,
mode: QueryMode
) -> Option<eval_to_valtree<'tcx>>;
fn valtree_to_const_val(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: valtree_to_const_val<'tcx>,
mode: QueryMode
) -> Option<valtree_to_const_val<'tcx>>;
fn destructure_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: destructure_const<'tcx>,
mode: QueryMode
) -> Option<destructure_const<'tcx>>;
fn try_destructure_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_destructure_mir_constant<'tcx>,
mode: QueryMode
) -> Option<try_destructure_mir_constant<'tcx>>;
fn deref_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deref_mir_constant<'tcx>,
mode: QueryMode
) -> Option<deref_mir_constant<'tcx>>;
fn const_caller_location(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_caller_location<'tcx>,
mode: QueryMode
) -> Option<const_caller_location<'tcx>>;
fn lit_to_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_const<'tcx>,
mode: QueryMode
) -> Option<lit_to_const<'tcx>>;
fn lit_to_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_mir_constant<'tcx>,
mode: QueryMode
) -> Option<lit_to_mir_constant<'tcx>>;
fn check_match(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_match<'tcx>,
mode: QueryMode
) -> Option<check_match<'tcx>>;
fn effective_visibilities(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: effective_visibilities<'tcx>,
mode: QueryMode
) -> Option<effective_visibilities<'tcx>>;
fn check_private_in_public(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_private_in_public<'tcx>,
mode: QueryMode
) -> Option<check_private_in_public<'tcx>>;
fn reachable_set(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_set<'tcx>,
mode: QueryMode
) -> Option<reachable_set<'tcx>>;
fn region_scope_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: region_scope_tree<'tcx>,
mode: QueryMode
) -> Option<region_scope_tree<'tcx>>;
fn mir_shims(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_shims<'tcx>,
mode: QueryMode
) -> Option<mir_shims<'tcx>>;
fn symbol_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_name<'tcx>,
mode: QueryMode
) -> Option<symbol_name<'tcx>>;
fn opt_def_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_def_kind<'tcx>,
mode: QueryMode
) -> Option<opt_def_kind<'tcx>>;
fn def_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_span<'tcx>,
mode: QueryMode
) -> Option<def_span<'tcx>>;
fn def_ident_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_ident_span<'tcx>,
mode: QueryMode
) -> Option<def_ident_span<'tcx>>;
fn lookup_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_stability<'tcx>>;
fn lookup_const_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_const_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_const_stability<'tcx>>;
fn lookup_default_body_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_default_body_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_default_body_stability<'tcx>>;
fn should_inherit_track_caller(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: should_inherit_track_caller<'tcx>,
mode: QueryMode
) -> Option<should_inherit_track_caller<'tcx>>;
fn lookup_deprecation_entry(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_deprecation_entry<'tcx>,
mode: QueryMode
) -> Option<lookup_deprecation_entry<'tcx>>;
fn is_doc_hidden(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_doc_hidden<'tcx>,
mode: QueryMode
) -> Option<is_doc_hidden<'tcx>>;
fn is_doc_notable_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_doc_notable_trait<'tcx>,
mode: QueryMode
) -> Option<is_doc_notable_trait<'tcx>>;
fn item_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_attrs<'tcx>,
mode: QueryMode
) -> Option<item_attrs<'tcx>>;
fn codegen_fn_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_fn_attrs<'tcx>,
mode: QueryMode
) -> Option<codegen_fn_attrs<'tcx>>;
fn asm_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asm_target_features<'tcx>,
mode: QueryMode
) -> Option<asm_target_features<'tcx>>;
fn fn_arg_names(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_arg_names<'tcx>,
mode: QueryMode
) -> Option<fn_arg_names<'tcx>>;
fn rendered_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: rendered_const<'tcx>,
mode: QueryMode
) -> Option<rendered_const<'tcx>>;
fn impl_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_parent<'tcx>,
mode: QueryMode
) -> Option<impl_parent<'tcx>>;
fn is_ctfe_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_ctfe_mir_available<'tcx>,
mode: QueryMode
) -> Option<is_ctfe_mir_available<'tcx>>;
fn is_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_mir_available<'tcx>,
mode: QueryMode
) -> Option<is_mir_available<'tcx>>;
fn own_existential_vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: own_existential_vtable_entries<'tcx>,
mode: QueryMode
) -> Option<own_existential_vtable_entries<'tcx>>;
fn vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_entries<'tcx>,
mode: QueryMode
) -> Option<vtable_entries<'tcx>>;
fn vtable_trait_upcasting_coercion_new_vptr_slot(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>,
mode: QueryMode
) -> Option<vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>>;
fn vtable_allocation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_allocation<'tcx>,
mode: QueryMode
) -> Option<vtable_allocation<'tcx>>;
fn codegen_select_candidate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_select_candidate<'tcx>,
mode: QueryMode
) -> Option<codegen_select_candidate<'tcx>>;
fn all_local_trait_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_local_trait_impls<'tcx>,
mode: QueryMode
) -> Option<all_local_trait_impls<'tcx>>;
fn trait_impls_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_impls_of<'tcx>,
mode: QueryMode
) -> Option<trait_impls_of<'tcx>>;
fn specialization_graph_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specialization_graph_of<'tcx>,
mode: QueryMode
) -> Option<specialization_graph_of<'tcx>>;
fn object_safety_violations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_safety_violations<'tcx>,
mode: QueryMode
) -> Option<object_safety_violations<'tcx>>;
fn param_env(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env<'tcx>,
mode: QueryMode
) -> Option<param_env<'tcx>>;
fn param_env_reveal_all_normalized(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env_reveal_all_normalized<'tcx>,
mode: QueryMode
) -> Option<param_env_reveal_all_normalized<'tcx>>;
fn is_copy_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_copy_raw<'tcx>,
mode: QueryMode
) -> Option<is_copy_raw<'tcx>>;
fn is_sized_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_sized_raw<'tcx>,
mode: QueryMode
) -> Option<is_sized_raw<'tcx>>;
fn is_freeze_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_freeze_raw<'tcx>,
mode: QueryMode
) -> Option<is_freeze_raw<'tcx>>;
fn is_unpin_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unpin_raw<'tcx>,
mode: QueryMode
) -> Option<is_unpin_raw<'tcx>>;
fn needs_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: needs_drop_raw<'tcx>,
mode: QueryMode
) -> Option<needs_drop_raw<'tcx>>;
fn has_significant_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_significant_drop_raw<'tcx>,
mode: QueryMode
) -> Option<has_significant_drop_raw<'tcx>>;
fn has_structural_eq_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_structural_eq_impls<'tcx>,
mode: QueryMode
) -> Option<has_structural_eq_impls<'tcx>>;
fn adt_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_drop_tys<'tcx>,
mode: QueryMode
) -> Option<adt_drop_tys<'tcx>>;
fn adt_significant_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_significant_drop_tys<'tcx>,
mode: QueryMode
) -> Option<adt_significant_drop_tys<'tcx>>;
fn layout_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: layout_of<'tcx>,
mode: QueryMode
) -> Option<layout_of<'tcx>>;
fn fn_abi_of_fn_ptr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_fn_ptr<'tcx>,
mode: QueryMode
) -> Option<fn_abi_of_fn_ptr<'tcx>>;
fn fn_abi_of_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_instance<'tcx>,
mode: QueryMode
) -> Option<fn_abi_of_instance<'tcx>>;
fn dylib_dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dylib_dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dylib_dependency_formats<'tcx>>;
fn dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dependency_formats<'tcx>>;
fn is_compiler_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_compiler_builtins<'tcx>,
mode: QueryMode
) -> Option<is_compiler_builtins<'tcx>>;
fn has_global_allocator(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_global_allocator<'tcx>,
mode: QueryMode
) -> Option<has_global_allocator<'tcx>>;
fn has_alloc_error_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_alloc_error_handler<'tcx>,
mode: QueryMode
) -> Option<has_alloc_error_handler<'tcx>>;
fn has_panic_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_panic_handler<'tcx>,
mode: QueryMode
) -> Option<has_panic_handler<'tcx>>;
fn is_profiler_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_profiler_runtime<'tcx>,
mode: QueryMode
) -> Option<is_profiler_runtime<'tcx>>;
fn has_ffi_unwind_calls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_ffi_unwind_calls<'tcx>,
mode: QueryMode
) -> Option<has_ffi_unwind_calls<'tcx>>;
fn required_panic_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: required_panic_strategy<'tcx>,
mode: QueryMode
) -> Option<required_panic_strategy<'tcx>>;
fn panic_in_drop_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: panic_in_drop_strategy<'tcx>,
mode: QueryMode
) -> Option<panic_in_drop_strategy<'tcx>>;
fn is_no_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_no_builtins<'tcx>,
mode: QueryMode
) -> Option<is_no_builtins<'tcx>>;
fn symbol_mangling_version(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_mangling_version<'tcx>,
mode: QueryMode
) -> Option<symbol_mangling_version<'tcx>>;
fn extern_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_crate<'tcx>,
mode: QueryMode
) -> Option<extern_crate<'tcx>>;
fn specializes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specializes<'tcx>,
mode: QueryMode
) -> Option<specializes<'tcx>>;
fn in_scope_traits_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: in_scope_traits_map<'tcx>,
mode: QueryMode
) -> Option<in_scope_traits_map<'tcx>>;
fn module_reexports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_reexports<'tcx>,
mode: QueryMode
) -> Option<module_reexports<'tcx>>;
fn impl_defaultness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_defaultness<'tcx>,
mode: QueryMode
) -> Option<impl_defaultness<'tcx>>;
fn check_well_formed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_well_formed<'tcx>,
mode: QueryMode
) -> Option<check_well_formed<'tcx>>;
fn reachable_non_generics(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_non_generics<'tcx>,
mode: QueryMode
) -> Option<reachable_non_generics<'tcx>>;
fn is_reachable_non_generic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_reachable_non_generic<'tcx>,
mode: QueryMode
) -> Option<is_reachable_non_generic<'tcx>>;
fn is_unreachable_local_definition(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unreachable_local_definition<'tcx>,
mode: QueryMode
) -> Option<is_unreachable_local_definition<'tcx>>;
fn upstream_monomorphizations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations<'tcx>,
mode: QueryMode
) -> Option<upstream_monomorphizations<'tcx>>;
fn upstream_monomorphizations_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations_for<'tcx>,
mode: QueryMode
) -> Option<upstream_monomorphizations_for<'tcx>>;
fn upstream_drop_glue_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_drop_glue_for<'tcx>,
mode: QueryMode
) -> Option<upstream_drop_glue_for<'tcx>>;
fn foreign_modules(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: foreign_modules<'tcx>,
mode: QueryMode
) -> Option<foreign_modules<'tcx>>;
fn entry_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: entry_fn<'tcx>,
mode: QueryMode
) -> Option<entry_fn<'tcx>>;
fn proc_macro_decls_static(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: proc_macro_decls_static<'tcx>,
mode: QueryMode
) -> Option<proc_macro_decls_static<'tcx>>;
fn crate_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_hash<'tcx>,
mode: QueryMode
) -> Option<crate_hash<'tcx>>;
fn crate_host_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_host_hash<'tcx>,
mode: QueryMode
) -> Option<crate_host_hash<'tcx>>;
fn extra_filename(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extra_filename<'tcx>,
mode: QueryMode
) -> Option<extra_filename<'tcx>>;
fn crate_extern_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_extern_paths<'tcx>,
mode: QueryMode
) -> Option<crate_extern_paths<'tcx>>;
fn implementations_of_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implementations_of_trait<'tcx>,
mode: QueryMode
) -> Option<implementations_of_trait<'tcx>>;
fn crate_incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_incoherent_impls<'tcx>,
mode: QueryMode
) -> Option<crate_incoherent_impls<'tcx>>;
fn native_library(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_library<'tcx>,
mode: QueryMode
) -> Option<native_library<'tcx>>;
fn resolve_lifetimes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_lifetimes<'tcx>,
mode: QueryMode
) -> Option<resolve_lifetimes<'tcx>>;
fn named_region_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: named_region_map<'tcx>,
mode: QueryMode
) -> Option<named_region_map<'tcx>>;
fn is_late_bound_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_late_bound_map<'tcx>,
mode: QueryMode
) -> Option<is_late_bound_map<'tcx>>;
fn object_lifetime_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_lifetime_default<'tcx>,
mode: QueryMode
) -> Option<object_lifetime_default<'tcx>>;
fn late_bound_vars_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: late_bound_vars_map<'tcx>,
mode: QueryMode
) -> Option<late_bound_vars_map<'tcx>>;
fn visibility(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visibility<'tcx>,
mode: QueryMode
) -> Option<visibility<'tcx>>;
fn inhabited_predicate_adt(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_adt<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_adt<'tcx>>;
fn inhabited_predicate_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_type<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_type<'tcx>>;
fn dep_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dep_kind<'tcx>,
mode: QueryMode
) -> Option<dep_kind<'tcx>>;
fn crate_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_name<'tcx>,
mode: QueryMode
) -> Option<crate_name<'tcx>>;
fn module_children(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_children<'tcx>,
mode: QueryMode
) -> Option<module_children<'tcx>>;
fn extern_mod_stmt_cnum(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_mod_stmt_cnum<'tcx>,
mode: QueryMode
) -> Option<extern_mod_stmt_cnum<'tcx>>;
fn lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lib_features<'tcx>,
mode: QueryMode
) -> Option<lib_features<'tcx>>;
fn defined_lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lib_features<'tcx>,
mode: QueryMode
) -> Option<defined_lib_features<'tcx>>;
fn stability_implications(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_implications<'tcx>,
mode: QueryMode
) -> Option<stability_implications<'tcx>>;
fn is_intrinsic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_intrinsic<'tcx>,
mode: QueryMode
) -> Option<is_intrinsic<'tcx>>;
fn get_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: get_lang_items<'tcx>,
mode: QueryMode
) -> Option<get_lang_items<'tcx>>;
fn all_diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<all_diagnostic_items<'tcx>>;
fn defined_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lang_items<'tcx>,
mode: QueryMode
) -> Option<defined_lang_items<'tcx>>;
fn diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<diagnostic_items<'tcx>>;
fn missing_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_lang_items<'tcx>,
mode: QueryMode
) -> Option<missing_lang_items<'tcx>>;
fn visible_parent_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visible_parent_map<'tcx>,
mode: QueryMode
) -> Option<visible_parent_map<'tcx>>;
fn trimmed_def_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trimmed_def_paths<'tcx>,
mode: QueryMode
) -> Option<trimmed_def_paths<'tcx>>;
fn missing_extern_crate_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_extern_crate_item<'tcx>,
mode: QueryMode
) -> Option<missing_extern_crate_item<'tcx>>;
fn used_crate_source(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_crate_source<'tcx>,
mode: QueryMode
) -> Option<used_crate_source<'tcx>>;
fn debugger_visualizers(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: debugger_visualizers<'tcx>,
mode: QueryMode
) -> Option<debugger_visualizers<'tcx>>;
fn postorder_cnums(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: postorder_cnums<'tcx>,
mode: QueryMode
) -> Option<postorder_cnums<'tcx>>;
fn is_private_dep(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_private_dep<'tcx>,
mode: QueryMode
) -> Option<is_private_dep<'tcx>>;
fn allocator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: allocator_kind<'tcx>,
mode: QueryMode
) -> Option<allocator_kind<'tcx>>;
fn alloc_error_handler_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: alloc_error_handler_kind<'tcx>,
mode: QueryMode
) -> Option<alloc_error_handler_kind<'tcx>>;
fn upvars_mentioned(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upvars_mentioned<'tcx>,
mode: QueryMode
) -> Option<upvars_mentioned<'tcx>>;
fn maybe_unused_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_trait_imports<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_trait_imports<'tcx>>;
fn maybe_unused_extern_crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_extern_crates<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_extern_crates<'tcx>>;
fn names_imported_by_glob_use(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: names_imported_by_glob_use<'tcx>,
mode: QueryMode
) -> Option<names_imported_by_glob_use<'tcx>>;
fn stability_index(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_index<'tcx>,
mode: QueryMode
) -> Option<stability_index<'tcx>>;
fn crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crates<'tcx>,
mode: QueryMode
) -> Option<crates<'tcx>>;
fn traits_in_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: traits_in_crate<'tcx>,
mode: QueryMode
) -> Option<traits_in_crate<'tcx>>;
fn exported_symbols(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: exported_symbols<'tcx>,
mode: QueryMode
) -> Option<exported_symbols<'tcx>>;
fn collect_and_partition_mono_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_and_partition_mono_items<'tcx>,
mode: QueryMode
) -> Option<collect_and_partition_mono_items<'tcx>>;
fn is_codegened_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_codegened_item<'tcx>,
mode: QueryMode
) -> Option<is_codegened_item<'tcx>>;
fn codegened_and_inlined_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegened_and_inlined_items<'tcx>,
mode: QueryMode
) -> Option<codegened_and_inlined_items<'tcx>>;
fn codegen_unit(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_unit<'tcx>,
mode: QueryMode
) -> Option<codegen_unit<'tcx>>;
fn unused_generic_params(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unused_generic_params<'tcx>,
mode: QueryMode
) -> Option<unused_generic_params<'tcx>>;
fn backend_optimization_level(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: backend_optimization_level<'tcx>,
mode: QueryMode
) -> Option<backend_optimization_level<'tcx>>;
fn output_filenames(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: output_filenames<'tcx>,
mode: QueryMode
) -> Option<output_filenames<'tcx>>;
fn normalize_projection_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: normalize_projection_ty<'tcx>,
mode: QueryMode
) -> Option<normalize_projection_ty<'tcx>>;
fn try_normalize_generic_arg_after_erasing_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_normalize_generic_arg_after_erasing_regions<'tcx>,
mode: QueryMode
) -> Option<try_normalize_generic_arg_after_erasing_regions<'tcx>>;
fn implied_outlives_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implied_outlives_bounds<'tcx>,
mode: QueryMode
) -> Option<implied_outlives_bounds<'tcx>>;
fn dropck_outlives(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dropck_outlives<'tcx>,
mode: QueryMode
) -> Option<dropck_outlives<'tcx>>;
fn evaluate_obligation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_obligation<'tcx>,
mode: QueryMode
) -> Option<evaluate_obligation<'tcx>>;
fn evaluate_goal(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_goal<'tcx>,
mode: QueryMode
) -> Option<evaluate_goal<'tcx>>;
fn type_op_ascribe_user_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_ascribe_user_type<'tcx>,
mode: QueryMode
) -> Option<type_op_ascribe_user_type<'tcx>>;
fn type_op_eq(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_eq<'tcx>,
mode: QueryMode
) -> Option<type_op_eq<'tcx>>;
fn type_op_subtype(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_subtype<'tcx>,
mode: QueryMode
) -> Option<type_op_subtype<'tcx>>;
fn type_op_prove_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_prove_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_prove_predicate<'tcx>>;
fn type_op_normalize_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_ty<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_ty<'tcx>>;
fn type_op_normalize_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_predicate<'tcx>>;
fn type_op_normalize_poly_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_poly_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_poly_fn_sig<'tcx>>;
fn type_op_normalize_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_fn_sig<'tcx>>;
fn subst_and_check_impossible_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: subst_and_check_impossible_predicates<'tcx>,
mode: QueryMode
) -> Option<subst_and_check_impossible_predicates<'tcx>>;
fn is_impossible_method(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_impossible_method<'tcx>,
mode: QueryMode
) -> Option<is_impossible_method<'tcx>>;
fn method_autoderef_steps(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: method_autoderef_steps<'tcx>,
mode: QueryMode
) -> Option<method_autoderef_steps<'tcx>>;
fn supported_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: supported_target_features<'tcx>,
mode: QueryMode
) -> Option<supported_target_features<'tcx>>;
fn instance_def_size_estimate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: instance_def_size_estimate<'tcx>,
mode: QueryMode
) -> Option<instance_def_size_estimate<'tcx>>;
fn features_query(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: features_query<'tcx>,
mode: QueryMode
) -> Option<features_query<'tcx>>;
fn resolve_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance<'tcx>,
mode: QueryMode
) -> Option<resolve_instance<'tcx>>;
fn resolve_instance_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<resolve_instance_of_const_arg<'tcx>>;
fn reveal_opaque_types_in_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reveal_opaque_types_in_bounds<'tcx>,
mode: QueryMode
) -> Option<reveal_opaque_types_in_bounds<'tcx>>;
fn limits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: limits<'tcx>,
mode: QueryMode
) -> Option<limits<'tcx>>;
fn diagnostic_hir_wf_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_hir_wf_check<'tcx>,
mode: QueryMode
) -> Option<diagnostic_hir_wf_check<'tcx>>;
fn global_backend_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: global_backend_features<'tcx>,
mode: QueryMode
) -> Option<global_backend_features<'tcx>>;
fn generator_diagnostic_data(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_diagnostic_data<'tcx>,
mode: QueryMode
) -> Option<generator_diagnostic_data<'tcx>>;
fn permits_uninit_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_uninit_init<'tcx>,
mode: QueryMode
) -> Option<permits_uninit_init<'tcx>>;
fn permits_zero_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_zero_init<'tcx>,
mode: QueryMode
) -> Option<permits_zero_init<'tcx>>;
fn compare_assoc_const_impl_item_with_trait_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: compare_assoc_const_impl_item_with_trait_item<'tcx>,
mode: QueryMode
) -> Option<compare_assoc_const_impl_item_with_trait_item<'tcx>>;
fn deduced_param_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deduced_param_attrs<'tcx>,
mode: QueryMode
) -> Option<deduced_param_attrs<'tcx>>;
}
Required Methods§
fn as_any(&'tcx self) -> &'tcx dyn Any
fn try_mark_green(&'tcx self, tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool
sourcefn trigger_delay_span_bug(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trigger_delay_span_bug<'tcx>,
mode: QueryMode
) -> Option<trigger_delay_span_bug<'tcx>>
fn trigger_delay_span_bug(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trigger_delay_span_bug<'tcx>,
mode: QueryMode
) -> Option<trigger_delay_span_bug<'tcx>>
[query description - consider adding a doc-comment!] triggering a delay span bug
sourcefn resolutions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolutions<'tcx>,
mode: QueryMode
) -> Option<resolutions<'tcx>>
fn resolutions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolutions<'tcx>,
mode: QueryMode
) -> Option<resolutions<'tcx>>
[query description - consider adding a doc-comment!] getting the resolver outputs
sourcefn resolver_for_lowering(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolver_for_lowering<'tcx>,
mode: QueryMode
) -> Option<resolver_for_lowering<'tcx>>
fn resolver_for_lowering(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolver_for_lowering<'tcx>,
mode: QueryMode
) -> Option<resolver_for_lowering<'tcx>>
[query description - consider adding a doc-comment!] getting the resolver for lowering
sourcefn source_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: source_span<'tcx>,
mode: QueryMode
) -> Option<source_span<'tcx>>
fn source_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: source_span<'tcx>,
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.
sourcefn hir_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate<'tcx>,
mode: QueryMode
) -> Option<hir_crate<'tcx>>
fn hir_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate<'tcx>,
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()
.
sourcefn hir_crate_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate_items<'tcx>,
mode: QueryMode
) -> Option<hir_crate_items<'tcx>>
fn hir_crate_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_crate_items<'tcx>,
mode: QueryMode
) -> Option<hir_crate_items<'tcx>>
All items in the crate.
sourcefn hir_module_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_module_items<'tcx>,
mode: QueryMode
) -> Option<hir_module_items<'tcx>>
fn hir_module_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_module_items<'tcx>,
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.
sourcefn hir_owner(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner<'tcx>,
mode: QueryMode
) -> Option<hir_owner<'tcx>>
fn hir_owner(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner<'tcx>,
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.
sourcefn local_def_id_to_hir_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: local_def_id_to_hir_id<'tcx>,
mode: QueryMode
) -> Option<local_def_id_to_hir_id<'tcx>>
fn local_def_id_to_hir_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: local_def_id_to_hir_id<'tcx>,
mode: QueryMode
) -> Option<local_def_id_to_hir_id<'tcx>>
Gives access to the HIR ID for the given LocalDefId
owner key
.
This can be conveniently accessed by methods on tcx.hir()
.
Avoid calling this query directly.
sourcefn hir_owner_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_parent<'tcx>,
mode: QueryMode
) -> Option<hir_owner_parent<'tcx>>
fn hir_owner_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_parent<'tcx>,
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.
sourcefn hir_owner_nodes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_nodes<'tcx>,
mode: QueryMode
) -> Option<hir_owner_nodes<'tcx>>
fn hir_owner_nodes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_owner_nodes<'tcx>,
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.
sourcefn hir_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_attrs<'tcx>,
mode: QueryMode
) -> Option<hir_attrs<'tcx>>
fn hir_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: hir_attrs<'tcx>,
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.
sourcefn opt_const_param_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_const_param_of<'tcx>,
mode: QueryMode
) -> Option<opt_const_param_of<'tcx>>
fn opt_const_param_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_const_param_of<'tcx>,
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`.
}
sourcefn const_param_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_param_default<'tcx>,
mode: QueryMode
) -> Option<const_param_default<'tcx>>
fn const_param_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_param_default<'tcx>,
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
.
sourcefn type_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_of<'tcx>,
mode: QueryMode
) -> Option<type_of<'tcx>>
fn type_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_of<'tcx>,
mode: QueryMode
) -> Option<type_of<'tcx>>
sourcefn collect_trait_impl_trait_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_trait_impl_trait_tys<'tcx>,
mode: QueryMode
) -> Option<collect_trait_impl_trait_tys<'tcx>>
fn collect_trait_impl_trait_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_trait_impl_trait_tys<'tcx>,
mode: QueryMode
) -> Option<collect_trait_impl_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
sourcefn analysis(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: analysis<'tcx>,
mode: QueryMode
) -> Option<analysis<'tcx>>
fn analysis(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: analysis<'tcx>,
mode: QueryMode
) -> Option<analysis<'tcx>>
[query description - consider adding a doc-comment!] running analysis passes on this crate
sourcefn check_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_expectations<'tcx>,
mode: QueryMode
) -> Option<check_expectations<'tcx>>
fn check_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_expectations<'tcx>,
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.
sourcefn generics_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generics_of<'tcx>,
mode: QueryMode
) -> Option<generics_of<'tcx>>
fn generics_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generics_of<'tcx>,
mode: QueryMode
) -> Option<generics_of<'tcx>>
Maps from the DefId
of an item (trait/struct/enum/fn) to its
associated generics.
sourcefn predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_of<'tcx>,
mode: QueryMode
) -> Option<predicates_of<'tcx>>
fn predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_of<'tcx>,
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.)
sourcefn explicit_item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_item_bounds<'tcx>,
mode: QueryMode
) -> Option<explicit_item_bounds<'tcx>>
fn explicit_item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_item_bounds<'tcx>,
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.
sourcefn item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_bounds<'tcx>,
mode: QueryMode
) -> Option<item_bounds<'tcx>>
fn item_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_bounds<'tcx>,
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.
sourcefn native_libraries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_libraries<'tcx>,
mode: QueryMode
) -> Option<native_libraries<'tcx>>
fn native_libraries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_libraries<'tcx>,
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 theirlink
attributes)- the
libs
(-l
) option
sourcefn shallow_lint_levels_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: shallow_lint_levels_on<'tcx>,
mode: QueryMode
) -> Option<shallow_lint_levels_on<'tcx>>
fn shallow_lint_levels_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: shallow_lint_levels_on<'tcx>,
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())
sourcefn lint_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_expectations<'tcx>,
mode: QueryMode
) -> Option<lint_expectations<'tcx>>
fn lint_expectations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_expectations<'tcx>,
mode: QueryMode
) -> Option<lint_expectations<'tcx>>
[query description - consider adding a doc-comment!] computing #[expect]
ed lints in this crate
sourcefn parent_module_from_def_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: parent_module_from_def_id<'tcx>,
mode: QueryMode
) -> Option<parent_module_from_def_id<'tcx>>
fn parent_module_from_def_id(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: parent_module_from_def_id<'tcx>,
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())
sourcefn expn_that_defined(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: expn_that_defined<'tcx>,
mode: QueryMode
) -> Option<expn_that_defined<'tcx>>
fn expn_that_defined(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: expn_that_defined<'tcx>,
mode: QueryMode
) -> Option<expn_that_defined<'tcx>>
[query description - consider adding a doc-comment!] getting the expansion that defined tcx.def_path_str(key)
sourcefn is_panic_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_panic_runtime<'tcx>,
mode: QueryMode
) -> Option<is_panic_runtime<'tcx>>
fn is_panic_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_panic_runtime<'tcx>,
mode: QueryMode
) -> Option<is_panic_runtime<'tcx>>
[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime
sourcefn representability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability<'tcx>,
mode: QueryMode
) -> Option<representability<'tcx>>
fn representability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability<'tcx>,
mode: QueryMode
) -> Option<representability<'tcx>>
Checks whether a type is representable or infinitely sized
sourcefn representability_adt_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability_adt_ty<'tcx>,
mode: QueryMode
) -> Option<representability_adt_ty<'tcx>>
fn representability_adt_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: representability_adt_ty<'tcx>,
mode: QueryMode
) -> Option<representability_adt_ty<'tcx>>
An implementation detail for the representability
query
sourcefn params_in_repr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: params_in_repr<'tcx>,
mode: QueryMode
) -> Option<params_in_repr<'tcx>>
fn params_in_repr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: params_in_repr<'tcx>,
mode: QueryMode
) -> Option<params_in_repr<'tcx>>
Set of param indexes for type params that are in the type’s representation
sourcefn thir_body(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_body<'tcx>,
mode: QueryMode
) -> Option<thir_body<'tcx>>
fn thir_body(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_body<'tcx>,
mode: QueryMode
) -> Option<thir_body<'tcx>>
Fetch the THIR for a given body. If typeck for that body failed, returns an empty Thir
.
sourcefn thir_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_tree<'tcx>,
mode: QueryMode
) -> Option<thir_tree<'tcx>>
fn thir_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_tree<'tcx>,
mode: QueryMode
) -> Option<thir_tree<'tcx>>
Create a THIR tree for debugging.
sourcefn mir_keys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_keys<'tcx>,
mode: QueryMode
) -> Option<mir_keys<'tcx>>
fn mir_keys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_keys<'tcx>,
mode: QueryMode
) -> Option<mir_keys<'tcx>>
Set of all the DefId
s in this crate that have MIR associated with
them. This includes all the body owners, but also things like struct
constructors.
sourcefn mir_const_qualif(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif<'tcx>,
mode: QueryMode
) -> Option<mir_const_qualif<'tcx>>
fn mir_const_qualif(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif<'tcx>,
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
.
sourcefn mir_const_qualif_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_const_qualif_const_arg<'tcx>>
fn mir_const_qualif_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const_qualif_const_arg<'tcx>,
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())
sourcefn mir_built(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_built<'tcx>,
mode: QueryMode
) -> Option<mir_built<'tcx>>
fn mir_built(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_built<'tcx>,
mode: QueryMode
) -> Option<mir_built<'tcx>>
Fetch the MIR for a given DefId
right after it’s built - this includes
unreachable code.
sourcefn mir_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const<'tcx>,
mode: QueryMode
) -> Option<mir_const<'tcx>>
fn mir_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_const<'tcx>,
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.
sourcefn thir_abstract_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const<'tcx>>
fn thir_abstract_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const<'tcx>>
Try to build an abstract representation of the given constant.
sourcefn thir_abstract_const_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const_of_const_arg<'tcx>>
fn thir_abstract_const_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_abstract_const_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<thir_abstract_const_of_const_arg<'tcx>>
Try to build an abstract representation of the given constant.
sourcefn mir_drops_elaborated_and_const_checked(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_drops_elaborated_and_const_checked<'tcx>,
mode: QueryMode
) -> Option<mir_drops_elaborated_and_const_checked<'tcx>>
fn mir_drops_elaborated_and_const_checked(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_drops_elaborated_and_const_checked<'tcx>,
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())
sourcefn mir_for_ctfe(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe<'tcx>,
mode: QueryMode
) -> Option<mir_for_ctfe<'tcx>>
fn mir_for_ctfe(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe<'tcx>,
mode: QueryMode
) -> Option<mir_for_ctfe<'tcx>>
[query description - consider adding a doc-comment!] caching mir of tcx.def_path_str(key)
for CTFE
sourcefn mir_for_ctfe_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_for_ctfe_of_const_arg<'tcx>>
fn mir_for_ctfe_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_for_ctfe_of_const_arg<'tcx>,
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())
sourcefn mir_promoted(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_promoted<'tcx>,
mode: QueryMode
) -> Option<mir_promoted<'tcx>>
fn mir_promoted(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_promoted<'tcx>,
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())
sourcefn symbols_for_closure_captures(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbols_for_closure_captures<'tcx>,
mode: QueryMode
) -> Option<symbols_for_closure_captures<'tcx>>
fn symbols_for_closure_captures(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbols_for_closure_captures<'tcx>,
mode: QueryMode
) -> Option<symbols_for_closure_captures<'tcx>>
[query description - consider adding a doc-comment!] finding symbols for captures of closure tcx.def_path_str(key.1.to_def_id())
in tcx.def_path_str(key.0.to_def_id())
sourcefn optimized_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: optimized_mir<'tcx>,
mode: QueryMode
) -> Option<optimized_mir<'tcx>>
fn optimized_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: optimized_mir<'tcx>,
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.
sourcefn coverageinfo(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coverageinfo<'tcx>,
mode: QueryMode
) -> Option<coverageinfo<'tcx>>
fn coverageinfo(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coverageinfo<'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).
sourcefn covered_code_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: covered_code_regions<'tcx>,
mode: QueryMode
) -> Option<covered_code_regions<'tcx>>
fn covered_code_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: covered_code_regions<'tcx>,
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.
sourcefn promoted_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir<'tcx>,
mode: QueryMode
) -> Option<promoted_mir<'tcx>>
fn promoted_mir(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir<'tcx>,
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.
sourcefn promoted_mir_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<promoted_mir_of_const_arg<'tcx>>
fn promoted_mir_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: promoted_mir_of_const_arg<'tcx>,
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())
sourcefn erase_regions_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: erase_regions_ty<'tcx>,
mode: QueryMode
) -> Option<erase_regions_ty<'tcx>>
fn erase_regions_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: erase_regions_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.
sourcefn wasm_import_module_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: wasm_import_module_map<'tcx>,
mode: QueryMode
) -> Option<wasm_import_module_map<'tcx>>
fn wasm_import_module_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: wasm_import_module_map<'tcx>,
mode: QueryMode
) -> Option<wasm_import_module_map<'tcx>>
[query description - consider adding a doc-comment!] getting wasm import module map
sourcefn predicates_defined_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_defined_on<'tcx>,
mode: QueryMode
) -> Option<predicates_defined_on<'tcx>>
fn predicates_defined_on(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: predicates_defined_on<'tcx>,
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.
sourcefn trait_explicit_predicates_and_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_explicit_predicates_and_bounds<'tcx>,
mode: QueryMode
) -> Option<trait_explicit_predicates_and_bounds<'tcx>>
fn trait_explicit_predicates_and_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_explicit_predicates_and_bounds<'tcx>,
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.
sourcefn explicit_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_predicates_of<'tcx>,
mode: QueryMode
) -> Option<explicit_predicates_of<'tcx>>
fn explicit_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: explicit_predicates_of<'tcx>,
mode: QueryMode
) -> Option<explicit_predicates_of<'tcx>>
Returns the predicates written explicitly by the user.
sourcefn inferred_outlives_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_of<'tcx>,
mode: QueryMode
) -> Option<inferred_outlives_of<'tcx>>
fn inferred_outlives_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_of<'tcx>,
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
).
sourcefn super_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_of<'tcx>,
mode: QueryMode
) -> Option<super_predicates_of<'tcx>>
fn super_predicates_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_of<'tcx>,
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).
sourcefn super_predicates_that_define_assoc_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_that_define_assoc_type<'tcx>,
mode: QueryMode
) -> Option<super_predicates_that_define_assoc_type<'tcx>>
fn super_predicates_that_define_assoc_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: super_predicates_that_define_assoc_type<'tcx>,
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
.
sourcefn type_param_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_param_predicates<'tcx>,
mode: QueryMode
) -> Option<type_param_predicates<'tcx>>
fn type_param_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_param_predicates<'tcx>,
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
.
sourcefn trait_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_def<'tcx>,
mode: QueryMode
) -> Option<trait_def<'tcx>>
fn trait_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_def<'tcx>,
mode: QueryMode
) -> Option<trait_def<'tcx>>
[query description - consider adding a doc-comment!] computing trait definition for tcx.def_path_str(key)
sourcefn adt_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_def<'tcx>,
mode: QueryMode
) -> Option<adt_def<'tcx>>
fn adt_def(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_def<'tcx>,
mode: QueryMode
) -> Option<adt_def<'tcx>>
[query description - consider adding a doc-comment!] computing ADT definition for tcx.def_path_str(key)
sourcefn adt_destructor(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_destructor<'tcx>,
mode: QueryMode
) -> Option<adt_destructor<'tcx>>
fn adt_destructor(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_destructor<'tcx>,
mode: QueryMode
) -> Option<adt_destructor<'tcx>>
[query description - consider adding a doc-comment!] computing Drop
impl for tcx.def_path_str(key)
sourcefn adt_sized_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_sized_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_sized_constraint<'tcx>>
fn adt_sized_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_sized_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_sized_constraint<'tcx>>
[query description - consider adding a doc-comment!] computing Sized
constraints for tcx.def_path_str(key)
sourcefn adt_dtorck_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_dtorck_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_dtorck_constraint<'tcx>>
fn adt_dtorck_constraint(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_dtorck_constraint<'tcx>,
mode: QueryMode
) -> Option<adt_dtorck_constraint<'tcx>>
[query description - consider adding a doc-comment!] computing drop-check constraints for tcx.def_path_str(key)
sourcefn constness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: constness<'tcx>,
mode: QueryMode
) -> Option<constness<'tcx>>
fn constness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: constness<'tcx>,
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.
sourcefn asyncness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asyncness<'tcx>,
mode: QueryMode
) -> Option<asyncness<'tcx>>
fn asyncness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asyncness<'tcx>,
mode: QueryMode
) -> Option<asyncness<'tcx>>
[query description - consider adding a doc-comment!] checking if the function is async: tcx.def_path_str(key)
sourcefn is_promotable_const_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_promotable_const_fn<'tcx>,
mode: QueryMode
) -> Option<is_promotable_const_fn<'tcx>>
fn is_promotable_const_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_promotable_const_fn<'tcx>,
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).
sourcefn is_foreign_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_foreign_item<'tcx>,
mode: QueryMode
) -> Option<is_foreign_item<'tcx>>
fn is_foreign_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_foreign_item<'tcx>,
mode: QueryMode
) -> Option<is_foreign_item<'tcx>>
Returns true
if this is a foreign item (i.e., linked via extern { ... }
).
sourcefn generator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_kind<'tcx>,
mode: QueryMode
) -> Option<generator_kind<'tcx>>
fn generator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_kind<'tcx>,
mode: QueryMode
) -> Option<generator_kind<'tcx>>
Returns Some(generator_kind)
if the node pointed to by def_id
is a generator.
sourcefn crate_variances(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_variances<'tcx>,
mode: QueryMode
) -> Option<crate_variances<'tcx>>
fn crate_variances(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_variances<'tcx>,
mode: QueryMode
) -> Option<crate_variances<'tcx>>
Gets a map with the variance of every item; use item_variance
instead.
sourcefn variances_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: variances_of<'tcx>,
mode: QueryMode
) -> Option<variances_of<'tcx>>
fn variances_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: variances_of<'tcx>,
mode: QueryMode
) -> Option<variances_of<'tcx>>
Maps from the DefId
of a type or region parameter to its (inferred) variance.
sourcefn inferred_outlives_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_crate<'tcx>,
mode: QueryMode
) -> Option<inferred_outlives_crate<'tcx>>
fn inferred_outlives_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inferred_outlives_crate<'tcx>,
mode: QueryMode
) -> Option<inferred_outlives_crate<'tcx>>
Maps from thee DefId
of a type to its (inferred) outlives.
sourcefn associated_item_def_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item_def_ids<'tcx>,
mode: QueryMode
) -> Option<associated_item_def_ids<'tcx>>
fn associated_item_def_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item_def_ids<'tcx>,
mode: QueryMode
) -> Option<associated_item_def_ids<'tcx>>
Maps from an impl/trait DefId
to a list of the DefId
s of its items.
sourcefn associated_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item<'tcx>,
mode: QueryMode
) -> Option<associated_item<'tcx>>
fn associated_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_item<'tcx>,
mode: QueryMode
) -> Option<associated_item<'tcx>>
Maps from a trait item to the trait item “descriptor”.
sourcefn associated_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_items<'tcx>,
mode: QueryMode
) -> Option<associated_items<'tcx>>
fn associated_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: associated_items<'tcx>,
mode: QueryMode
) -> Option<associated_items<'tcx>>
Collects the associated items defined on a trait or impl.
sourcefn impl_item_implementor_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_item_implementor_ids<'tcx>,
mode: QueryMode
) -> Option<impl_item_implementor_ids<'tcx>>
fn impl_item_implementor_ids(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_item_implementor_ids<'tcx>,
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 }
sourcefn impl_trait_ref(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_trait_ref<'tcx>,
mode: QueryMode
) -> Option<impl_trait_ref<'tcx>>
fn impl_trait_ref(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_trait_ref<'tcx>,
mode: QueryMode
) -> Option<impl_trait_ref<'tcx>>
Given an impl_id
, return the trait it implements.
Return None
if this is an inherent impl.
sourcefn impl_polarity(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_polarity<'tcx>,
mode: QueryMode
) -> Option<impl_polarity<'tcx>>
fn impl_polarity(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_polarity<'tcx>,
mode: QueryMode
) -> Option<impl_polarity<'tcx>>
[query description - consider adding a doc-comment!] computing implementation polarity of tcx.def_path_str(impl_id)
sourcefn issue33140_self_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: issue33140_self_ty<'tcx>,
mode: QueryMode
) -> Option<issue33140_self_ty<'tcx>>
fn issue33140_self_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: issue33140_self_ty<'tcx>,
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)
sourcefn inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inherent_impls<'tcx>,
mode: QueryMode
) -> Option<inherent_impls<'tcx>>
fn inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inherent_impls<'tcx>,
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.
sourcefn incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: incoherent_impls<'tcx>,
mode: QueryMode
) -> Option<incoherent_impls<'tcx>>
fn incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: incoherent_impls<'tcx>,
mode: QueryMode
) -> Option<incoherent_impls<'tcx>>
[query description - consider adding a doc-comment!] collecting all inherent impls for {:?}
sourcefn unsafety_check_result(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result<'tcx>,
mode: QueryMode
) -> Option<unsafety_check_result<'tcx>>
fn unsafety_check_result(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result<'tcx>,
mode: QueryMode
) -> Option<unsafety_check_result<'tcx>>
The result of unsafety-checking this LocalDefId
.
sourcefn unsafety_check_result_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result_for_const_arg<'tcx>,
mode: QueryMode
) -> Option<unsafety_check_result_for_const_arg<'tcx>>
fn unsafety_check_result_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafety_check_result_for_const_arg<'tcx>,
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())
sourcefn thir_check_unsafety(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety<'tcx>,
mode: QueryMode
) -> Option<thir_check_unsafety<'tcx>>
fn thir_check_unsafety(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety<'tcx>,
mode: QueryMode
) -> Option<thir_check_unsafety<'tcx>>
Unsafety-check this LocalDefId
with THIR unsafeck. This should be
used with -Zthir-unsafeck
.
sourcefn thir_check_unsafety_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety_for_const_arg<'tcx>,
mode: QueryMode
) -> Option<thir_check_unsafety_for_const_arg<'tcx>>
fn thir_check_unsafety_for_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: thir_check_unsafety_for_const_arg<'tcx>,
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())
sourcefn unsafe_derive_on_repr_packed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafe_derive_on_repr_packed<'tcx>,
mode: QueryMode
) -> Option<unsafe_derive_on_repr_packed<'tcx>>
fn unsafe_derive_on_repr_packed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unsafe_derive_on_repr_packed<'tcx>,
mode: QueryMode
) -> Option<unsafe_derive_on_repr_packed<'tcx>>
HACK: when evaluated, this reports an “unsafe derive on repr(packed)” error.
Unsafety checking is executed for each method separately, but we only want to emit this error once per derive. As there are some impls with multiple methods, we use a query for deduplication.
sourcefn assumed_wf_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: assumed_wf_types<'tcx>,
mode: QueryMode
) -> Option<assumed_wf_types<'tcx>>
fn assumed_wf_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: assumed_wf_types<'tcx>,
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.
sourcefn fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_sig<'tcx>,
mode: QueryMode
) -> Option<fn_sig<'tcx>>
fn fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_sig<'tcx>,
mode: QueryMode
) -> Option<fn_sig<'tcx>>
Computes the signature of the function.
sourcefn lint_mod(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_mod<'tcx>,
mode: QueryMode
) -> Option<lint_mod<'tcx>>
fn lint_mod(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lint_mod<'tcx>,
mode: QueryMode
) -> Option<lint_mod<'tcx>>
Performs lint checking for the module.
sourcefn check_mod_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_attrs<'tcx>,
mode: QueryMode
) -> Option<check_mod_attrs<'tcx>>
fn check_mod_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_attrs<'tcx>,
mode: QueryMode
) -> Option<check_mod_attrs<'tcx>>
Checks the attributes in the module.
sourcefn check_mod_unstable_api_usage(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_unstable_api_usage<'tcx>,
mode: QueryMode
) -> Option<check_mod_unstable_api_usage<'tcx>>
fn check_mod_unstable_api_usage(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_unstable_api_usage<'tcx>,
mode: QueryMode
) -> Option<check_mod_unstable_api_usage<'tcx>>
Checks for uses of unstable APIs in the module.
sourcefn check_mod_const_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_const_bodies<'tcx>,
mode: QueryMode
) -> Option<check_mod_const_bodies<'tcx>>
fn check_mod_const_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_const_bodies<'tcx>,
mode: QueryMode
) -> Option<check_mod_const_bodies<'tcx>>
Checks the const bodies in the module for illegal operations (e.g. if
or loop
).
sourcefn check_mod_loops(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_loops<'tcx>,
mode: QueryMode
) -> Option<check_mod_loops<'tcx>>
fn check_mod_loops(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_loops<'tcx>,
mode: QueryMode
) -> Option<check_mod_loops<'tcx>>
Checks the loops in the module.
sourcefn check_mod_naked_functions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_naked_functions<'tcx>,
mode: QueryMode
) -> Option<check_mod_naked_functions<'tcx>>
fn check_mod_naked_functions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_naked_functions<'tcx>,
mode: QueryMode
) -> Option<check_mod_naked_functions<'tcx>>
[query description - consider adding a doc-comment!] checking naked functions in describe_as_module(key, tcx)
sourcefn check_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<check_mod_item_types<'tcx>>
fn check_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<check_mod_item_types<'tcx>>
[query description - consider adding a doc-comment!] checking item types in describe_as_module(key, tcx)
sourcefn check_mod_privacy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_privacy<'tcx>,
mode: QueryMode
) -> Option<check_mod_privacy<'tcx>>
fn check_mod_privacy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_privacy<'tcx>,
mode: QueryMode
) -> Option<check_mod_privacy<'tcx>>
[query description - consider adding a doc-comment!] checking privacy in describe_as_module(key, tcx)
sourcefn check_liveness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_liveness<'tcx>,
mode: QueryMode
) -> Option<check_liveness<'tcx>>
fn check_liveness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_liveness<'tcx>,
mode: QueryMode
) -> Option<check_liveness<'tcx>>
[query description - consider adding a doc-comment!] checking liveness of variables in tcx.def_path_str(key)
sourcefn live_symbols_and_ignored_derived_traits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: live_symbols_and_ignored_derived_traits<'tcx>,
mode: QueryMode
) -> Option<live_symbols_and_ignored_derived_traits<'tcx>>
fn live_symbols_and_ignored_derived_traits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: live_symbols_and_ignored_derived_traits<'tcx>,
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)
sourcefn check_mod_deathness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_deathness<'tcx>,
mode: QueryMode
) -> Option<check_mod_deathness<'tcx>>
fn check_mod_deathness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_deathness<'tcx>,
mode: QueryMode
) -> Option<check_mod_deathness<'tcx>>
[query description - consider adding a doc-comment!] checking deathness of variables in describe_as_module(key, tcx)
sourcefn check_mod_impl_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_impl_wf<'tcx>,
mode: QueryMode
) -> Option<check_mod_impl_wf<'tcx>>
fn check_mod_impl_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_impl_wf<'tcx>,
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)
sourcefn check_mod_type_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_type_wf<'tcx>,
mode: QueryMode
) -> Option<check_mod_type_wf<'tcx>>
fn check_mod_type_wf(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_mod_type_wf<'tcx>,
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)
sourcefn collect_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<collect_mod_item_types<'tcx>>
fn collect_mod_item_types(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_mod_item_types<'tcx>,
mode: QueryMode
) -> Option<collect_mod_item_types<'tcx>>
[query description - consider adding a doc-comment!] collecting item types in describe_as_module(key, tcx)
sourcefn coerce_unsized_info(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coerce_unsized_info<'tcx>,
mode: QueryMode
) -> Option<coerce_unsized_info<'tcx>>
fn coerce_unsized_info(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coerce_unsized_info<'tcx>,
mode: QueryMode
) -> Option<coerce_unsized_info<'tcx>>
Caches CoerceUnsized
kinds for impls on custom types.
sourcefn typeck_item_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_item_bodies<'tcx>,
mode: QueryMode
) -> Option<typeck_item_bodies<'tcx>>
fn typeck_item_bodies(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_item_bodies<'tcx>,
mode: QueryMode
) -> Option<typeck_item_bodies<'tcx>>
[query description - consider adding a doc-comment!] type-checking all item bodies
sourcefn typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck<'tcx>,
mode: QueryMode
) -> Option<typeck<'tcx>>
fn typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck<'tcx>,
mode: QueryMode
) -> Option<typeck<'tcx>>
[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())
sourcefn typeck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_const_arg<'tcx>,
mode: QueryMode
) -> Option<typeck_const_arg<'tcx>>
fn typeck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: typeck_const_arg<'tcx>,
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())
sourcefn diagnostic_only_typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_only_typeck<'tcx>,
mode: QueryMode
) -> Option<diagnostic_only_typeck<'tcx>>
fn diagnostic_only_typeck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_only_typeck<'tcx>,
mode: QueryMode
) -> Option<diagnostic_only_typeck<'tcx>>
[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key.to_def_id())
sourcefn used_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_trait_imports<'tcx>,
mode: QueryMode
) -> Option<used_trait_imports<'tcx>>
fn used_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_trait_imports<'tcx>,
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())
sourcefn has_typeck_results(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_typeck_results<'tcx>,
mode: QueryMode
) -> Option<has_typeck_results<'tcx>>
fn has_typeck_results(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_typeck_results<'tcx>,
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
sourcefn coherent_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coherent_trait<'tcx>,
mode: QueryMode
) -> Option<coherent_trait<'tcx>>
fn coherent_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: coherent_trait<'tcx>,
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)
sourcefn mir_borrowck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck<'tcx>,
mode: QueryMode
) -> Option<mir_borrowck<'tcx>>
fn mir_borrowck(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck<'tcx>,
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.
sourcefn mir_borrowck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck_const_arg<'tcx>,
mode: QueryMode
) -> Option<mir_borrowck_const_arg<'tcx>>
fn mir_borrowck_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_borrowck_const_arg<'tcx>,
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())
sourcefn crate_inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls<'tcx>,
mode: QueryMode
) -> Option<crate_inherent_impls<'tcx>>
fn crate_inherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls<'tcx>,
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.
sourcefn crate_inherent_impls_overlap_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls_overlap_check<'tcx>,
mode: QueryMode
) -> Option<crate_inherent_impls_overlap_check<'tcx>>
fn crate_inherent_impls_overlap_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_inherent_impls_overlap_check<'tcx>,
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.
sourcefn orphan_check_impl(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: orphan_check_impl<'tcx>,
mode: QueryMode
) -> Option<orphan_check_impl<'tcx>>
fn orphan_check_impl(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: orphan_check_impl<'tcx>,
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.
sourcefn mir_callgraph_reachable(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_callgraph_reachable<'tcx>,
mode: QueryMode
) -> Option<mir_callgraph_reachable<'tcx>>
fn mir_callgraph_reachable(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_callgraph_reachable<'tcx>,
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.
sourcefn mir_inliner_callees(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_inliner_callees<'tcx>,
mode: QueryMode
) -> Option<mir_inliner_callees<'tcx>>
fn mir_inliner_callees(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_inliner_callees<'tcx>,
mode: QueryMode
) -> Option<mir_inliner_callees<'tcx>>
Obtain all the calls into other local functions
sourcefn eval_to_allocation_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_allocation_raw<'tcx>,
mode: QueryMode
) -> Option<eval_to_allocation_raw<'tcx>>
fn eval_to_allocation_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_allocation_raw<'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.
sourcefn eval_to_const_value_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_const_value_raw<'tcx>,
mode: QueryMode
) -> Option<eval_to_const_value_raw<'tcx>>
fn eval_to_const_value_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_const_value_raw<'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
.
sourcefn eval_to_valtree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_valtree<'tcx>,
mode: QueryMode
) -> Option<eval_to_valtree<'tcx>>
fn eval_to_valtree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: eval_to_valtree<'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.
sourcefn valtree_to_const_val(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: valtree_to_const_val<'tcx>,
mode: QueryMode
) -> Option<valtree_to_const_val<'tcx>>
fn valtree_to_const_val(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: valtree_to_const_val<'tcx>,
mode: QueryMode
) -> Option<valtree_to_const_val<'tcx>>
Converts a type level constant value into ConstValue
sourcefn destructure_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: destructure_const<'tcx>,
mode: QueryMode
) -> Option<destructure_const<'tcx>>
fn destructure_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: destructure_const<'tcx>,
mode: QueryMode
) -> Option<destructure_const<'tcx>>
Destructures array, ADT or tuple constants into the constants of their fields.
sourcefn try_destructure_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_destructure_mir_constant<'tcx>,
mode: QueryMode
) -> Option<try_destructure_mir_constant<'tcx>>
fn try_destructure_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_destructure_mir_constant<'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.
sourcefn deref_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deref_mir_constant<'tcx>,
mode: QueryMode
) -> Option<deref_mir_constant<'tcx>>
fn deref_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deref_mir_constant<'tcx>,
mode: QueryMode
) -> Option<deref_mir_constant<'tcx>>
Dereference a constant reference or raw pointer and turn the result into a constant again.
sourcefn const_caller_location(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_caller_location<'tcx>,
mode: QueryMode
) -> Option<const_caller_location<'tcx>>
fn const_caller_location(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: const_caller_location<'tcx>,
mode: QueryMode
) -> Option<const_caller_location<'tcx>>
[query description - consider adding a doc-comment!] getting a &core::panic::Location referring to a span
sourcefn lit_to_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_const<'tcx>,
mode: QueryMode
) -> Option<lit_to_const<'tcx>>
fn lit_to_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_const<'tcx>,
mode: QueryMode
) -> Option<lit_to_const<'tcx>>
[query description - consider adding a doc-comment!] converting literal to const
sourcefn lit_to_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_mir_constant<'tcx>,
mode: QueryMode
) -> Option<lit_to_mir_constant<'tcx>>
fn lit_to_mir_constant(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lit_to_mir_constant<'tcx>,
mode: QueryMode
) -> Option<lit_to_mir_constant<'tcx>>
[query description - consider adding a doc-comment!] converting literal to mir constant
sourcefn check_match(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_match<'tcx>,
mode: QueryMode
) -> Option<check_match<'tcx>>
fn check_match(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_match<'tcx>,
mode: QueryMode
) -> Option<check_match<'tcx>>
[query description - consider adding a doc-comment!] match-checking tcx.def_path_str(key)
sourcefn effective_visibilities(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: effective_visibilities<'tcx>,
mode: QueryMode
) -> Option<effective_visibilities<'tcx>>
fn effective_visibilities(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: effective_visibilities<'tcx>,
mode: QueryMode
) -> Option<effective_visibilities<'tcx>>
Performs part of the privacy check and computes effective visibilities.
sourcefn check_private_in_public(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_private_in_public<'tcx>,
mode: QueryMode
) -> Option<check_private_in_public<'tcx>>
fn check_private_in_public(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_private_in_public<'tcx>,
mode: QueryMode
) -> Option<check_private_in_public<'tcx>>
[query description - consider adding a doc-comment!] checking for private elements in public interfaces
sourcefn reachable_set(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_set<'tcx>,
mode: QueryMode
) -> Option<reachable_set<'tcx>>
fn reachable_set(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_set<'tcx>,
mode: QueryMode
) -> Option<reachable_set<'tcx>>
[query description - consider adding a doc-comment!] reachability
sourcefn region_scope_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: region_scope_tree<'tcx>,
mode: QueryMode
) -> Option<region_scope_tree<'tcx>>
fn region_scope_tree(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: region_scope_tree<'tcx>,
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.
sourcefn mir_shims(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_shims<'tcx>,
mode: QueryMode
) -> Option<mir_shims<'tcx>>
fn mir_shims(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: mir_shims<'tcx>,
mode: QueryMode
) -> Option<mir_shims<'tcx>>
Generates a MIR body for the shim.
sourcefn symbol_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_name<'tcx>,
mode: QueryMode
) -> Option<symbol_name<'tcx>>
fn symbol_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_name<'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.
sourcefn opt_def_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_def_kind<'tcx>,
mode: QueryMode
) -> Option<opt_def_kind<'tcx>>
fn opt_def_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: opt_def_kind<'tcx>,
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)
sourcefn def_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_span<'tcx>,
mode: QueryMode
) -> Option<def_span<'tcx>>
fn def_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_span<'tcx>,
mode: QueryMode
) -> Option<def_span<'tcx>>
Gets the span for the definition.
sourcefn def_ident_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_ident_span<'tcx>,
mode: QueryMode
) -> Option<def_ident_span<'tcx>>
fn def_ident_span(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: def_ident_span<'tcx>,
mode: QueryMode
) -> Option<def_ident_span<'tcx>>
Gets the span for the identifier of the definition.
sourcefn lookup_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_stability<'tcx>>
fn lookup_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_stability<'tcx>>
[query description - consider adding a doc-comment!] looking up stability of tcx.def_path_str(def_id)
sourcefn lookup_const_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_const_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_const_stability<'tcx>>
fn lookup_const_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_const_stability<'tcx>,
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)
sourcefn lookup_default_body_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_default_body_stability<'tcx>,
mode: QueryMode
) -> Option<lookup_default_body_stability<'tcx>>
fn lookup_default_body_stability(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_default_body_stability<'tcx>,
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)
sourcefn should_inherit_track_caller(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: should_inherit_track_caller<'tcx>,
mode: QueryMode
) -> Option<should_inherit_track_caller<'tcx>>
fn should_inherit_track_caller(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: should_inherit_track_caller<'tcx>,
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)
sourcefn lookup_deprecation_entry(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_deprecation_entry<'tcx>,
mode: QueryMode
) -> Option<lookup_deprecation_entry<'tcx>>
fn lookup_deprecation_entry(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lookup_deprecation_entry<'tcx>,
mode: QueryMode
) -> Option<lookup_deprecation_entry<'tcx>>
[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id)
is deprecated
Determines whether an item is annotated with doc(hidden)
.
sourcefn is_doc_notable_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_doc_notable_trait<'tcx>,
mode: QueryMode
) -> Option<is_doc_notable_trait<'tcx>>
fn is_doc_notable_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_doc_notable_trait<'tcx>,
mode: QueryMode
) -> Option<is_doc_notable_trait<'tcx>>
Determines whether an item is annotated with doc(notable_trait)
.
sourcefn item_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_attrs<'tcx>,
mode: QueryMode
) -> Option<item_attrs<'tcx>>
fn item_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: item_attrs<'tcx>,
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.
sourcefn codegen_fn_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_fn_attrs<'tcx>,
mode: QueryMode
) -> Option<codegen_fn_attrs<'tcx>>
fn codegen_fn_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_fn_attrs<'tcx>,
mode: QueryMode
) -> Option<codegen_fn_attrs<'tcx>>
[query description - consider adding a doc-comment!] computing codegen attributes of tcx.def_path_str(def_id)
sourcefn asm_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asm_target_features<'tcx>,
mode: QueryMode
) -> Option<asm_target_features<'tcx>>
fn asm_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: asm_target_features<'tcx>,
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)
sourcefn fn_arg_names(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_arg_names<'tcx>,
mode: QueryMode
) -> Option<fn_arg_names<'tcx>>
fn fn_arg_names(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_arg_names<'tcx>,
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)
sourcefn rendered_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: rendered_const<'tcx>,
mode: QueryMode
) -> Option<rendered_const<'tcx>>
fn rendered_const(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: rendered_const<'tcx>,
mode: QueryMode
) -> Option<rendered_const<'tcx>>
Gets the rendered value of the specified constant or associated constant. Used by rustdoc.
sourcefn impl_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_parent<'tcx>,
mode: QueryMode
) -> Option<impl_parent<'tcx>>
fn impl_parent(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_parent<'tcx>,
mode: QueryMode
) -> Option<impl_parent<'tcx>>
[query description - consider adding a doc-comment!] computing specialization parent impl of tcx.def_path_str(def_id)
sourcefn is_ctfe_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_ctfe_mir_available<'tcx>,
mode: QueryMode
) -> Option<is_ctfe_mir_available<'tcx>>
fn is_ctfe_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_ctfe_mir_available<'tcx>,
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)
sourcefn is_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_mir_available<'tcx>,
mode: QueryMode
) -> Option<is_mir_available<'tcx>>
fn is_mir_available(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_mir_available<'tcx>,
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)
sourcefn own_existential_vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: own_existential_vtable_entries<'tcx>,
mode: QueryMode
) -> Option<own_existential_vtable_entries<'tcx>>
fn own_existential_vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: own_existential_vtable_entries<'tcx>,
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)
sourcefn vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_entries<'tcx>,
mode: QueryMode
) -> Option<vtable_entries<'tcx>>
fn vtable_entries(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_entries<'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())
sourcefn vtable_trait_upcasting_coercion_new_vptr_slot(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>,
mode: QueryMode
) -> Option<vtable_trait_upcasting_coercion_new_vptr_slot<'tcx>>
fn vtable_trait_upcasting_coercion_new_vptr_slot(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_trait_upcasting_coercion_new_vptr_slot<'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
sourcefn vtable_allocation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_allocation<'tcx>,
mode: QueryMode
) -> Option<vtable_allocation<'tcx>>
fn vtable_allocation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: vtable_allocation<'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())
>
sourcefn codegen_select_candidate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_select_candidate<'tcx>,
mode: QueryMode
) -> Option<codegen_select_candidate<'tcx>>
fn codegen_select_candidate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_select_candidate<'tcx>,
mode: QueryMode
) -> Option<codegen_select_candidate<'tcx>>
[query description - consider adding a doc-comment!] computing candidate for key.1
sourcefn all_local_trait_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_local_trait_impls<'tcx>,
mode: QueryMode
) -> Option<all_local_trait_impls<'tcx>>
fn all_local_trait_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_local_trait_impls<'tcx>,
mode: QueryMode
) -> Option<all_local_trait_impls<'tcx>>
Return all impl
blocks in the current crate.
sourcefn trait_impls_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_impls_of<'tcx>,
mode: QueryMode
) -> Option<trait_impls_of<'tcx>>
fn trait_impls_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trait_impls_of<'tcx>,
mode: QueryMode
) -> Option<trait_impls_of<'tcx>>
Given a trait trait_id
, return all known impl
blocks.
sourcefn specialization_graph_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specialization_graph_of<'tcx>,
mode: QueryMode
) -> Option<specialization_graph_of<'tcx>>
fn specialization_graph_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specialization_graph_of<'tcx>,
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)
sourcefn object_safety_violations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_safety_violations<'tcx>,
mode: QueryMode
) -> Option<object_safety_violations<'tcx>>
fn object_safety_violations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_safety_violations<'tcx>,
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)
sourcefn param_env(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env<'tcx>,
mode: QueryMode
) -> Option<param_env<'tcx>>
fn param_env(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env<'tcx>,
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.
sourcefn param_env_reveal_all_normalized(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env_reveal_all_normalized<'tcx>,
mode: QueryMode
) -> Option<param_env_reveal_all_normalized<'tcx>>
fn param_env_reveal_all_normalized(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: param_env_reveal_all_normalized<'tcx>,
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.
sourcefn is_copy_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_copy_raw<'tcx>,
mode: QueryMode
) -> Option<is_copy_raw<'tcx>>
fn is_copy_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_copy_raw<'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.
sourcefn is_sized_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_sized_raw<'tcx>,
mode: QueryMode
) -> Option<is_sized_raw<'tcx>>
fn is_sized_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_sized_raw<'tcx>,
mode: QueryMode
) -> Option<is_sized_raw<'tcx>>
Query backing Ty::is_sized
.
sourcefn is_freeze_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_freeze_raw<'tcx>,
mode: QueryMode
) -> Option<is_freeze_raw<'tcx>>
fn is_freeze_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_freeze_raw<'tcx>,
mode: QueryMode
) -> Option<is_freeze_raw<'tcx>>
Query backing Ty::is_freeze
.
sourcefn is_unpin_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unpin_raw<'tcx>,
mode: QueryMode
) -> Option<is_unpin_raw<'tcx>>
fn is_unpin_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unpin_raw<'tcx>,
mode: QueryMode
) -> Option<is_unpin_raw<'tcx>>
Query backing Ty::is_unpin
.
sourcefn needs_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: needs_drop_raw<'tcx>,
mode: QueryMode
) -> Option<needs_drop_raw<'tcx>>
fn needs_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: needs_drop_raw<'tcx>,
mode: QueryMode
) -> Option<needs_drop_raw<'tcx>>
Query backing Ty::needs_drop
.
sourcefn has_significant_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_significant_drop_raw<'tcx>,
mode: QueryMode
) -> Option<has_significant_drop_raw<'tcx>>
fn has_significant_drop_raw(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_significant_drop_raw<'tcx>,
mode: QueryMode
) -> Option<has_significant_drop_raw<'tcx>>
Query backing Ty::has_significant_drop_raw
.
sourcefn has_structural_eq_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_structural_eq_impls<'tcx>,
mode: QueryMode
) -> Option<has_structural_eq_impls<'tcx>>
fn has_structural_eq_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_structural_eq_impls<'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.
sourcefn adt_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_drop_tys<'tcx>,
mode: QueryMode
) -> Option<adt_drop_tys<'tcx>>
fn adt_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_drop_tys<'tcx>,
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.
sourcefn adt_significant_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_significant_drop_tys<'tcx>,
mode: QueryMode
) -> Option<adt_significant_drop_tys<'tcx>>
fn adt_significant_drop_tys(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: adt_significant_drop_tys<'tcx>,
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.
sourcefn layout_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: layout_of<'tcx>,
mode: QueryMode
) -> Option<layout_of<'tcx>>
fn layout_of(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: layout_of<'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.
sourcefn fn_abi_of_fn_ptr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_fn_ptr<'tcx>,
mode: QueryMode
) -> Option<fn_abi_of_fn_ptr<'tcx>>
fn fn_abi_of_fn_ptr(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_fn_ptr<'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
.
sourcefn fn_abi_of_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_instance<'tcx>,
mode: QueryMode
) -> Option<fn_abi_of_instance<'tcx>>
fn fn_abi_of_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: fn_abi_of_instance<'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
).
sourcefn dylib_dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dylib_dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dylib_dependency_formats<'tcx>>
fn dylib_dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dylib_dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dylib_dependency_formats<'tcx>>
[query description - consider adding a doc-comment!] getting dylib dependency formats of crate
sourcefn dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dependency_formats<'tcx>>
fn dependency_formats(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dependency_formats<'tcx>,
mode: QueryMode
) -> Option<dependency_formats<'tcx>>
[query description - consider adding a doc-comment!] getting the linkage format of all dependencies
sourcefn is_compiler_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_compiler_builtins<'tcx>,
mode: QueryMode
) -> Option<is_compiler_builtins<'tcx>>
fn is_compiler_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_compiler_builtins<'tcx>,
mode: QueryMode
) -> Option<is_compiler_builtins<'tcx>>
[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins
sourcefn has_global_allocator(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_global_allocator<'tcx>,
mode: QueryMode
) -> Option<has_global_allocator<'tcx>>
fn has_global_allocator(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_global_allocator<'tcx>,
mode: QueryMode
) -> Option<has_global_allocator<'tcx>>
[query description - consider adding a doc-comment!] checking if the crate has_global_allocator
sourcefn has_alloc_error_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_alloc_error_handler<'tcx>,
mode: QueryMode
) -> Option<has_alloc_error_handler<'tcx>>
fn has_alloc_error_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_alloc_error_handler<'tcx>,
mode: QueryMode
) -> Option<has_alloc_error_handler<'tcx>>
[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler
sourcefn has_panic_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_panic_handler<'tcx>,
mode: QueryMode
) -> Option<has_panic_handler<'tcx>>
fn has_panic_handler(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_panic_handler<'tcx>,
mode: QueryMode
) -> Option<has_panic_handler<'tcx>>
[query description - consider adding a doc-comment!] checking if the crate has_panic_handler
sourcefn is_profiler_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_profiler_runtime<'tcx>,
mode: QueryMode
) -> Option<is_profiler_runtime<'tcx>>
fn is_profiler_runtime(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_profiler_runtime<'tcx>,
mode: QueryMode
) -> Option<is_profiler_runtime<'tcx>>
[query description - consider adding a doc-comment!] checking if a crate is #![profiler_runtime]
sourcefn has_ffi_unwind_calls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_ffi_unwind_calls<'tcx>,
mode: QueryMode
) -> Option<has_ffi_unwind_calls<'tcx>>
fn has_ffi_unwind_calls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: has_ffi_unwind_calls<'tcx>,
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
sourcefn required_panic_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: required_panic_strategy<'tcx>,
mode: QueryMode
) -> Option<required_panic_strategy<'tcx>>
fn required_panic_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: required_panic_strategy<'tcx>,
mode: QueryMode
) -> Option<required_panic_strategy<'tcx>>
[query description - consider adding a doc-comment!] getting a crate’s required panic strategy
sourcefn panic_in_drop_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: panic_in_drop_strategy<'tcx>,
mode: QueryMode
) -> Option<panic_in_drop_strategy<'tcx>>
fn panic_in_drop_strategy(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: panic_in_drop_strategy<'tcx>,
mode: QueryMode
) -> Option<panic_in_drop_strategy<'tcx>>
[query description - consider adding a doc-comment!] getting a crate’s configured panic-in-drop strategy
sourcefn is_no_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_no_builtins<'tcx>,
mode: QueryMode
) -> Option<is_no_builtins<'tcx>>
fn is_no_builtins(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_no_builtins<'tcx>,
mode: QueryMode
) -> Option<is_no_builtins<'tcx>>
[query description - consider adding a doc-comment!] getting whether a crate has #![no_builtins]
sourcefn symbol_mangling_version(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_mangling_version<'tcx>,
mode: QueryMode
) -> Option<symbol_mangling_version<'tcx>>
fn symbol_mangling_version(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: symbol_mangling_version<'tcx>,
mode: QueryMode
) -> Option<symbol_mangling_version<'tcx>>
[query description - consider adding a doc-comment!] getting a crate’s symbol mangling version
sourcefn extern_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_crate<'tcx>,
mode: QueryMode
) -> Option<extern_crate<'tcx>>
fn extern_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_crate<'tcx>,
mode: QueryMode
) -> Option<extern_crate<'tcx>>
[query description - consider adding a doc-comment!] getting crate’s ExternCrateData
sourcefn specializes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specializes<'tcx>,
mode: QueryMode
) -> Option<specializes<'tcx>>
fn specializes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: specializes<'tcx>,
mode: QueryMode
) -> Option<specializes<'tcx>>
[query description - consider adding a doc-comment!] computing whether impls specialize one another
sourcefn in_scope_traits_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: in_scope_traits_map<'tcx>,
mode: QueryMode
) -> Option<in_scope_traits_map<'tcx>>
fn in_scope_traits_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: in_scope_traits_map<'tcx>,
mode: QueryMode
) -> Option<in_scope_traits_map<'tcx>>
[query description - consider adding a doc-comment!] getting traits in scope at a block
sourcefn module_reexports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_reexports<'tcx>,
mode: QueryMode
) -> Option<module_reexports<'tcx>>
fn module_reexports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_reexports<'tcx>,
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())
sourcefn impl_defaultness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_defaultness<'tcx>,
mode: QueryMode
) -> Option<impl_defaultness<'tcx>>
fn impl_defaultness(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: impl_defaultness<'tcx>,
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
sourcefn check_well_formed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_well_formed<'tcx>,
mode: QueryMode
) -> Option<check_well_formed<'tcx>>
fn check_well_formed(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: check_well_formed<'tcx>,
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
sourcefn reachable_non_generics(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_non_generics<'tcx>,
mode: QueryMode
) -> Option<reachable_non_generics<'tcx>>
fn reachable_non_generics(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reachable_non_generics<'tcx>,
mode: QueryMode
) -> Option<reachable_non_generics<'tcx>>
[query description - consider adding a doc-comment!] looking up the exported symbols of a crate
sourcefn is_reachable_non_generic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_reachable_non_generic<'tcx>,
mode: QueryMode
) -> Option<is_reachable_non_generic<'tcx>>
fn is_reachable_non_generic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_reachable_non_generic<'tcx>,
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
sourcefn is_unreachable_local_definition(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unreachable_local_definition<'tcx>,
mode: QueryMode
) -> Option<is_unreachable_local_definition<'tcx>>
fn is_unreachable_local_definition(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_unreachable_local_definition<'tcx>,
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
sourcefn upstream_monomorphizations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations<'tcx>,
mode: QueryMode
) -> Option<upstream_monomorphizations<'tcx>>
fn upstream_monomorphizations(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations<'tcx>,
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()
.
sourcefn upstream_monomorphizations_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations_for<'tcx>,
mode: QueryMode
) -> Option<upstream_monomorphizations_for<'tcx>>
fn upstream_monomorphizations_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_monomorphizations_for<'tcx>,
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.
sourcefn upstream_drop_glue_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_drop_glue_for<'tcx>,
mode: QueryMode
) -> Option<upstream_drop_glue_for<'tcx>>
fn upstream_drop_glue_for(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upstream_drop_glue_for<'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).
sourcefn foreign_modules(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: foreign_modules<'tcx>,
mode: QueryMode
) -> Option<foreign_modules<'tcx>>
fn foreign_modules(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: foreign_modules<'tcx>,
mode: QueryMode
) -> Option<foreign_modules<'tcx>>
Returns a list of all extern
blocks of a crate.
sourcefn entry_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: entry_fn<'tcx>,
mode: QueryMode
) -> Option<entry_fn<'tcx>>
fn entry_fn(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: entry_fn<'tcx>,
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).
sourcefn proc_macro_decls_static(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: proc_macro_decls_static<'tcx>,
mode: QueryMode
) -> Option<proc_macro_decls_static<'tcx>>
fn proc_macro_decls_static(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: proc_macro_decls_static<'tcx>,
mode: QueryMode
) -> Option<proc_macro_decls_static<'tcx>>
Finds the rustc_proc_macro_decls
item of a crate.
sourcefn crate_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_hash<'tcx>,
mode: QueryMode
) -> Option<crate_hash<'tcx>>
fn crate_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_hash<'tcx>,
mode: QueryMode
) -> Option<crate_hash<'tcx>>
[query description - consider adding a doc-comment!] looking up the hash a crate
sourcefn crate_host_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_host_hash<'tcx>,
mode: QueryMode
) -> Option<crate_host_hash<'tcx>>
fn crate_host_hash(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_host_hash<'tcx>,
mode: QueryMode
) -> Option<crate_host_hash<'tcx>>
Gets the hash for the host proc macro. Used to support -Z dual-proc-macro.
sourcefn extra_filename(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extra_filename<'tcx>,
mode: QueryMode
) -> Option<extra_filename<'tcx>>
fn extra_filename(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extra_filename<'tcx>,
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.
sourcefn crate_extern_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_extern_paths<'tcx>,
mode: QueryMode
) -> Option<crate_extern_paths<'tcx>>
fn crate_extern_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_extern_paths<'tcx>,
mode: QueryMode
) -> Option<crate_extern_paths<'tcx>>
Gets the paths where the crate came from in the file system.
sourcefn implementations_of_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implementations_of_trait<'tcx>,
mode: QueryMode
) -> Option<implementations_of_trait<'tcx>>
fn implementations_of_trait(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implementations_of_trait<'tcx>,
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)
.
sourcefn crate_incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_incoherent_impls<'tcx>,
mode: QueryMode
) -> Option<crate_incoherent_impls<'tcx>>
fn crate_incoherent_impls(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_incoherent_impls<'tcx>,
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.
sourcefn native_library(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_library<'tcx>,
mode: QueryMode
) -> Option<native_library<'tcx>>
fn native_library(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: native_library<'tcx>,
mode: QueryMode
) -> Option<native_library<'tcx>>
Get the corresponding native library from the native_libraries
query
sourcefn resolve_lifetimes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_lifetimes<'tcx>,
mode: QueryMode
) -> Option<resolve_lifetimes<'tcx>>
fn resolve_lifetimes(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_lifetimes<'tcx>,
mode: QueryMode
) -> Option<resolve_lifetimes<'tcx>>
Does lifetime resolution on items. Importantly, we can’t resolve lifetimes directly on things like trait methods, because of trait params. See `rustc_resolve::late::lifetimes for details.
sourcefn named_region_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: named_region_map<'tcx>,
mode: QueryMode
) -> Option<named_region_map<'tcx>>
fn named_region_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: named_region_map<'tcx>,
mode: QueryMode
) -> Option<named_region_map<'tcx>>
[query description - consider adding a doc-comment!] looking up a named region
sourcefn is_late_bound_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_late_bound_map<'tcx>,
mode: QueryMode
) -> Option<is_late_bound_map<'tcx>>
fn is_late_bound_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_late_bound_map<'tcx>,
mode: QueryMode
) -> Option<is_late_bound_map<'tcx>>
[query description - consider adding a doc-comment!] testing if a region is late bound
sourcefn object_lifetime_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_lifetime_default<'tcx>,
mode: QueryMode
) -> Option<object_lifetime_default<'tcx>>
fn object_lifetime_default(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: object_lifetime_default<'tcx>,
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.
sourcefn late_bound_vars_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: late_bound_vars_map<'tcx>,
mode: QueryMode
) -> Option<late_bound_vars_map<'tcx>>
fn late_bound_vars_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: late_bound_vars_map<'tcx>,
mode: QueryMode
) -> Option<late_bound_vars_map<'tcx>>
[query description - consider adding a doc-comment!] looking up late bound vars
sourcefn visibility(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visibility<'tcx>,
mode: QueryMode
) -> Option<visibility<'tcx>>
fn visibility(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visibility<'tcx>,
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.
sourcefn inhabited_predicate_adt(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_adt<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_adt<'tcx>>
fn inhabited_predicate_adt(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_adt<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_adt<'tcx>>
[query description - consider adding a doc-comment!] computing the uninhabited predicate of {:?}
sourcefn inhabited_predicate_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_type<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_type<'tcx>>
fn inhabited_predicate_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: inhabited_predicate_type<'tcx>,
mode: QueryMode
) -> Option<inhabited_predicate_type<'tcx>>
Do not call this query directly: invoke Ty::inhabited_predicate
instead.
sourcefn dep_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dep_kind<'tcx>,
mode: QueryMode
) -> Option<dep_kind<'tcx>>
fn dep_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dep_kind<'tcx>,
mode: QueryMode
) -> Option<dep_kind<'tcx>>
[query description - consider adding a doc-comment!] fetching what a dependency looks like
sourcefn crate_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_name<'tcx>,
mode: QueryMode
) -> Option<crate_name<'tcx>>
fn crate_name(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crate_name<'tcx>,
mode: QueryMode
) -> Option<crate_name<'tcx>>
Gets the name of the crate.
sourcefn module_children(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_children<'tcx>,
mode: QueryMode
) -> Option<module_children<'tcx>>
fn module_children(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: module_children<'tcx>,
mode: QueryMode
) -> Option<module_children<'tcx>>
[query description - consider adding a doc-comment!] collecting child items of module tcx.def_path_str(def_id)
sourcefn extern_mod_stmt_cnum(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_mod_stmt_cnum<'tcx>,
mode: QueryMode
) -> Option<extern_mod_stmt_cnum<'tcx>>
fn extern_mod_stmt_cnum(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: extern_mod_stmt_cnum<'tcx>,
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())
sourcefn lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lib_features<'tcx>,
mode: QueryMode
) -> Option<lib_features<'tcx>>
fn lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: lib_features<'tcx>,
mode: QueryMode
) -> Option<lib_features<'tcx>>
[query description - consider adding a doc-comment!] calculating the lib features map
sourcefn defined_lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lib_features<'tcx>,
mode: QueryMode
) -> Option<defined_lib_features<'tcx>>
fn defined_lib_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lib_features<'tcx>,
mode: QueryMode
) -> Option<defined_lib_features<'tcx>>
[query description - consider adding a doc-comment!] calculating the lib features defined in a crate
sourcefn stability_implications(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_implications<'tcx>,
mode: QueryMode
) -> Option<stability_implications<'tcx>>
fn stability_implications(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_implications<'tcx>,
mode: QueryMode
) -> Option<stability_implications<'tcx>>
[query description - consider adding a doc-comment!] calculating the implications between #[unstable]
features defined in a crate
sourcefn is_intrinsic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_intrinsic<'tcx>,
mode: QueryMode
) -> Option<is_intrinsic<'tcx>>
fn is_intrinsic(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_intrinsic<'tcx>,
mode: QueryMode
) -> Option<is_intrinsic<'tcx>>
Whether the function is an intrinsic
sourcefn get_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: get_lang_items<'tcx>,
mode: QueryMode
) -> Option<get_lang_items<'tcx>>
fn get_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: get_lang_items<'tcx>,
mode: QueryMode
) -> Option<get_lang_items<'tcx>>
Returns the lang items defined in another crate by loading it from metadata.
sourcefn all_diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<all_diagnostic_items<'tcx>>
fn all_diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: all_diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<all_diagnostic_items<'tcx>>
Returns all diagnostic items defined in all crates.
sourcefn defined_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lang_items<'tcx>,
mode: QueryMode
) -> Option<defined_lang_items<'tcx>>
fn defined_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: defined_lang_items<'tcx>,
mode: QueryMode
) -> Option<defined_lang_items<'tcx>>
Returns the lang items defined in another crate by loading it from metadata.
sourcefn diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<diagnostic_items<'tcx>>
fn diagnostic_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_items<'tcx>,
mode: QueryMode
) -> Option<diagnostic_items<'tcx>>
Returns the diagnostic items defined in a crate.
sourcefn missing_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_lang_items<'tcx>,
mode: QueryMode
) -> Option<missing_lang_items<'tcx>>
fn missing_lang_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_lang_items<'tcx>,
mode: QueryMode
) -> Option<missing_lang_items<'tcx>>
[query description - consider adding a doc-comment!] calculating the missing lang items in a crate
sourcefn visible_parent_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visible_parent_map<'tcx>,
mode: QueryMode
) -> Option<visible_parent_map<'tcx>>
fn visible_parent_map(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: visible_parent_map<'tcx>,
mode: QueryMode
) -> Option<visible_parent_map<'tcx>>
[query description - consider adding a doc-comment!] calculating the visible parent map
sourcefn trimmed_def_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trimmed_def_paths<'tcx>,
mode: QueryMode
) -> Option<trimmed_def_paths<'tcx>>
fn trimmed_def_paths(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: trimmed_def_paths<'tcx>,
mode: QueryMode
) -> Option<trimmed_def_paths<'tcx>>
[query description - consider adding a doc-comment!] calculating trimmed def paths
sourcefn missing_extern_crate_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_extern_crate_item<'tcx>,
mode: QueryMode
) -> Option<missing_extern_crate_item<'tcx>>
fn missing_extern_crate_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: missing_extern_crate_item<'tcx>,
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
sourcefn used_crate_source(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_crate_source<'tcx>,
mode: QueryMode
) -> Option<used_crate_source<'tcx>>
fn used_crate_source(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: used_crate_source<'tcx>,
mode: QueryMode
) -> Option<used_crate_source<'tcx>>
[query description - consider adding a doc-comment!] looking at the source for a crate
sourcefn debugger_visualizers(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: debugger_visualizers<'tcx>,
mode: QueryMode
) -> Option<debugger_visualizers<'tcx>>
fn debugger_visualizers(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: debugger_visualizers<'tcx>,
mode: QueryMode
) -> Option<debugger_visualizers<'tcx>>
Returns the debugger visualizers defined for this crate.
sourcefn postorder_cnums(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: postorder_cnums<'tcx>,
mode: QueryMode
) -> Option<postorder_cnums<'tcx>>
fn postorder_cnums(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: postorder_cnums<'tcx>,
mode: QueryMode
) -> Option<postorder_cnums<'tcx>>
[query description - consider adding a doc-comment!] generating a postorder list of CrateNums
sourcefn is_private_dep(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_private_dep<'tcx>,
mode: QueryMode
) -> Option<is_private_dep<'tcx>>
fn is_private_dep(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_private_dep<'tcx>,
mode: QueryMode
) -> Option<is_private_dep<'tcx>>
Returns whether or not the crate with CrateNum ‘cnum’ is marked as a private dependency
sourcefn allocator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: allocator_kind<'tcx>,
mode: QueryMode
) -> Option<allocator_kind<'tcx>>
fn allocator_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: allocator_kind<'tcx>,
mode: QueryMode
) -> Option<allocator_kind<'tcx>>
[query description - consider adding a doc-comment!] getting the allocator kind for the current crate
sourcefn alloc_error_handler_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: alloc_error_handler_kind<'tcx>,
mode: QueryMode
) -> Option<alloc_error_handler_kind<'tcx>>
fn alloc_error_handler_kind(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: alloc_error_handler_kind<'tcx>,
mode: QueryMode
) -> Option<alloc_error_handler_kind<'tcx>>
[query description - consider adding a doc-comment!] alloc error handler kind for the current crate
sourcefn upvars_mentioned(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upvars_mentioned<'tcx>,
mode: QueryMode
) -> Option<upvars_mentioned<'tcx>>
fn upvars_mentioned(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: upvars_mentioned<'tcx>,
mode: QueryMode
) -> Option<upvars_mentioned<'tcx>>
[query description - consider adding a doc-comment!] collecting upvars mentioned in tcx.def_path_str(def_id)
sourcefn maybe_unused_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_trait_imports<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_trait_imports<'tcx>>
fn maybe_unused_trait_imports(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_trait_imports<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_trait_imports<'tcx>>
[query description - consider adding a doc-comment!] fetching potentially unused trait imports
sourcefn maybe_unused_extern_crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_extern_crates<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_extern_crates<'tcx>>
fn maybe_unused_extern_crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: maybe_unused_extern_crates<'tcx>,
mode: QueryMode
) -> Option<maybe_unused_extern_crates<'tcx>>
[query description - consider adding a doc-comment!] looking up all possibly unused extern crates
sourcefn names_imported_by_glob_use(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: names_imported_by_glob_use<'tcx>,
mode: QueryMode
) -> Option<names_imported_by_glob_use<'tcx>>
fn names_imported_by_glob_use(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: names_imported_by_glob_use<'tcx>,
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())
sourcefn stability_index(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_index<'tcx>,
mode: QueryMode
) -> Option<stability_index<'tcx>>
fn stability_index(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: stability_index<'tcx>,
mode: QueryMode
) -> Option<stability_index<'tcx>>
[query description - consider adding a doc-comment!] calculating the stability index for the local crate
sourcefn crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crates<'tcx>,
mode: QueryMode
) -> Option<crates<'tcx>>
fn crates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: crates<'tcx>,
mode: QueryMode
) -> Option<crates<'tcx>>
[query description - consider adding a doc-comment!] fetching all foreign CrateNum instances
sourcefn traits_in_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: traits_in_crate<'tcx>,
mode: QueryMode
) -> Option<traits_in_crate<'tcx>>
fn traits_in_crate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: traits_in_crate<'tcx>,
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.
sourcefn exported_symbols(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: exported_symbols<'tcx>,
mode: QueryMode
) -> Option<exported_symbols<'tcx>>
fn exported_symbols(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: exported_symbols<'tcx>,
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 incnum
machine code. - The
exported_symbols
sets of different crates do not intersect.
sourcefn collect_and_partition_mono_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_and_partition_mono_items<'tcx>,
mode: QueryMode
) -> Option<collect_and_partition_mono_items<'tcx>>
fn collect_and_partition_mono_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: collect_and_partition_mono_items<'tcx>,
mode: QueryMode
) -> Option<collect_and_partition_mono_items<'tcx>>
[query description - consider adding a doc-comment!] collect_and_partition_mono_items
sourcefn is_codegened_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_codegened_item<'tcx>,
mode: QueryMode
) -> Option<is_codegened_item<'tcx>>
fn is_codegened_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_codegened_item<'tcx>,
mode: QueryMode
) -> Option<is_codegened_item<'tcx>>
[query description - consider adding a doc-comment!] determining whether tcx.def_path_str(def_id)
needs codegen
sourcefn codegened_and_inlined_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegened_and_inlined_items<'tcx>,
mode: QueryMode
) -> Option<codegened_and_inlined_items<'tcx>>
fn codegened_and_inlined_items(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegened_and_inlined_items<'tcx>,
mode: QueryMode
) -> Option<codegened_and_inlined_items<'tcx>>
All items participating in code generation together with items inlined into them.
sourcefn codegen_unit(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_unit<'tcx>,
mode: QueryMode
) -> Option<codegen_unit<'tcx>>
fn codegen_unit(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: codegen_unit<'tcx>,
mode: QueryMode
) -> Option<codegen_unit<'tcx>>
[query description - consider adding a doc-comment!] getting codegen unit {sym}
sourcefn unused_generic_params(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unused_generic_params<'tcx>,
mode: QueryMode
) -> Option<unused_generic_params<'tcx>>
fn unused_generic_params(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: unused_generic_params<'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())
sourcefn backend_optimization_level(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: backend_optimization_level<'tcx>,
mode: QueryMode
) -> Option<backend_optimization_level<'tcx>>
fn backend_optimization_level(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: backend_optimization_level<'tcx>,
mode: QueryMode
) -> Option<backend_optimization_level<'tcx>>
[query description - consider adding a doc-comment!] optimization level used by backend
sourcefn output_filenames(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: output_filenames<'tcx>,
mode: QueryMode
) -> Option<output_filenames<'tcx>>
fn output_filenames(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: output_filenames<'tcx>,
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.
sourcefn normalize_projection_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: normalize_projection_ty<'tcx>,
mode: QueryMode
) -> Option<normalize_projection_ty<'tcx>>
fn normalize_projection_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: normalize_projection_ty<'tcx>,
mode: QueryMode
) -> Option<normalize_projection_ty<'tcx>>
Do not call this query directly: invoke normalize
instead.
sourcefn try_normalize_generic_arg_after_erasing_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_normalize_generic_arg_after_erasing_regions<'tcx>,
mode: QueryMode
) -> Option<try_normalize_generic_arg_after_erasing_regions<'tcx>>
fn try_normalize_generic_arg_after_erasing_regions(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: try_normalize_generic_arg_after_erasing_regions<'tcx>,
mode: QueryMode
) -> Option<try_normalize_generic_arg_after_erasing_regions<'tcx>>
Do not call this query directly: invoke try_normalize_erasing_regions
instead.
sourcefn implied_outlives_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implied_outlives_bounds<'tcx>,
mode: QueryMode
) -> Option<implied_outlives_bounds<'tcx>>
fn implied_outlives_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: implied_outlives_bounds<'tcx>,
mode: QueryMode
) -> Option<implied_outlives_bounds<'tcx>>
[query description - consider adding a doc-comment!] computing implied outlives bounds for goal.value.value
sourcefn dropck_outlives(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dropck_outlives<'tcx>,
mode: QueryMode
) -> Option<dropck_outlives<'tcx>>
fn dropck_outlives(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: dropck_outlives<'tcx>,
mode: QueryMode
) -> Option<dropck_outlives<'tcx>>
Do not call this query directly:
invoke DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)
instead.
sourcefn evaluate_obligation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_obligation<'tcx>,
mode: QueryMode
) -> Option<evaluate_obligation<'tcx>>
fn evaluate_obligation(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_obligation<'tcx>,
mode: QueryMode
) -> Option<evaluate_obligation<'tcx>>
Do not call this query directly: invoke infcx.predicate_may_hold()
or
infcx.predicate_must_hold()
instead.
sourcefn evaluate_goal(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_goal<'tcx>,
mode: QueryMode
) -> Option<evaluate_goal<'tcx>>
fn evaluate_goal(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: evaluate_goal<'tcx>,
mode: QueryMode
) -> Option<evaluate_goal<'tcx>>
[query description - consider adding a doc-comment!] evaluating trait selection obligation goal.value
sourcefn type_op_ascribe_user_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_ascribe_user_type<'tcx>,
mode: QueryMode
) -> Option<type_op_ascribe_user_type<'tcx>>
fn type_op_ascribe_user_type(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_ascribe_user_type<'tcx>,
mode: QueryMode
) -> Option<type_op_ascribe_user_type<'tcx>>
Do not call this query directly: part of the Eq
type-op
sourcefn type_op_eq(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_eq<'tcx>,
mode: QueryMode
) -> Option<type_op_eq<'tcx>>
fn type_op_eq(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_eq<'tcx>,
mode: QueryMode
) -> Option<type_op_eq<'tcx>>
Do not call this query directly: part of the Eq
type-op
sourcefn type_op_subtype(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_subtype<'tcx>,
mode: QueryMode
) -> Option<type_op_subtype<'tcx>>
fn type_op_subtype(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_subtype<'tcx>,
mode: QueryMode
) -> Option<type_op_subtype<'tcx>>
Do not call this query directly: part of the Subtype
type-op
sourcefn type_op_prove_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_prove_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_prove_predicate<'tcx>>
fn type_op_prove_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_prove_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_prove_predicate<'tcx>>
Do not call this query directly: part of the ProvePredicate
type-op
sourcefn type_op_normalize_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_ty<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_ty<'tcx>>
fn type_op_normalize_ty(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_ty<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_ty<'tcx>>
Do not call this query directly: part of the Normalize
type-op
sourcefn type_op_normalize_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_predicate<'tcx>>
fn type_op_normalize_predicate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_predicate<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_predicate<'tcx>>
Do not call this query directly: part of the Normalize
type-op
sourcefn type_op_normalize_poly_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_poly_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_poly_fn_sig<'tcx>>
fn type_op_normalize_poly_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_poly_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_poly_fn_sig<'tcx>>
Do not call this query directly: part of the Normalize
type-op
sourcefn type_op_normalize_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_fn_sig<'tcx>>
fn type_op_normalize_fn_sig(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: type_op_normalize_fn_sig<'tcx>,
mode: QueryMode
) -> Option<type_op_normalize_fn_sig<'tcx>>
Do not call this query directly: part of the Normalize
type-op
sourcefn subst_and_check_impossible_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: subst_and_check_impossible_predicates<'tcx>,
mode: QueryMode
) -> Option<subst_and_check_impossible_predicates<'tcx>>
fn subst_and_check_impossible_predicates(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: subst_and_check_impossible_predicates<'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)
sourcefn is_impossible_method(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_impossible_method<'tcx>,
mode: QueryMode
) -> Option<is_impossible_method<'tcx>>
fn is_impossible_method(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: is_impossible_method<'tcx>,
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)
sourcefn method_autoderef_steps(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: method_autoderef_steps<'tcx>,
mode: QueryMode
) -> Option<method_autoderef_steps<'tcx>>
fn method_autoderef_steps(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: method_autoderef_steps<'tcx>,
mode: QueryMode
) -> Option<method_autoderef_steps<'tcx>>
[query description - consider adding a doc-comment!] computing autoderef types for goal.value.value
sourcefn supported_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: supported_target_features<'tcx>,
mode: QueryMode
) -> Option<supported_target_features<'tcx>>
fn supported_target_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: supported_target_features<'tcx>,
mode: QueryMode
) -> Option<supported_target_features<'tcx>>
[query description - consider adding a doc-comment!] looking up supported target features
sourcefn instance_def_size_estimate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: instance_def_size_estimate<'tcx>,
mode: QueryMode
) -> Option<instance_def_size_estimate<'tcx>>
fn instance_def_size_estimate(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: instance_def_size_estimate<'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.
sourcefn features_query(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: features_query<'tcx>,
mode: QueryMode
) -> Option<features_query<'tcx>>
fn features_query(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: features_query<'tcx>,
mode: QueryMode
) -> Option<features_query<'tcx>>
[query description - consider adding a doc-comment!] looking up enabled feature gates
sourcefn resolve_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance<'tcx>,
mode: QueryMode
) -> Option<resolve_instance<'tcx>>
fn resolve_instance(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance<'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 successOk(None)
when theSubstsRef
are still too generic, and therefore don’t allow finding the finalInstance
Err(ErrorGuaranteed)
when theInstance
resolution process couldn’t complete due to errors elsewhere - this is distinct fromOk(None)
to avoid misleading diagnostics when an error has already been/will be emitted, for the original cause
sourcefn resolve_instance_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance_of_const_arg<'tcx>,
mode: QueryMode
) -> Option<resolve_instance_of_const_arg<'tcx>>
fn resolve_instance_of_const_arg(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: resolve_instance_of_const_arg<'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)
sourcefn reveal_opaque_types_in_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reveal_opaque_types_in_bounds<'tcx>,
mode: QueryMode
) -> Option<reveal_opaque_types_in_bounds<'tcx>>
fn reveal_opaque_types_in_bounds(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: reveal_opaque_types_in_bounds<'tcx>,
mode: QueryMode
) -> Option<reveal_opaque_types_in_bounds<'tcx>>
[query description - consider adding a doc-comment!] revealing opaque types in {:?}
sourcefn limits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: limits<'tcx>,
mode: QueryMode
) -> Option<limits<'tcx>>
fn limits(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: limits<'tcx>,
mode: QueryMode
) -> Option<limits<'tcx>>
[query description - consider adding a doc-comment!] looking up limits
sourcefn diagnostic_hir_wf_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_hir_wf_check<'tcx>,
mode: QueryMode
) -> Option<diagnostic_hir_wf_check<'tcx>>
fn diagnostic_hir_wf_check(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: diagnostic_hir_wf_check<'tcx>,
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.
sourcefn global_backend_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: global_backend_features<'tcx>,
mode: QueryMode
) -> Option<global_backend_features<'tcx>>
fn global_backend_features(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: global_backend_features<'tcx>,
mode: QueryMode
) -> Option<global_backend_features<'tcx>>
The list of backend features computed from CLI flags (-Ctarget-cpu
, -Ctarget-feature
,
--target
and similar).
sourcefn generator_diagnostic_data(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_diagnostic_data<'tcx>,
mode: QueryMode
) -> Option<generator_diagnostic_data<'tcx>>
fn generator_diagnostic_data(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: generator_diagnostic_data<'tcx>,
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)
sourcefn permits_uninit_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_uninit_init<'tcx>,
mode: QueryMode
) -> Option<permits_uninit_init<'tcx>>
fn permits_uninit_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_uninit_init<'tcx>,
mode: QueryMode
) -> Option<permits_uninit_init<'tcx>>
[query description - consider adding a doc-comment!] checking to see if key.ty
permits being left uninit
sourcefn permits_zero_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_zero_init<'tcx>,
mode: QueryMode
) -> Option<permits_zero_init<'tcx>>
fn permits_zero_init(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: permits_zero_init<'tcx>,
mode: QueryMode
) -> Option<permits_zero_init<'tcx>>
[query description - consider adding a doc-comment!] checking to see if key.ty
permits being left zeroed
sourcefn compare_assoc_const_impl_item_with_trait_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: compare_assoc_const_impl_item_with_trait_item<'tcx>,
mode: QueryMode
) -> Option<compare_assoc_const_impl_item_with_trait_item<'tcx>>
fn compare_assoc_const_impl_item_with_trait_item(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: compare_assoc_const_impl_item_with_trait_item<'tcx>,
mode: QueryMode
) -> Option<compare_assoc_const_impl_item_with_trait_item<'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
sourcefn deduced_param_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deduced_param_attrs<'tcx>,
mode: QueryMode
) -> Option<deduced_param_attrs<'tcx>>
fn deduced_param_attrs(
&'tcx self,
tcx: TyCtxt<'tcx>,
span: Span,
key: deduced_param_attrs<'tcx>,
mode: QueryMode
) -> Option<deduced_param_attrs<'tcx>>
[query description - consider adding a doc-comment!] deducing parameter attributes for tcx.def_path_str(def_id)