DepKind in rustc_middle::dep_graph::dep_node - Rust
Description: API documentation for the Rust `DepKind` enum in crate `rustc_middle`.

Skip to main content

## DepKind

# Enum DepKind

Source

    #[repr(u16)]pub enum DepKind {
    Show 329 variants    Null = 0,
        Red = 1,
        SideEffect = 2,
        AnonZeroDeps = 3,
        TraitSelect = 4,
        CompileCodegenUnit = 5,
        CompileMonoItem = 6,
        Metadata = 7,
        derive_macro_expansion = 8,
        trigger_delayed_bug = 9,
        registered_tools = 10,
        early_lint_checks = 11,
        env_var_os = 12,
        resolutions = 13,
        resolver_for_lowering_raw = 14,
        source_span = 15,
        hir_crate = 16,
        lower_delayed_owner = 17,
        delayed_owner = 18,
        hir_crate_items = 19,
        hir_module_items = 20,
        local_def_id_to_hir_id = 21,
        hir_owner_parent_q = 22,
        opt_hir_owner_nodes = 23,
        hir_attr_map = 24,
        opt_ast_lowering_delayed_lints = 25,
        const_param_default = 26,
        const_of_item = 27,
        type_of = 28,
        type_of_opaque = 29,
        type_of_opaque_hir_typeck = 30,
        type_alias_is_lazy = 31,
        collect_return_position_impl_trait_in_trait_tys = 32,
        opaque_ty_origin = 33,
        unsizing_params_for_adt = 34,
        analysis = 35,
        check_expectations = 36,
        generics_of = 37,
        predicates_of = 38,
        opaque_types_defined_by = 39,
        nested_bodies_within = 40,
        explicit_item_bounds = 41,
        explicit_item_self_bounds = 42,
        item_bounds = 43,
        item_self_bounds = 44,
        item_non_self_bounds = 45,
        impl_super_outlives = 46,
        native_libraries = 47,
        shallow_lint_levels_on = 48,
        lint_expectations = 49,
        lints_that_dont_need_to_run = 50,
        expn_that_defined = 51,
        is_panic_runtime = 52,
        check_representability = 53,
        check_representability_adt_ty = 54,
        params_in_repr = 55,
        thir_body = 56,
        mir_keys = 57,
        mir_const_qualif = 58,
        mir_built = 59,
        thir_abstract_const = 60,
        mir_drops_elaborated_and_const_checked = 61,
        mir_for_ctfe = 62,
        mir_promoted = 63,
        closure_typeinfo = 64,
        closure_saved_names_of_captured_variables = 65,
        mir_coroutine_witnesses = 66,
        check_coroutine_obligations = 67,
        check_potentially_region_dependent_goals = 68,
        optimized_mir = 69,
        coverage_attr_on = 70,
        coverage_ids_info = 71,
        promoted_mir = 72,
        erase_and_anonymize_regions_ty = 73,
        wasm_import_module_map = 74,
        trait_explicit_predicates_and_bounds = 75,
        explicit_predicates_of = 76,
        inferred_outlives_of = 77,
        explicit_super_predicates_of = 78,
        explicit_implied_predicates_of = 79,
        explicit_supertraits_containing_assoc_item = 80,
        const_conditions = 81,
        explicit_implied_const_bounds = 82,
        type_param_predicates = 83,
        trait_def = 84,
        adt_def = 85,
        adt_destructor = 86,
        adt_async_destructor = 87,
        adt_sizedness_constraint = 88,
        adt_dtorck_constraint = 89,
        constness = 90,
        asyncness = 91,
        is_promotable_const_fn = 92,
        coroutine_by_move_body_def_id = 93,
        coroutine_kind = 94,
        coroutine_for_closure = 95,
        coroutine_hidden_types = 96,
        crate_variances = 97,
        variances_of = 98,
        inferred_outlives_crate = 99,
        associated_item_def_ids = 100,
        associated_item = 101,
        associated_items = 102,
        impl_item_implementor_ids = 103,
        associated_types_for_impl_traits_in_trait_or_impl = 104,
        impl_trait_header = 105,
        impl_self_is_guaranteed_unsized = 106,
        inherent_impls = 107,
        incoherent_impls = 108,
        check_transmutes = 109,
        check_unsafety = 110,
        check_tail_calls = 111,
        assumed_wf_types = 112,
        assumed_wf_types_for_rpitit = 113,
        fn_sig = 114,
        lint_mod = 115,
        check_unused_traits = 116,
        check_mod_attrs = 117,
        check_mod_unstable_api_usage = 118,
        check_mod_privacy = 119,
        check_liveness = 120,
        live_symbols_and_ignored_derived_traits = 121,
        check_mod_deathness = 122,
        check_type_wf = 123,
        coerce_unsized_info = 124,
        typeck_root = 125,
        used_trait_imports = 126,
        coherent_trait = 127,
        mir_borrowck = 128,
        crate_inherent_impls = 129,
        crate_inherent_impls_validity_check = 130,
        crate_inherent_impls_overlap_check = 131,
        orphan_check_impl = 132,
        mir_callgraph_cyclic = 133,
        mir_inliner_callees = 134,
        tag_for_variant = 135,
        eval_to_allocation_raw = 136,
        eval_static_initializer = 137,
        eval_to_const_value_raw = 138,
        eval_to_valtree = 139,
        valtree_to_const_val = 140,
        lit_to_const = 141,
        check_match = 142,
        effective_visibilities = 143,
        check_private_in_public = 144,
        reachable_set = 145,
        region_scope_tree = 146,
        mir_shims = 147,
        symbol_name = 148,
        def_kind = 149,
        def_span = 150,
        def_ident_span = 151,
        ty_span = 152,
        lookup_stability = 153,
        lookup_const_stability = 154,
        lookup_default_body_stability = 155,
        should_inherit_track_caller = 156,
        inherited_align = 157,
        lookup_deprecation_entry = 158,
        is_doc_hidden = 159,
        is_doc_notable_trait = 160,
        attrs_for_def = 161,
        codegen_fn_attrs = 162,
        asm_target_features = 163,
        fn_arg_idents = 164,
        rendered_const = 165,
        rendered_precise_capturing_args = 166,
        impl_parent = 167,
        is_mir_available = 168,
        own_existential_vtable_entries = 169,
        vtable_entries = 170,
        first_method_vtable_slot = 171,
        supertrait_vtable_slot = 172,
        vtable_allocation = 173,
        codegen_select_candidate = 174,
        all_local_trait_impls = 175,
        local_trait_impls = 176,
        trait_impls_of = 177,
        specialization_graph_of = 178,
        dyn_compatibility_violations = 179,
        is_dyn_compatible = 180,
        param_env = 181,
        typing_env_normalized_for_post_analysis = 182,
        is_copy_raw = 183,
        is_use_cloned_raw = 184,
        is_sized_raw = 185,
        is_freeze_raw = 186,
        is_unsafe_unpin_raw = 187,
        is_unpin_raw = 188,
        is_async_drop_raw = 189,
        needs_drop_raw = 190,
        needs_async_drop_raw = 191,
        has_significant_drop_raw = 192,
        has_structural_eq_impl = 193,
        adt_drop_tys = 194,
        adt_async_drop_tys = 195,
        adt_significant_drop_tys = 196,
        list_significant_drop_tys = 197,
        layout_of = 198,
        fn_abi_of_fn_ptr = 199,
        fn_abi_of_instance_no_deduced_attrs = 200,
        fn_abi_of_instance_raw = 201,
        dylib_dependency_formats = 202,
        dependency_formats = 203,
        is_compiler_builtins = 204,
        has_global_allocator = 205,
        has_alloc_error_handler = 206,
        has_panic_handler = 207,
        is_profiler_runtime = 208,
        has_ffi_unwind_calls = 209,
        required_panic_strategy = 210,
        panic_in_drop_strategy = 211,
        is_no_builtins = 212,
        symbol_mangling_version = 213,
        extern_crate = 214,
        specialization_enabled_in = 215,
        specializes = 216,
        in_scope_traits_map = 217,
        defaultness = 218,
        default_field = 219,
        check_well_formed = 220,
        enforce_impl_non_lifetime_params_are_constrained = 221,
        reachable_non_generics = 222,
        is_reachable_non_generic = 223,
        is_unreachable_local_definition = 224,
        upstream_monomorphizations = 225,
        upstream_monomorphizations_for = 226,
        upstream_drop_glue_for = 227,
        upstream_async_drop_glue_for = 228,
        foreign_modules = 229,
        clashing_extern_declarations = 230,
        entry_fn = 231,
        proc_macro_decls_static = 232,
        crate_hash = 233,
        crate_host_hash = 234,
        extra_filename = 235,
        crate_extern_paths = 236,
        implementations_of_trait = 237,
        crate_incoherent_impls = 238,
        native_library = 239,
        inherit_sig_for_delegation_item = 240,
        resolve_bound_vars = 241,
        named_variable_map = 242,
        is_late_bound_map = 243,
        object_lifetime_default = 244,
        late_bound_vars_map = 245,
        opaque_captured_lifetimes = 246,
        visibility = 247,
        inhabited_predicate_adt = 248,
        inhabited_predicate_type = 249,
        crate_dep_kind = 250,
        crate_name = 251,
        module_children = 252,
        num_extern_def_ids = 253,
        lib_features = 254,
        stability_implications = 255,
        intrinsic_raw = 256,
        get_lang_items = 257,
        all_diagnostic_items = 258,
        defined_lang_items = 259,
        diagnostic_items = 260,
        missing_lang_items = 261,
        visible_parent_map = 262,
        trimmed_def_paths = 263,
        missing_extern_crate_item = 264,
        used_crate_source = 265,
        debugger_visualizers = 266,
        postorder_cnums = 267,
        is_private_dep = 268,
        allocator_kind = 269,
        alloc_error_handler_kind = 270,
        upvars_mentioned = 271,
        crates = 272,
        used_crates = 273,
        duplicate_crate_names = 274,
        traits = 275,
        trait_impls_in_crate = 276,
        stable_order_of_exportable_impls = 277,
        exportable_items = 278,
        exported_non_generic_symbols = 279,
        exported_generic_symbols = 280,
        collect_and_partition_mono_items = 281,
        is_codegened_item = 282,
        codegen_unit = 283,
        backend_optimization_level = 284,
        output_filenames = 285,
        normalize_canonicalized_projection = 286,
        normalize_canonicalized_free_alias = 287,
        normalize_canonicalized_inherent_projection = 288,
        try_normalize_generic_arg_after_erasing_regions = 289,
        implied_outlives_bounds = 290,
        dropck_outlives = 291,
        evaluate_obligation = 292,
        type_op_ascribe_user_type = 293,
        type_op_prove_predicate = 294,
        type_op_normalize_ty = 295,
        type_op_normalize_clause = 296,
        type_op_normalize_poly_fn_sig = 297,
        type_op_normalize_fn_sig = 298,
        instantiate_and_check_impossible_predicates = 299,
        is_impossible_associated_item = 300,
        method_autoderef_steps = 301,
        evaluate_root_goal_for_proof_tree_raw = 302,
        rust_target_features = 303,
        implied_target_features = 304,
        features_query = 305,
        crate_for_resolver = 306,
        resolve_instance_raw = 307,
        reveal_opaque_types_in_bounds = 308,
        limits = 309,
        diagnostic_hir_wf_check = 310,
        global_backend_features = 311,
        check_validity_requirement = 312,
        compare_impl_item = 313,
        deduced_param_attrs = 314,
        doc_link_resolutions = 315,
        doc_link_traits_in_scope = 316,
        stripped_cfg_items = 317,
        generics_require_sized_self = 318,
        cross_crate_inlinable = 319,
        check_mono_item = 320,
        skip_move_check_fns = 321,
        items_of_instance = 322,
        size_estimate = 323,
        anon_const_kind = 324,
        trivial_const = 325,
        sanitizer_settings_for = 326,
        check_externally_implementable_items = 327,
        externally_implementable_items = 328,
    }

