#[repr(u16)]enum DepKindDefs {
Show 307 variants
Null = 0,
Red = 1,
TraitSelect = 2,
CompileCodegenUnit = 3,
CompileMonoItem = 4,
trigger_delayed_bug = 5,
registered_tools = 6,
early_lint_checks = 7,
resolutions = 8,
resolver_for_lowering_raw = 9,
source_span = 10,
hir_crate = 11,
hir_crate_items = 12,
hir_module_items = 13,
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,
opaque_ty_origin = 23,
unsizing_params_for_adt = 24,
analysis = 25,
check_expectations = 26,
generics_of = 27,
predicates_of = 28,
opaque_types_defined_by = 29,
explicit_item_bounds = 30,
explicit_item_super_predicates = 31,
item_bounds = 32,
item_super_predicates = 33,
item_non_self_assumptions = 34,
impl_super_outlives = 35,
native_libraries = 36,
shallow_lint_levels_on = 37,
lint_expectations = 38,
lints_that_dont_need_to_run = 39,
expn_that_defined = 40,
is_panic_runtime = 41,
representability = 42,
representability_adt_ty = 43,
params_in_repr = 44,
thir_body = 45,
mir_keys = 46,
mir_const_qualif = 47,
mir_built = 48,
thir_abstract_const = 49,
mir_drops_elaborated_and_const_checked = 50,
mir_for_ctfe = 51,
mir_promoted = 52,
closure_typeinfo = 53,
closure_saved_names_of_captured_variables = 54,
mir_coroutine_witnesses = 55,
check_coroutine_obligations = 56,
optimized_mir = 57,
coverage_attr_on = 58,
coverage_ids_info = 59,
promoted_mir = 60,
erase_regions_ty = 61,
wasm_import_module_map = 62,
trait_explicit_predicates_and_bounds = 63,
explicit_predicates_of = 64,
inferred_outlives_of = 65,
explicit_super_predicates_of = 66,
explicit_implied_predicates_of = 67,
explicit_supertraits_containing_assoc_item = 68,
const_conditions = 69,
explicit_implied_const_bounds = 70,
type_param_predicates = 71,
trait_def = 72,
adt_def = 73,
adt_destructor = 74,
adt_async_destructor = 75,
adt_sized_constraint = 76,
adt_dtorck_constraint = 77,
constness = 78,
asyncness = 79,
is_promotable_const_fn = 80,
coroutine_by_move_body_def_id = 81,
coroutine_kind = 82,
coroutine_for_closure = 83,
crate_variances = 84,
variances_of = 85,
inferred_outlives_crate = 86,
associated_item_def_ids = 87,
associated_item = 88,
associated_items = 89,
impl_item_implementor_ids = 90,
associated_types_for_impl_traits_in_associated_fn = 91,
associated_type_for_impl_trait_in_trait = 92,
impl_trait_header = 93,
self_ty_of_trait_impl_enabling_order_dep_trait_object_hack = 94,
inherent_impls = 95,
incoherent_impls = 96,
check_unsafety = 97,
assumed_wf_types = 98,
assumed_wf_types_for_rpitit = 99,
fn_sig = 100,
lint_mod = 101,
check_unused_traits = 102,
check_mod_attrs = 103,
check_mod_unstable_api_usage = 104,
check_mod_const_bodies = 105,
check_mod_loops = 106,
check_mod_naked_functions = 107,
check_mod_privacy = 108,
check_liveness = 109,
live_symbols_and_ignored_derived_traits = 110,
check_mod_deathness = 111,
check_mod_type_wf = 112,
coerce_unsized_info = 113,
typeck = 114,
diagnostic_only_typeck = 115,
used_trait_imports = 116,
coherent_trait = 117,
mir_borrowck = 118,
crate_inherent_impls = 119,
crate_inherent_impls_validity_check = 120,
crate_inherent_impls_overlap_check = 121,
orphan_check_impl = 122,
mir_callgraph_reachable = 123,
mir_inliner_callees = 124,
tag_for_variant = 125,
eval_to_allocation_raw = 126,
eval_static_initializer = 127,
eval_to_const_value_raw = 128,
eval_to_valtree = 129,
valtree_to_const_val = 130,
destructure_const = 131,
lit_to_const = 132,
check_match = 133,
effective_visibilities = 134,
check_private_in_public = 135,
reachable_set = 136,
region_scope_tree = 137,
mir_shims = 138,
symbol_name = 139,
def_kind = 140,
def_span = 141,
def_ident_span = 142,
lookup_stability = 143,
lookup_const_stability = 144,
lookup_default_body_stability = 145,
should_inherit_track_caller = 146,
lookup_deprecation_entry = 147,
is_doc_hidden = 148,
is_doc_notable_trait = 149,
item_attrs = 150,
codegen_fn_attrs = 151,
asm_target_features = 152,
fn_arg_names = 153,
rendered_const = 154,
rendered_precise_capturing_args = 155,
impl_parent = 156,
is_ctfe_mir_available = 157,
is_mir_available = 158,
own_existential_vtable_entries = 159,
vtable_entries = 160,
first_method_vtable_slot = 161,
supertrait_vtable_slot = 162,
vtable_allocation = 163,
codegen_select_candidate = 164,
all_local_trait_impls = 165,
trait_impls_of = 166,
specialization_graph_of = 167,
dyn_compatibility_violations = 168,
is_dyn_compatible = 169,
param_env = 170,
param_env_reveal_all_normalized = 171,
is_copy_raw = 172,
is_sized_raw = 173,
is_freeze_raw = 174,
is_unpin_raw = 175,
needs_drop_raw = 176,
needs_async_drop_raw = 177,
has_significant_drop_raw = 178,
has_structural_eq_impl = 179,
adt_drop_tys = 180,
adt_significant_drop_tys = 181,
list_significant_drop_tys = 182,
layout_of = 183,
fn_abi_of_fn_ptr = 184,
fn_abi_of_instance = 185,
dylib_dependency_formats = 186,
dependency_formats = 187,
is_compiler_builtins = 188,
has_global_allocator = 189,
has_alloc_error_handler = 190,
has_panic_handler = 191,
is_profiler_runtime = 192,
has_ffi_unwind_calls = 193,
required_panic_strategy = 194,
panic_in_drop_strategy = 195,
is_no_builtins = 196,
symbol_mangling_version = 197,
extern_crate = 198,
specialization_enabled_in = 199,
specializes = 200,
in_scope_traits_map = 201,
defaultness = 202,
check_well_formed = 203,
reachable_non_generics = 204,
is_reachable_non_generic = 205,
is_unreachable_local_definition = 206,
upstream_monomorphizations = 207,
upstream_monomorphizations_for = 208,
upstream_drop_glue_for = 209,
upstream_async_drop_glue_for = 210,
foreign_modules = 211,
clashing_extern_declarations = 212,
entry_fn = 213,
proc_macro_decls_static = 214,
crate_hash = 215,
crate_host_hash = 216,
extra_filename = 217,
crate_extern_paths = 218,
implementations_of_trait = 219,
crate_incoherent_impls = 220,
native_library = 221,
inherit_sig_for_delegation_item = 222,
resolve_bound_vars = 223,
named_variable_map = 224,
is_late_bound_map = 225,
object_lifetime_default = 226,
late_bound_vars_map = 227,
opaque_captured_lifetimes = 228,
visibility = 229,
inhabited_predicate_adt = 230,
inhabited_predicate_type = 231,
dep_kind = 232,
crate_name = 233,
module_children = 234,
extern_mod_stmt_cnum = 235,
num_extern_def_ids = 236,
lib_features = 237,
stability_implications = 238,
intrinsic_raw = 239,
get_lang_items = 240,
all_diagnostic_items = 241,
defined_lang_items = 242,
diagnostic_items = 243,
missing_lang_items = 244,
visible_parent_map = 245,
trimmed_def_paths = 246,
missing_extern_crate_item = 247,
used_crate_source = 248,
debugger_visualizers = 249,
postorder_cnums = 250,
is_private_dep = 251,
allocator_kind = 252,
alloc_error_handler_kind = 253,
upvars_mentioned = 254,
maybe_unused_trait_imports = 255,
names_imported_by_glob_use = 256,
stability_index = 257,
crates = 258,
used_crates = 259,
traits = 260,
trait_impls_in_crate = 261,
exported_symbols = 262,
collect_and_partition_mono_items = 263,
is_codegened_item = 264,
codegen_unit = 265,
unused_generic_params = 266,
backend_optimization_level = 267,
output_filenames = 268,
normalize_canonicalized_projection_ty = 269,
normalize_canonicalized_weak_ty = 270,
normalize_canonicalized_inherent_projection_ty = 271,
try_normalize_generic_arg_after_erasing_regions = 272,
implied_outlives_bounds_compat = 273,
implied_outlives_bounds = 274,
dropck_outlives = 275,
evaluate_obligation = 276,
type_op_ascribe_user_type = 277,
type_op_prove_predicate = 278,
type_op_normalize_ty = 279,
type_op_normalize_clause = 280,
type_op_normalize_poly_fn_sig = 281,
type_op_normalize_fn_sig = 282,
instantiate_and_check_impossible_predicates = 283,
is_impossible_associated_item = 284,
method_autoderef_steps = 285,
rust_target_features = 286,
implied_target_features = 287,
features_query = 288,
crate_for_resolver = 289,
resolve_instance_raw = 290,
reveal_opaque_types_in_bounds = 291,
limits = 292,
diagnostic_hir_wf_check = 293,
global_backend_features = 294,
check_validity_requirement = 295,
compare_impl_const = 296,
deduced_param_attrs = 297,
doc_link_resolutions = 298,
doc_link_traits_in_scope = 299,
stripped_cfg_items = 300,
generics_require_sized_self = 301,
cross_crate_inlinable = 302,
check_mono_item = 303,
skip_move_check_fns = 304,
items_of_instance = 305,
size_estimate = 306,
}
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_delayed_bug = 5
This exists purely for testing the interactions between delayed bugs 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_raw = 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.
local_def_id_to_hir_id = 14
Returns HIR ID for the given LocalDefId
.
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
opaque_ty_origin = 23
[query description - consider adding a doc-comment!] determine where the opaque originates from
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.
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())
explicit_item_bounds = 30
Returns the list of bounds that are required to be satisfied by a implementation or definition. 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.
Syntactially, these are the bounds written on the trait’s type
definition, or those after the impl
keyword for an opaque:
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.
explicit_item_super_predicates = 31
The set of item bounds (see TyCtxt::explicit_item_bounds
) that
share the Self
type of the item. These are a subset of the bounds
that may explicitly be used for things like closure signature
deduction.
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.
item_super_predicates = 33
[query description - consider adding a doc-comment!] elaborating item assumptions for tcx.def_path_str(key)
item_non_self_assumptions = 34
[query description - consider adding a doc-comment!] elaborating item assumptions for tcx.def_path_str(key)
impl_super_outlives = 35
[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of tcx.def_path_str(key)
native_libraries = 36
Look up all native libraries this crate depends on. These are assembled from the following places:
extern
blocks (depending on theirlink
attributes)- the
libs
(-l
) option
shallow_lint_levels_on = 37
[query description - consider adding a doc-comment!] looking up lint levels for tcx.def_path_str(key)
lint_expectations = 38
[query description - consider adding a doc-comment!] computing #[expect]
ed lints in this crate
lints_that_dont_need_to_run = 39
[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 = 40
[query description - consider adding a doc-comment!] getting the expansion that defined tcx.def_path_str(key)
is_panic_runtime = 41
[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime
representability = 42
Checks whether a type is representable or infinitely sized
representability_adt_ty = 43
An implementation detail for the representability
query
params_in_repr = 44
Set of param indexes for type params that are in the type’s representation
thir_body = 45
Fetch the THIR for a given body.
mir_keys = 46
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 = 47
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 = 48
Build the MIR for a given DefId
and prepare it for const qualification.
See the rustc dev guide for more info.
thir_abstract_const = 49
Try to build an abstract representation of the given constant.
mir_drops_elaborated_and_const_checked = 50
[query description - consider adding a doc-comment!] elaborating drops for tcx.def_path_str(key)
mir_for_ctfe = 51
[query description - consider adding a doc-comment!] caching mir of tcx.def_path_str(key)
for CTFE
mir_promoted = 52
[query description - consider adding a doc-comment!] promoting constants in MIR for tcx.def_path_str(key)
closure_typeinfo = 53
[query description - consider adding a doc-comment!] finding symbols for captures of closure tcx.def_path_str(key)
closure_saved_names_of_captured_variables = 54
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 = 55
[query description - consider adding a doc-comment!] coroutine witness types for tcx.def_path_str(key)
check_coroutine_obligations = 56
[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type tcx.def_path_str(key)
optimized_mir = 57
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 = 58
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 = 59
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 = 60
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 = 61
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 = 62
[query description - consider adding a doc-comment!] getting wasm import module map
trait_explicit_predicates_and_bounds = 63
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 = 64
Returns the predicates written explicitly by the user.
You should probably use predicates_of
unless you’re looking for
predicates with explicit spans for diagnostics purposes.
inferred_outlives_of = 65
Returns the inferred outlives predicates (e.g., for struct Foo<'a, T> { x: &'a T }
, this would return T: 'a
).
explicit_super_predicates_of = 66
Maps from the DefId
of a trait to the list of super-predicates of the trait,
before elaboration (so it doesn’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 = 67
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 = 68
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 = 69
[query description - consider adding a doc-comment!] computing the conditions for tcx.def_path_str(key)
to be considered const
explicit_implied_const_bounds = 70
[query description - consider adding a doc-comment!] computing the implied ~const
bounds for tcx.def_path_str(key)
type_param_predicates = 71
To avoid cycles within the predicates of a single item we compute
per-type-parameter predicates for resolving T::AssocTy
.
trait_def = 72
[query description - consider adding a doc-comment!] computing trait definition for tcx.def_path_str(key)
adt_def = 73
[query description - consider adding a doc-comment!] computing ADT definition for tcx.def_path_str(key)
adt_destructor = 74
[query description - consider adding a doc-comment!] computing Drop
impl for tcx.def_path_str(key)
adt_async_destructor = 75
[query description - consider adding a doc-comment!] computing AsyncDrop
impl for tcx.def_path_str(key)
adt_sized_constraint = 76
[query description - consider adding a doc-comment!] computing the Sized
constraint for tcx.def_path_str(key)
adt_dtorck_constraint = 77
[query description - consider adding a doc-comment!] computing drop-check constraints for tcx.def_path_str(key)
constness = 78
Returns true
if this is a const fn / const impl.
Do not call this function manually. 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 and stability.
asyncness = 79
[query description - consider adding a doc-comment!] checking if the function is async: tcx.def_path_str(key)
is_promotable_const_fn = 80
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 = 81
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 = 82
Returns Some(coroutine_kind)
if the node pointed to by def_id
is a coroutine.
coroutine_for_closure = 83
[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it
crate_variances = 84
Gets a map with the variance of every item; use variances_of
instead.
variances_of = 85
Maps from the DefId
of a type or region parameter to its (inferred) variance.
inferred_outlives_crate = 86
Maps from thee DefId
of a type to its (inferred) outlives.
associated_item_def_ids = 87
Maps from an impl/trait or struct/variant DefId
to a list of the DefId
s of its associated items or fields.
associated_item = 88
Maps from a trait/impl item to the trait/impl item “descriptor”.
associated_items = 89
Collects the associated items defined on a trait or impl.
impl_item_implementor_ids = 90
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 = 91
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 = 92
Given an impl trait in trait opaque_ty_def_id
, create and return the corresponding
associated item.
impl_trait_header = 93
Given an impl_id
, return the trait it implements along with some header information.
Return None
if this is an inherent impl.
self_ty_of_trait_impl_enabling_order_dep_trait_object_hack = 94
[query description - consider adding a doc-comment!] computing self type wrt issue #33140 tcx.def_path_str(key)
inherent_impls = 95
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 = 96
[query description - consider adding a doc-comment!] collecting all inherent impls for {:?}
check_unsafety = 97
Unsafety-check this LocalDefId
.
assumed_wf_types = 98
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 = 99
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 = 100
Computes the signature of the function.
lint_mod = 101
Performs lint checking for the module.
check_unused_traits = 102
[query description - consider adding a doc-comment!] checking unused trait imports in crate
check_mod_attrs = 103
Checks the attributes in the module.
check_mod_unstable_api_usage = 104
Checks for uses of unstable APIs in the module.
check_mod_const_bodies = 105
Checks the const bodies in the module for illegal operations (e.g. if
or loop
).
check_mod_loops = 106
Checks the loops in the module.
check_mod_naked_functions = 107
[query description - consider adding a doc-comment!] checking naked functions in describe_as_module(key, tcx)
check_mod_privacy = 108
[query description - consider adding a doc-comment!] checking privacy in describe_as_module(key.to_local_def_id(), tcx)
check_liveness = 109
[query description - consider adding a doc-comment!] checking liveness of variables in tcx.def_path_str(key)
live_symbols_and_ignored_derived_traits = 110
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 = 111
[query description - consider adding a doc-comment!] checking deathness of variables in describe_as_module(key, tcx)
check_mod_type_wf = 112
[query description - consider adding a doc-comment!] checking that types are well-formed in describe_as_module(key, tcx)
coerce_unsized_info = 113
Caches CoerceUnsized
kinds for impls on custom types.
typeck = 114
[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key)
diagnostic_only_typeck = 115
[query description - consider adding a doc-comment!] type-checking tcx.def_path_str(key)
used_trait_imports = 116
[query description - consider adding a doc-comment!] finding used_trait_imports tcx.def_path_str(key)
coherent_trait = 117
[query description - consider adding a doc-comment!] coherence checking all impls of trait tcx.def_path_str(def_id)
mir_borrowck = 118
Borrow-checks the function body. If this is a closure, returns additional requirements that the closure’s creator must verify.
crate_inherent_impls = 119
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 = 120
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 = 121
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 = 122
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 = 123
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 = 124
Obtain all the calls into other local functions
tag_for_variant = 125
Computes the tag (if any) for a given type and variant.
eval_to_allocation_raw = 126
Evaluates a constant and returns the computed allocation.
Do not use this directly, use the eval_to_const_value
or eval_to_valtree
instead.
eval_static_initializer = 127
Evaluate a static’s initializer, returning the allocation of the initializer’s memory.
eval_to_const_value_raw = 128
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 = 129
Evaluate a constant and convert it to a type level constant or
return None
if that is not possible.
valtree_to_const_val = 130
Converts a type level constant value into ConstValue
destructure_const = 131
Destructures array, ADT or tuple constants into the constants of their fields.
lit_to_const = 132
[query description - consider adding a doc-comment!] converting literal to const
check_match = 133
[query description - consider adding a doc-comment!] match-checking tcx.def_path_str(key)
effective_visibilities = 134
Performs part of the privacy check and computes effective visibilities.
check_private_in_public = 135
[query description - consider adding a doc-comment!] checking for private elements in public interfaces
reachable_set = 136
[query description - consider adding a doc-comment!] reachability
region_scope_tree = 137
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 = 138
Generates a MIR body for the shim.
symbol_name = 139
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 = 140
[query description - consider adding a doc-comment!] looking up definition kind of tcx.def_path_str(def_id)
def_span = 141
Gets the span for the definition.
def_ident_span = 142
Gets the span for the identifier of the definition.
lookup_stability = 143
[query description - consider adding a doc-comment!] looking up stability of tcx.def_path_str(def_id)
lookup_const_stability = 144
[query description - consider adding a doc-comment!] looking up const stability of tcx.def_path_str(def_id)
lookup_default_body_stability = 145
[query description - consider adding a doc-comment!] looking up default body stability of tcx.def_path_str(def_id)
should_inherit_track_caller = 146
[query description - consider adding a doc-comment!] computing should_inherit_track_caller of tcx.def_path_str(def_id)
lookup_deprecation_entry = 147
[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id)
is deprecated
Determines whether an item is annotated with doc(hidden)
.
is_doc_notable_trait = 149
Determines whether an item is annotated with doc(notable_trait)
.
item_attrs = 150
Returns the attributes on the item at def_id
.
Do not use this directly, use tcx.get_attrs
instead.
codegen_fn_attrs = 151
[query description - consider adding a doc-comment!] computing codegen attributes of tcx.def_path_str(def_id)
asm_target_features = 152
[query description - consider adding a doc-comment!] computing target features for inline asm of tcx.def_path_str(def_id)
fn_arg_names = 153
[query description - consider adding a doc-comment!] looking up function parameter names for tcx.def_path_str(def_id)
rendered_const = 154
Gets the rendered value of the specified constant or associated constant. Used by rustdoc.
rendered_precise_capturing_args = 155
Gets the rendered precise capturing args for an opaque for use in rustdoc.
impl_parent = 156
[query description - consider adding a doc-comment!] computing specialization parent impl of tcx.def_path_str(def_id)
is_ctfe_mir_available = 157
[query description - consider adding a doc-comment!] checking if item has CTFE MIR available: tcx.def_path_str(key)
is_mir_available = 158
[query description - consider adding a doc-comment!] checking if item has MIR available: tcx.def_path_str(key)
own_existential_vtable_entries = 159
[query description - consider adding a doc-comment!] finding all existential vtable entries for trait tcx.def_path_str(key)
vtable_entries = 160
[query description - consider adding a doc-comment!] finding all vtable entries for trait tcx.def_path_str(key.def_id())
first_method_vtable_slot = 161
[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 = 162
[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 = 163
[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 = 164
[query description - consider adding a doc-comment!] computing candidate for key.value
all_local_trait_impls = 165
Return all impl
blocks in the current crate.
trait_impls_of = 166
Given a trait trait_id
, return all known impl
blocks.
specialization_graph_of = 167
[query description - consider adding a doc-comment!] building specialization graph of trait tcx.def_path_str(trait_id)
dyn_compatibility_violations = 168
[query description - consider adding a doc-comment!] determining dyn-compatibility of trait tcx.def_path_str(trait_id)
is_dyn_compatible = 169
[query description - consider adding a doc-comment!] checking if trait tcx.def_path_str(trait_id)
is dyn-compatible
param_env = 170
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 = 171
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 = 172
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 = 173
Query backing Ty::is_sized
.
is_freeze_raw = 174
Query backing Ty::is_freeze
.
is_unpin_raw = 175
Query backing Ty::is_unpin
.
needs_drop_raw = 176
Query backing Ty::needs_drop
.
needs_async_drop_raw = 177
Query backing Ty::needs_async_drop
.
has_significant_drop_raw = 178
Query backing Ty::has_significant_drop_raw
.
has_structural_eq_impl = 179
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 = 180
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 = 181
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 = 182
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 = 183
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 = 184
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 = 185
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 InstanceKind::Virtual
instance (of <dyn Trait as Trait>::fn
).
dylib_dependency_formats = 186
[query description - consider adding a doc-comment!] getting dylib dependency formats of crate
dependency_formats = 187
[query description - consider adding a doc-comment!] getting the linkage format of all dependencies
is_compiler_builtins = 188
[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins
has_global_allocator = 189
[query description - consider adding a doc-comment!] checking if the crate has_global_allocator
has_alloc_error_handler = 190
[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler
has_panic_handler = 191
[query description - consider adding a doc-comment!] checking if the crate has_panic_handler
is_profiler_runtime = 192
[query description - consider adding a doc-comment!] checking if a crate is #![profiler_runtime]
has_ffi_unwind_calls = 193
[query description - consider adding a doc-comment!] checking if tcx.def_path_str(key)
contains FFI-unwind calls
required_panic_strategy = 194
[query description - consider adding a doc-comment!] getting a crate’s required panic strategy
panic_in_drop_strategy = 195
[query description - consider adding a doc-comment!] getting a crate’s configured panic-in-drop strategy
is_no_builtins = 196
[query description - consider adding a doc-comment!] getting whether a crate has #![no_builtins]
symbol_mangling_version = 197
[query description - consider adding a doc-comment!] getting a crate’s symbol mangling version
extern_crate = 198
[query description - consider adding a doc-comment!] getting crate’s ExternCrateData
specialization_enabled_in = 199
[query description - consider adding a doc-comment!] checking whether the crate enabled specialization
/min_specialization
specializes = 200
[query description - consider adding a doc-comment!] computing whether impls specialize one another
in_scope_traits_map = 201
[query description - consider adding a doc-comment!] getting traits in scope at a block
defaultness = 202
Returns whether the impl or associated function has the default
keyword.
check_well_formed = 203
[query description - consider adding a doc-comment!] checking that tcx.def_path_str(key)
is well-formed
reachable_non_generics = 204
[query description - consider adding a doc-comment!] looking up the exported symbols of a crate
is_reachable_non_generic = 205
[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id)
is an exported symbol
is_unreachable_local_definition = 206
[query description - consider adding a doc-comment!] checking whether tcx.def_path_str(def_id)
is reachable from outside the crate
upstream_monomorphizations = 207
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 = 208
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 = 209
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 = 210
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 = 211
Returns a list of all extern
blocks of a crate.
clashing_extern_declarations = 212
Lint against extern fn
declarations having incompatible types.
entry_fn = 213
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 = 214
Finds the rustc_proc_macro_decls
item of a crate.
crate_hash = 215
[query description - consider adding a doc-comment!] looking up the hash a crate
crate_host_hash = 216
Gets the hash for the host proc macro. Used to support -Z dual-proc-macro.
extra_filename = 217
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 = 218
Gets the paths where the crate came from in the file system.
implementations_of_trait = 219
Given a crate and a trait, look up all impls of that trait in the crate.
Return (impl_id, self_ty)
.
crate_incoherent_impls = 220
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 = 221
Get the corresponding native library from the native_libraries
query
inherit_sig_for_delegation_item = 222
[query description - consider adding a doc-comment!] inheriting delegation signature
resolve_bound_vars = 223
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 = 224
[query description - consider adding a doc-comment!] looking up a named region inside tcx.def_path_str(owner_id)
is_late_bound_map = 225
[query description - consider adding a doc-comment!] testing if a region is late bound inside tcx.def_path_str(owner_id)
object_lifetime_default = 226
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 = 227
[query description - consider adding a doc-comment!] looking up late bound vars inside tcx.def_path_str(owner_id)
opaque_captured_lifetimes = 228
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 = 229
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 = 230
[query description - consider adding a doc-comment!] computing the uninhabited predicate of {:?}
inhabited_predicate_type = 231
Do not call this query directly: invoke Ty::inhabited_predicate
instead.
dep_kind = 232
[query description - consider adding a doc-comment!] fetching what a dependency looks like
crate_name = 233
Gets the name of the crate.
module_children = 234
[query description - consider adding a doc-comment!] collecting child items of module tcx.def_path_str(def_id)
extern_mod_stmt_cnum = 235
[query description - consider adding a doc-comment!] computing crate imported by tcx.def_path_str(def_id)
num_extern_def_ids = 236
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 = 237
[query description - consider adding a doc-comment!] calculating the lib features defined in a crate
stability_implications = 238
[query description - consider adding a doc-comment!] calculating the implications between #[unstable]
features defined in a crate
intrinsic_raw = 239
Whether the function is an intrinsic
get_lang_items = 240
Returns the lang items defined in another crate by loading it from metadata.
all_diagnostic_items = 241
Returns all diagnostic items defined in all crates.
defined_lang_items = 242
Returns the lang items defined in another crate by loading it from metadata.
diagnostic_items = 243
Returns the diagnostic items defined in a crate.
missing_lang_items = 244
[query description - consider adding a doc-comment!] calculating the missing lang items in a crate
visible_parent_map = 245
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 = 246
Collects the “trimmed”, shortest accessible paths to all items for diagnostics. See the provider docs for more info.
missing_extern_crate_item = 247
[query description - consider adding a doc-comment!] seeing if we’re missing an extern crate
item for this crate
used_crate_source = 248
[query description - consider adding a doc-comment!] looking at the source for a crate
debugger_visualizers = 249
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 = 250
[query description - consider adding a doc-comment!] generating a postorder list of CrateNums
is_private_dep = 251
Returns whether or not the crate with CrateNum ‘cnum’ is marked as a private dependency
allocator_kind = 252
[query description - consider adding a doc-comment!] getting the allocator kind for the current crate
alloc_error_handler_kind = 253
[query description - consider adding a doc-comment!] alloc error handler kind for the current crate
upvars_mentioned = 254
[query description - consider adding a doc-comment!] collecting upvars mentioned in tcx.def_path_str(def_id)
maybe_unused_trait_imports = 255
[query description - consider adding a doc-comment!] fetching potentially unused trait imports
names_imported_by_glob_use = 256
[query description - consider adding a doc-comment!] finding names imported by glob use for tcx.def_path_str(def_id)
stability_index = 257
[query description - consider adding a doc-comment!] calculating the stability index for the local crate
crates = 258
[query description - consider adding a doc-comment!] fetching all foreign CrateNum instances
used_crates = 259
[query description - consider adding a doc-comment!] fetching CrateNum
s for all crates loaded non-speculatively
traits = 260
A list of all traits in a crate, used by rustdoc and error reporting.
trait_impls_in_crate = 261
[query description - consider adding a doc-comment!] fetching all trait impls in a crate
exported_symbols = 262
The list of symbols exported from the given crate.
- All names contained in
exported_symbols(cnum)
are guaranteed to correspond to a publicly visible symbol incnum
machine code. - The
exported_symbols
sets of different crates do not intersect.
collect_and_partition_mono_items = 263
[query description - consider adding a doc-comment!] collect_and_partition_mono_items
is_codegened_item = 264
[query description - consider adding a doc-comment!] determining whether tcx.def_path_str(def_id)
needs codegen
codegen_unit = 265
[query description - consider adding a doc-comment!] getting codegen unit {sym}
unused_generic_params = 266
[query description - consider adding a doc-comment!] determining which generic parameters are unused by tcx.def_path_str(key.def_id())
backend_optimization_level = 267
[query description - consider adding a doc-comment!] optimization level used by backend
output_filenames = 268
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_ty = 269
Do not call this query directly: Invoke normalize
instead.
normalize_canonicalized_weak_ty = 270
Do not call this query directly: Invoke normalize
instead.
normalize_canonicalized_inherent_projection_ty = 271
Do not call this query directly: Invoke normalize
instead.
try_normalize_generic_arg_after_erasing_regions = 272
Do not call this query directly: invoke try_normalize_erasing_regions
instead.
implied_outlives_bounds_compat = 273
[query description - consider adding a doc-comment!] computing implied outlives bounds for goal.canonical.value.value.ty
implied_outlives_bounds = 274
[query description - consider adding a doc-comment!] computing implied outlives bounds v2 for goal.canonical.value.value.ty
dropck_outlives = 275
Do not call this query directly:
invoke DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)
instead.
evaluate_obligation = 276
Do not call this query directly: invoke infcx.predicate_may_hold()
or
infcx.predicate_must_hold()
instead.
type_op_ascribe_user_type = 277
Do not call this query directly: part of the Eq
type-op
type_op_prove_predicate = 278
Do not call this query directly: part of the ProvePredicate
type-op
type_op_normalize_ty = 279
Do not call this query directly: part of the Normalize
type-op
type_op_normalize_clause = 280
Do not call this query directly: part of the Normalize
type-op
type_op_normalize_poly_fn_sig = 281
Do not call this query directly: part of the Normalize
type-op
type_op_normalize_fn_sig = 282
Do not call this query directly: part of the Normalize
type-op
instantiate_and_check_impossible_predicates = 283
[query description - consider adding a doc-comment!] checking impossible instantiated predicates: tcx.def_path_str(key.0)
is_impossible_associated_item = 284
[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 = 285
[query description - consider adding a doc-comment!] computing autoderef types for goal.canonical.value.value
rust_target_features = 286
Returns the Rust target features for the current target. These are not always the same as LLVM target features!
implied_target_features = 287
[query description - consider adding a doc-comment!] looking up implied target features
features_query = 288
[query description - consider adding a doc-comment!] looking up enabled feature gates
crate_for_resolver = 289
[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution
resolve_instance_raw = 290
Attempt to resolve the given DefId
to an Instance
, for the
given generics args (GenericArgsRef
), returning one of:
Ok(Some(instance))
on successOk(None)
when theGenericArgsRef
are still too generic, and therefore don’t allow finding the finalInstance
Err(ErrorGuaranteed)
when theInstance
resolution process couldn’t complete due to errors elsewhere - this is distinct fromOk(None)
to avoid misleading diagnostics when an error has already been/will be emitted, for the original cause.
reveal_opaque_types_in_bounds = 291
[query description - consider adding a doc-comment!] revealing opaque types in {:?}
limits = 292
[query description - consider adding a doc-comment!] looking up limits
diagnostic_hir_wf_check = 293
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 = 294
The list of backend features computed from CLI flags (-Ctarget-cpu
, -Ctarget-feature
,
--target
and similar).
check_validity_requirement = 295
[query description - consider adding a doc-comment!] checking validity requirement for key.1.value
: key.0
compare_impl_const = 296
[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 = 297
[query description - consider adding a doc-comment!] deducing parameter attributes for tcx.def_path_str(def_id)
doc_link_resolutions = 298
[query description - consider adding a doc-comment!] resolutions for documentation links for a module
doc_link_traits_in_scope = 299
[query description - consider adding a doc-comment!] traits in scope for documentation links for a module
stripped_cfg_items = 300
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 = 301
[query description - consider adding a doc-comment!] check whether the item has a where Self: Sized
bound
cross_crate_inlinable = 302
[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates
check_mono_item = 303
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 = 304
Builds the set of functions that should be skipped for the move-size check.
items_of_instance = 305
[query description - consider adding a doc-comment!] collecting items used by key.0
size_estimate = 306
[query description - consider adding a doc-comment!] estimating codegen size of key
Auto Trait Implementations§
impl DynSend for DepKindDefs
impl DynSync for DepKindDefs
impl Freeze for DepKindDefs
impl RefUnwindSafe for DepKindDefs
impl Send for DepKindDefs
impl Sync for DepKindDefs
impl Unpin for DepKindDefs
impl UnwindSafe for DepKindDefs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for 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 bytesRed
: 0 bytesTraitSelect
: 0 bytesCompileCodegenUnit
: 0 bytesCompileMonoItem
: 0 bytestrigger_delayed_bug
: 0 bytesregistered_tools
: 0 bytesearly_lint_checks
: 0 bytesresolutions
: 0 bytesresolver_for_lowering_raw
: 0 bytessource_span
: 0 byteshir_crate
: 0 byteshir_crate_items
: 0 byteshir_module_items
: 0 byteslocal_def_id_to_hir_id
: 0 byteshir_owner_parent
: 0 bytesopt_hir_owner_nodes
: 0 byteshir_attrs
: 0 bytesconst_param_default
: 0 bytestype_of
: 0 bytestype_of_opaque
: 0 bytestype_alias_is_lazy
: 0 bytescollect_return_position_impl_trait_in_trait_tys
: 0 bytesopaque_ty_origin
: 0 bytesunsizing_params_for_adt
: 0 bytesanalysis
: 0 bytescheck_expectations
: 0 bytesgenerics_of
: 0 bytespredicates_of
: 0 bytesopaque_types_defined_by
: 0 bytesexplicit_item_bounds
: 0 bytesexplicit_item_super_predicates
: 0 bytesitem_bounds
: 0 bytesitem_super_predicates
: 0 bytesitem_non_self_assumptions
: 0 bytesimpl_super_outlives
: 0 bytesnative_libraries
: 0 bytesshallow_lint_levels_on
: 0 byteslint_expectations
: 0 byteslints_that_dont_need_to_run
: 0 bytesexpn_that_defined
: 0 bytesis_panic_runtime
: 0 bytesrepresentability
: 0 bytesrepresentability_adt_ty
: 0 bytesparams_in_repr
: 0 bytesthir_body
: 0 bytesmir_keys
: 0 bytesmir_const_qualif
: 0 bytesmir_built
: 0 bytesthir_abstract_const
: 0 bytesmir_drops_elaborated_and_const_checked
: 0 bytesmir_for_ctfe
: 0 bytesmir_promoted
: 0 bytesclosure_typeinfo
: 0 bytesclosure_saved_names_of_captured_variables
: 0 bytesmir_coroutine_witnesses
: 0 bytescheck_coroutine_obligations
: 0 bytesoptimized_mir
: 0 bytescoverage_attr_on
: 0 bytescoverage_ids_info
: 0 bytespromoted_mir
: 0 byteserase_regions_ty
: 0 byteswasm_import_module_map
: 0 bytestrait_explicit_predicates_and_bounds
: 0 bytesexplicit_predicates_of
: 0 bytesinferred_outlives_of
: 0 bytesexplicit_super_predicates_of
: 0 bytesexplicit_implied_predicates_of
: 0 bytesexplicit_supertraits_containing_assoc_item
: 0 bytesconst_conditions
: 0 bytesexplicit_implied_const_bounds
: 0 bytestype_param_predicates
: 0 bytestrait_def
: 0 bytesadt_def
: 0 bytesadt_destructor
: 0 bytesadt_async_destructor
: 0 bytesadt_sized_constraint
: 0 bytesadt_dtorck_constraint
: 0 bytesconstness
: 0 bytesasyncness
: 0 bytesis_promotable_const_fn
: 0 bytescoroutine_by_move_body_def_id
: 0 bytescoroutine_kind
: 0 bytescoroutine_for_closure
: 0 bytescrate_variances
: 0 bytesvariances_of
: 0 bytesinferred_outlives_crate
: 0 bytesassociated_item_def_ids
: 0 bytesassociated_item
: 0 bytesassociated_items
: 0 bytesimpl_item_implementor_ids
: 0 bytesassociated_types_for_impl_traits_in_associated_fn
: 0 bytesassociated_type_for_impl_trait_in_trait
: 0 bytesimpl_trait_header
: 0 bytesself_ty_of_trait_impl_enabling_order_dep_trait_object_hack
: 0 bytesinherent_impls
: 0 bytesincoherent_impls
: 0 bytescheck_unsafety
: 0 bytesassumed_wf_types
: 0 bytesassumed_wf_types_for_rpitit
: 0 bytesfn_sig
: 0 byteslint_mod
: 0 bytescheck_unused_traits
: 0 bytescheck_mod_attrs
: 0 bytescheck_mod_unstable_api_usage
: 0 bytescheck_mod_const_bodies
: 0 bytescheck_mod_loops
: 0 bytescheck_mod_naked_functions
: 0 bytescheck_mod_privacy
: 0 bytescheck_liveness
: 0 byteslive_symbols_and_ignored_derived_traits
: 0 bytescheck_mod_deathness
: 0 bytescheck_mod_type_wf
: 0 bytescoerce_unsized_info
: 0 bytestypeck
: 0 bytesdiagnostic_only_typeck
: 0 bytesused_trait_imports
: 0 bytescoherent_trait
: 0 bytesmir_borrowck
: 0 bytescrate_inherent_impls
: 0 bytescrate_inherent_impls_validity_check
: 0 bytescrate_inherent_impls_overlap_check
: 0 bytesorphan_check_impl
: 0 bytesmir_callgraph_reachable
: 0 bytesmir_inliner_callees
: 0 bytestag_for_variant
: 0 byteseval_to_allocation_raw
: 0 byteseval_static_initializer
: 0 byteseval_to_const_value_raw
: 0 byteseval_to_valtree
: 0 bytesvaltree_to_const_val
: 0 bytesdestructure_const
: 0 byteslit_to_const
: 0 bytescheck_match
: 0 byteseffective_visibilities
: 0 bytescheck_private_in_public
: 0 bytesreachable_set
: 0 bytesregion_scope_tree
: 0 bytesmir_shims
: 0 bytessymbol_name
: 0 bytesdef_kind
: 0 bytesdef_span
: 0 bytesdef_ident_span
: 0 byteslookup_stability
: 0 byteslookup_const_stability
: 0 byteslookup_default_body_stability
: 0 bytesshould_inherit_track_caller
: 0 byteslookup_deprecation_entry
: 0 bytesis_doc_hidden
: 0 bytesis_doc_notable_trait
: 0 bytesitem_attrs
: 0 bytescodegen_fn_attrs
: 0 bytesasm_target_features
: 0 bytesfn_arg_names
: 0 bytesrendered_const
: 0 bytesrendered_precise_capturing_args
: 0 bytesimpl_parent
: 0 bytesis_ctfe_mir_available
: 0 bytesis_mir_available
: 0 bytesown_existential_vtable_entries
: 0 bytesvtable_entries
: 0 bytesfirst_method_vtable_slot
: 0 bytessupertrait_vtable_slot
: 0 bytesvtable_allocation
: 0 bytescodegen_select_candidate
: 0 bytesall_local_trait_impls
: 0 bytestrait_impls_of
: 0 bytesspecialization_graph_of
: 0 bytesdyn_compatibility_violations
: 0 bytesis_dyn_compatible
: 0 bytesparam_env
: 0 bytesparam_env_reveal_all_normalized
: 0 bytesis_copy_raw
: 0 bytesis_sized_raw
: 0 bytesis_freeze_raw
: 0 bytesis_unpin_raw
: 0 bytesneeds_drop_raw
: 0 bytesneeds_async_drop_raw
: 0 byteshas_significant_drop_raw
: 0 byteshas_structural_eq_impl
: 0 bytesadt_drop_tys
: 0 bytesadt_significant_drop_tys
: 0 byteslist_significant_drop_tys
: 0 byteslayout_of
: 0 bytesfn_abi_of_fn_ptr
: 0 bytesfn_abi_of_instance
: 0 bytesdylib_dependency_formats
: 0 bytesdependency_formats
: 0 bytesis_compiler_builtins
: 0 byteshas_global_allocator
: 0 byteshas_alloc_error_handler
: 0 byteshas_panic_handler
: 0 bytesis_profiler_runtime
: 0 byteshas_ffi_unwind_calls
: 0 bytesrequired_panic_strategy
: 0 bytespanic_in_drop_strategy
: 0 bytesis_no_builtins
: 0 bytessymbol_mangling_version
: 0 bytesextern_crate
: 0 bytesspecialization_enabled_in
: 0 bytesspecializes
: 0 bytesin_scope_traits_map
: 0 bytesdefaultness
: 0 bytescheck_well_formed
: 0 bytesreachable_non_generics
: 0 bytesis_reachable_non_generic
: 0 bytesis_unreachable_local_definition
: 0 bytesupstream_monomorphizations
: 0 bytesupstream_monomorphizations_for
: 0 bytesupstream_drop_glue_for
: 0 bytesupstream_async_drop_glue_for
: 0 bytesforeign_modules
: 0 bytesclashing_extern_declarations
: 0 bytesentry_fn
: 0 bytesproc_macro_decls_static
: 0 bytescrate_hash
: 0 bytescrate_host_hash
: 0 bytesextra_filename
: 0 bytescrate_extern_paths
: 0 bytesimplementations_of_trait
: 0 bytescrate_incoherent_impls
: 0 bytesnative_library
: 0 bytesinherit_sig_for_delegation_item
: 0 bytesresolve_bound_vars
: 0 bytesnamed_variable_map
: 0 bytesis_late_bound_map
: 0 bytesobject_lifetime_default
: 0 byteslate_bound_vars_map
: 0 bytesopaque_captured_lifetimes
: 0 bytesvisibility
: 0 bytesinhabited_predicate_adt
: 0 bytesinhabited_predicate_type
: 0 bytesdep_kind
: 0 bytescrate_name
: 0 bytesmodule_children
: 0 bytesextern_mod_stmt_cnum
: 0 bytesnum_extern_def_ids
: 0 byteslib_features
: 0 bytesstability_implications
: 0 bytesintrinsic_raw
: 0 bytesget_lang_items
: 0 bytesall_diagnostic_items
: 0 bytesdefined_lang_items
: 0 bytesdiagnostic_items
: 0 bytesmissing_lang_items
: 0 bytesvisible_parent_map
: 0 bytestrimmed_def_paths
: 0 bytesmissing_extern_crate_item
: 0 bytesused_crate_source
: 0 bytesdebugger_visualizers
: 0 bytespostorder_cnums
: 0 bytesis_private_dep
: 0 bytesallocator_kind
: 0 bytesalloc_error_handler_kind
: 0 bytesupvars_mentioned
: 0 bytesmaybe_unused_trait_imports
: 0 bytesnames_imported_by_glob_use
: 0 bytesstability_index
: 0 bytescrates
: 0 bytesused_crates
: 0 bytestraits
: 0 bytestrait_impls_in_crate
: 0 bytesexported_symbols
: 0 bytescollect_and_partition_mono_items
: 0 bytesis_codegened_item
: 0 bytescodegen_unit
: 0 bytesunused_generic_params
: 0 bytesbackend_optimization_level
: 0 bytesoutput_filenames
: 0 bytesnormalize_canonicalized_projection_ty
: 0 bytesnormalize_canonicalized_weak_ty
: 0 bytesnormalize_canonicalized_inherent_projection_ty
: 0 bytestry_normalize_generic_arg_after_erasing_regions
: 0 bytesimplied_outlives_bounds_compat
: 0 bytesimplied_outlives_bounds
: 0 bytesdropck_outlives
: 0 bytesevaluate_obligation
: 0 bytestype_op_ascribe_user_type
: 0 bytestype_op_prove_predicate
: 0 bytestype_op_normalize_ty
: 0 bytestype_op_normalize_clause
: 0 bytestype_op_normalize_poly_fn_sig
: 0 bytestype_op_normalize_fn_sig
: 0 bytesinstantiate_and_check_impossible_predicates
: 0 bytesis_impossible_associated_item
: 0 bytesmethod_autoderef_steps
: 0 bytesrust_target_features
: 0 bytesimplied_target_features
: 0 bytesfeatures_query
: 0 bytescrate_for_resolver
: 0 bytesresolve_instance_raw
: 0 bytesreveal_opaque_types_in_bounds
: 0 byteslimits
: 0 bytesdiagnostic_hir_wf_check
: 0 bytesglobal_backend_features
: 0 bytescheck_validity_requirement
: 0 bytescompare_impl_const
: 0 bytesdeduced_param_attrs
: 0 bytesdoc_link_resolutions
: 0 bytesdoc_link_traits_in_scope
: 0 bytesstripped_cfg_items
: 0 bytesgenerics_require_sized_self
: 0 bytescross_crate_inlinable
: 0 bytescheck_mono_item
: 0 bytesskip_move_check_fns
: 0 bytesitems_of_instance
: 0 bytessize_estimate
: 0 bytes