Struct rustc_query_impl::Queries[−][src]

pub struct Queries<'tcx> {
    providers: IndexVec<CrateNum, Providers>,
    fallback_extern_providers: Box<Providers>,
    trigger_delay_span_bug: QueryState<DepKind, trigger_delay_span_bug<'tcx>>,
    hir_crate: QueryState<DepKind, hir_crate<'tcx>>,
    index_hir: QueryState<DepKind, index_hir<'tcx>>,
    hir_module_items: QueryState<DepKind, hir_module_items<'tcx>>,
    hir_owner: QueryState<DepKind, hir_owner<'tcx>>,
    hir_owner_nodes: QueryState<DepKind, hir_owner_nodes<'tcx>>,
    hir_attrs: QueryState<DepKind, hir_attrs<'tcx>>,
    opt_const_param_of: QueryState<DepKind, opt_const_param_of<'tcx>>,
    type_of: QueryState<DepKind, type_of<'tcx>>,
    analysis: QueryState<DepKind, analysis<'tcx>>,
    generics_of: QueryState<DepKind, generics_of<'tcx>>,
    predicates_of: QueryState<DepKind, predicates_of<'tcx>>,
    explicit_item_bounds: QueryState<DepKind, explicit_item_bounds<'tcx>>,
    item_bounds: QueryState<DepKind, item_bounds<'tcx>>,
    projection_ty_from_predicates: QueryState<DepKind, projection_ty_from_predicates<'tcx>>,
    native_libraries: QueryState<DepKind, native_libraries<'tcx>>,
    lint_levels: QueryState<DepKind, lint_levels<'tcx>>,
    parent_module_from_def_id: QueryState<DepKind, parent_module_from_def_id<'tcx>>,
    expn_that_defined: QueryState<DepKind, expn_that_defined<'tcx>>,
    is_panic_runtime: QueryState<DepKind, is_panic_runtime<'tcx>>,
    mir_keys: QueryState<DepKind, mir_keys<'tcx>>,
    mir_const_qualif: QueryState<DepKind, mir_const_qualif<'tcx>>,
    mir_const_qualif_const_arg: QueryState<DepKind, mir_const_qualif_const_arg<'tcx>>,
    mir_built: QueryState<DepKind, mir_built<'tcx>>,
    mir_const: QueryState<DepKind, mir_const<'tcx>>,
    mir_abstract_const: QueryState<DepKind, mir_abstract_const<'tcx>>,
    mir_abstract_const_of_const_arg: QueryState<DepKind, mir_abstract_const_of_const_arg<'tcx>>,
    try_unify_abstract_consts: QueryState<DepKind, try_unify_abstract_consts<'tcx>>,
    mir_drops_elaborated_and_const_checked: QueryState<DepKind, mir_drops_elaborated_and_const_checked<'tcx>>,
    mir_for_ctfe: QueryState<DepKind, mir_for_ctfe<'tcx>>,
    mir_for_ctfe_of_const_arg: QueryState<DepKind, mir_for_ctfe_of_const_arg<'tcx>>,
    mir_promoted: QueryState<DepKind, mir_promoted<'tcx>>,
    optimized_mir: QueryState<DepKind, optimized_mir<'tcx>>,
    coverageinfo: QueryState<DepKind, coverageinfo<'tcx>>,
    covered_file_name: QueryState<DepKind, covered_file_name<'tcx>>,
    covered_code_regions: QueryState<DepKind, covered_code_regions<'tcx>>,
    promoted_mir: QueryState<DepKind, promoted_mir<'tcx>>,
    promoted_mir_of_const_arg: QueryState<DepKind, promoted_mir_of_const_arg<'tcx>>,
    erase_regions_ty: QueryState<DepKind, erase_regions_ty<'tcx>>,
    wasm_import_module_map: QueryState<DepKind, wasm_import_module_map<'tcx>>,
    predicates_defined_on: QueryState<DepKind, predicates_defined_on<'tcx>>,
    trait_explicit_predicates_and_bounds: QueryState<DepKind, trait_explicit_predicates_and_bounds<'tcx>>,
    explicit_predicates_of: QueryState<DepKind, explicit_predicates_of<'tcx>>,
    inferred_outlives_of: QueryState<DepKind, inferred_outlives_of<'tcx>>,
    super_predicates_of: QueryState<DepKind, super_predicates_of<'tcx>>,
    super_predicates_that_define_assoc_type: QueryState<DepKind, super_predicates_that_define_assoc_type<'tcx>>,
    type_param_predicates: QueryState<DepKind, type_param_predicates<'tcx>>,
    trait_def: QueryState<DepKind, trait_def<'tcx>>,
    adt_def: QueryState<DepKind, adt_def<'tcx>>,
    adt_destructor: QueryState<DepKind, adt_destructor<'tcx>>,
    adt_sized_constraint: QueryState<DepKind, adt_sized_constraint<'tcx>>,
    adt_dtorck_constraint: QueryState<DepKind, adt_dtorck_constraint<'tcx>>,
    is_const_fn_raw: QueryState<DepKind, is_const_fn_raw<'tcx>>,
    is_const_impl_raw: QueryState<DepKind, is_const_impl_raw<'tcx>>,
    asyncness: QueryState<DepKind, asyncness<'tcx>>,
    is_promotable_const_fn: QueryState<DepKind, is_promotable_const_fn<'tcx>>,
    is_foreign_item: QueryState<DepKind, is_foreign_item<'tcx>>,
    static_mutability: QueryState<DepKind, static_mutability<'tcx>>,
    generator_kind: QueryState<DepKind, generator_kind<'tcx>>,
    crate_variances: QueryState<DepKind, crate_variances<'tcx>>,
    variances_of: QueryState<DepKind, variances_of<'tcx>>,
    inferred_outlives_crate: QueryState<DepKind, inferred_outlives_crate<'tcx>>,
    associated_item_def_ids: QueryState<DepKind, associated_item_def_ids<'tcx>>,
    associated_item: QueryState<DepKind, associated_item<'tcx>>,
    associated_items: QueryState<DepKind, associated_items<'tcx>>,
    impl_trait_ref: QueryState<DepKind, impl_trait_ref<'tcx>>,
    impl_polarity: QueryState<DepKind, impl_polarity<'tcx>>,
    issue33140_self_ty: QueryState<DepKind, issue33140_self_ty<'tcx>>,
    inherent_impls: QueryState<DepKind, inherent_impls<'tcx>>,
    unsafety_check_result: QueryState<DepKind, unsafety_check_result<'tcx>>,
    unsafety_check_result_for_const_arg: QueryState<DepKind, unsafety_check_result_for_const_arg<'tcx>>,
    unsafe_derive_on_repr_packed: QueryState<DepKind, unsafe_derive_on_repr_packed<'tcx>>,
    fn_sig: QueryState<DepKind, fn_sig<'tcx>>,
    lint_mod: QueryState<DepKind, lint_mod<'tcx>>,
    check_mod_attrs: QueryState<DepKind, check_mod_attrs<'tcx>>,
    check_mod_unstable_api_usage: QueryState<DepKind, check_mod_unstable_api_usage<'tcx>>,
    check_mod_const_bodies: QueryState<DepKind, check_mod_const_bodies<'tcx>>,
    check_mod_loops: QueryState<DepKind, check_mod_loops<'tcx>>,
    check_mod_naked_functions: QueryState<DepKind, check_mod_naked_functions<'tcx>>,
    check_mod_item_types: QueryState<DepKind, check_mod_item_types<'tcx>>,
    check_mod_privacy: QueryState<DepKind, check_mod_privacy<'tcx>>,
    check_mod_intrinsics: QueryState<DepKind, check_mod_intrinsics<'tcx>>,
    check_mod_liveness: QueryState<DepKind, check_mod_liveness<'tcx>>,
    check_mod_impl_wf: QueryState<DepKind, check_mod_impl_wf<'tcx>>,
    collect_mod_item_types: QueryState<DepKind, collect_mod_item_types<'tcx>>,
    coerce_unsized_info: QueryState<DepKind, coerce_unsized_info<'tcx>>,
    typeck_item_bodies: QueryState<DepKind, typeck_item_bodies<'tcx>>,
    typeck: QueryState<DepKind, typeck<'tcx>>,
    typeck_const_arg: QueryState<DepKind, typeck_const_arg<'tcx>>,
    diagnostic_only_typeck: QueryState<DepKind, diagnostic_only_typeck<'tcx>>,
    used_trait_imports: QueryState<DepKind, used_trait_imports<'tcx>>,
    has_typeck_results: QueryState<DepKind, has_typeck_results<'tcx>>,
    coherent_trait: QueryState<DepKind, coherent_trait<'tcx>>,
    mir_borrowck: QueryState<DepKind, mir_borrowck<'tcx>>,
    mir_borrowck_const_arg: QueryState<DepKind, mir_borrowck_const_arg<'tcx>>,
    crate_inherent_impls: QueryState<DepKind, crate_inherent_impls<'tcx>>,
    crate_inherent_impls_overlap_check: QueryState<DepKind, crate_inherent_impls_overlap_check<'tcx>>,
    mir_callgraph_reachable: QueryState<DepKind, mir_callgraph_reachable<'tcx>>,
    mir_inliner_callees: QueryState<DepKind, mir_inliner_callees<'tcx>>,
    eval_to_allocation_raw: QueryState<DepKind, eval_to_allocation_raw<'tcx>>,
    eval_to_const_value_raw: QueryState<DepKind, eval_to_const_value_raw<'tcx>>,
    const_to_valtree: QueryState<DepKind, const_to_valtree<'tcx>>,
    destructure_const: QueryState<DepKind, destructure_const<'tcx>>,
    deref_const: QueryState<DepKind, deref_const<'tcx>>,
    const_caller_location: QueryState<DepKind, const_caller_location<'tcx>>,
    lit_to_const: QueryState<DepKind, lit_to_const<'tcx>>,
    check_match: QueryState<DepKind, check_match<'tcx>>,
    privacy_access_levels: QueryState<DepKind, privacy_access_levels<'tcx>>,
    check_private_in_public: QueryState<DepKind, check_private_in_public<'tcx>>,
    reachable_set: QueryState<DepKind, reachable_set<'tcx>>,
    region_scope_tree: QueryState<DepKind, region_scope_tree<'tcx>>,
    mir_shims: QueryState<DepKind, mir_shims<'tcx>>,
    symbol_name: QueryState<DepKind, symbol_name<'tcx>>,
    opt_def_kind: QueryState<DepKind, opt_def_kind<'tcx>>,
    def_span: QueryState<DepKind, def_span<'tcx>>,
    def_ident_span: QueryState<DepKind, def_ident_span<'tcx>>,
    lookup_stability: QueryState<DepKind, lookup_stability<'tcx>>,
    lookup_const_stability: QueryState<DepKind, lookup_const_stability<'tcx>>,
    lookup_deprecation_entry: QueryState<DepKind, lookup_deprecation_entry<'tcx>>,
    item_attrs: QueryState<DepKind, item_attrs<'tcx>>,
    codegen_fn_attrs: QueryState<DepKind, codegen_fn_attrs<'tcx>>,
    fn_arg_names: QueryState<DepKind, fn_arg_names<'tcx>>,
    rendered_const: QueryState<DepKind, rendered_const<'tcx>>,
    impl_parent: QueryState<DepKind, impl_parent<'tcx>>,
    trait_of_item: QueryState<DepKind, trait_of_item<'tcx>>,
    is_ctfe_mir_available: QueryState<DepKind, is_ctfe_mir_available<'tcx>>,
    is_mir_available: QueryState<DepKind, is_mir_available<'tcx>>,
    vtable_methods: QueryState<DepKind, vtable_methods<'tcx>>,
    codegen_fulfill_obligation: QueryState<DepKind, codegen_fulfill_obligation<'tcx>>,
    all_local_trait_impls: QueryState<DepKind, all_local_trait_impls<'tcx>>,
    trait_impls_of: QueryState<DepKind, trait_impls_of<'tcx>>,
    specialization_graph_of: QueryState<DepKind, specialization_graph_of<'tcx>>,
    object_safety_violations: QueryState<DepKind, object_safety_violations<'tcx>>,
    param_env: QueryState<DepKind, param_env<'tcx>>,
    param_env_reveal_all_normalized: QueryState<DepKind, param_env_reveal_all_normalized<'tcx>>,
    is_copy_raw: QueryState<DepKind, is_copy_raw<'tcx>>,
    is_sized_raw: QueryState<DepKind, is_sized_raw<'tcx>>,
    is_freeze_raw: QueryState<DepKind, is_freeze_raw<'tcx>>,
    needs_drop_raw: QueryState<DepKind, needs_drop_raw<'tcx>>,
    has_structural_eq_impls: QueryState<DepKind, has_structural_eq_impls<'tcx>>,
    adt_drop_tys: QueryState<DepKind, adt_drop_tys<'tcx>>,
    layout_raw: QueryState<DepKind, layout_raw<'tcx>>,
    dylib_dependency_formats: QueryState<DepKind, dylib_dependency_formats<'tcx>>,
    dependency_formats: QueryState<DepKind, dependency_formats<'tcx>>,
    is_compiler_builtins: QueryState<DepKind, is_compiler_builtins<'tcx>>,
    has_global_allocator: QueryState<DepKind, has_global_allocator<'tcx>>,
    has_panic_handler: QueryState<DepKind, has_panic_handler<'tcx>>,
    is_profiler_runtime: QueryState<DepKind, is_profiler_runtime<'tcx>>,
    panic_strategy: QueryState<DepKind, panic_strategy<'tcx>>,
    is_no_builtins: QueryState<DepKind, is_no_builtins<'tcx>>,
    symbol_mangling_version: QueryState<DepKind, symbol_mangling_version<'tcx>>,
    extern_crate: QueryState<DepKind, extern_crate<'tcx>>,
    specializes: QueryState<DepKind, specializes<'tcx>>,
    in_scope_traits_map: QueryState<DepKind, in_scope_traits_map<'tcx>>,
    module_exports: QueryState<DepKind, module_exports<'tcx>>,
    impl_defaultness: QueryState<DepKind, impl_defaultness<'tcx>>,
    check_item_well_formed: QueryState<DepKind, check_item_well_formed<'tcx>>,
    check_trait_item_well_formed: QueryState<DepKind, check_trait_item_well_formed<'tcx>>,
    check_impl_item_well_formed: QueryState<DepKind, check_impl_item_well_formed<'tcx>>,
    reachable_non_generics: QueryState<DepKind, reachable_non_generics<'tcx>>,
    is_reachable_non_generic: QueryState<DepKind, is_reachable_non_generic<'tcx>>,
    is_unreachable_local_definition: QueryState<DepKind, is_unreachable_local_definition<'tcx>>,
    upstream_monomorphizations: QueryState<DepKind, upstream_monomorphizations<'tcx>>,
    upstream_monomorphizations_for: QueryState<DepKind, upstream_monomorphizations_for<'tcx>>,
    upstream_drop_glue_for: QueryState<DepKind, upstream_drop_glue_for<'tcx>>,
    foreign_modules: QueryState<DepKind, foreign_modules<'tcx>>,
    entry_fn: QueryState<DepKind, entry_fn<'tcx>>,
    plugin_registrar_fn: QueryState<DepKind, plugin_registrar_fn<'tcx>>,
    proc_macro_decls_static: QueryState<DepKind, proc_macro_decls_static<'tcx>>,
    crate_disambiguator: QueryState<DepKind, crate_disambiguator<'tcx>>,
    crate_hash: QueryState<DepKind, crate_hash<'tcx>>,
    crate_host_hash: QueryState<DepKind, crate_host_hash<'tcx>>,
    original_crate_name: QueryState<DepKind, original_crate_name<'tcx>>,
    extra_filename: QueryState<DepKind, extra_filename<'tcx>>,
    crate_extern_paths: QueryState<DepKind, crate_extern_paths<'tcx>>,
    implementations_of_trait: QueryState<DepKind, implementations_of_trait<'tcx>>,
    all_trait_implementations: QueryState<DepKind, all_trait_implementations<'tcx>>,
    is_dllimport_foreign_item: QueryState<DepKind, is_dllimport_foreign_item<'tcx>>,
    is_statically_included_foreign_item: QueryState<DepKind, is_statically_included_foreign_item<'tcx>>,
    native_library_kind: QueryState<DepKind, native_library_kind<'tcx>>,
    link_args: QueryState<DepKind, link_args<'tcx>>,
    resolve_lifetimes: QueryState<DepKind, resolve_lifetimes<'tcx>>,
    named_region_map: QueryState<DepKind, named_region_map<'tcx>>,
    is_late_bound_map: QueryState<DepKind, is_late_bound_map<'tcx>>,
    object_lifetime_defaults_map: QueryState<DepKind, object_lifetime_defaults_map<'tcx>>,
    visibility: QueryState<DepKind, visibility<'tcx>>,
    type_uninhabited_from: QueryState<DepKind, type_uninhabited_from<'tcx>>,
    dep_kind: QueryState<DepKind, dep_kind<'tcx>>,
    crate_name: QueryState<DepKind, crate_name<'tcx>>,
    item_children: QueryState<DepKind, item_children<'tcx>>,
    extern_mod_stmt_cnum: QueryState<DepKind, extern_mod_stmt_cnum<'tcx>>,
    get_lib_features: QueryState<DepKind, get_lib_features<'tcx>>,
    defined_lib_features: QueryState<DepKind, defined_lib_features<'tcx>>,
    get_lang_items: QueryState<DepKind, get_lang_items<'tcx>>,
    all_diagnostic_items: QueryState<DepKind, all_diagnostic_items<'tcx>>,
    defined_lang_items: QueryState<DepKind, defined_lang_items<'tcx>>,
    diagnostic_items: QueryState<DepKind, diagnostic_items<'tcx>>,
    missing_lang_items: QueryState<DepKind, missing_lang_items<'tcx>>,
    visible_parent_map: QueryState<DepKind, visible_parent_map<'tcx>>,
    trimmed_def_paths: QueryState<DepKind, trimmed_def_paths<'tcx>>,
    missing_extern_crate_item: QueryState<DepKind, missing_extern_crate_item<'tcx>>,
    used_crate_source: QueryState<DepKind, used_crate_source<'tcx>>,
    postorder_cnums: QueryState<DepKind, postorder_cnums<'tcx>>,
    upvars_mentioned: QueryState<DepKind, upvars_mentioned<'tcx>>,
    maybe_unused_trait_import: QueryState<DepKind, maybe_unused_trait_import<'tcx>>,
    maybe_unused_extern_crates: QueryState<DepKind, maybe_unused_extern_crates<'tcx>>,
    names_imported_by_glob_use: QueryState<DepKind, names_imported_by_glob_use<'tcx>>,
    stability_index: QueryState<DepKind, stability_index<'tcx>>,
    all_crate_nums: QueryState<DepKind, all_crate_nums<'tcx>>,
    all_traits: QueryState<DepKind, all_traits<'tcx>>,
    exported_symbols: QueryState<DepKind, exported_symbols<'tcx>>,
    collect_and_partition_mono_items: QueryState<DepKind, collect_and_partition_mono_items<'tcx>>,
    is_codegened_item: QueryState<DepKind, is_codegened_item<'tcx>>,
    codegened_and_inlined_items: QueryState<DepKind, codegened_and_inlined_items<'tcx>>,
    codegen_unit: QueryState<DepKind, codegen_unit<'tcx>>,
    unused_generic_params: QueryState<DepKind, unused_generic_params<'tcx>>,
    backend_optimization_level: QueryState<DepKind, backend_optimization_level<'tcx>>,
    output_filenames: QueryState<DepKind, output_filenames<'tcx>>,
    normalize_projection_ty: QueryState<DepKind, normalize_projection_ty<'tcx>>,
    normalize_generic_arg_after_erasing_regions: QueryState<DepKind, normalize_generic_arg_after_erasing_regions<'tcx>>,
    implied_outlives_bounds: QueryState<DepKind, implied_outlives_bounds<'tcx>>,
    dropck_outlives: QueryState<DepKind, dropck_outlives<'tcx>>,
    evaluate_obligation: QueryState<DepKind, evaluate_obligation<'tcx>>,
    evaluate_goal: QueryState<DepKind, evaluate_goal<'tcx>>,
    type_implements_trait: QueryState<DepKind, type_implements_trait<'tcx>>,
    type_op_ascribe_user_type: QueryState<DepKind, type_op_ascribe_user_type<'tcx>>,
    type_op_eq: QueryState<DepKind, type_op_eq<'tcx>>,
    type_op_subtype: QueryState<DepKind, type_op_subtype<'tcx>>,
    type_op_prove_predicate: QueryState<DepKind, type_op_prove_predicate<'tcx>>,
    type_op_normalize_ty: QueryState<DepKind, type_op_normalize_ty<'tcx>>,
    type_op_normalize_predicate: QueryState<DepKind, type_op_normalize_predicate<'tcx>>,
    type_op_normalize_poly_fn_sig: QueryState<DepKind, type_op_normalize_poly_fn_sig<'tcx>>,
    type_op_normalize_fn_sig: QueryState<DepKind, type_op_normalize_fn_sig<'tcx>>,
    subst_and_check_impossible_predicates: QueryState<DepKind, subst_and_check_impossible_predicates<'tcx>>,
    method_autoderef_steps: QueryState<DepKind, method_autoderef_steps<'tcx>>,
    supported_target_features: QueryState<DepKind, supported_target_features<'tcx>>,
    instance_def_size_estimate: QueryState<DepKind, instance_def_size_estimate<'tcx>>,
    features_query: QueryState<DepKind, features_query<'tcx>>,
    resolve_instance: QueryState<DepKind, resolve_instance<'tcx>>,
    resolve_instance_of_const_arg: QueryState<DepKind, resolve_instance_of_const_arg<'tcx>>,
    normalize_opaque_types: QueryState<DepKind, normalize_opaque_types<'tcx>>,
    conservative_is_privately_uninhabited: QueryState<DepKind, conservative_is_privately_uninhabited<'tcx>>,
}

