#[repr(u16)]
enum DepKindDefs {
Show 291 variants Null = 0, Red = 1, TraitSelect = 2, CompileCodegenUnit = 3, CompileMonoItem = 4, trigger_span_delayed_bug = 5, registered_tools = 6, early_lint_checks = 7, resolutions = 8, resolver_for_lowering = 9, source_span = 10, hir_crate = 11, hir_crate_items = 12, hir_module_items = 13, opt_local_def_id_to_hir_id = 14, hir_owner_parent = 15, opt_hir_owner_nodes = 16, hir_attrs = 17, const_param_default = 18, type_of = 19, type_of_opaque = 20, type_alias_is_lazy = 21, collect_return_position_impl_trait_in_trait_tys = 22, is_type_alias_impl_trait = 23, unsizing_params_for_adt = 24, analysis = 25, check_expectations = 26, generics_of = 27, predicates_of = 28, opaque_types_defined_by = 29, impl_trait_in_assoc_types_defined_by = 30, explicit_item_bounds = 31, item_bounds = 32, native_libraries = 33, shallow_lint_levels_on = 34, lint_expectations = 35, expn_that_defined = 36, is_panic_runtime = 37, representability = 38, representability_adt_ty = 39, params_in_repr = 40, thir_body = 41, thir_tree = 42, thir_flat = 43, mir_keys = 44, mir_const_qualif = 45, mir_built = 46, mir_const = 47, thir_abstract_const = 48, mir_drops_elaborated_and_const_checked = 49, mir_for_ctfe = 50, mir_promoted = 51, closure_typeinfo = 52, closure_saved_names_of_captured_variables = 53, mir_coroutine_witnesses = 54, check_coroutine_obligations = 55, optimized_mir = 56, coverage_ids_info = 57, promoted_mir = 58, erase_regions_ty = 59, wasm_import_module_map = 60, predicates_defined_on = 61, trait_explicit_predicates_and_bounds = 62, explicit_predicates_of = 63, inferred_outlives_of = 64, super_predicates_of = 65, implied_predicates_of = 66, super_predicates_that_define_assoc_item = 67, type_param_predicates = 68, trait_def = 69, adt_def = 70, adt_destructor = 71, adt_sized_constraint = 72, adt_dtorck_constraint = 73, constness = 74, asyncness = 75, is_promotable_const_fn = 76, coroutine_kind = 77, crate_variances = 78, variances_of = 79, inferred_outlives_crate = 80, associated_item_def_ids = 81, associated_item = 82, associated_items = 83, impl_item_implementor_ids = 84, associated_types_for_impl_traits_in_associated_fn = 85, associated_type_for_impl_trait_in_trait = 86, impl_trait_ref = 87, impl_polarity = 88, issue33140_self_ty = 89, inherent_impls = 90, incoherent_impls = 91, mir_unsafety_check_result = 92, check_unsafety = 93, assumed_wf_types = 94, assumed_wf_types_for_rpitit = 95, fn_sig = 96, lint_mod = 97, check_unused_traits = 98, check_mod_attrs = 99, check_mod_unstable_api_usage = 100, check_mod_const_bodies = 101, check_mod_loops = 102, check_mod_naked_functions = 103, check_mod_privacy = 104, check_liveness = 105, live_symbols_and_ignored_derived_traits = 106, check_mod_deathness = 107, check_mod_impl_wf = 108, check_mod_type_wf = 109, collect_mod_item_types = 110, coerce_unsized_info = 111, typeck = 112, diagnostic_only_typeck = 113, used_trait_imports = 114, has_typeck_results = 115, coherent_trait = 116, mir_borrowck = 117, crate_inherent_impls = 118, crate_inherent_impls_overlap_check = 119, orphan_check_impl = 120, mir_callgraph_reachable = 121, mir_inliner_callees = 122, eval_to_allocation_raw = 123, eval_to_const_value_raw = 124, eval_to_valtree = 125, valtree_to_const_val = 126, destructure_const = 127, lit_to_const = 128, check_match = 129, effective_visibilities = 130, check_private_in_public = 131, reachable_set = 132, region_scope_tree = 133, mir_shims = 134, symbol_name = 135, def_kind = 136, def_span = 137, def_ident_span = 138, lookup_stability = 139, lookup_const_stability = 140, lookup_default_body_stability = 141, should_inherit_track_caller = 142, lookup_deprecation_entry = 143, is_doc_hidden = 144, is_doc_notable_trait = 145, item_attrs = 146, codegen_fn_attrs = 147, asm_target_features = 148, fn_arg_names = 149, rendered_const = 150, impl_parent = 151, is_ctfe_mir_available = 152, is_mir_available = 153, own_existential_vtable_entries = 154, vtable_entries = 155, vtable_trait_upcasting_coercion_new_vptr_slot = 156, vtable_allocation = 157, codegen_select_candidate = 158, all_local_trait_impls = 159, trait_impls_of = 160, specialization_graph_of = 161, object_safety_violations = 162, check_is_object_safe = 163, param_env = 164, param_env_reveal_all_normalized = 165, is_copy_raw = 166, is_sized_raw = 167, is_freeze_raw = 168, is_unpin_raw = 169, needs_drop_raw = 170, has_significant_drop_raw = 171, has_structural_eq_impl = 172, adt_drop_tys = 173, adt_significant_drop_tys = 174, layout_of = 175, fn_abi_of_fn_ptr = 176, fn_abi_of_instance = 177, dylib_dependency_formats = 178, dependency_formats = 179, is_compiler_builtins = 180, has_global_allocator = 181, has_alloc_error_handler = 182, has_panic_handler = 183, is_profiler_runtime = 184, has_ffi_unwind_calls = 185, required_panic_strategy = 186, panic_in_drop_strategy = 187, is_no_builtins = 188, symbol_mangling_version = 189, extern_crate = 190, specializes = 191, in_scope_traits_map = 192, defaultness = 193, check_well_formed = 194, reachable_non_generics = 195, is_reachable_non_generic = 196, is_unreachable_local_definition = 197, upstream_monomorphizations = 198, upstream_monomorphizations_for = 199, upstream_drop_glue_for = 200, foreign_modules = 201, clashing_extern_declarations = 202, entry_fn = 203, proc_macro_decls_static = 204, crate_hash = 205, crate_host_hash = 206, extra_filename = 207, crate_extern_paths = 208, implementations_of_trait = 209, crate_incoherent_impls = 210, native_library = 211, resolve_bound_vars = 212, named_variable_map = 213, is_late_bound_map = 214, object_lifetime_default = 215, late_bound_vars_map = 216, visibility = 217, inhabited_predicate_adt = 218, inhabited_predicate_type = 219, dep_kind = 220, crate_name = 221, module_children = 222, extern_mod_stmt_cnum = 223, lib_features = 224, stability_implications = 225, is_intrinsic = 226, get_lang_items = 227, all_diagnostic_items = 228, defined_lang_items = 229, diagnostic_items = 230, missing_lang_items = 231, visible_parent_map = 232, trimmed_def_paths = 233, missing_extern_crate_item = 234, used_crate_source = 235, debugger_visualizers = 236, postorder_cnums = 237, is_private_dep = 238, allocator_kind = 239, alloc_error_handler_kind = 240, upvars_mentioned = 241, maybe_unused_trait_imports = 242, names_imported_by_glob_use = 243, stability_index = 244, crates = 245, traits = 246, trait_impls_in_crate = 247, exported_symbols = 248, collect_and_partition_mono_items = 249, is_codegened_item = 250, codegen_unit = 251, unused_generic_params = 252, backend_optimization_level = 253, output_filenames = 254, normalize_projection_ty = 255, normalize_weak_ty = 256, normalize_inherent_projection_ty = 257, try_normalize_generic_arg_after_erasing_regions = 258, implied_outlives_bounds_compat = 259, implied_outlives_bounds = 260, dropck_outlives = 261, evaluate_obligation = 262, type_op_ascribe_user_type = 263, type_op_eq = 264, type_op_subtype = 265, type_op_prove_predicate = 266, type_op_normalize_ty = 267, type_op_normalize_clause = 268, type_op_normalize_poly_fn_sig = 269, type_op_normalize_fn_sig = 270, subst_and_check_impossible_predicates = 271, is_impossible_associated_item = 272, method_autoderef_steps = 273, supported_target_features = 274, features_query = 275, crate_for_resolver = 276, resolve_instance = 277, reveal_opaque_types_in_bounds = 278, limits = 279, diagnostic_hir_wf_check = 280, global_backend_features = 281, check_validity_requirement = 282, compare_impl_const = 283, deduced_param_attrs = 284, doc_link_resolutions = 285, doc_link_traits_in_scope = 286, check_tys_might_be_eq = 287, stripped_cfg_items = 288, generics_require_sized_self = 289, cross_crate_inlinable = 290,
}
Expand description