## Variants§

§

### Null = 0

We use this for most things when incr. comp. is turned off.

§

### Red = 1

We use this to create a forever-red node.

§

### SideEffect = 2

We use this to create a side effect node.

§

### AnonZeroDeps = 3

We use this to create the anon node with zero dependencies.

§

### TraitSelect = 4

§

### CompileCodegenUnit = 5

§

### CompileMonoItem = 6

§

### Metadata = 7

§

### derive_macro_expansion = 8

Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`. The key is:

- A unique key corresponding to the invocation of a macro.
- Token stream which serves as an input to the macro.

The output is the token stream generated by the proc macro.

§

### trigger_delayed_bug = 9

This exists purely for testing the interactions between delayed bugs and incremental.

§

### registered_tools = 10

Collects the list of all tools registered using `#![register_tool]`.

§

### early_lint_checks = 11

[query description - consider adding a doc-comment!] perform lints prior to AST lowering

§

### env_var_os = 12

Tracked access to environment variables.

Useful for the implementation of `std::env!`, `proc-macro`s change detection and other changes in the compiler’s behaviour that is easier to control with an environment variable than a flag.

NOTE: This currently does not work with dependency info in the analysis, codegen and linking passes, place extra code at the top of `rustc_interface::passes::write_dep_info` to make that work.

§

### resolutions = 13

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

§

### resolver_for_lowering_raw = 14

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

§

### source_span = 15

Return the span for a definition.

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

§

### hir_crate = 16

Represents crate as a whole (as distinct from the top-level crate module).

If you call `tcx.hir_crate(())` 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_crate(())`; instead, prefer wrappers like `TyCtxt::hir_visit_all_item_likes_in_crate`.

§

### lower_delayed_owner = 17

[query description - consider adding a doc-comment!] lowering the delayed AST owner `tcx.def_path_str(def_id)`

§

### delayed_owner = 18

[query description - consider adding a doc-comment!] getting child of lowered delayed AST owner `tcx.def_path_str(def_id)`

§

### hir_crate_items = 19

All items in the crate.

§

### hir_module_items = 20

The items in a module.

This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`. Avoid calling this query directly.

§

### local_def_id_to_hir_id = 21

Returns HIR ID for the given `LocalDefId`.

§

### hir_owner_parent_q = 22

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

This can be conveniently accessed by `tcx.hir_*` methods. Avoid calling this query directly.

§

### opt_hir_owner_nodes = 23

Gives access to the HIR nodes and bodies inside `key` if it’s a HIR owner.

This can be conveniently accessed by `tcx.hir_*` methods. Avoid calling this query directly.

§

### hir_attr_map = 24

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

This can be conveniently accessed by `tcx.hir_*` methods. Avoid calling this query directly.

§

### opt_ast_lowering_delayed_lints = 25

Gives access to lints emitted during ast lowering.

This can be conveniently accessed by `tcx.hir_*` methods. Avoid calling this query directly.

§

### const_param_default = 26

Returns the default of the const pararameter given by `DefId`.

E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`.

§

### const_of_item = 27

Returns the const of the RHS of a (free or assoc) const item, if it is a `type const`.

When a const item is used in a type-level expression, like in equality for an assoc const projection, this allows us to retrieve the typesystem-appropriate representation of the const value.

This query will ICE if given a const that is not marked with `type const`.

§

### type_of = 28

Returns the type of the definition given by `DefId`.

For type aliases (whether eager or lazy) and associated types, this returns the underlying aliased type (not the corresponding alias type).

For opaque types, this returns and thus reveals the hidden type! If you want to detect cycle errors use `type_of_opaque` instead.

To clarify, for type definitions, this does not return the “type of a type” (aka kind or sort) in the type-theoretical sense! It merely returns the type primarily associated with it.

#### §Panics

This query will panic if the given definition doesn’t (and can’t conceptually) have an (underlying) type.

§

### type_of_opaque = 29

Returns the hidden type of the opaque type given by `DefId`.

#### §Panics

This query will panic if the given definition is not an opaque type.

§

### type_of_opaque_hir_typeck = 30

[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck

§

### type_alias_is_lazy = 31

Returns whether the type alias given by `DefId` is lazy.

I.e., if the type alias expands / ought to expand to a free alias type instead of the underlying aliased type.

Relevant for features `lazy_type_alias` and `type_alias_impl_trait`.

#### §Panics

This query may panic if the given definition is not a type alias.

§

### collect_return_position_impl_trait_in_trait_tys = 32

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

§

### opaque_ty_origin = 33

[query description - consider adding a doc-comment!] determine where the opaque originates from

§

### unsizing_params_for_adt = 34

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

§

### analysis = 35

The root query triggering all analysis passes like typeck or borrowck.

§

### check_expectations = 36

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

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

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

§

### generics_of = 37

Returns the generics of the definition given by `DefId`.

§

### predicates_of = 38

Returns the (elaborated) predicates of the definition given by `DefId` that must be proven true at usage sites (and which can be assumed at definition site).

This is almost always the “predicates query” that you want.

Tip: You can use `#[rustc_dump_predicates]` on an item to basically print the result of this query for use in UI tests or for debugging purposes.