Fields

providers: IndexVec<CrateNum, Providers>fallback_extern_providers: Box<Providers>trigger_delay_span_bug: QueryState<DepKind, trigger_delay_span_bug<'tcx>>

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

hir_crate: QueryState<DepKind, 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().

index_hir: QueryState<DepKind, index_hir<'tcx>>

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

hir_module_items: QueryState<DepKind, hir_module_items<'tcx>>

The items in a module.

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

hir_owner: QueryState<DepKind, 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.

hir_owner_nodes: QueryState<DepKind, hir_owner_nodes<'tcx>>

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

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

hir_attrs: QueryState<DepKind, hir_attrs<'tcx>>

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

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

opt_const_param_of: QueryState<DepKind, 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`.
}
type_of: QueryState<DepKind, type_of<'tcx>>

Records the type of every item.

analysis: QueryState<DepKind, analysis<'tcx>>

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

generics_of: QueryState<DepKind, generics_of<'tcx>>

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

predicates_of: QueryState<DepKind, predicates_of<'tcx>>

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

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

explicit_item_bounds: QueryState<DepKind, explicit_item_bounds<'tcx>>

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

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

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

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

item_bounds: QueryState<DepKind, 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.

projection_ty_from_predicates: QueryState<DepKind, projection_ty_from_predicates<'tcx>>

[query description - consider adding a doc-comment!] finding projection type inside predicates of tcx.def_path_str(key.0)

native_libraries: QueryState<DepKind, native_libraries<'tcx>>

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

lint_levels: QueryState<DepKind, lint_levels<'tcx>>

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

parent_module_from_def_id: QueryState<DepKind, parent_module_from_def_id<'tcx>>

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

expn_that_defined: QueryState<DepKind, expn_that_defined<'tcx>>

Internal helper query. Use tcx.expansion_that_defined instead

is_panic_runtime: QueryState<DepKind, is_panic_runtime<'tcx>>

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

mir_keys: QueryState<DepKind, mir_keys<'tcx>>

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

mir_const_qualif: QueryState<DepKind, mir_const_qualif<'tcx>>

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

mir_const_qualif_const_arg: QueryState<DepKind, mir_const_qualif_const_arg<'tcx>>

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

mir_built: QueryState<DepKind, mir_built<'tcx>>

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

mir_const: QueryState<DepKind, 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.

mir_abstract_const: QueryState<DepKind, mir_abstract_const<'tcx>>

Try to build an abstract representation of the given constant.

mir_abstract_const_of_const_arg: QueryState<DepKind, mir_abstract_const_of_const_arg<'tcx>>

Try to build an abstract representation of the given constant.

try_unify_abstract_consts: QueryState<DepKind, try_unify_abstract_consts<'tcx>>

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

mir_drops_elaborated_and_const_checked: QueryState<DepKind, mir_drops_elaborated_and_const_checked<'tcx>>

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

mir_for_ctfe: QueryState<DepKind, mir_for_ctfe<'tcx>>

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

mir_for_ctfe_of_const_arg: QueryState<DepKind, mir_for_ctfe_of_const_arg<'tcx>>

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

mir_promoted: QueryState<DepKind, mir_promoted<'tcx>>

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

optimized_mir: QueryState<DepKind, optimized_mir<'tcx>>

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

coverageinfo: QueryState<DepKind, coverageinfo<'tcx>>

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

covered_file_name: QueryState<DepKind, covered_file_name<'tcx>>

Returns the name of the file that contains the function body, if instrumented for coverage.

covered_code_regions: QueryState<DepKind, covered_code_regions<'tcx>>

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

promoted_mir: QueryState<DepKind, promoted_mir<'tcx>>

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

promoted_mir_of_const_arg: QueryState<DepKind, promoted_mir_of_const_arg<'tcx>>

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

erase_regions_ty: QueryState<DepKind, erase_regions_ty<'tcx>>

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

wasm_import_module_map: QueryState<DepKind, wasm_import_module_map<'tcx>>

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

predicates_defined_on: QueryState<DepKind, predicates_defined_on<'tcx>>

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

trait_explicit_predicates_and_bounds: QueryState<DepKind, trait_explicit_predicates_and_bounds<'tcx>>

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

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

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

becomes

trait X { type U: Copy; }

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

explicit_predicates_of: QueryState<DepKind, explicit_predicates_of<'tcx>>

Returns the predicates written explicitly by the user.

inferred_outlives_of: QueryState<DepKind, inferred_outlives_of<'tcx>>

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

super_predicates_of: QueryState<DepKind, super_predicates_of<'tcx>>

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

super_predicates_that_define_assoc_type: QueryState<DepKind, super_predicates_that_define_assoc_type<'tcx>>

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

type_param_predicates: QueryState<DepKind, type_param_predicates<'tcx>>

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

trait_def: QueryState<DepKind, trait_def<'tcx>>

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

adt_def: QueryState<DepKind, adt_def<'tcx>>

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

adt_destructor: QueryState<DepKind, adt_destructor<'tcx>>

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

adt_sized_constraint: QueryState<DepKind, adt_sized_constraint<'tcx>>

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

adt_dtorck_constraint: QueryState<DepKind, adt_dtorck_constraint<'tcx>>

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

is_const_fn_raw: QueryState<DepKind, is_const_fn_raw<'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.

is_const_impl_raw: QueryState<DepKind, is_const_impl_raw<'tcx>>

Returns true if this is a const impl. Do not call this function manually.

This query caches the base data for the is_const_impl helper function, which also takes into account stability attributes (e.g., #[rustc_const_unstable]).

asyncness: QueryState<DepKind, asyncness<'tcx>>

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

is_promotable_const_fn: QueryState<DepKind, is_promotable_const_fn<'tcx>>

Returns true if calls to the function may be promoted.

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

is_foreign_item: QueryState<DepKind, is_foreign_item<'tcx>>

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

static_mutability: QueryState<DepKind, static_mutability<'tcx>>

Returns Some(mutability) if the node pointed to by def_id is a static item.

generator_kind: QueryState<DepKind, generator_kind<'tcx>>

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

crate_variances: QueryState<DepKind, crate_variances<'tcx>>

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

variances_of: QueryState<DepKind, variances_of<'tcx>>

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

inferred_outlives_crate: QueryState<DepKind, inferred_outlives_crate<'tcx>>

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

associated_item_def_ids: QueryState<DepKind, associated_item_def_ids<'tcx>>

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

associated_item: QueryState<DepKind, associated_item<'tcx>>

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

associated_items: QueryState<DepKind, associated_items<'tcx>>

Collects the associated items defined on a trait or impl.

impl_trait_ref: QueryState<DepKind, impl_trait_ref<'tcx>>

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

impl_polarity: QueryState<DepKind, impl_polarity<'tcx>>

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

issue33140_self_ty: QueryState<DepKind, issue33140_self_ty<'tcx>>

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

inherent_impls: QueryState<DepKind, 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.

unsafety_check_result: QueryState<DepKind, unsafety_check_result<'tcx>>

The result of unsafety-checking this LocalDefId.

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

unsafe_derive_on_repr_packed: QueryState<DepKind, unsafe_derive_on_repr_packed<'tcx>>

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

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

fn_sig: QueryState<DepKind, fn_sig<'tcx>>

The signature of functions.

lint_mod: QueryState<DepKind, lint_mod<'tcx>>

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

check_mod_attrs: QueryState<DepKind, check_mod_attrs<'tcx>>

Checks the attributes in the module.

check_mod_unstable_api_usage: QueryState<DepKind, check_mod_unstable_api_usage<'tcx>>

[query description - consider adding a doc-comment!] checking for unstable API usage in describe_as_module(key, tcx)

check_mod_const_bodies: QueryState<DepKind, check_mod_const_bodies<'tcx>>

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

check_mod_loops: QueryState<DepKind, check_mod_loops<'tcx>>

Checks the loops in the module.

check_mod_naked_functions: QueryState<DepKind, check_mod_naked_functions<'tcx>>

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

check_mod_item_types: QueryState<DepKind, check_mod_item_types<'tcx>>

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

check_mod_privacy: QueryState<DepKind, check_mod_privacy<'tcx>>

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

check_mod_intrinsics: QueryState<DepKind, check_mod_intrinsics<'tcx>>

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

check_mod_liveness: QueryState<DepKind, check_mod_liveness<'tcx>>

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

check_mod_impl_wf: QueryState<DepKind, check_mod_impl_wf<'tcx>>

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

collect_mod_item_types: QueryState<DepKind, collect_mod_item_types<'tcx>>

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

coerce_unsized_info: QueryState<DepKind, coerce_unsized_info<'tcx>>

Caches CoerceUnsized kinds for impls on custom types.

typeck_item_bodies: QueryState<DepKind, typeck_item_bodies<'tcx>>

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

typeck: QueryState<DepKind, typeck<'tcx>>

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

typeck_const_arg: QueryState<DepKind, typeck_const_arg<'tcx>>

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

diagnostic_only_typeck: QueryState<DepKind, diagnostic_only_typeck<'tcx>>

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

used_trait_imports: QueryState<DepKind, used_trait_imports<'tcx>>

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

has_typeck_results: QueryState<DepKind, has_typeck_results<'tcx>>

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

coherent_trait: QueryState<DepKind, coherent_trait<'tcx>>

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

mir_borrowck: QueryState<DepKind, mir_borrowck<'tcx>>

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

mir_borrowck_const_arg: QueryState<DepKind, mir_borrowck_const_arg<'tcx>>

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

crate_inherent_impls: QueryState<DepKind, crate_inherent_impls<'tcx>>

Gets a complete map from all types to their inherent impls. Not meant to be used directly outside of coherence. (Defined only for LOCAL_CRATE.)

crate_inherent_impls_overlap_check: QueryState<DepKind, 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. (Defined only for LOCAL_CRATE.)

mir_callgraph_reachable: QueryState<DepKind, mir_callgraph_reachable<'tcx>>

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

mir_inliner_callees: QueryState<DepKind, mir_inliner_callees<'tcx>>

Obtain all the calls into other local functions

eval_to_allocation_raw: QueryState<DepKind, eval_to_allocation_raw<'tcx>>

Evaluates a constant and returns the computed allocation.

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

eval_to_const_value_raw: QueryState<DepKind, 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.

const_to_valtree: QueryState<DepKind, const_to_valtree<'tcx>>

Convert an evaluated constant to a type level constant or return None if that is not possible.

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

Destructure a constant ADT or array into its variant index and its field values.

deref_const: QueryState<DepKind, deref_const<'tcx>>

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

const_caller_location: QueryState<DepKind, const_caller_location<'tcx>>

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

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

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

check_match: QueryState<DepKind, check_match<'tcx>>

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

privacy_access_levels: QueryState<DepKind, privacy_access_levels<'tcx>>

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

check_private_in_public: QueryState<DepKind, check_private_in_public<'tcx>>

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

reachable_set: QueryState<DepKind, reachable_set<'tcx>>

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

region_scope_tree: QueryState<DepKind, region_scope_tree<'tcx>>

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

mir_shims: QueryState<DepKind, mir_shims<'tcx>>

[query description - consider adding a doc-comment!] generating MIR shim for tcx.def_path_str(key.def_id())

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

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

opt_def_kind: QueryState<DepKind, opt_def_kind<'tcx>>

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

def_span: QueryState<DepKind, def_span<'tcx>>

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

def_ident_span: QueryState<DepKind, def_ident_span<'tcx>>

[query description - consider adding a doc-comment!] looking up span for tcx.def_path_str(def_id) ’s identifier

lookup_stability: QueryState<DepKind, lookup_stability<'tcx>>

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

lookup_const_stability: QueryState<DepKind, lookup_const_stability<'tcx>>

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

lookup_deprecation_entry: QueryState<DepKind, lookup_deprecation_entry<'tcx>>

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

item_attrs: QueryState<DepKind, item_attrs<'tcx>>

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

codegen_fn_attrs: QueryState<DepKind, codegen_fn_attrs<'tcx>>

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

fn_arg_names: QueryState<DepKind, fn_arg_names<'tcx>>

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

rendered_const: QueryState<DepKind, rendered_const<'tcx>>

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

impl_parent: QueryState<DepKind, impl_parent<'tcx>>

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

trait_of_item: QueryState<DepKind, trait_of_item<'tcx>>

Given an associated_item, find the trait it belongs to. Return None if the DefId is not an associated item.

is_ctfe_mir_available: QueryState<DepKind, is_ctfe_mir_available<'tcx>>

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

is_mir_available: QueryState<DepKind, is_mir_available<'tcx>>

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

vtable_methods: QueryState<DepKind, vtable_methods<'tcx>>

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

codegen_fulfill_obligation: QueryState<DepKind, codegen_fulfill_obligation<'tcx>>

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

all_local_trait_impls: QueryState<DepKind, all_local_trait_impls<'tcx>>

Return all impl blocks in the current crate.

To allow caching this between crates, you must pass in LOCAL_CRATE as the crate number. Passing in any other crate will cause an ICE.

trait_impls_of: QueryState<DepKind, trait_impls_of<'tcx>>

Given a trait trait_id, return all known impl blocks.

specialization_graph_of: QueryState<DepKind, specialization_graph_of<'tcx>>

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

object_safety_violations: QueryState<DepKind, object_safety_violations<'tcx>>

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

param_env: QueryState<DepKind, param_env<'tcx>>

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

param_env_reveal_all_normalized: QueryState<DepKind, param_env_reveal_all_normalized<'tcx>>

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

is_copy_raw: QueryState<DepKind, is_copy_raw<'tcx>>

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

is_sized_raw: QueryState<DepKind, is_sized_raw<'tcx>>

Query backing TyS::is_sized.

is_freeze_raw: QueryState<DepKind, is_freeze_raw<'tcx>>

Query backing TyS::is_freeze.

needs_drop_raw: QueryState<DepKind, needs_drop_raw<'tcx>>

Query backing TyS::needs_drop.

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

Query backing TyS::is_structural_eq_shallow.

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

adt_drop_tys: QueryState<DepKind, 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.

layout_raw: QueryState<DepKind, layout_raw<'tcx>>

[query description - consider adding a doc-comment!] computing layout of env.value

dylib_dependency_formats: QueryState<DepKind, dylib_dependency_formats<'tcx>>

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

dependency_formats: QueryState<DepKind, dependency_formats<'tcx>>

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

is_compiler_builtins: QueryState<DepKind, is_compiler_builtins<'tcx>>

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

has_global_allocator: QueryState<DepKind, has_global_allocator<'tcx>>

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

has_panic_handler: QueryState<DepKind, has_panic_handler<'tcx>>

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

is_profiler_runtime: QueryState<DepKind, is_profiler_runtime<'tcx>>

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

panic_strategy: QueryState<DepKind, panic_strategy<'tcx>>

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

is_no_builtins: QueryState<DepKind, is_no_builtins<'tcx>>

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

symbol_mangling_version: QueryState<DepKind, symbol_mangling_version<'tcx>>

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

extern_crate: QueryState<DepKind, extern_crate<'tcx>>

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

specializes: QueryState<DepKind, specializes<'tcx>>

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

in_scope_traits_map: QueryState<DepKind, in_scope_traits_map<'tcx>>

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

module_exports: QueryState<DepKind, module_exports<'tcx>>

[query description - consider adding a doc-comment!] looking up items exported by tcx.def_path_str(def_id.to_def_id())

impl_defaultness: QueryState<DepKind, impl_defaultness<'tcx>>

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

check_item_well_formed: QueryState<DepKind, check_item_well_formed<'tcx>>

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

check_trait_item_well_formed: QueryState<DepKind, check_trait_item_well_formed<'tcx>>

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

check_impl_item_well_formed: QueryState<DepKind, check_impl_item_well_formed<'tcx>>

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

reachable_non_generics: QueryState<DepKind, reachable_non_generics<'tcx>>

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

is_reachable_non_generic: QueryState<DepKind, is_reachable_non_generic<'tcx>>

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

is_unreachable_local_definition: QueryState<DepKind, is_unreachable_local_definition<'tcx>>

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

upstream_monomorphizations: QueryState<DepKind, upstream_monomorphizations<'tcx>>

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

upstream_monomorphizations_for: QueryState<DepKind, upstream_monomorphizations_for<'tcx>>

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

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

upstream_drop_glue_for: QueryState<DepKind, upstream_drop_glue_for<'tcx>>

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

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

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

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

foreign_modules: QueryState<DepKind, foreign_modules<'tcx>>

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

entry_fn: QueryState<DepKind, 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).

plugin_registrar_fn: QueryState<DepKind, plugin_registrar_fn<'tcx>>

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

proc_macro_decls_static: QueryState<DepKind, proc_macro_decls_static<'tcx>>

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

crate_disambiguator: QueryState<DepKind, crate_disambiguator<'tcx>>

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

crate_hash: QueryState<DepKind, crate_hash<'tcx>>

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

crate_host_hash: QueryState<DepKind, crate_host_hash<'tcx>>

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

original_crate_name: QueryState<DepKind, original_crate_name<'tcx>>

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

extra_filename: QueryState<DepKind, extra_filename<'tcx>>

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

crate_extern_paths: QueryState<DepKind, crate_extern_paths<'tcx>>

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

implementations_of_trait: QueryState<DepKind, 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).

all_trait_implementations: QueryState<DepKind, all_trait_implementations<'tcx>>

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

is_dllimport_foreign_item: QueryState<DepKind, is_dllimport_foreign_item<'tcx>>

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

is_statically_included_foreign_item: QueryState<DepKind, is_statically_included_foreign_item<'tcx>>

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

native_library_kind: QueryState<DepKind, native_library_kind<'tcx>>

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

link_args: QueryState<DepKind, link_args<'tcx>>

[query description - consider adding a doc-comment!] looking up link arguments for a crate

resolve_lifetimes: QueryState<DepKind, resolve_lifetimes<'tcx>>

Lifetime resolution. See middle::resolve_lifetimes.

named_region_map: QueryState<DepKind, named_region_map<'tcx>>

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

is_late_bound_map: QueryState<DepKind, is_late_bound_map<'tcx>>

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

object_lifetime_defaults_map: QueryState<DepKind, object_lifetime_defaults_map<'tcx>>

[query description - consider adding a doc-comment!] looking up lifetime defaults for a region

visibility: QueryState<DepKind, visibility<'tcx>>

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

type_uninhabited_from: QueryState<DepKind, type_uninhabited_from<'tcx>>

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

dep_kind: QueryState<DepKind, dep_kind<'tcx>>

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

crate_name: QueryState<DepKind, crate_name<'tcx>>

[query description - consider adding a doc-comment!] fetching what a crate is named

item_children: QueryState<DepKind, item_children<'tcx>>

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

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

get_lib_features: QueryState<DepKind, get_lib_features<'tcx>>

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

defined_lib_features: QueryState<DepKind, defined_lib_features<'tcx>>

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

get_lang_items: QueryState<DepKind, get_lang_items<'tcx>>

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

all_diagnostic_items: QueryState<DepKind, all_diagnostic_items<'tcx>>

Returns all diagnostic items defined in all crates.

defined_lang_items: QueryState<DepKind, defined_lang_items<'tcx>>

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

diagnostic_items: QueryState<DepKind, diagnostic_items<'tcx>>

Returns the diagnostic items defined in a crate.

missing_lang_items: QueryState<DepKind, missing_lang_items<'tcx>>

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

visible_parent_map: QueryState<DepKind, visible_parent_map<'tcx>>

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

trimmed_def_paths: QueryState<DepKind, trimmed_def_paths<'tcx>>

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

missing_extern_crate_item: QueryState<DepKind, missing_extern_crate_item<'tcx>>

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

used_crate_source: QueryState<DepKind, used_crate_source<'tcx>>

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

postorder_cnums: QueryState<DepKind, postorder_cnums<'tcx>>

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

upvars_mentioned: QueryState<DepKind, upvars_mentioned<'tcx>>

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

maybe_unused_trait_import: QueryState<DepKind, maybe_unused_trait_import<'tcx>>

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

maybe_unused_extern_crates: QueryState<DepKind, maybe_unused_extern_crates<'tcx>>

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

names_imported_by_glob_use: QueryState<DepKind, names_imported_by_glob_use<'tcx>>

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

stability_index: QueryState<DepKind, stability_index<'tcx>>

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

all_crate_nums: QueryState<DepKind, all_crate_nums<'tcx>>

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

all_traits: QueryState<DepKind, all_traits<'tcx>>

A vector of every trait accessible in the whole crate (i.e., including those from subcrates). This is used only for error reporting.

exported_symbols: QueryState<DepKind, exported_symbols<'tcx>>

The list of symbols exported from the given crate.

collect_and_partition_mono_items: QueryState<DepKind, collect_and_partition_mono_items<'tcx>>

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

is_codegened_item: QueryState<DepKind, is_codegened_item<'tcx>>

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

codegened_and_inlined_items: QueryState<DepKind, codegened_and_inlined_items<'tcx>>

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

codegen_unit: QueryState<DepKind, codegen_unit<'tcx>>

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

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

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

backend_optimization_level: QueryState<DepKind, backend_optimization_level<'tcx>>

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

output_filenames: QueryState<DepKind, output_filenames<'tcx>>

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

normalize_projection_ty: QueryState<DepKind, normalize_projection_ty<'tcx>>

Do not call this query directly: invoke normalize instead.

normalize_generic_arg_after_erasing_regions: QueryState<DepKind, normalize_generic_arg_after_erasing_regions<'tcx>>

Do not call this query directly: invoke normalize_erasing_regions instead.

implied_outlives_bounds: QueryState<DepKind, implied_outlives_bounds<'tcx>>

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

dropck_outlives: QueryState<DepKind, dropck_outlives<'tcx>>

Do not call this query directly: invoke infcx.at().dropck_outlives() instead.

evaluate_obligation: QueryState<DepKind, evaluate_obligation<'tcx>>

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

evaluate_goal: QueryState<DepKind, evaluate_goal<'tcx>>

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

type_implements_trait: QueryState<DepKind, type_implements_trait<'tcx>>

[query description - consider adding a doc-comment!] evaluating type_implements_trait {:?}

type_op_ascribe_user_type: QueryState<DepKind, type_op_ascribe_user_type<'tcx>>

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

type_op_eq: QueryState<DepKind, type_op_eq<'tcx>>

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

type_op_subtype: QueryState<DepKind, type_op_subtype<'tcx>>

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

type_op_prove_predicate: QueryState<DepKind, type_op_prove_predicate<'tcx>>

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

type_op_normalize_ty: QueryState<DepKind, type_op_normalize_ty<'tcx>>

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

type_op_normalize_predicate: QueryState<DepKind, type_op_normalize_predicate<'tcx>>

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

type_op_normalize_poly_fn_sig: QueryState<DepKind, type_op_normalize_poly_fn_sig<'tcx>>

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

type_op_normalize_fn_sig: QueryState<DepKind, type_op_normalize_fn_sig<'tcx>>

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

subst_and_check_impossible_predicates: QueryState<DepKind, subst_and_check_impossible_predicates<'tcx>>

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

method_autoderef_steps: QueryState<DepKind, method_autoderef_steps<'tcx>>

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

supported_target_features: QueryState<DepKind, supported_target_features<'tcx>>

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

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

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

features_query: QueryState<DepKind, features_query<'tcx>>

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

resolve_instance: QueryState<DepKind, resolve_instance<'tcx>>

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

resolve_instance_of_const_arg: QueryState<DepKind, resolve_instance_of_const_arg<'tcx>>

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

normalize_opaque_types: QueryState<DepKind, normalize_opaque_types<'tcx>>

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

conservative_is_privately_uninhabited: QueryState<DepKind, conservative_is_privately_uninhabited<'tcx>>

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

Implementations

impl<'tcx> Queries<'tcx>[src]

pub fn new(
    providers: IndexVec<CrateNum, Providers>,
    fallback_extern_providers: Providers
) -> Self
[src]

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

impl<'tcx> Queries<'tcx>[src]

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

Trait Implementations

impl<'tcx> QueryEngine<'tcx> for Queries<'tcx>[src]

fn trigger_delay_span_bug(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: trigger_delay_span_bug<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<trigger_delay_span_bug<'tcx>>
[src]

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

fn hir_crate(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: hir_crate<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<hir_crate<'tcx>>
[src]

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().

fn index_hir(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: index_hir<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<index_hir<'tcx>>
[src]

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

fn hir_module_items(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: hir_module_items<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<hir_module_items<'tcx>>
[src]

The items in a module.

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

fn hir_owner(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: hir_owner<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<hir_owner<'tcx>>
[src]

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.

fn hir_owner_nodes(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: hir_owner_nodes<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<hir_owner_nodes<'tcx>>
[src]

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.

fn hir_attrs(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: hir_attrs<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<hir_attrs<'tcx>>
[src]

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.

fn opt_const_param_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: opt_const_param_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<opt_const_param_of<'tcx>>
[src]

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`.
}