This enum serves as an index into arrays built by make_dep_kind_array.

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.

§

TraitSelect = 2

§

CompileCodegenUnit = 3

§

CompileMonoItem = 4

§

trigger_span_delayed_bug = 5

This exists purely for testing the interactions between span_delayed_bug and incremental.

§

registered_tools = 6

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

§

early_lint_checks = 7

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

§

resolutions = 8

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

§

resolver_for_lowering = 9

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

§

source_span = 10

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

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

§

hir_crate_items = 12

All items in the crate.

§

hir_module_items = 13

The items in a module.

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

§

opt_local_def_id_to_hir_id = 14

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

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

§

hir_owner_parent = 15

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

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

§

opt_hir_owner_nodes = 16

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

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

§

hir_attrs = 17

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

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

§

const_param_default = 18

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

§

type_of = 19

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

§

type_of_opaque = 20

Specialized instance of type_of that detects cycles that are due to revealing opaque because of an auto trait bound. Unless CyclePlaceholder needs to be handled separately, call type_of instead.

§

type_alias_is_lazy = 21

[query description - consider adding a doc-comment!] computing whether {path} is a lazy type alias

§

collect_return_position_impl_trait_in_trait_tys = 22

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

§

is_type_alias_impl_trait = 23

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

§

unsizing_params_for_adt = 24

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