§

### opaque_types_defined_by = 39

[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())`

§

### nested_bodies_within = 40

A list of all bodies inside of `key`, nested bodies are always stored before their parent.

§

### explicit_item_bounds = 41

Returns the explicitly user-written bounds on the associated or opaque type given by `DefId` that must be proven true at definition site (and which can be assumed at usage sites).

For associated types, these must be satisfied for an implementation to be well-formed, and for opaque types, these are required to be satisfied by the hidden type of the opaque.

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

Syntactially, these are the bounds written on associated types in trait definitions, or those after the `impl` keyword for an opaque:

ⓘ

    trait Trait { type X: Bound + 'lt; }
    //                    ^^^^^^^^^^^
    fn function() -> impl Debug + Display { /*...*/ }
    //                    ^^^^^^^^^^^^^^^

§

### explicit_item_self_bounds = 42

Returns the explicitly user-written bounds that share the `Self` type of the item.

These are a subset of the explicit item bounds that may explicitly be used for things like closure signature deduction.

§

### item_bounds = 43

Returns the (elaborated) bounds on the associated or opaque type given by `DefId` that must be proven true at definition site (and which can be assumed at usage sites).

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

Tip: You can use `#[rustc_dump_item_bounds]` on an item to basically print the result of this query for use in UI tests or for debugging purposes.

#### §Examples

    trait Trait { type Assoc: Eq + ?Sized; }

While `Self::explicit_item_bounds` returns `[<Self as Trait>::Assoc: Eq]` here, `item_bounds` returns:

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

§

### item_self_bounds = 44

[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)`

§

### item_non_self_bounds = 45

[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)`

§

### impl_super_outlives = 46

[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)`

§

### native_libraries = 47

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

- `extern` blocks (depending on their `link` attributes)
- the `libs` (`-l`) option

§

### shallow_lint_levels_on = 48

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

§

### lint_expectations = 49

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

§

### lints_that_dont_need_to_run = 50

[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow

§

### expn_that_defined = 51

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

§

### is_panic_runtime = 52

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

§

### check_representability = 53

Checks whether a type is representable or infinitely sized

§

### check_representability_adt_ty = 54

An implementation detail for the `check_representability` query. See that query for more details, particularly on the modifiers.

§

### params_in_repr = 55

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

§

### thir_body = 56

Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless `-Zno-steal-thir` is on.

§

### mir_keys = 57

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

§

### mir_const_qualif = 58

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_built = 59

Build the MIR for a given `DefId` and prepare it for const qualification.

See the rustc dev guide for more info.

§

### thir_abstract_const = 60

Try to build an abstract representation of the given constant.

§

### mir_drops_elaborated_and_const_checked = 61

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

§

### mir_for_ctfe = 62

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

§

### mir_promoted = 63

[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)`

§

### closure_typeinfo = 64

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

§

### closure_saved_names_of_captured_variables = 65

Returns names of captured upvars for closures and coroutines.

Here are some examples:

- `name__field1__field2` when the upvar is captured by value.
- `_ref__name__field` when the upvar is captured by reference.

For coroutines this only contains upvars that are shared by all states.

§

### mir_coroutine_witnesses = 66

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

§

### check_coroutine_obligations = 67

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

§

### check_potentially_region_dependent_goals = 68

Used in case `mir_borrowck` fails to prove an obligation. We generally assume that all goals we prove in MIR type check hold as we’ve already checked them in HIR typeck.

However, we replace each free region in the MIR body with a unique region inference variable. As we may rely on structural identity when proving goals this may cause a goal to no longer hold. We store obligations for which this may happen during HIR typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck encounters an unexpected error. We expect this to result in an error when used and delay a bug if it does not.

§

### optimized_mir = 69

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.

§

### coverage_attr_on = 70

Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on this def and any enclosing defs, up to the crate root.

Returns `false` if `#[coverage(off)]` was found, or `true` if either `#[coverage(on)]` or no coverage attribute was found.

§

### coverage_ids_info = 71

Scans through a function’s MIR after MIR optimizations, to prepare the information needed by codegen when `-Cinstrument-coverage` is active.

This includes the details of where to insert `llvm.instrprof.increment` intrinsics, and the expression tables to be embedded in the function’s coverage metadata.

FIXME(Zalathar): This query’s purpose has drifted a bit and should probably be renamed, but that can wait until after the potential follow-ups to #136053 have settled down.

Returns `None` for functions that were not instrumented.

§

### promoted_mir = 72

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.

§

### erase_and_anonymize_regions_ty = 73

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

§

### wasm_import_module_map = 74

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

§

### trait_explicit_predicates_and_bounds = 75

Returns the explicitly user-written predicates and bounds of the trait given by `DefId`.

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; }

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

#### §Panics

This query will panic if the given definition is not a trait.

§

### explicit_predicates_of = 76

Returns the explicitly user-written predicates of the definition given by `DefId` that must be proven true at usage sites (and which can be assumed at definition site).

You should probably use `TyCtxt::predicates_of` unless you’re looking for predicates with explicit spans for diagnostics purposes.

§

### inferred_outlives_of = 77

Returns the inferred outlives-predicates of the item given by `DefId`.

E.g., for `struct Foo<'a, T> { x: &'a T }`, this would return `[T: 'a]`.

Tip: You can use `#[rustc_dump_inferred_outlives]` on an item to basically print the result of this query for use in UI tests or for debugging purposes.

§

### explicit_super_predicates_of = 78

Returns the explicitly user-written super-predicates of the trait given by `DefId`.

These predicates are unelaborated and consequently don’t contain transitive 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 super-predicates must not be cyclic).

§

### explicit_implied_predicates_of = 79

The predicates of the trait that are implied during elaboration.

This is a superset of the super-predicates of the trait, but a subset of the predicates of the trait. For regular traits, this includes all super-predicates and their associated type bounds. For trait aliases, currently, this includes all of the predicates of the trait alias.

§

### explicit_supertraits_containing_assoc_item = 80

The Ident is the name of an associated type.The query returns only the subset of supertraits that define the given associated type. This is used to avoid cycles in resolving type-dependent associated item paths like `T::Item`.

§

### const_conditions = 81

Compute the conditions that need to hold for a conditionally-const item to be const. That is, compute the set of `[const]` where clauses for a given item.

This can be thought of as the `[const]` equivalent of `predicates_of`. These are the predicates that need to be proven at usage sites, and can be assumed at definition.

This query also computes the `[const]` where clauses for associated types, which are not “const”, but which have item bounds which may be `[const]`. These must hold for the `[const]` item bound to hold.

§

### explicit_implied_const_bounds = 82

Compute the const bounds that are implied for a conditionally-const item.

This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These are the predicates that need to proven at definition sites, and can be assumed at usage sites.

§

### type_param_predicates = 83

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

§

### trait_def = 84

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

§

### adt_def = 85

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

§

### adt_destructor = 86

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

§

### adt_async_destructor = 87

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

§

### adt_sizedness_constraint = 88

[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)`

§

### adt_dtorck_constraint = 89

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

§

### constness = 90

Returns the constness of the function-like1 definition given by `DefId`.

Tuple struct/variant constructors are always const, foreign functions are never const. The rest is const iff marked with keyword `const` (or rather its parent in the case of associated functions).

Do not call this query directly. It is only meant to cache the base data for the higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead.

Also note that neither of them takes into account feature gates, stability and const predicates/conditions!

#### §Panics

This query will panic if the given definition is not function-like1.

1. Tuple struct/variant constructors, closures and free, associated and foreign functions. ↩ 1 2

§

### asyncness = 91

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

§

### is_promotable_const_fn = 92

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

§

### coroutine_by_move_body_def_id = 93

The body of the coroutine, modified to take its upvars by move rather than by ref.

This is used by coroutine-closures, which must return a different flavor of coroutine when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which is run right after building the initial MIR, and will only be populated for coroutines which come out of the async closure desugaring.

§

### coroutine_kind = 94

Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine.

§

### coroutine_for_closure = 95

[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it

§

### coroutine_hidden_types = 96

[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine

§

### crate_variances = 97

Gets a map with the variances of every item in the local crate.

Do not call this query directly, use `Self::variances_of` instead.

§

### variances_of = 98

Returns the (inferred) variances of the item given by `DefId`.

The list of variances corresponds to the list of (early-bound) generic parameters of the item (including its parents).

Tip: You can use `#[rustc_dump_variances]` on an item to basically print the result of this query for use in UI tests or for debugging purposes.