fn type_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_of<'tcx>>
[src]

Records the type of every item.

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

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

fn generics_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: generics_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<generics_of<'tcx>>
[src]

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

fn predicates_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: predicates_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<predicates_of<'tcx>>
[src]

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

fn explicit_item_bounds(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: explicit_item_bounds<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<explicit_item_bounds<'tcx>>
[src]

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.

fn item_bounds(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: item_bounds<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<item_bounds<'tcx>>
[src]

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.

fn projection_ty_from_predicates(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: projection_ty_from_predicates<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<projection_ty_from_predicates<'tcx>>
[src]

[query description - consider adding a doc-comment!] finding projection type inside predicates of tcx.def_path_str(key.0)

fn native_libraries(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: native_libraries<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<native_libraries<'tcx>>
[src]

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

fn lint_levels(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lint_levels<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<lint_levels<'tcx>>
[src]

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

fn parent_module_from_def_id(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: parent_module_from_def_id<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<parent_module_from_def_id<'tcx>>
[src]

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

fn expn_that_defined(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: expn_that_defined<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<expn_that_defined<'tcx>>
[src]

Internal helper query. Use tcx.expansion_that_defined instead

fn is_panic_runtime(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_panic_runtime<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_panic_runtime<'tcx>>
[src]

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

fn mir_keys(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_keys<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_keys<'tcx>>
[src]

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

fn mir_const_qualif(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_const_qualif<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_const_qualif<'tcx>>
[src]

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.

fn mir_const_qualif_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_const_qualif_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_const_qualif_const_arg<'tcx>>
[src]

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

fn mir_built(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_built<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_built<'tcx>>
[src]

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

fn mir_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_const<'tcx>>
[src]

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.

fn mir_abstract_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_abstract_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_abstract_const<'tcx>>
[src]

Try to build an abstract representation of the given constant.

fn mir_abstract_const_of_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_abstract_const_of_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_abstract_const_of_const_arg<'tcx>>
[src]

Try to build an abstract representation of the given constant.

fn try_unify_abstract_consts(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: try_unify_abstract_consts<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<try_unify_abstract_consts<'tcx>>
[src]

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

fn mir_drops_elaborated_and_const_checked(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_drops_elaborated_and_const_checked<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_drops_elaborated_and_const_checked<'tcx>>
[src]

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

fn mir_for_ctfe(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_for_ctfe<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_for_ctfe<'tcx>>
[src]

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

fn mir_for_ctfe_of_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_for_ctfe_of_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_for_ctfe_of_const_arg<'tcx>>
[src]

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

fn mir_promoted(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_promoted<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_promoted<'tcx>>
[src]

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

fn optimized_mir(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: optimized_mir<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<optimized_mir<'tcx>>
[src]

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.

fn coverageinfo(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: coverageinfo<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<coverageinfo<'tcx>>
[src]

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

fn covered_file_name(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: covered_file_name<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<covered_file_name<'tcx>>
[src]

Returns the name of the file that contains the function body, if instrumented for coverage.

fn covered_code_regions(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: covered_code_regions<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<covered_code_regions<'tcx>>
[src]

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.

fn promoted_mir(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: promoted_mir<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<promoted_mir<'tcx>>
[src]

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.

fn promoted_mir_of_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: promoted_mir_of_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<promoted_mir_of_const_arg<'tcx>>
[src]

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

fn erase_regions_ty(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: erase_regions_ty<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<erase_regions_ty<'tcx>>
[src]

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.

fn wasm_import_module_map(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: wasm_import_module_map<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<wasm_import_module_map<'tcx>>
[src]

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

fn predicates_defined_on(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: predicates_defined_on<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<predicates_defined_on<'tcx>>
[src]

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.

fn trait_explicit_predicates_and_bounds(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: trait_explicit_predicates_and_bounds<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<trait_explicit_predicates_and_bounds<'tcx>>
[src]

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.

fn explicit_predicates_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: explicit_predicates_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<explicit_predicates_of<'tcx>>
[src]

Returns the predicates written explicitly by the user.

fn inferred_outlives_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: inferred_outlives_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<inferred_outlives_of<'tcx>>
[src]

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

fn super_predicates_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: super_predicates_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<super_predicates_of<'tcx>>
[src]

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

fn super_predicates_that_define_assoc_type(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: super_predicates_that_define_assoc_type<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<super_predicates_that_define_assoc_type<'tcx>>
[src]

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.

fn type_param_predicates(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_param_predicates<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_param_predicates<'tcx>>
[src]

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

fn trait_def(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: trait_def<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<trait_def<'tcx>>
[src]

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

fn adt_def(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: adt_def<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<adt_def<'tcx>>
[src]

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

fn adt_destructor(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: adt_destructor<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<adt_destructor<'tcx>>
[src]

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

fn adt_sized_constraint(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: adt_sized_constraint<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<adt_sized_constraint<'tcx>>
[src]

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

fn adt_dtorck_constraint(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: adt_dtorck_constraint<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<adt_dtorck_constraint<'tcx>>
[src]

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

fn is_const_fn_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_const_fn_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_const_fn_raw<'tcx>>
[src]

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.

fn is_const_impl_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_const_impl_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_const_impl_raw<'tcx>>
[src]

Returns true if this is a const impl. Do not call this function manually.

This query caches the base data for the is_const_impl helper function, which also takes into account stability attributes (e.g., #[rustc_const_unstable]).

fn asyncness(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: asyncness<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<asyncness<'tcx>>
[src]

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

fn is_promotable_const_fn(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_promotable_const_fn<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_promotable_const_fn<'tcx>>
[src]

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

fn is_foreign_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_foreign_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_foreign_item<'tcx>>
[src]

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

fn static_mutability(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: static_mutability<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<static_mutability<'tcx>>
[src]

Returns Some(mutability) if the node pointed to by def_id is a static item.

fn generator_kind(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: generator_kind<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<generator_kind<'tcx>>
[src]

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

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

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

fn variances_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: variances_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<variances_of<'tcx>>
[src]

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

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

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

fn associated_item_def_ids(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: associated_item_def_ids<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<associated_item_def_ids<'tcx>>
[src]

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

fn associated_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: associated_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<associated_item<'tcx>>
[src]

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

fn associated_items(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: associated_items<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<associated_items<'tcx>>
[src]

Collects the associated items defined on a trait or impl.

fn impl_trait_ref(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: impl_trait_ref<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<impl_trait_ref<'tcx>>
[src]

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

fn impl_polarity(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: impl_polarity<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<impl_polarity<'tcx>>
[src]

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

fn issue33140_self_ty(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: issue33140_self_ty<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<issue33140_self_ty<'tcx>>
[src]

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

fn inherent_impls(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: inherent_impls<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<inherent_impls<'tcx>>
[src]

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.

fn unsafety_check_result(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: unsafety_check_result<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<unsafety_check_result<'tcx>>
[src]

The result of unsafety-checking this LocalDefId.

fn unsafety_check_result_for_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: unsafety_check_result_for_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<unsafety_check_result_for_const_arg<'tcx>>
[src]

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

fn unsafe_derive_on_repr_packed(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: unsafe_derive_on_repr_packed<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<unsafe_derive_on_repr_packed<'tcx>>
[src]

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

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

fn fn_sig(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: fn_sig<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<fn_sig<'tcx>>
[src]

The signature of functions.

fn lint_mod(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lint_mod<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<lint_mod<'tcx>>
[src]

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

fn check_mod_attrs(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_attrs<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_attrs<'tcx>>
[src]

Checks the attributes in the module.

fn check_mod_unstable_api_usage(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_unstable_api_usage<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_unstable_api_usage<'tcx>>
[src]

[query description - consider adding a doc-comment!] checking for unstable API usage in describe_as_module(key, tcx)

fn check_mod_const_bodies(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_const_bodies<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_const_bodies<'tcx>>
[src]

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

fn check_mod_loops(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_loops<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_loops<'tcx>>
[src]

Checks the loops in the module.

fn check_mod_naked_functions(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_naked_functions<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_naked_functions<'tcx>>
[src]

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

fn check_mod_item_types(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_item_types<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_item_types<'tcx>>
[src]

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

fn check_mod_privacy(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_privacy<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_privacy<'tcx>>
[src]

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

fn check_mod_intrinsics(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_intrinsics<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_intrinsics<'tcx>>
[src]

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

fn check_mod_liveness(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_liveness<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_liveness<'tcx>>
[src]

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

fn check_mod_impl_wf(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_mod_impl_wf<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_mod_impl_wf<'tcx>>
[src]

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

fn collect_mod_item_types(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: collect_mod_item_types<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<collect_mod_item_types<'tcx>>
[src]

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

fn coerce_unsized_info(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: coerce_unsized_info<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<coerce_unsized_info<'tcx>>
[src]

Caches CoerceUnsized kinds for impls on custom types.

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

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

fn typeck(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: typeck<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<typeck<'tcx>>
[src]

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

fn typeck_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: typeck_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<typeck_const_arg<'tcx>>
[src]

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

fn diagnostic_only_typeck(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: diagnostic_only_typeck<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<diagnostic_only_typeck<'tcx>>
[src]

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

fn used_trait_imports(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: used_trait_imports<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<used_trait_imports<'tcx>>
[src]

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

fn has_typeck_results(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: has_typeck_results<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<has_typeck_results<'tcx>>
[src]

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

fn coherent_trait(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: coherent_trait<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<coherent_trait<'tcx>>
[src]

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

fn mir_borrowck(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_borrowck<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_borrowck<'tcx>>
[src]

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

fn mir_borrowck_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_borrowck_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_borrowck_const_arg<'tcx>>
[src]

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

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

Gets a complete map from all types to their inherent impls. Not meant to be used directly outside of coherence. (Defined only for LOCAL_CRATE.)

fn crate_inherent_impls_overlap_check(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_inherent_impls_overlap_check<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_inherent_impls_overlap_check<'tcx>>
[src]

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

fn mir_callgraph_reachable(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_callgraph_reachable<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_callgraph_reachable<'tcx>>
[src]

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.

fn mir_inliner_callees(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_inliner_callees<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_inliner_callees<'tcx>>
[src]

Obtain all the calls into other local functions

fn eval_to_allocation_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: eval_to_allocation_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<eval_to_allocation_raw<'tcx>>
[src]

Evaluates a constant and returns the computed allocation.

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

fn eval_to_const_value_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: eval_to_const_value_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<eval_to_const_value_raw<'tcx>>
[src]

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.

fn const_to_valtree(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: const_to_valtree<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<const_to_valtree<'tcx>>
[src]

Convert an evaluated constant to a type level constant or return None if that is not possible.

fn destructure_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: destructure_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<destructure_const<'tcx>>
[src]

Destructure a constant ADT or array into its variant index and its field values.

fn deref_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: deref_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<deref_const<'tcx>>
[src]

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

fn const_caller_location(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: const_caller_location<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<const_caller_location<'tcx>>
[src]

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

fn lit_to_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lit_to_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<lit_to_const<'tcx>>
[src]

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

fn check_match(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_match<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_match<'tcx>>
[src]

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

fn privacy_access_levels(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: privacy_access_levels<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<privacy_access_levels<'tcx>>
[src]

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

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

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

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

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

fn region_scope_tree(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: region_scope_tree<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<region_scope_tree<'tcx>>
[src]

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.

fn mir_shims(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: mir_shims<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<mir_shims<'tcx>>
[src]

[query description - consider adding a doc-comment!] generating MIR shim for tcx.def_path_str(key.def_id())

fn symbol_name(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: symbol_name<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<symbol_name<'tcx>>
[src]

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.

fn opt_def_kind(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: opt_def_kind<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<opt_def_kind<'tcx>>
[src]

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

fn def_span(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: def_span<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<def_span<'tcx>>
[src]

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

fn def_ident_span(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: def_ident_span<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<def_ident_span<'tcx>>
[src]

[query description - consider adding a doc-comment!] looking up span for tcx.def_path_str(def_id) ’s identifier

fn lookup_stability(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lookup_stability<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<lookup_stability<'tcx>>
[src]

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

fn lookup_const_stability(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: lookup_const_stability<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<lookup_const_stability<'tcx>>
[src]

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

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

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

fn item_attrs(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: item_attrs<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<item_attrs<'tcx>>
[src]

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

fn codegen_fn_attrs(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: codegen_fn_attrs<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<codegen_fn_attrs<'tcx>>
[src]

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

fn fn_arg_names(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: fn_arg_names<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<fn_arg_names<'tcx>>
[src]

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

fn rendered_const(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: rendered_const<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<rendered_const<'tcx>>
[src]

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

fn impl_parent(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: impl_parent<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<impl_parent<'tcx>>
[src]

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

fn trait_of_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: trait_of_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<trait_of_item<'tcx>>
[src]

Given an associated_item, find the trait it belongs to. Return None if the DefId is not an associated item.

fn is_ctfe_mir_available(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_ctfe_mir_available<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_ctfe_mir_available<'tcx>>
[src]

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

fn is_mir_available(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_mir_available<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_mir_available<'tcx>>
[src]

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

fn vtable_methods(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: vtable_methods<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<vtable_methods<'tcx>>
[src]

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

fn codegen_fulfill_obligation(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: codegen_fulfill_obligation<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<codegen_fulfill_obligation<'tcx>>
[src]

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

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

Return all impl blocks in the current crate.

To allow caching this between crates, you must pass in LOCAL_CRATE as the crate number. Passing in any other crate will cause an ICE.

fn trait_impls_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: trait_impls_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<trait_impls_of<'tcx>>
[src]

Given a trait trait_id, return all known impl blocks.

fn specialization_graph_of(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: specialization_graph_of<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<specialization_graph_of<'tcx>>
[src]

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

fn object_safety_violations(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: object_safety_violations<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<object_safety_violations<'tcx>>
[src]

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

fn param_env(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: param_env<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<param_env<'tcx>>
[src]

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.

fn param_env_reveal_all_normalized(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: param_env_reveal_all_normalized<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<param_env_reveal_all_normalized<'tcx>>
[src]

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.

fn is_copy_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_copy_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_copy_raw<'tcx>>
[src]

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.

fn is_sized_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_sized_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_sized_raw<'tcx>>
[src]

Query backing TyS::is_sized.

fn is_freeze_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_freeze_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_freeze_raw<'tcx>>
[src]

Query backing TyS::is_freeze.

fn needs_drop_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: needs_drop_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<needs_drop_raw<'tcx>>
[src]

Query backing TyS::needs_drop.

fn has_structural_eq_impls(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: has_structural_eq_impls<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<has_structural_eq_impls<'tcx>>
[src]

Query backing TyS::is_structural_eq_shallow.

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

fn adt_drop_tys(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: adt_drop_tys<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<adt_drop_tys<'tcx>>
[src]

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.

fn layout_raw(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: layout_raw<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<layout_raw<'tcx>>
[src]

[query description - consider adding a doc-comment!] computing layout of env.value

fn dylib_dependency_formats(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: dylib_dependency_formats<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<dylib_dependency_formats<'tcx>>
[src]

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

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

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

fn is_compiler_builtins(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_compiler_builtins<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_compiler_builtins<'tcx>>
[src]

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

fn has_global_allocator(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: has_global_allocator<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<has_global_allocator<'tcx>>
[src]

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

fn has_panic_handler(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: has_panic_handler<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<has_panic_handler<'tcx>>
[src]

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

fn is_profiler_runtime(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_profiler_runtime<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_profiler_runtime<'tcx>>
[src]

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

fn panic_strategy(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: panic_strategy<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<panic_strategy<'tcx>>
[src]

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

fn is_no_builtins(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_no_builtins<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_no_builtins<'tcx>>
[src]

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

fn symbol_mangling_version(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: symbol_mangling_version<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<symbol_mangling_version<'tcx>>
[src]

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

fn extern_crate(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: extern_crate<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<extern_crate<'tcx>>
[src]

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

fn specializes(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: specializes<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<specializes<'tcx>>
[src]

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

fn in_scope_traits_map(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: in_scope_traits_map<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<in_scope_traits_map<'tcx>>
[src]

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

fn module_exports(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: module_exports<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<module_exports<'tcx>>
[src]

[query description - consider adding a doc-comment!] looking up items exported by tcx.def_path_str(def_id.to_def_id())

fn impl_defaultness(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: impl_defaultness<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<impl_defaultness<'tcx>>
[src]

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

fn check_item_well_formed(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_item_well_formed<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_item_well_formed<'tcx>>
[src]

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

fn check_trait_item_well_formed(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_trait_item_well_formed<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_trait_item_well_formed<'tcx>>
[src]

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

fn check_impl_item_well_formed(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: check_impl_item_well_formed<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<check_impl_item_well_formed<'tcx>>
[src]

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

fn reachable_non_generics(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: reachable_non_generics<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<reachable_non_generics<'tcx>>
[src]

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

fn is_reachable_non_generic(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_reachable_non_generic<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_reachable_non_generic<'tcx>>
[src]

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

fn is_unreachable_local_definition(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_unreachable_local_definition<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_unreachable_local_definition<'tcx>>
[src]

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

fn upstream_monomorphizations(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: upstream_monomorphizations<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<upstream_monomorphizations<'tcx>>
[src]

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().

fn upstream_monomorphizations_for(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: upstream_monomorphizations_for<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<upstream_monomorphizations_for<'tcx>>
[src]

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.

fn upstream_drop_glue_for(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: upstream_drop_glue_for<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<upstream_drop_glue_for<'tcx>>
[src]

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

fn foreign_modules(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: foreign_modules<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<foreign_modules<'tcx>>
[src]

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

fn entry_fn(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: entry_fn<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<entry_fn<'tcx>>
[src]

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

fn plugin_registrar_fn(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: plugin_registrar_fn<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<plugin_registrar_fn<'tcx>>
[src]

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

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

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

fn crate_disambiguator(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_disambiguator<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_disambiguator<'tcx>>
[src]

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

fn crate_hash(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_hash<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_hash<'tcx>>
[src]

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

fn crate_host_hash(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_host_hash<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_host_hash<'tcx>>
[src]

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

fn original_crate_name(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: original_crate_name<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<original_crate_name<'tcx>>
[src]

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

fn extra_filename(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: extra_filename<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<extra_filename<'tcx>>
[src]

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

fn crate_extern_paths(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_extern_paths<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_extern_paths<'tcx>>
[src]

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

fn implementations_of_trait(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: implementations_of_trait<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<implementations_of_trait<'tcx>>
[src]

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

fn all_trait_implementations(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: all_trait_implementations<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<all_trait_implementations<'tcx>>
[src]

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

fn is_dllimport_foreign_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_dllimport_foreign_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_dllimport_foreign_item<'tcx>>
[src]

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

fn is_statically_included_foreign_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_statically_included_foreign_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_statically_included_foreign_item<'tcx>>
[src]

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

fn native_library_kind(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: native_library_kind<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<native_library_kind<'tcx>>
[src]

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

[query description - consider adding a doc-comment!] looking up link arguments for a crate

fn resolve_lifetimes(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: resolve_lifetimes<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<resolve_lifetimes<'tcx>>
[src]

Lifetime resolution. See middle::resolve_lifetimes.

fn named_region_map(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: named_region_map<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<named_region_map<'tcx>>
[src]

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

fn is_late_bound_map(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_late_bound_map<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_late_bound_map<'tcx>>
[src]

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

fn object_lifetime_defaults_map(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: object_lifetime_defaults_map<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<object_lifetime_defaults_map<'tcx>>
[src]

[query description - consider adding a doc-comment!] looking up lifetime defaults for a region

fn visibility(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: visibility<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<visibility<'tcx>>
[src]

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

fn type_uninhabited_from(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_uninhabited_from<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_uninhabited_from<'tcx>>
[src]

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

fn dep_kind(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: dep_kind<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<dep_kind<'tcx>>
[src]

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

fn crate_name(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: crate_name<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<crate_name<'tcx>>
[src]

[query description - consider adding a doc-comment!] fetching what a crate is named

fn item_children(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: item_children<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<item_children<'tcx>>
[src]

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

fn extern_mod_stmt_cnum(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: extern_mod_stmt_cnum<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<extern_mod_stmt_cnum<'tcx>>
[src]

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

fn get_lib_features(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: get_lib_features<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<get_lib_features<'tcx>>
[src]

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

fn defined_lib_features(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: defined_lib_features<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<defined_lib_features<'tcx>>
[src]

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

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

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

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

Returns all diagnostic items defined in all crates.

fn defined_lang_items(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: defined_lang_items<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<defined_lang_items<'tcx>>
[src]

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

fn diagnostic_items(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: diagnostic_items<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<diagnostic_items<'tcx>>
[src]

Returns the diagnostic items defined in a crate.

fn missing_lang_items(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: missing_lang_items<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<missing_lang_items<'tcx>>
[src]

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

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

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

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

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

fn missing_extern_crate_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: missing_extern_crate_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<missing_extern_crate_item<'tcx>>
[src]

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

fn used_crate_source(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: used_crate_source<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<used_crate_source<'tcx>>
[src]

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

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

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

fn upvars_mentioned(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: upvars_mentioned<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<upvars_mentioned<'tcx>>
[src]

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

fn maybe_unused_trait_import(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: maybe_unused_trait_import<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<maybe_unused_trait_import<'tcx>>
[src]

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

fn maybe_unused_extern_crates(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: maybe_unused_extern_crates<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<maybe_unused_extern_crates<'tcx>>
[src]

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

fn names_imported_by_glob_use(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: names_imported_by_glob_use<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<names_imported_by_glob_use<'tcx>>
[src]

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

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

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

fn all_crate_nums(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: all_crate_nums<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<all_crate_nums<'tcx>>
[src]

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

fn all_traits(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: all_traits<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<all_traits<'tcx>>
[src]

A vector of every trait accessible in the whole crate (i.e., including those from subcrates). This is used only for error reporting.

fn exported_symbols(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: exported_symbols<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<exported_symbols<'tcx>>
[src]

The list of symbols exported from the given crate.

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

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

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

fn is_codegened_item(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: is_codegened_item<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<is_codegened_item<'tcx>>
[src]

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

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

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

fn codegen_unit(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: codegen_unit<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<codegen_unit<'tcx>>
[src]

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

fn unused_generic_params(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: unused_generic_params<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<unused_generic_params<'tcx>>
[src]

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

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

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

fn output_filenames(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: output_filenames<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<output_filenames<'tcx>>
[src]

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

fn normalize_projection_ty(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: normalize_projection_ty<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<normalize_projection_ty<'tcx>>
[src]

Do not call this query directly: invoke normalize instead.

fn normalize_generic_arg_after_erasing_regions(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: normalize_generic_arg_after_erasing_regions<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<normalize_generic_arg_after_erasing_regions<'tcx>>
[src]

Do not call this query directly: invoke normalize_erasing_regions instead.

fn implied_outlives_bounds(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: implied_outlives_bounds<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<implied_outlives_bounds<'tcx>>
[src]

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

fn dropck_outlives(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: dropck_outlives<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<dropck_outlives<'tcx>>
[src]

Do not call this query directly: invoke infcx.at().dropck_outlives() instead.

fn evaluate_obligation(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: evaluate_obligation<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<evaluate_obligation<'tcx>>
[src]

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

fn evaluate_goal(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: evaluate_goal<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<evaluate_goal<'tcx>>
[src]

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

fn type_implements_trait(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_implements_trait<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_implements_trait<'tcx>>
[src]

[query description - consider adding a doc-comment!] evaluating type_implements_trait {:?}

fn type_op_ascribe_user_type(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_ascribe_user_type<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_ascribe_user_type<'tcx>>
[src]

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

fn type_op_eq(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_eq<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_eq<'tcx>>
[src]

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

fn type_op_subtype(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_subtype<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_subtype<'tcx>>
[src]

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

fn type_op_prove_predicate(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_prove_predicate<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_prove_predicate<'tcx>>
[src]

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

fn type_op_normalize_ty(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_normalize_ty<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_normalize_ty<'tcx>>
[src]

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

fn type_op_normalize_predicate(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_normalize_predicate<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_normalize_predicate<'tcx>>
[src]

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

fn type_op_normalize_poly_fn_sig(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_normalize_poly_fn_sig<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_normalize_poly_fn_sig<'tcx>>
[src]

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

fn type_op_normalize_fn_sig(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: type_op_normalize_fn_sig<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<type_op_normalize_fn_sig<'tcx>>
[src]

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

fn subst_and_check_impossible_predicates(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: subst_and_check_impossible_predicates<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<subst_and_check_impossible_predicates<'tcx>>
[src]

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

fn method_autoderef_steps(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: method_autoderef_steps<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<method_autoderef_steps<'tcx>>
[src]

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

fn supported_target_features(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: supported_target_features<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<supported_target_features<'tcx>>
[src]

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

fn instance_def_size_estimate(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: instance_def_size_estimate<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<instance_def_size_estimate<'tcx>>
[src]

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

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

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

fn resolve_instance(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: resolve_instance<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<resolve_instance<'tcx>>
[src]

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

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

fn resolve_instance_of_const_arg(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: resolve_instance_of_const_arg<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<resolve_instance_of_const_arg<'tcx>>
[src]

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

fn normalize_opaque_types(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: normalize_opaque_types<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<normalize_opaque_types<'tcx>>
[src]

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

fn conservative_is_privately_uninhabited(
    &'tcx self,
    tcx: TyCtxt<'tcx>,
    span: Span,
    key: conservative_is_privately_uninhabited<'tcx>,
    lookup: QueryLookup,
    mode: QueryMode
) -> Option<conservative_is_privately_uninhabited<'tcx>>
[src]

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

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for Queries<'tcx>

impl<'tcx> !Send for Queries<'tcx>

impl<'tcx> !Sync for Queries<'tcx>

impl<'tcx> Unpin for Queries<'tcx>

impl<'tcx> !UnwindSafe for Queries<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.