§

analysis = 25

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

§

check_expectations = 26

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

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

§

predicates_of = 28

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

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

§

opaque_types_defined_by = 29

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

§

impl_trait_in_assoc_types_defined_by = 30

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

§

explicit_item_bounds = 31

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

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

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

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

§

item_bounds = 32

Elaborated version of the predicates from explicit_item_bounds.

For example:

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

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

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

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

§

native_libraries = 33

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

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

§

lint_expectations = 35

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

§

expn_that_defined = 36

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

§

is_panic_runtime = 37

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

§

representability = 38

Checks whether a type is representable or infinitely sized

§

representability_adt_ty = 39

An implementation detail for the representability query

§

params_in_repr = 40

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

§

thir_body = 41

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

§

thir_tree = 42

Create a THIR tree for debugging.

§

thir_flat = 43

Create a list-like THIR representation for debugging.

§

mir_keys = 44

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

§

mir_const_qualif = 45

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

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

§

mir_const = 47

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

See the README for the mir module for details.

§

thir_abstract_const = 48

Try to build an abstract representation of the given constant.

§

mir_drops_elaborated_and_const_checked = 49

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

§

mir_for_ctfe = 50

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

§

mir_promoted = 51

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

§

closure_typeinfo = 52

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

§

closure_saved_names_of_captured_variables = 53

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

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

§

check_coroutine_obligations = 55

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