§

### inferred_outlives_crate = 99

Gets a map with the inferred outlives-predicates of every item in the local crate.

Do not call this query directly, use `Self::inferred_outlives_of` instead.

§

### associated_item_def_ids = 100

Maps from an impl/trait or struct/variant `DefId` to a list of the `DefId`s of its associated items or fields.

§

### associated_item = 101

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

§

### associated_items = 102

Collects the associated items defined on a trait or impl.

§

### impl_item_implementor_ids = 103

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

For example, with the following code

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

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

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

§

### associated_types_for_impl_traits_in_trait_or_impl = 104

Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id to its associated type items that correspond to the RPITITs in its signature.

§

### impl_trait_header = 105

Given an `impl_id`, return the trait it implements along with some header information.

§

### impl_self_is_guaranteed_unsized = 106

Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due to either being one of the built-in unsized types (str/slice/dyn) or to be a struct whose tail is one of those types.

§

### inherent_impls = 107

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

§

### incoherent_impls = 108

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

§

### check_transmutes = 109

Unsafety-check this `LocalDefId`.

§

### check_unsafety = 110

Unsafety-check this `LocalDefId`.

§

### check_tail_calls = 111

Checks well-formedness of tail calls (`become f()`).

§

### assumed_wf_types = 112

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

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

§

### assumed_wf_types_for_rpitit = 113

We need to store the assumed_wf_types for an RPITIT so that impls of foreign traits with return-position impl trait in traits can inherit the right wf types.

§

### fn_sig = 114

Computes the signature of the function.

§

### lint_mod = 115

Performs lint checking for the module.

§

### check_unused_traits = 116

[query description - consider adding a doc-comment!] checking unused trait imports in crate

§

### check_mod_attrs = 117

Checks the attributes in the module.

§

### check_mod_unstable_api_usage = 118

Checks for uses of unstable APIs in the module.

§

### check_mod_privacy = 119

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

§

### check_liveness = 120

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

§

### live_symbols_and_ignored_derived_traits = 121

Return dead-code liveness summary for the crate.

§

### check_mod_deathness = 122

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

§

### check_type_wf = 123

[query description - consider adding a doc-comment!] checking that types are well-formed

§

### coerce_unsized_info = 124

Caches `CoerceUnsized` kinds for impls on custom types.

§

### typeck_root = 125

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

§

### used_trait_imports = 126

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

§

### coherent_trait = 127

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

§

### mir_borrowck = 128

Borrow-checks the given typeck root, e.g. functions, const/static items, and its children, e.g. closures, inline consts.

§

### crate_inherent_impls = 129

Gets a complete map from all types to their inherent impls.

Not meant to be used directly outside of coherence.

§

### crate_inherent_impls_validity_check = 130

Checks all types in the crate for overlap in their inherent impls. Reports errors.

Not meant to be used directly outside of coherence.

§

### crate_inherent_impls_overlap_check = 131

Checks all types in the crate for overlap in their inherent impls. Reports errors.

Not meant to be used directly outside of coherence.

§

### orphan_check_impl = 132

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

§

### mir_callgraph_cyclic = 133

Return the set of (transitive) callees that may result in a recursive call to `key`, if we were able to walk all callees.

§

### mir_inliner_callees = 134

Obtain all the calls into other local functions

§

### tag_for_variant = 135

Computes the tag (if any) for a given type and variant.

`None` means that the variant doesn’t need a tag (because it is niched).

#### §Panics

This query will panic for uninhabited variants and if the passed type is not an enum.

§

### eval_to_allocation_raw = 136

Evaluates a constant and returns the computed allocation.

Do not call this query directly, use `Self::eval_to_const_value_raw` or `Self::eval_to_valtree` instead.

§

### eval_static_initializer = 137

Evaluate a static’s initializer, returning the allocation of the initializer’s memory.

§

### eval_to_const_value_raw = 138

Evaluates const items or anonymous constants1 into a representation suitable for the type system and const generics.

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

1. Such as enum variant explicit discriminants or array lengths. ↩

§

### eval_to_valtree = 139

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

§

### valtree_to_const_val = 140

Converts a type-level constant value into a MIR constant value.

§

### lit_to_const = 141

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

§

### check_match = 142

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

§

### effective_visibilities = 143

Performs part of the privacy check and computes effective visibilities.

§

### check_private_in_public = 144

[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)`

§

### reachable_set = 145

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

§

### region_scope_tree = 146

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 = 147

Generates a MIR body for the shim.

§

### symbol_name = 148

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.

§

### def_kind = 149

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

§

### def_span = 150

Gets the span for the definition.

§

### def_ident_span = 151

Gets the span for the identifier of the definition.

§

### ty_span = 152

Gets the span for the type of the definition. Panics if it is not a definition that has a single type.

§

### lookup_stability = 153

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

§

### lookup_const_stability = 154

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

§

### lookup_default_body_stability = 155

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

§

### should_inherit_track_caller = 156

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

§

### inherited_align = 157

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

§

### lookup_deprecation_entry = 158

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

§

### is_doc_hidden = 159

Determines whether an item is annotated with `#[doc(hidden)]`.

§

### is_doc_notable_trait = 160

Determines whether an item is annotated with `#[doc(notable_trait)]`.

§

### attrs_for_def = 161

Returns the attributes on the item at `def_id`.

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

§

### codegen_fn_attrs = 162

Returns the `CodegenFnAttrs` for the item at `def_id`.

If possible, use `tcx.codegen_instance_attrs` instead. That function takes the instance kind into account.

For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`, but should not be applied if the instance kind is `InstanceKind::ReifyShim`. Using this query would include the attribute regardless of the actual instance kind at the call site.

§

### asm_target_features = 163

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

§

### fn_arg_idents = 164

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

§

### rendered_const = 165

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

§

### rendered_precise_capturing_args = 166

Gets the rendered precise capturing args for an opaque for use in rustdoc.

§

### impl_parent = 167

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

§

### is_mir_available = 168

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

§

### own_existential_vtable_entries = 169

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

§

### vtable_entries = 170

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

§

### first_method_vtable_slot = 171

[query description - consider adding a doc-comment!] finding the slot within the vtable of `key.self_ty()` for the implementation of `key.print_only_trait_name()`

§

### supertrait_vtable_slot = 172

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

§

### vtable_allocation = 173

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

§

### codegen_select_candidate = 174

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

§

### all_local_trait_impls = 175

Return all `impl` blocks in the current crate.

§

### local_trait_impls = 176

Return all `impl` blocks of the given trait in the current crate.

§

### trait_impls_of = 177

Given a trait `trait_id`, return all known `impl` blocks.

§

### specialization_graph_of = 178

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

§

### dyn_compatibility_violations = 179

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

§

### is_dyn_compatible = 180

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

§

### param_env = 181

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.

You should almost certainly not use this. If you already have an InferCtxt, then you should also probably have a `ParamEnv` from when it was built. If you don’t, then you should take a `TypingEnv` to ensure that you handle opaque types correctly.

§

### typing_env_normalized_for_post_analysis = 182

Like `param_env`, but returns the `ParamEnv` after all opaque types have been replaced with their hidden type. This is used in the old trait solver when in `PostAnalysis` mode and should not be called directly.

§

### is_copy_raw = 183

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_use_cloned_raw = 184

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

§

### is_sized_raw = 185

Query backing `Ty::is_sized`.

§

### is_freeze_raw = 186

Query backing `Ty::is_freeze`.

§

### is_unsafe_unpin_raw = 187

Query backing `Ty::is_unsafe_unpin`.

§

### is_unpin_raw = 188

Query backing `Ty::is_unpin`.

§

### is_async_drop_raw = 189

Query backing `Ty::is_async_drop`.

§

### needs_drop_raw = 190

Query backing `Ty::needs_drop`.

§

### needs_async_drop_raw = 191

Query backing `Ty::needs_async_drop`.

§

### has_significant_drop_raw = 192

Query backing `Ty::has_significant_drop_raw`.

§

### has_structural_eq_impl = 193

Query backing `Ty::is_structural_eq_shallow`.

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

§

### adt_drop_tys = 194

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

§

### adt_async_drop_tys = 195

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

§

### adt_significant_drop_tys = 196

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

§

### list_significant_drop_tys = 197

Returns a list of types which (a) have a potentially significant destructor and (b) may be dropped as a result of dropping a value of some type `ty` (in the given environment).

The idea of “significant” drop is somewhat informal and is used only for diagnostics and edition migrations. The idea is that a significant drop may have some visible side-effect on execution; freeing memory is NOT considered a side-effect. The rules are as follows:

- Type with no explicit drop impl do not have significant drop.
- Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation.

Note that insignificant drop is a “shallow” property. A type like `Vec<LockGuard>` does not have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>` then the return value would be `&[LockGuard]`. IMPORTANT: DO NOT run this query before promoted MIR body is constructed, because this query partially depends on that query. Otherwise, there is a risk of query cycles.