§

optimized_mir = 56

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_ids_info = 57

Summarizes coverage IDs inserted by the InstrumentCoverage MIR pass (for compiler option -Cinstrument-coverage), after MIR optimizations have had a chance to potentially remove some of them.

§

promoted_mir = 58

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

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

§

wasm_import_module_map = 60

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

§

predicates_defined_on = 61

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

§

trait_explicit_predicates_and_bounds = 62

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

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

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

becomes

trait X { type U: Copy; }

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

§

explicit_predicates_of = 63

Returns the predicates written explicitly by the user.

§

inferred_outlives_of = 64

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

§

super_predicates_of = 65

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

§

implied_predicates_of = 66

[query description - consider adding a doc-comment!] computing the implied predicates of tcx.def_path_str(key)

§

super_predicates_that_define_assoc_item = 67

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

§

type_param_predicates = 68

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

§

trait_def = 69

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

§

adt_def = 70

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

§

adt_destructor = 71

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

§

adt_sized_constraint = 72

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

§

adt_dtorck_constraint = 73

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

§

constness = 74

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

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

§

asyncness = 75

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

§

is_promotable_const_fn = 76

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_kind = 77

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

§

crate_variances = 78

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

§

variances_of = 79

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

§

inferred_outlives_crate = 80

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

§

associated_item_def_ids = 81

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

§

associated_item = 82

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

§

associated_items = 83

Collects the associated items defined on a trait or impl.

§

impl_item_implementor_ids = 84

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

For example, with the following code

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

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

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

§

associated_types_for_impl_traits_in_associated_fn = 85

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

§

associated_type_for_impl_trait_in_trait = 86

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

§

impl_trait_ref = 87

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

§

impl_polarity = 88

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

§

issue33140_self_ty = 89

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

§

inherent_impls = 90

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

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

§

mir_unsafety_check_result = 92

The result of unsafety-checking this LocalDefId with the old checker.

§

check_unsafety = 93

Unsafety-check this LocalDefId.

§

assumed_wf_types = 94

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

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

Computes the signature of the function.

§

lint_mod = 97

Performs lint checking for the module.

§

check_unused_traits = 98

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

§

check_mod_attrs = 99

Checks the attributes in the module.

§

check_mod_unstable_api_usage = 100

Checks for uses of unstable APIs in the module.

§

check_mod_const_bodies = 101

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

§

check_mod_loops = 102

Checks the loops in the module.

§

check_mod_naked_functions = 103

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

§

check_mod_privacy = 104

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

§

check_liveness = 105

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

§

live_symbols_and_ignored_derived_traits = 106

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

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

§

check_mod_deathness = 107

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

§

check_mod_impl_wf = 108

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

§

check_mod_type_wf = 109

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

§

collect_mod_item_types = 110

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

§

coerce_unsized_info = 111

Caches CoerceUnsized kinds for impls on custom types.

§

typeck = 112

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

§

diagnostic_only_typeck = 113

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

§

used_trait_imports = 114

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

§

has_typeck_results = 115

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

§

coherent_trait = 116

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

§

mir_borrowck = 117

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

§

crate_inherent_impls = 118

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

§

crate_inherent_impls_overlap_check = 119

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

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

§

mir_callgraph_reachable = 121

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

§

mir_inliner_callees = 122

Obtain all the calls into other local functions

§

eval_to_allocation_raw = 123

Evaluates a constant and returns the computed allocation.

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

§

eval_to_const_value_raw = 124

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

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

§

eval_to_valtree = 125

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

§

valtree_to_const_val = 126

Converts a type level constant value into ConstValue

§

destructure_const = 127

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

§

lit_to_const = 128

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

§

check_match = 129

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

§

effective_visibilities = 130

Performs part of the privacy check and computes effective visibilities.

§

check_private_in_public = 131

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

§

reachable_set = 132

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

§

region_scope_tree = 133

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

Generates a MIR body for the shim.

§

symbol_name = 135

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

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

§

def_span = 137

Gets the span for the definition.

§

def_ident_span = 138

Gets the span for the identifier of the definition.

§

lookup_stability = 139

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

§

lookup_const_stability = 140

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

§

lookup_default_body_stability = 141

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

§

should_inherit_track_caller = 142

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

§

lookup_deprecation_entry = 143

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

§

is_doc_hidden = 144

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

§

is_doc_notable_trait = 145

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

§

item_attrs = 146

Returns the attributes on the item at def_id.

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

§

codegen_fn_attrs = 147

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

§

asm_target_features = 148

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

§

fn_arg_names = 149

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

§

rendered_const = 150

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

§

impl_parent = 151

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

§

is_ctfe_mir_available = 152

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

§

is_mir_available = 153

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

§

own_existential_vtable_entries = 154

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

§

vtable_entries = 155

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

§

vtable_trait_upcasting_coercion_new_vptr_slot = 156

[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 = 157

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

§

codegen_select_candidate = 158

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

§

all_local_trait_impls = 159

Return all impl blocks in the current crate.

§

trait_impls_of = 160

Given a trait trait_id, return all known impl blocks.

§

specialization_graph_of = 161

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

§

object_safety_violations = 162

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

§

check_is_object_safe = 163

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

§

param_env = 164

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

§

param_env_reveal_all_normalized = 165

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

§

is_copy_raw = 166

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

§

is_sized_raw = 167

Query backing Ty::is_sized.

§

is_freeze_raw = 168

Query backing Ty::is_freeze.

§

is_unpin_raw = 169

Query backing Ty::is_unpin.

§

needs_drop_raw = 170

Query backing Ty::needs_drop.

§

has_significant_drop_raw = 171

Query backing Ty::has_significant_drop_raw.

§

has_structural_eq_impl = 172

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

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

§

adt_significant_drop_tys = 174

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

§

layout_of = 175

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

§

fn_abi_of_fn_ptr = 176

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

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

§

fn_abi_of_instance = 177

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

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

§

dylib_dependency_formats = 178

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

§

dependency_formats = 179

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

§

is_compiler_builtins = 180

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

§

has_global_allocator = 181

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

§

has_alloc_error_handler = 182

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

§

has_panic_handler = 183

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

§

is_profiler_runtime = 184

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

§

has_ffi_unwind_calls = 185

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

§

required_panic_strategy = 186

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

§

panic_in_drop_strategy = 187

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

§

is_no_builtins = 188

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

§

symbol_mangling_version = 189

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

§

extern_crate = 190

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

§

specializes = 191

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

§

in_scope_traits_map = 192

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

§

defaultness = 193

Returns whether the impl or associated function has the default keyword.

§

check_well_formed = 194

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

§

reachable_non_generics = 195

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

§

is_reachable_non_generic = 196

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

§

is_unreachable_local_definition = 197

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

§

upstream_monomorphizations = 198

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

§

upstream_monomorphizations_for = 199

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

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

§

foreign_modules = 201

Returns a list of all extern blocks of a crate.

§

clashing_extern_declarations = 202

Lint against extern fn declarations having incompatible types.

§

entry_fn = 203

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

Finds the rustc_proc_macro_decls item of a crate.

§

crate_hash = 205

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

§

crate_host_hash = 206

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

§

extra_filename = 207

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

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

§

implementations_of_trait = 209

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

§

crate_incoherent_impls = 210

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

Get the corresponding native library from the native_libraries query

§

resolve_bound_vars = 212

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

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

§

is_late_bound_map = 214

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

§

object_lifetime_default = 215

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

§

late_bound_vars_map = 216

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

§

visibility = 217

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

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

§

inhabited_predicate_type = 219

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

§

dep_kind = 220

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

§

crate_name = 221

Gets the name of the crate.

§

module_children = 222

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

§

extern_mod_stmt_cnum = 223

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

§

lib_features = 224

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

§

stability_implications = 225

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

§

is_intrinsic = 226

Whether the function is an intrinsic

§

get_lang_items = 227

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

§

all_diagnostic_items = 228

Returns all diagnostic items defined in all crates.

§

defined_lang_items = 229

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

§

diagnostic_items = 230

Returns the diagnostic items defined in a crate.

§

missing_lang_items = 231

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

§

visible_parent_map = 232

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

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

§

missing_extern_crate_item = 234

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

§

used_crate_source = 235

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

§

debugger_visualizers = 236

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

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

§

is_private_dep = 238

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

§

allocator_kind = 239

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

§

alloc_error_handler_kind = 240

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

§

upvars_mentioned = 241

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

§

maybe_unused_trait_imports = 242

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

§

names_imported_by_glob_use = 243

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

§

stability_index = 244

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

§

crates = 245

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

§

traits = 246

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

§

trait_impls_in_crate = 247

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

§

exported_symbols = 248

The list of symbols exported from the given crate.

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

collect_and_partition_mono_items = 249

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

§

is_codegened_item = 250

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

§

codegen_unit = 251

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

§

unused_generic_params = 252

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

§

backend_optimization_level = 253

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

§

output_filenames = 254

Return the filenames where output artefacts shall be stored.

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

§

normalize_projection_ty = 255

Do not call this query directly: invoke normalize instead.

§

normalize_weak_ty = 256

Do not call this query directly: invoke normalize instead.

§

normalize_inherent_projection_ty = 257

Do not call this query directly: invoke normalize instead.

§

try_normalize_generic_arg_after_erasing_regions = 258

Do not call this query directly: invoke try_normalize_erasing_regions instead.

§

implied_outlives_bounds_compat = 259

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

§

implied_outlives_bounds = 260

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

§

dropck_outlives = 261

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

§

evaluate_obligation = 262

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

§

type_op_ascribe_user_type = 263

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

§

type_op_eq = 264

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

§

type_op_subtype = 265

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

§

type_op_prove_predicate = 266

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

§

type_op_normalize_ty = 267

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

§

type_op_normalize_clause = 268

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

§

type_op_normalize_poly_fn_sig = 269

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

§

type_op_normalize_fn_sig = 270

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

§

subst_and_check_impossible_predicates = 271

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

§

is_impossible_associated_item = 272

[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 = 273

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

§

supported_target_features = 274

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

§

features_query = 275

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

§

crate_for_resolver = 276

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

§

resolve_instance = 277

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

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

§

limits = 279

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

§

diagnostic_hir_wf_check = 280

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

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

§

check_validity_requirement = 282

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

§

compare_impl_const = 283

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

§

deduced_param_attrs = 284

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

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

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

§

check_tys_might_be_eq = 287

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

§

stripped_cfg_items = 288

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

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

§

cross_crate_inlinable = 290

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

Auto Trait Implementations§

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

§

type Output = R

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P> IntoQueryParam<P> for P

source§

impl<T> MaybeResult<T> for T

§

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<'tcx, T> ToPredicate<'tcx, T> for T

source§

fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> T

source§

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

§

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

§

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<Tcx, T> Value<Tcx> for T
where Tcx: DepContext,

source§

default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed ) -> T

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
  • TraitSelect: 0 bytes
  • CompileCodegenUnit: 0 bytes
  • CompileMonoItem: 0 bytes
  • trigger_span_delayed_bug: 0 bytes
  • registered_tools: 0 bytes
  • early_lint_checks: 0 bytes
  • resolutions: 0 bytes
  • resolver_for_lowering: 0 bytes
  • source_span: 0 bytes
  • hir_crate: 0 bytes
  • hir_crate_items: 0 bytes
  • hir_module_items: 0 bytes
  • opt_local_def_id_to_hir_id: 0 bytes
  • hir_owner_parent: 0 bytes
  • opt_hir_owner_nodes: 0 bytes
  • hir_attrs: 0 bytes
  • const_param_default: 0 bytes
  • type_of: 0 bytes
  • type_of_opaque: 0 bytes
  • type_alias_is_lazy: 0 bytes
  • collect_return_position_impl_trait_in_trait_tys: 0 bytes
  • is_type_alias_impl_trait: 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
  • impl_trait_in_assoc_types_defined_by: 0 bytes
  • explicit_item_bounds: 0 bytes
  • item_bounds: 0 bytes
  • native_libraries: 0 bytes
  • shallow_lint_levels_on: 0 bytes
  • lint_expectations: 0 bytes
  • expn_that_defined: 0 bytes
  • is_panic_runtime: 0 bytes
  • representability: 0 bytes
  • representability_adt_ty: 0 bytes
  • params_in_repr: 0 bytes
  • thir_body: 0 bytes
  • thir_tree: 0 bytes
  • thir_flat: 0 bytes
  • mir_keys: 0 bytes
  • mir_const_qualif: 0 bytes
  • mir_built: 0 bytes
  • mir_const: 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
  • optimized_mir: 0 bytes
  • coverage_ids_info: 0 bytes
  • promoted_mir: 0 bytes
  • erase_regions_ty: 0 bytes
  • wasm_import_module_map: 0 bytes
  • predicates_defined_on: 0 bytes
  • trait_explicit_predicates_and_bounds: 0 bytes
  • explicit_predicates_of: 0 bytes
  • inferred_outlives_of: 0 bytes
  • super_predicates_of: 0 bytes
  • implied_predicates_of: 0 bytes
  • super_predicates_that_define_assoc_item: 0 bytes
  • type_param_predicates: 0 bytes
  • trait_def: 0 bytes
  • adt_def: 0 bytes
  • adt_destructor: 0 bytes
  • adt_sized_constraint: 0 bytes
  • adt_dtorck_constraint: 0 bytes
  • constness: 0 bytes
  • asyncness: 0 bytes
  • is_promotable_const_fn: 0 bytes
  • coroutine_kind: 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_associated_fn: 0 bytes
  • associated_type_for_impl_trait_in_trait: 0 bytes
  • impl_trait_ref: 0 bytes
  • impl_polarity: 0 bytes
  • issue33140_self_ty: 0 bytes
  • inherent_impls: 0 bytes
  • incoherent_impls: 0 bytes
  • mir_unsafety_check_result: 0 bytes
  • check_unsafety: 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_const_bodies: 0 bytes
  • check_mod_loops: 0 bytes
  • check_mod_naked_functions: 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_mod_impl_wf: 0 bytes
  • check_mod_type_wf: 0 bytes
  • collect_mod_item_types: 0 bytes
  • coerce_unsized_info: 0 bytes
  • typeck: 0 bytes
  • diagnostic_only_typeck: 0 bytes
  • used_trait_imports: 0 bytes
  • has_typeck_results: 0 bytes
  • coherent_trait: 0 bytes
  • mir_borrowck: 0 bytes
  • crate_inherent_impls: 0 bytes
  • crate_inherent_impls_overlap_check: 0 bytes
  • orphan_check_impl: 0 bytes
  • mir_callgraph_reachable: 0 bytes
  • mir_inliner_callees: 0 bytes
  • eval_to_allocation_raw: 0 bytes
  • eval_to_const_value_raw: 0 bytes
  • eval_to_valtree: 0 bytes
  • valtree_to_const_val: 0 bytes
  • destructure_const: 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
  • lookup_stability: 0 bytes
  • lookup_const_stability: 0 bytes
  • lookup_default_body_stability: 0 bytes
  • should_inherit_track_caller: 0 bytes
  • lookup_deprecation_entry: 0 bytes
  • is_doc_hidden: 0 bytes
  • is_doc_notable_trait: 0 bytes
  • item_attrs: 0 bytes
  • codegen_fn_attrs: 0 bytes
  • asm_target_features: 0 bytes
  • fn_arg_names: 0 bytes
  • rendered_const: 0 bytes
  • impl_parent: 0 bytes
  • is_ctfe_mir_available: 0 bytes
  • is_mir_available: 0 bytes
  • own_existential_vtable_entries: 0 bytes
  • vtable_entries: 0 bytes
  • vtable_trait_upcasting_coercion_new_vptr_slot: 0 bytes
  • vtable_allocation: 0 bytes
  • codegen_select_candidate: 0 bytes
  • all_local_trait_impls: 0 bytes
  • trait_impls_of: 0 bytes
  • specialization_graph_of: 0 bytes
  • object_safety_violations: 0 bytes
  • check_is_object_safe: 0 bytes
  • param_env: 0 bytes
  • param_env_reveal_all_normalized: 0 bytes
  • is_copy_raw: 0 bytes
  • is_sized_raw: 0 bytes
  • is_freeze_raw: 0 bytes
  • is_unpin_raw: 0 bytes
  • needs_drop_raw: 0 bytes
  • has_significant_drop_raw: 0 bytes
  • has_structural_eq_impl: 0 bytes
  • adt_drop_tys: 0 bytes
  • adt_significant_drop_tys: 0 bytes
  • layout_of: 0 bytes
  • fn_abi_of_fn_ptr: 0 bytes
  • fn_abi_of_instance: 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
  • specializes: 0 bytes
  • in_scope_traits_map: 0 bytes
  • defaultness: 0 bytes
  • check_well_formed: 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
  • 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
  • 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
  • visibility: 0 bytes
  • inhabited_predicate_adt: 0 bytes
  • inhabited_predicate_type: 0 bytes
  • dep_kind: 0 bytes
  • crate_name: 0 bytes
  • module_children: 0 bytes
  • extern_mod_stmt_cnum: 0 bytes
  • lib_features: 0 bytes
  • stability_implications: 0 bytes
  • is_intrinsic: 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
  • maybe_unused_trait_imports: 0 bytes
  • names_imported_by_glob_use: 0 bytes
  • stability_index: 0 bytes
  • crates: 0 bytes
  • traits: 0 bytes
  • trait_impls_in_crate: 0 bytes
  • exported_symbols: 0 bytes
  • collect_and_partition_mono_items: 0 bytes
  • is_codegened_item: 0 bytes
  • codegen_unit: 0 bytes
  • unused_generic_params: 0 bytes
  • backend_optimization_level: 0 bytes
  • output_filenames: 0 bytes
  • normalize_projection_ty: 0 bytes
  • normalize_weak_ty: 0 bytes
  • normalize_inherent_projection_ty: 0 bytes
  • try_normalize_generic_arg_after_erasing_regions: 0 bytes
  • implied_outlives_bounds_compat: 0 bytes
  • implied_outlives_bounds: 0 bytes
  • dropck_outlives: 0 bytes
  • evaluate_obligation: 0 bytes
  • type_op_ascribe_user_type: 0 bytes
  • type_op_eq: 0 bytes
  • type_op_subtype: 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
  • subst_and_check_impossible_predicates: 0 bytes
  • is_impossible_associated_item: 0 bytes
  • method_autoderef_steps: 0 bytes
  • supported_target_features: 0 bytes
  • features_query: 0 bytes
  • crate_for_resolver: 0 bytes
  • resolve_instance: 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_const: 0 bytes
  • deduced_param_attrs: 0 bytes
  • doc_link_resolutions: 0 bytes
  • doc_link_traits_in_scope: 0 bytes
  • check_tys_might_be_eq: 0 bytes
  • stripped_cfg_items: 0 bytes
  • generics_require_sized_self: 0 bytes
  • cross_crate_inlinable: 0 bytes