§

### layout_of = 198

Computes the layout of a type. Note that this implicitly executes in `TypingMode::PostAnalysis`, and will normalize the input type.

§

### fn_abi_of_fn_ptr = 199

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

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

§

### fn_abi_of_instance_no_deduced_attrs = 200

Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for direct calls* to an `fn`. Indirectly-passed parameters in the returned ABI might not include all possible codegen optimization attributes (such as `ReadOnly` or `CapturesNone`), as deducing these requires inspection of function bodies that can lead to cycles when performed during typeck. Post typeck, you should prefer the optimized ABI returned by `TyCtxt::fn_abi_of_instance`.

NB: the ABI returned by this query must not differ from that returned by `fn_abi_of_instance_raw` in any other way.

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

§

### fn_abi_of_instance_raw = 201

Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for direct calls* to an `fn`. Indirectly-passed parameters in the returned ABI will include applicable codegen optimization attributes, including `ReadOnly` and `CapturesNone` – deduction of which requires inspection of function bodies that can lead to cycles when performed during typeck. During typeck, you should therefore use instead the unoptimized ABI returned by `fn_abi_of_instance_no_deduced_attrs`.

For performance reasons, you should prefer to call the inherent `TyCtxt::fn_abi_of_instance` method rather than invoke this query: it delegates to this query if necessary, but where possible delegates instead to the `fn_abi_of_instance_no_deduced_attrs` query (thus avoiding unnecessary query system overhead).

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

§

### dylib_dependency_formats = 202

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

§

### dependency_formats = 203

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

§

### is_compiler_builtins = 204

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

§

### has_global_allocator = 205

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

§

### has_alloc_error_handler = 206

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

§

### has_panic_handler = 207

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

§

### is_profiler_runtime = 208

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

§

### has_ffi_unwind_calls = 209

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

§

### required_panic_strategy = 210

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

§

### panic_in_drop_strategy = 211

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

§

### is_no_builtins = 212

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

§

### symbol_mangling_version = 213

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

§

### extern_crate = 214

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

§

### specialization_enabled_in = 215

[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`

§

### specializes = 216

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

§

### in_scope_traits_map = 217

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

§

### defaultness = 218

Returns whether the impl or associated function has the `default` keyword. Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`.

§

### default_field = 219

Returns whether the field corresponding to the `DefId` has a default field value.

§

### check_well_formed = 220

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

§

### enforce_impl_non_lifetime_params_are_constrained = 221

[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` ’s generics are constrained by the impl header

§

### reachable_non_generics = 222

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

§

### is_reachable_non_generic = 223

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

§

### is_unreachable_local_definition = 224

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

§

### upstream_monomorphizations = 225

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`, `upstream_async_drop_glue_for`, or, even better, `Instance::upstream_monomorphization()`.

§

### upstream_monomorphizations_for = 226

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 = 227

Returns the upstream crate that exports drop-glue for the given type (`args` 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).

§

### upstream_async_drop_glue_for = 228

Returns the upstream crate that exports async-drop-glue for the given type (`args` is expected to be a single-item list containing the type one wants async-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 async-drop-glue in any upstream crate would invalidate all functions calling async-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 = 229

Returns a list of all `extern` blocks of a crate.

§

### clashing_extern_declarations = 230

Lint against `extern fn` declarations having incompatible types.

§

### entry_fn = 231

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

§

### proc_macro_decls_static = 232

Finds the `rustc_proc_macro_decls` item of a crate.

§

### crate_hash = 233

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

§

### crate_host_hash = 234

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

§

### extra_filename = 235

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

§

### crate_extern_paths = 236

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

§

### implementations_of_trait = 237

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

§

### crate_incoherent_impls = 238

Collects all incoherent impls for the given crate and type.

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

§

### native_library = 239

Get the corresponding native library from the `native_libraries` query

§

### inherit_sig_for_delegation_item = 240

[query description - consider adding a doc-comment!] inheriting delegation signature

§

### resolve_bound_vars = 241

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

§

### named_variable_map = 242

[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)`

§

### is_late_bound_map = 243

[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)`

§

### object_lifetime_default = 244

Returns the default lifetime to be used if a trait object type were to be passed for the type parameter given by `DefId`.

Tip: You can use `#[rustc_dump_object_lifetime_defaults]` on an item to basically print the result of this query for use in UI tests or for debugging purposes.

#### §Examples

- For `T` in `struct Foo<'a, T: 'a>(&'a T);`, this would be `Param('a)`
- For `T` in `struct Bar<'a, T>(&'a T);`, this would be `Empty`

#### §Panics

This query will panic if the given definition is not a type parameter.

§

### late_bound_vars_map = 245

[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)`

§

### opaque_captured_lifetimes = 246

For an opaque type, return the list of (captured lifetime, inner generic param).

ⓘ

    fn foo<'a: 'a, 'b, T>(&'b u8) -> impl Into<Self> + 'b { ... }

We would return `[('a, '_a), ('b, '_b)]`, with `'a` early-bound and `'b` late-bound.

After hir_ty_lowering, we get:

ⓘ

    opaque foo::<'a>::opaque<'_a, '_b>: Into<Foo<'_a>> + '_b;
                             ^^^^^^^^ inner generic params
    fn foo<'a>: for<'b> fn(&'b u8) -> foo::<'a>::opaque::<'a, 'b>
                                                          ^^^^^^ captured lifetimes

§

### visibility = 247

Computes the visibility of the provided `def_id`.

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

    use std::fmt::Debug;

    pub trait Foo<T: Debug> {}

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

§

### inhabited_predicate_adt = 248

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

§

### inhabited_predicate_type = 249

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

§

### crate_dep_kind = 250

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

§

### crate_name = 251

Gets the name of the crate.

§

### module_children = 252

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

§

### num_extern_def_ids = 253

Gets the number of definitions in a foreign crate.

This allows external tools to iterate over all definitions in a foreign crate.

This should never be used for the local crate, instead use `iter_local_def_id`.

§

### lib_features = 254

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

§

### stability_implications = 255

Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]` attributes. If a `#[unstable(feature = "implier", implied_by = "impliee")]` attribute exists, then this map will have a `impliee -> implier` entry.

This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should specify their implications (both `implies` and `implied_by`). If only one of the two attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this mapping is necessary for diagnostics. When a “unnecessary feature attribute” error is reported, only the `#[stable]` attribute information is available, so the map is necessary to know that the feature implies another feature. If it were reversed, and the `#[stable]` attribute had an `implies` meta item, then a map would be necessary when avoiding a “use of unstable feature” error for a feature that was implied.

§

### intrinsic_raw = 256

Whether the function is an intrinsic

§

### get_lang_items = 257

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

§

### all_diagnostic_items = 258

Returns all diagnostic items defined in all crates.

§

### defined_lang_items = 259

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

§

### diagnostic_items = 260

Returns the diagnostic items defined in a crate.

§

### missing_lang_items = 261

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

§

### visible_parent_map = 262

The visible parent map is a map from every item to a visible parent. It prefers the shortest visible path to an item. Used for diagnostics, for example path trimming. The parents are modules, enums or traits.

§

### trimmed_def_paths = 263

Collects the “trimmed”, shortest accessible paths to all items for diagnostics. See the provider docs for more info.

§

### missing_extern_crate_item = 264

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

§

### used_crate_source = 265

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

§

### debugger_visualizers = 266

Returns the debugger visualizers defined for this crate. NOTE: This query has to be marked `eval_always` because it reads data directly from disk that is not tracked anywhere else. I.e. it represents a genuine input to the query system.

§

### postorder_cnums = 267

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

§

### is_private_dep = 268

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

§

### allocator_kind = 269

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

§

### alloc_error_handler_kind = 270

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

§

### upvars_mentioned = 271

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

§

### crates = 272

All available crates in the graph, including those that should not be user-facing (such as private crates).

§

### used_crates = 273

[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively

§

### duplicate_crate_names = 274

All crates that share the same name as crate `c`.

This normally occurs when multiple versions of the same dependency are present in the dependency tree.

§

### traits = 275

A list of all traits in a crate, used by rustdoc and error reporting.

§

### trait_impls_in_crate = 276

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

§

### stable_order_of_exportable_impls = 277

[query description - consider adding a doc-comment!] fetching the stable impl’s order

§

### exportable_items = 278

[query description - consider adding a doc-comment!] fetching all exportable items in a crate

§

### exported_non_generic_symbols = 279

The list of non-generic symbols exported from the given crate.

This is separate from exported_generic_symbols to avoid having to deserialize all non-generic symbols too for upstream crates in the upstream_monomorphizations query.

- All names contained in `exported_non_generic_symbols(cnum)` are guaranteed to correspond to a publicly visible symbol in `cnum` machine code.
- The `exported_non_generic_symbols` and `exported_generic_symbols` sets of different crates do not intersect.

§

### exported_generic_symbols = 280

The list of generic symbols exported from the given crate.

- All names contained in `exported_generic_symbols(cnum)` are guaranteed to correspond to a publicly visible symbol in `cnum` machine code.
- The `exported_non_generic_symbols` and `exported_generic_symbols` sets of different crates do not intersect.

§

### collect_and_partition_mono_items = 281

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

§

### is_codegened_item = 282

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

§

### codegen_unit = 283

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

§

### backend_optimization_level = 284

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

§

### output_filenames = 285

Return the filenames where output artefacts shall be stored.

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

§

### normalize_canonicalized_projection = 286

Do not call this query directly: Invoke `normalize` instead.

§

### normalize_canonicalized_free_alias = 287

Do not call this query directly: Invoke `normalize` instead.

§

### normalize_canonicalized_inherent_projection = 288

Do not call this query directly: Invoke `normalize` instead.

§

### try_normalize_generic_arg_after_erasing_regions = 289

Do not call this query directly: invoke `try_normalize_erasing_regions` instead.

§

### implied_outlives_bounds = 290

[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})

§

### dropck_outlives = 291

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

§

### evaluate_obligation = 292

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

§

### type_op_ascribe_user_type = 293

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

§

### type_op_prove_predicate = 294

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

§

### type_op_normalize_ty = 295

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

§

### type_op_normalize_clause = 296

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

§

### type_op_normalize_poly_fn_sig = 297

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

§

### type_op_normalize_fn_sig = 298

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

§

### instantiate_and_check_impossible_predicates = 299

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

§

### is_impossible_associated_item = 300

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

§

### method_autoderef_steps = 301

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

§

### evaluate_root_goal_for_proof_tree_raw = 302

Used by `-Znext-solver` to compute proof trees.

§

### rust_target_features = 303

Returns the Rust target features for the current target. These are not always the same as LLVM target features!

§

### implied_target_features = 304

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

§

### features_query = 305

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

§

### crate_for_resolver = 306

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

§

### resolve_instance_raw = 307

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

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

§

### reveal_opaque_types_in_bounds = 308

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

§

### limits = 309

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

§

### diagnostic_hir_wf_check = 310

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

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

§

### global_backend_features = 311

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

§

### check_validity_requirement = 312

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

§

### compare_impl_item = 313

This takes the def-id of an associated item from a impl of a trait, and checks its validity against the trait item it corresponds to.

Any other def id will ICE.

§

### deduced_param_attrs = 314

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

§

### doc_link_resolutions = 315

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

§

### doc_link_traits_in_scope = 316

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

§

### stripped_cfg_items = 317

Get all item paths that were stripped by a `#[cfg]` in a particular crate. Should not be called for the local crate before the resolver outputs are created, as it is only fed there.

§

### generics_require_sized_self = 318

[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound

§

### cross_crate_inlinable = 319

[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates

§

### check_mono_item = 320

Perform monomorphization-time checking on this item. This is used for lints/errors that can only be checked once the instance is fully monomorphized.

§

### skip_move_check_fns = 321

Builds the set of functions that should be skipped for the move-size check.

§

### items_of_instance = 322

[query description - consider adding a doc-comment!] collecting items used by `key.0`

§

### size_estimate = 323

[query description - consider adding a doc-comment!] estimating codegen size of `key`

§

### anon_const_kind = 324

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

§

### trivial_const = 325

[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const

§

### sanitizer_settings_for = 326

Checks for the nearest `#[sanitize(xyz = "off")]` or `#[sanitize(xyz = "on")]` on this def and any enclosing defs, up to the crate root.

Returns the sanitizer settings for this def.

§

### check_externally_implementable_items = 327

[query description - consider adding a doc-comment!] check externally implementable items

§

### externally_implementable_items = 328

Returns a list of all `externally implementable items` crate.

## Implementations§

Source§

### impl DepKind

Source

#### pub(crate) const MAX: u16

This is the highest value a `DepKind` can have. It’s used during encoding to pack information into the unused bits.

Source

#### pub(crate) fn from_u16(u: u16) -> Self

Source

#### pub(crate) const fn as_u16(&self) -> u16

Source

#### pub const fn as_usize(&self) -> usize

## Trait Implementations§

Source§

### impl Clone for DepKind

Source§

#### fn clone(&self) -> DepKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more
Source§

### impl Debug for DepKind

Source§

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

### impl Hash for DepKind

Source§

#### fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given `Hasher`. Read more
1.3.0 · Source§

#### fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given `Hasher`. Read more
Source§

### impl PartialEq for DepKind

Source§

#### fn eq(&self, other: &DepKind) -> bool

Tests for `self` and `other` values to be equal, and is used by `==`.
1.0.0 (const: unstable) · Source§

#### fn ne(&self, other: &Rhs) -> bool

Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

### impl Copy for DepKind

Source§

### impl Eq for DepKind

Source§

### impl StructuralPartialEq for DepKind

## Auto Trait Implementations§

§

### impl DynSend for DepKind

§

### impl DynSync for DepKind

§

### impl Freeze for DepKind

§

### impl RefUnwindSafe for DepKind

§

### impl Send for DepKind

§

### impl Sync for DepKind

§

### impl Unpin for DepKind

§

### impl UnsafeUnpin for DepKind

§

### impl UnwindSafe for DepKind

## Blanket Implementations§

Source§

### impl<T> Aligned for T

Source§

#### const ALIGN: Alignment

Alignment of `Self`.
Source§

### impl<T> Any for T
where T: 'static + ?Sized,

Source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
Source§

### impl<T> AnyEq for T
where T: Any + PartialEq,

Source§

#### fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

#### fn as_any(&self) -> &(dyn Any + 'static)

Source§

### impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T
where T: Copy,

Source§

#### fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T

Source§

#### fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]

Source§

### impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T
where T: Copy,

Source§

#### fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T

Source§

#### fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]

Source§

### impl<T> Borrow<T> for T
where T: ?Sized,

Source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

### impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

### impl<T> CloneToUninit for T
where T: Clone,

Source§

#### unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (`clone_to_uninit`)
Performs copy-assignment from `self` to `dest`. Read more
Source§

### impl<T, R> CollectAndApply<T, R> for T

Source§

#### fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to `f(&iter.collect::<Vec<_>>())`.

Source§

#### type Output = R

Source§

### impl<T> DynClone for T
where T: Clone,

Source§

#### fn __clone_box(&self, _: Private) -> *mut ()

Source§

### impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

#### fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

### impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

#### fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

### impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

#### fn equivalent(&self, key: &K) -> bool

Compare self to `key` and return `true` if they are equal.
Source§

### impl<T> From<T> for T

Source§

#### fn from(t: T) -> T

Returns the argument unchanged.

Source§

### impl<T> Instrument for T

Source§

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided `Span`, returning an `Instrumented` wrapper. Read more
Source§

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
Source§

### impl<T, U> Into<U> for T
where U: From<T>,

Source§

#### fn into(self) -> U

Calls `U::from(self)`.

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

Source§

### impl<T> IntoEither for T

Source§

#### fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left` is `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
Source§

#### fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left(&self)` returns `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
Source§

### impl<K> IntoQueryKey<K> for K

Source§

#### fn into_query_key(self) -> K

Argument conversion from `Self` to `K`. This should always be a very cheap conversion, e.g. `LocalDefId::to_def_id`.
Source§

### impl<T> MaybeResult<T> for T

Source§

#### type Error = !

Source§

#### fn from(_: Result<T, <T as MaybeResult<T>>::Error>) -> T

Source§

#### fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>

Source§

### impl<T> Pointable for T

Source§

#### const ALIGN: usize

The alignment of pointer.
Source§

#### type Init = T

The type for initializers.
Source§

#### unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

#### unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

#### unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

#### unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

### impl<T> Same for T

Source§

#### type Output = T

Should always be `Self`
Source§

### impl<T> ToOwned for T
where T: Clone,

Source§

#### type Owned = T

The resulting type after obtaining ownership.
Source§

#### fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

#### fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

### impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

#### type Error = Infallible

The type returned in the event of a conversion error.
Source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

### impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

### impl<I, T, U> Upcast<I, U> for T
where U: UpcastFrom<I, T>,

Source§

#### fn upcast(self, interner: I) -> U

Source§

### impl<I, T> UpcastFrom<I, T> for T

Source§

#### fn upcast_from(from: T, _tcx: I) -> T

Source§

### impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

#### fn vzip(self) -> V

Source§

### impl<T> WithSubscriber for T

Source§

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
Source§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
Source§

### impl<T> ErasedDestructor for T
where T: 'static,

## Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain `repr(...)` attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 2 bytes

Size for each variant:

- `Null`: 0 bytes
- `Red`: 0 bytes
- `SideEffect`: 0 bytes
- `AnonZeroDeps`: 0 bytes
- `TraitSelect`: 0 bytes
- `CompileCodegenUnit`: 0 bytes
- `CompileMonoItem`: 0 bytes
- `Metadata`: 0 bytes
- `derive_macro_expansion`: 0 bytes
- `trigger_delayed_bug`: 0 bytes
- `registered_tools`: 0 bytes
- `early_lint_checks`: 0 bytes
- `env_var_os`: 0 bytes
- `resolutions`: 0 bytes
- `resolver_for_lowering_raw`: 0 bytes
- `source_span`: 0 bytes
- `hir_crate`: 0 bytes
- `lower_delayed_owner`: 0 bytes
- `delayed_owner`: 0 bytes
- `hir_crate_items`: 0 bytes
- `hir_module_items`: 0 bytes
- `local_def_id_to_hir_id`: 0 bytes
- `hir_owner_parent_q`: 0 bytes
- `opt_hir_owner_nodes`: 0 bytes
- `hir_attr_map`: 0 bytes
- `opt_ast_lowering_delayed_lints`: 0 bytes
- `const_param_default`: 0 bytes
- `const_of_item`: 0 bytes
- `type_of`: 0 bytes
- `type_of_opaque`: 0 bytes
- `type_of_opaque_hir_typeck`: 0 bytes
- `type_alias_is_lazy`: 0 bytes
- `collect_return_position_impl_trait_in_trait_tys`: 0 bytes
- `opaque_ty_origin`: 0 bytes
- `unsizing_params_for_adt`: 0 bytes
- `analysis`: 0 bytes
- `check_expectations`: 0 bytes
- `generics_of`: 0 bytes
- `predicates_of`: 0 bytes
- `opaque_types_defined_by`: 0 bytes
- `nested_bodies_within`: 0 bytes
- `explicit_item_bounds`: 0 bytes
- `explicit_item_self_bounds`: 0 bytes
- `item_bounds`: 0 bytes
- `item_self_bounds`: 0 bytes
- `item_non_self_bounds`: 0 bytes
- `impl_super_outlives`: 0 bytes
- `native_libraries`: 0 bytes
- `shallow_lint_levels_on`: 0 bytes
- `lint_expectations`: 0 bytes
- `lints_that_dont_need_to_run`: 0 bytes
- `expn_that_defined`: 0 bytes
- `is_panic_runtime`: 0 bytes
- `check_representability`: 0 bytes
- `check_representability_adt_ty`: 0 bytes
- `params_in_repr`: 0 bytes
- `thir_body`: 0 bytes
- `mir_keys`: 0 bytes
- `mir_const_qualif`: 0 bytes
- `mir_built`: 0 bytes
- `thir_abstract_const`: 0 bytes
- `mir_drops_elaborated_and_const_checked`: 0 bytes
- `mir_for_ctfe`: 0 bytes
- `mir_promoted`: 0 bytes
- `closure_typeinfo`: 0 bytes
- `closure_saved_names_of_captured_variables`: 0 bytes
- `mir_coroutine_witnesses`: 0 bytes
- `check_coroutine_obligations`: 0 bytes
- `check_potentially_region_dependent_goals`: 0 bytes
- `optimized_mir`: 0 bytes
- `coverage_attr_on`: 0 bytes
- `coverage_ids_info`: 0 bytes
- `promoted_mir`: 0 bytes
- `erase_and_anonymize_regions_ty`: 0 bytes
- `wasm_import_module_map`: 0 bytes
- `trait_explicit_predicates_and_bounds`: 0 bytes
- `explicit_predicates_of`: 0 bytes
- `inferred_outlives_of`: 0 bytes
- `explicit_super_predicates_of`: 0 bytes
- `explicit_implied_predicates_of`: 0 bytes
- `explicit_supertraits_containing_assoc_item`: 0 bytes
- `const_conditions`: 0 bytes
- `explicit_implied_const_bounds`: 0 bytes
- `type_param_predicates`: 0 bytes
- `trait_def`: 0 bytes
- `adt_def`: 0 bytes
- `adt_destructor`: 0 bytes
- `adt_async_destructor`: 0 bytes
- `adt_sizedness_constraint`: 0 bytes
- `adt_dtorck_constraint`: 0 bytes
- `constness`: 0 bytes
- `asyncness`: 0 bytes
- `is_promotable_const_fn`: 0 bytes
- `coroutine_by_move_body_def_id`: 0 bytes
- `coroutine_kind`: 0 bytes
- `coroutine_for_closure`: 0 bytes
- `coroutine_hidden_types`: 0 bytes
- `crate_variances`: 0 bytes
- `variances_of`: 0 bytes
- `inferred_outlives_crate`: 0 bytes
- `associated_item_def_ids`: 0 bytes
- `associated_item`: 0 bytes
- `associated_items`: 0 bytes
- `impl_item_implementor_ids`: 0 bytes
- `associated_types_for_impl_traits_in_trait_or_impl`: 0 bytes
- `impl_trait_header`: 0 bytes
- `impl_self_is_guaranteed_unsized`: 0 bytes
- `inherent_impls`: 0 bytes
- `incoherent_impls`: 0 bytes
- `check_transmutes`: 0 bytes
- `check_unsafety`: 0 bytes
- `check_tail_calls`: 0 bytes
- `assumed_wf_types`: 0 bytes
- `assumed_wf_types_for_rpitit`: 0 bytes
- `fn_sig`: 0 bytes
- `lint_mod`: 0 bytes
- `check_unused_traits`: 0 bytes
- `check_mod_attrs`: 0 bytes
- `check_mod_unstable_api_usage`: 0 bytes
- `check_mod_privacy`: 0 bytes
- `check_liveness`: 0 bytes
- `live_symbols_and_ignored_derived_traits`: 0 bytes
- `check_mod_deathness`: 0 bytes
- `check_type_wf`: 0 bytes
- `coerce_unsized_info`: 0 bytes
- `typeck_root`: 0 bytes
- `used_trait_imports`: 0 bytes
- `coherent_trait`: 0 bytes
- `mir_borrowck`: 0 bytes
- `crate_inherent_impls`: 0 bytes
- `crate_inherent_impls_validity_check`: 0 bytes
- `crate_inherent_impls_overlap_check`: 0 bytes
- `orphan_check_impl`: 0 bytes
- `mir_callgraph_cyclic`: 0 bytes
- `mir_inliner_callees`: 0 bytes
- `tag_for_variant`: 0 bytes
- `eval_to_allocation_raw`: 0 bytes
- `eval_static_initializer`: 0 bytes
- `eval_to_const_value_raw`: 0 bytes
- `eval_to_valtree`: 0 bytes
- `valtree_to_const_val`: 0 bytes
- `lit_to_const`: 0 bytes
- `check_match`: 0 bytes
- `effective_visibilities`: 0 bytes
- `check_private_in_public`: 0 bytes
- `reachable_set`: 0 bytes
- `region_scope_tree`: 0 bytes
- `mir_shims`: 0 bytes
- `symbol_name`: 0 bytes
- `def_kind`: 0 bytes
- `def_span`: 0 bytes
- `def_ident_span`: 0 bytes
- `ty_span`: 0 bytes
- `lookup_stability`: 0 bytes
- `lookup_const_stability`: 0 bytes
- `lookup_default_body_stability`: 0 bytes
- `should_inherit_track_caller`: 0 bytes
- `inherited_align`: 0 bytes
- `lookup_deprecation_entry`: 0 bytes
- `is_doc_hidden`: 0 bytes
- `is_doc_notable_trait`: 0 bytes
- `attrs_for_def`: 0 bytes
- `codegen_fn_attrs`: 0 bytes
- `asm_target_features`: 0 bytes
- `fn_arg_idents`: 0 bytes
- `rendered_const`: 0 bytes
- `rendered_precise_capturing_args`: 0 bytes
- `impl_parent`: 0 bytes
- `is_mir_available`: 0 bytes
- `own_existential_vtable_entries`: 0 bytes
- `vtable_entries`: 0 bytes
- `first_method_vtable_slot`: 0 bytes
- `supertrait_vtable_slot`: 0 bytes
- `vtable_allocation`: 0 bytes
- `codegen_select_candidate`: 0 bytes
- `all_local_trait_impls`: 0 bytes
- `local_trait_impls`: 0 bytes
- `trait_impls_of`: 0 bytes
- `specialization_graph_of`: 0 bytes
- `dyn_compatibility_violations`: 0 bytes
- `is_dyn_compatible`: 0 bytes
- `param_env`: 0 bytes
- `typing_env_normalized_for_post_analysis`: 0 bytes
- `is_copy_raw`: 0 bytes
- `is_use_cloned_raw`: 0 bytes
- `is_sized_raw`: 0 bytes
- `is_freeze_raw`: 0 bytes
- `is_unsafe_unpin_raw`: 0 bytes
- `is_unpin_raw`: 0 bytes
- `is_async_drop_raw`: 0 bytes
- `needs_drop_raw`: 0 bytes
- `needs_async_drop_raw`: 0 bytes
- `has_significant_drop_raw`: 0 bytes
- `has_structural_eq_impl`: 0 bytes
- `adt_drop_tys`: 0 bytes
- `adt_async_drop_tys`: 0 bytes
- `adt_significant_drop_tys`: 0 bytes
- `list_significant_drop_tys`: 0 bytes
- `layout_of`: 0 bytes
- `fn_abi_of_fn_ptr`: 0 bytes
- `fn_abi_of_instance_no_deduced_attrs`: 0 bytes
- `fn_abi_of_instance_raw`: 0 bytes
- `dylib_dependency_formats`: 0 bytes
- `dependency_formats`: 0 bytes
- `is_compiler_builtins`: 0 bytes
- `has_global_allocator`: 0 bytes
- `has_alloc_error_handler`: 0 bytes
- `has_panic_handler`: 0 bytes
- `is_profiler_runtime`: 0 bytes
- `has_ffi_unwind_calls`: 0 bytes
- `required_panic_strategy`: 0 bytes
- `panic_in_drop_strategy`: 0 bytes
- `is_no_builtins`: 0 bytes
- `symbol_mangling_version`: 0 bytes
- `extern_crate`: 0 bytes
- `specialization_enabled_in`: 0 bytes
- `specializes`: 0 bytes
- `in_scope_traits_map`: 0 bytes
- `defaultness`: 0 bytes
- `default_field`: 0 bytes
- `check_well_formed`: 0 bytes
- `enforce_impl_non_lifetime_params_are_constrained`: 0 bytes
- `reachable_non_generics`: 0 bytes
- `is_reachable_non_generic`: 0 bytes
- `is_unreachable_local_definition`: 0 bytes
- `upstream_monomorphizations`: 0 bytes
- `upstream_monomorphizations_for`: 0 bytes
- `upstream_drop_glue_for`: 0 bytes
- `upstream_async_drop_glue_for`: 0 bytes
- `foreign_modules`: 0 bytes
- `clashing_extern_declarations`: 0 bytes
- `entry_fn`: 0 bytes
- `proc_macro_decls_static`: 0 bytes
- `crate_hash`: 0 bytes
- `crate_host_hash`: 0 bytes
- `extra_filename`: 0 bytes
- `crate_extern_paths`: 0 bytes
- `implementations_of_trait`: 0 bytes
- `crate_incoherent_impls`: 0 bytes
- `native_library`: 0 bytes
- `inherit_sig_for_delegation_item`: 0 bytes
- `resolve_bound_vars`: 0 bytes
- `named_variable_map`: 0 bytes
- `is_late_bound_map`: 0 bytes
- `object_lifetime_default`: 0 bytes
- `late_bound_vars_map`: 0 bytes
- `opaque_captured_lifetimes`: 0 bytes
- `visibility`: 0 bytes
- `inhabited_predicate_adt`: 0 bytes
- `inhabited_predicate_type`: 0 bytes
- `crate_dep_kind`: 0 bytes
- `crate_name`: 0 bytes
- `module_children`: 0 bytes
- `num_extern_def_ids`: 0 bytes
- `lib_features`: 0 bytes
- `stability_implications`: 0 bytes
- `intrinsic_raw`: 0 bytes
- `get_lang_items`: 0 bytes
- `all_diagnostic_items`: 0 bytes
- `defined_lang_items`: 0 bytes
- `diagnostic_items`: 0 bytes
- `missing_lang_items`: 0 bytes
- `visible_parent_map`: 0 bytes
- `trimmed_def_paths`: 0 bytes
- `missing_extern_crate_item`: 0 bytes
- `used_crate_source`: 0 bytes
- `debugger_visualizers`: 0 bytes
- `postorder_cnums`: 0 bytes
- `is_private_dep`: 0 bytes
- `allocator_kind`: 0 bytes
- `alloc_error_handler_kind`: 0 bytes
- `upvars_mentioned`: 0 bytes
- `crates`: 0 bytes
- `used_crates`: 0 bytes
- `duplicate_crate_names`: 0 bytes
- `traits`: 0 bytes
- `trait_impls_in_crate`: 0 bytes
- `stable_order_of_exportable_impls`: 0 bytes
- `exportable_items`: 0 bytes
- `exported_non_generic_symbols`: 0 bytes
- `exported_generic_symbols`: 0 bytes
- `collect_and_partition_mono_items`: 0 bytes
- `is_codegened_item`: 0 bytes
- `codegen_unit`: 0 bytes
- `backend_optimization_level`: 0 bytes
- `output_filenames`: 0 bytes
- `normalize_canonicalized_projection`: 0 bytes
- `normalize_canonicalized_free_alias`: 0 bytes
- `normalize_canonicalized_inherent_projection`: 0 bytes
- `try_normalize_generic_arg_after_erasing_regions`: 0 bytes
- `implied_outlives_bounds`: 0 bytes
- `dropck_outlives`: 0 bytes
- `evaluate_obligation`: 0 bytes
- `type_op_ascribe_user_type`: 0 bytes
- `type_op_prove_predicate`: 0 bytes
- `type_op_normalize_ty`: 0 bytes
- `type_op_normalize_clause`: 0 bytes
- `type_op_normalize_poly_fn_sig`: 0 bytes
- `type_op_normalize_fn_sig`: 0 bytes
- `instantiate_and_check_impossible_predicates`: 0 bytes
- `is_impossible_associated_item`: 0 bytes
- `method_autoderef_steps`: 0 bytes
- `evaluate_root_goal_for_proof_tree_raw`: 0 bytes
- `rust_target_features`: 0 bytes
- `implied_target_features`: 0 bytes
- `features_query`: 0 bytes
- `crate_for_resolver`: 0 bytes
- `resolve_instance_raw`: 0 bytes
- `reveal_opaque_types_in_bounds`: 0 bytes
- `limits`: 0 bytes
- `diagnostic_hir_wf_check`: 0 bytes
- `global_backend_features`: 0 bytes
- `check_validity_requirement`: 0 bytes
- `compare_impl_item`: 0 bytes
- `deduced_param_attrs`: 0 bytes
- `doc_link_resolutions`: 0 bytes
- `doc_link_traits_in_scope`: 0 bytes
- `stripped_cfg_items`: 0 bytes
- `generics_require_sized_self`: 0 bytes
- `cross_crate_inlinable`: 0 bytes
- `check_mono_item`: 0 bytes
- `skip_move_check_fns`: 0 bytes
- `items_of_instance`: 0 bytes
- `size_estimate`: 0 bytes
- `anon_const_kind`: 0 bytes
- `trivial_const`: 0 bytes
- `sanitizer_settings_for`: 0 bytes
- `check_externally_implementable_items`: 0 bytes
- `externally_implementable_items`: 0 bytes