1//!
2//! # The rustc Query System: Query Definitions and Modifiers
3//!
4//! The core processes in rustc are shipped as queries. Each query is a demand-driven function from some key to a value.
5//! The execution result of the function is cached and directly read during the next request, thereby improving compilation efficiency.
6//! Some results are saved locally and directly read during the next compilation, which are core of incremental compilation.
7//!
8//! ## How to Read This Module
9//!
10//! Each `query` block in this file defines a single query, specifying its key and value types, along with various modifiers.
11//! These query definitions are processed by the [`rustc_macros`], which expands them into the necessary boilerplate code
12//! for the query system—including the [`Providers`] struct (a function table for all query implementations, where each field is
13//! a function pointer to the actual provider), caching, and dependency graph integration.
14//! **Note:** The `Providers` struct is not a Rust trait, but a struct generated by the `rustc_macros` to hold all provider functions.
15//! The `rustc_macros` also supports a set of **query modifiers** (see below) that control the behavior of each query.
16//!
17//! The actual provider functions are implemented in various modules and registered into the `Providers` struct
18//! during compiler initialization (see [`rustc_interface::passes::DEFAULT_QUERY_PROVIDERS`]).
19//!
20//! [`rustc_macros`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_macros/index.html
21//! [`rustc_interface::passes::DEFAULT_QUERY_PROVIDERS`]: ../../rustc_interface/passes/static.DEFAULT_QUERY_PROVIDERS.html
22//!
23//! ## Query Modifiers
24//!
25//! Query modifiers are special flags that alter the behavior of a query. They are parsed and processed by the `rustc_macros`
26//! The main modifiers are:
27//!
28//! - `desc { ... }`: Sets the human-readable description for diagnostics and profiling. Required for every query.
29//! - `arena_cache`: Use an arena for in-memory caching of the query result.
30//! - `cache_on_disk_if { ... }`: Cache the query result to disk if the provided block evaluates to true.
31//! - `cycle_fatal`: If a dependency cycle is detected, abort compilation with a fatal error.
32//! - `cycle_delay_bug`: If a dependency cycle is detected, emit a delayed bug instead of aborting immediately.
33//! - `cycle_stash`: If a dependency cycle is detected, stash the error for later handling.
34//! - `no_hash`: Do not hash the query result for incremental compilation; just mark as dirty if recomputed.
35//! - `anon`: Make the query anonymous in the dependency graph (no dep node is created).
36//! - `eval_always`: Always evaluate the query, ignoring its dependencies and cached results.
37//! - `depth_limit`: Impose a recursion depth limit on the query to prevent stack overflows.
38//! - `separate_provide_extern`: Use separate provider functions for local and external crates.
39//! - `feedable`: Allow the query result to be set from another query ("fed" externally).
40//! - `return_result_from_ensure_ok`: When called via `tcx.ensure_ok()`, return `Result<(), ErrorGuaranteed>` instead of `()`.
41//! If the query needs to be executed and returns an error, the error is returned to the caller.
42//! Only valid for queries returning `Result<_, ErrorGuaranteed>`.
43//!
44//! For the up-to-date list, see the `QueryModifiers` struct in
45//! [`rustc_macros/src/query.rs`](https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_macros/src/query.rs)
46//! and for more details in incremental compilation, see the
47//! [Query modifiers in incremental compilation](https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation-in-detail.html#query-modifiers) section of the rustc-dev-guide.
48//!
49//! ## Query Expansion and Code Generation
50//!
51//! The [`rustc_macros::rustc_queries`] macro expands each query definition into:
52//! - A method on [`TyCtxt`] (and [`crate::query::TyCtxtAt`]) for invoking the query.
53//! - Provider traits and structs for supplying the query's value.
54//! - Caching and dependency graph integration.
55//! - Support for incremental compilation, disk caching, and arena allocation as controlled by the modifiers.
56//!
57//! [`rustc_macros::rustc_queries`]: ../../rustc_macros/macro.rustc_queries.html
58//!
59//! The macro-based approach allows the query system to be highly flexible and maintainable, while minimizing boilerplate.
60//!
61//! For more details, see the [rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html).
6263#![allow(unused_parens)]
6465use std::ffi::OsStr;
66use std::mem;
67use std::path::PathBuf;
68use std::sync::Arc;
6970use rustc_abi::Align;
71use rustc_arena::TypedArena;
72use rustc_ast::expand::allocator::AllocatorKind;
73use rustc_ast::tokenstream::TokenStream;
74use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
75use rustc_data_structures::sorted_map::SortedMap;
76use rustc_data_structures::steal::Steal;
77use rustc_data_structures::svh::Svh;
78use rustc_data_structures::unord::{UnordMap, UnordSet};
79use rustc_errors::ErrorGuaranteed;
80use rustc_hir::attrs::{EiiDecl, EiiImpl, StrippedCfgItem};
81use rustc_hir::def::{DefKind, DocLinkResMap};
82use rustc_hir::def_id::{
83CrateNum, DefId, DefIdMap, LocalDefId, LocalDefIdMap, LocalDefIdSet, LocalModDefId,
84};
85use rustc_hir::lang_items::{LangItem, LanguageItems};
86use rustc_hir::{Crate, ItemLocalId, ItemLocalMap, PreciseCapturingArgKind, TraitCandidate};
87use rustc_index::IndexVec;
88use rustc_lint_defs::LintId;
89use rustc_macros::rustc_queries;
90use rustc_session::Limits;
91use rustc_session::config::{EntryFnType, OptLevel, OutputFilenames, SymbolManglingVersion};
92use rustc_session::cstore::{
93CrateDepKind, CrateSource, ExternCrate, ForeignModule, LinkagePreference, NativeLib,
94};
95use rustc_session::lint::LintExpectationId;
96use rustc_span::def_id::LOCAL_CRATE;
97use rustc_span::source_map::Spanned;
98use rustc_span::{DUMMY_SP, LocalExpnId, Span, Symbol};
99use rustc_target::spec::PanicStrategy;
100use {rustc_abias abi, rustc_astas ast, rustc_hiras hir};
101102use crate::infer::canonical::{self, Canonical};
103use crate::lint::LintExpectation;
104use crate::metadata::ModChild;
105use crate::middle::codegen_fn_attrs::{CodegenFnAttrs, SanitizerFnAttrs};
106use crate::middle::debugger_visualizer::DebuggerVisualizerFile;
107use crate::middle::deduced_param_attrs::DeducedParamAttrs;
108use crate::middle::exported_symbols::{ExportedSymbol, SymbolExportInfo};
109use crate::middle::lib_features::LibFeatures;
110use crate::middle::privacy::EffectiveVisibilities;
111use crate::middle::resolve_bound_vars::{ObjectLifetimeDefault, ResolveBoundVars, ResolvedArg};
112use crate::middle::stability::DeprecationEntry;
113use crate::mir::interpret::{
114EvalStaticInitializerRawResult, EvalToAllocationRawResult, EvalToConstValueResult,
115EvalToValTreeResult, GlobalId, LitToConstInput,
116};
117use crate::mir::mono::{
118CodegenUnit, CollectionMode, MonoItem, MonoItemPartitions, NormalizationErrorInMono,
119};
120use crate::query::describe_as_module;
121use crate::query::plumbing::CyclePlaceholder;
122use crate::traits::query::{
123CanonicalAliasGoal, CanonicalDropckOutlivesGoal, CanonicalImpliedOutlivesBoundsGoal,
124CanonicalMethodAutoderefStepsGoal, CanonicalPredicateGoal, CanonicalTypeOpAscribeUserTypeGoal,
125CanonicalTypeOpNormalizeGoal, CanonicalTypeOpProvePredicateGoal, DropckConstraint,
126DropckOutlivesResult, MethodAutoderefStepsResult, NoSolution, NormalizationResult,
127OutlivesBound,
128};
129use crate::traits::{
130CodegenObligationError, DynCompatibilityViolation, EvaluationResult, ImplSource,
131ObligationCause, OverflowError, WellFormedLoc, solve, specialization_graph,
132};
133use crate::ty::fast_reject::SimplifiedType;
134use crate::ty::layout::ValidityRequirement;
135use crate::ty::print::PrintTraitRefExt;
136use crate::ty::util::AlwaysRequiresDrop;
137use crate::ty::{
138self, CrateInherentImpls, GenericArg, GenericArgsRef, PseudoCanonicalInput, SizedTraitKind, Ty,
139TyCtxt, TyCtxtFeed,
140};
141use crate::{dep_graph, mir, thir};
142143// Each of these queries corresponds to a function pointer field in the
144// `Providers` struct for requesting a value of that type, and a method
145// on `tcx: TyCtxt` (and `tcx.at(span)`) for doing that request in a way
146// which memoizes and does dep-graph tracking, wrapping around the actual
147// `Providers` that the driver creates (using several `rustc_*` crates).
148//
149// The result type of each query must implement `Clone`, and additionally
150// `ty::query::values::Value`, which produces an appropriate placeholder
151// (error) value if the query resulted in a query cycle.
152// Queries marked with `cycle_fatal` do not need the latter implementation,
153// as they will raise an fatal error on query cycles instead.
154pub mod cached {
use super::*;
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn derive_macro_expansion<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::derive_macro_expansion::Key<'tcx>) -> bool {
let crate::query::Providers { derive_macro_expansion: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn hir_module_items<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::hir_module_items::Key<'tcx>) -> bool {
let crate::query::Providers { hir_module_items: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn const_param_default<'tcx>(_: TyCtxt<'tcx>,
param: &crate::queries::const_param_default::Key<'tcx>) -> bool {
let crate::query::Providers { const_param_default: _, .. };
{ param.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn const_of_item<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::const_of_item::Key<'tcx>) -> bool {
let crate::query::Providers { const_of_item: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn type_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::type_of::Key<'tcx>) -> bool {
let crate::query::Providers { type_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn collect_return_position_impl_trait_in_trait_tys<'tcx>(_:
TyCtxt<'tcx>,
key:
&crate::queries::collect_return_position_impl_trait_in_trait_tys::Key<'tcx>)
-> bool {
let crate::query::Providers {
collect_return_position_impl_trait_in_trait_tys: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn generics_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::generics_of::Key<'tcx>) -> bool {
let crate::query::Providers { generics_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn predicates_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::predicates_of::Key<'tcx>) -> bool {
let crate::query::Providers { predicates_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn explicit_item_bounds<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::explicit_item_bounds::Key<'tcx>) -> bool {
let crate::query::Providers { explicit_item_bounds: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn explicit_item_self_bounds<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::explicit_item_self_bounds::Key<'tcx>) -> bool {
let crate::query::Providers { explicit_item_self_bounds: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn mir_const_qualif<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::mir_const_qualif::Key<'tcx>) -> bool {
let crate::query::Providers { mir_const_qualif: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn mir_for_ctfe<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::mir_for_ctfe::Key<'tcx>) -> bool {
let crate::query::Providers { mir_for_ctfe: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn mir_coroutine_witnesses<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::mir_coroutine_witnesses::Key<'tcx>) -> bool {
let crate::query::Providers { mir_coroutine_witnesses: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn optimized_mir<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::optimized_mir::Key<'tcx>) -> bool {
let crate::query::Providers { optimized_mir: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn promoted_mir<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::promoted_mir::Key<'tcx>) -> bool {
let crate::query::Providers { promoted_mir: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn explicit_predicates_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::explicit_predicates_of::Key<'tcx>) -> bool {
let crate::query::Providers { explicit_predicates_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn inferred_outlives_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::inferred_outlives_of::Key<'tcx>) -> bool {
let crate::query::Providers { inferred_outlives_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn explicit_super_predicates_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::explicit_super_predicates_of::Key<'tcx>)
-> bool {
let crate::query::Providers { explicit_super_predicates_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn explicit_implied_predicates_of<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::explicit_implied_predicates_of::Key<'tcx>)
-> bool {
let crate::query::Providers { explicit_implied_predicates_of: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn trait_def<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::trait_def::Key<'tcx>) -> bool {
let crate::query::Providers { trait_def: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn adt_def<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::adt_def::Key<'tcx>) -> bool {
let crate::query::Providers { adt_def: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn adt_destructor<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::adt_destructor::Key<'tcx>) -> bool {
let crate::query::Providers { adt_destructor: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn adt_async_destructor<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::adt_async_destructor::Key<'tcx>) -> bool {
let crate::query::Providers { adt_async_destructor: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn variances_of<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::variances_of::Key<'tcx>) -> bool {
let crate::query::Providers { variances_of: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn associated_item_def_ids<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::associated_item_def_ids::Key<'tcx>) -> bool {
let crate::query::Providers { associated_item_def_ids: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn associated_item<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::associated_item::Key<'tcx>) -> bool {
let crate::query::Providers { associated_item: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn impl_trait_header<'tcx>(_: TyCtxt<'tcx>,
impl_id: &crate::queries::impl_trait_header::Key<'tcx>) -> bool {
let crate::query::Providers { impl_trait_header: _, .. };
{ impl_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn inherent_impls<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::inherent_impls::Key<'tcx>) -> bool {
let crate::query::Providers { inherent_impls: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn fn_sig<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::fn_sig::Key<'tcx>) -> bool {
let crate::query::Providers { fn_sig: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn check_liveness<'tcx>(tcx: TyCtxt<'tcx>,
key: &crate::queries::check_liveness::Key<'tcx>) -> bool {
let crate::query::Providers { check_liveness: _, .. };
{ tcx.is_typeck_child(key.to_def_id()) }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn coerce_unsized_info<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::coerce_unsized_info::Key<'tcx>) -> bool {
let crate::query::Providers { coerce_unsized_info: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn typeck<'tcx>(tcx: TyCtxt<'tcx>,
key: &crate::queries::typeck::Key<'tcx>) -> bool {
let crate::query::Providers { typeck: _, .. };
{ !tcx.is_typeck_child(key.to_def_id()) }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn used_trait_imports<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::used_trait_imports::Key<'tcx>) -> bool {
let crate::query::Providers { used_trait_imports: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn mir_callgraph_cyclic<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::mir_callgraph_cyclic::Key<'tcx>) -> bool {
let crate::query::Providers { mir_callgraph_cyclic: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn eval_to_allocation_raw<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::eval_to_allocation_raw::Key<'tcx>) -> bool {
let crate::query::Providers { eval_to_allocation_raw: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn eval_static_initializer<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::eval_static_initializer::Key<'tcx>) -> bool {
let crate::query::Providers { eval_static_initializer: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn eval_to_const_value_raw<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::eval_to_const_value_raw::Key<'tcx>) -> bool {
let crate::query::Providers { eval_to_const_value_raw: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn reachable_set<'tcx>(_: TyCtxt<'tcx>,
_: &crate::queries::reachable_set::Key<'tcx>) -> bool {
let crate::query::Providers { reachable_set: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn symbol_name<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::symbol_name::Key<'tcx>) -> bool {
let crate::query::Providers { symbol_name: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn def_kind<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::def_kind::Key<'tcx>) -> bool {
let crate::query::Providers { def_kind: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn def_span<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::def_span::Key<'tcx>) -> bool {
let crate::query::Providers { def_span: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn def_ident_span<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::def_ident_span::Key<'tcx>) -> bool {
let crate::query::Providers { def_ident_span: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn ty_span<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::ty_span::Key<'tcx>) -> bool {
let crate::query::Providers { ty_span: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn lookup_stability<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::lookup_stability::Key<'tcx>) -> bool {
let crate::query::Providers { lookup_stability: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn lookup_const_stability<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::lookup_const_stability::Key<'tcx>) -> bool {
let crate::query::Providers { lookup_const_stability: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn lookup_deprecation_entry<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::lookup_deprecation_entry::Key<'tcx>)
-> bool {
let crate::query::Providers { lookup_deprecation_entry: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn codegen_fn_attrs<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::codegen_fn_attrs::Key<'tcx>) -> bool {
let crate::query::Providers { codegen_fn_attrs: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn is_mir_available<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::is_mir_available::Key<'tcx>) -> bool {
let crate::query::Providers { is_mir_available: _, .. };
{ key.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn codegen_select_candidate<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::codegen_select_candidate::Key<'tcx>) -> bool {
let crate::query::Providers { codegen_select_candidate: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn specialization_graph_of<'tcx>(_: TyCtxt<'tcx>,
trait_id: &crate::queries::specialization_graph_of::Key<'tcx>)
-> bool {
let crate::query::Providers { specialization_graph_of: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn adt_drop_tys<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::adt_drop_tys::Key<'tcx>) -> bool {
let crate::query::Providers { adt_drop_tys: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn adt_async_drop_tys<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::adt_async_drop_tys::Key<'tcx>) -> bool {
let crate::query::Providers { adt_async_drop_tys: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn has_ffi_unwind_calls<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::has_ffi_unwind_calls::Key<'tcx>) -> bool {
let crate::query::Providers { has_ffi_unwind_calls: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn is_reachable_non_generic<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::is_reachable_non_generic::Key<'tcx>)
-> bool {
let crate::query::Providers { is_reachable_non_generic: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn exported_non_generic_symbols<'tcx>(_: TyCtxt<'tcx>,
cnum: &crate::queries::exported_non_generic_symbols::Key<'tcx>)
-> bool {
let crate::query::Providers { exported_non_generic_symbols: _, .. };
{ *cnum == LOCAL_CRATE }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn exported_generic_symbols<'tcx>(_: TyCtxt<'tcx>,
cnum: &crate::queries::exported_generic_symbols::Key<'tcx>) -> bool {
let crate::query::Providers { exported_generic_symbols: _, .. };
{ *cnum == LOCAL_CRATE }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn items_of_instance<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::items_of_instance::Key<'tcx>) -> bool {
let crate::query::Providers { items_of_instance: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn size_estimate<'tcx>(_: TyCtxt<'tcx>,
key: &crate::queries::size_estimate::Key<'tcx>) -> bool {
let crate::query::Providers { size_estimate: _, .. };
{ true }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn trivial_const<'tcx>(_: TyCtxt<'tcx>,
def_id: &crate::queries::trivial_const::Key<'tcx>) -> bool {
let crate::query::Providers { trivial_const: _, .. };
{ def_id.is_local() }
}
#[allow(unused_variables, unused_braces, rustc :: pass_by_value)]
#[inline]
pub fn externally_implementable_items<'tcx>(_: TyCtxt<'tcx>,
cnum: &crate::queries::externally_implementable_items::Key<'tcx>)
-> bool {
let crate::query::Providers { externally_implementable_items: _, .. };
{ *cnum == LOCAL_CRATE }
}
}rustc_queries! {
155/// Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`.
156 /// The key is:
157 /// - A unique key corresponding to the invocation of a macro.
158 /// - Token stream which serves as an input to the macro.
159 ///
160 /// The output is the token stream generated by the proc macro.
161query derive_macro_expansion(key: (LocalExpnId, &'tcx TokenStream)) -> Result<&'tcx TokenStream, ()> {
162 desc { "expanding a derive (proc) macro" }
163 cache_on_disk_if { true }
164 }
165166/// This exists purely for testing the interactions between delayed bugs and incremental.
167query trigger_delayed_bug(key: DefId) {
168 desc { "triggering a delayed bug for testing incremental" }
169 }
170171/// Collects the list of all tools registered using `#![register_tool]`.
172query registered_tools(_: ()) -> &'tcx ty::RegisteredTools {
173 arena_cache
174 desc { "compute registered tools for crate" }
175 }
176177 query early_lint_checks(_: ()) {
178 desc { "perform lints prior to AST lowering" }
179 }
180181/// Tracked access to environment variables.
182 ///
183 /// Useful for the implementation of `std::env!`, `proc-macro`s change
184 /// detection and other changes in the compiler's behaviour that is easier
185 /// to control with an environment variable than a flag.
186 ///
187 /// NOTE: This currently does not work with dependency info in the
188 /// analysis, codegen and linking passes, place extra code at the top of
189 /// `rustc_interface::passes::write_dep_info` to make that work.
190query env_var_os(key: &'tcx OsStr) -> Option<&'tcx OsStr> {
191// Environment variables are global state
192eval_always
193 desc { "get the value of an environment variable" }
194 }
195196 query resolutions(_: ()) -> &'tcx ty::ResolverGlobalCtxt {
197 desc { "getting the resolver outputs" }
198 }
199200 query resolver_for_lowering_raw(_: ()) -> (&'tcx Steal<(ty::ResolverAstLowering, Arc<ast::Crate>)>, &'tcx ty::ResolverGlobalCtxt) {
201 eval_always
202 no_hash
203 desc { "getting the resolver for lowering" }
204 }
205206/// Return the span for a definition.
207 ///
208 /// Contrary to `def_span` below, this query returns the full absolute span of the definition.
209 /// This span is meant for dep-tracking rather than diagnostics. It should not be used outside
210 /// of rustc_middle::hir::source_map.
211query source_span(key: LocalDefId) -> Span {
212// Accesses untracked data
213eval_always
214 desc { "getting the source span" }
215 }
216217/// Represents crate as a whole (as distinct from the top-level crate module).
218 ///
219 /// If you call `tcx.hir_crate(())` we will have to assume that any change
220 /// means that you need to be recompiled. This is because the `hir_crate`
221 /// query gives you access to all other items. To avoid this fate, do not
222 /// call `tcx.hir_crate(())`; instead, prefer wrappers like
223 /// [`TyCtxt::hir_visit_all_item_likes_in_crate`].
224query hir_crate(key: ()) -> &'tcx Crate<'tcx> {
225 arena_cache
226 eval_always
227 desc { "getting the crate HIR" }
228 }
229230/// All items in the crate.
231query hir_crate_items(_: ()) -> &'tcx rustc_middle::hir::ModuleItems {
232 arena_cache
233 eval_always
234 desc { "getting HIR crate items" }
235 }
236237/// The items in a module.
238 ///
239 /// This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`.
240 /// Avoid calling this query directly.
241query hir_module_items(key: LocalModDefId) -> &'tcx rustc_middle::hir::ModuleItems {
242 arena_cache
243 desc { |tcx| "getting HIR module items in `{}`", tcx.def_path_str(key) }
244 cache_on_disk_if { true }
245 }
246247/// Returns HIR ID for the given `LocalDefId`.
248query local_def_id_to_hir_id(key: LocalDefId) -> hir::HirId {
249 desc { |tcx| "getting HIR ID of `{}`", tcx.def_path_str(key) }
250 feedable
251 }
252253/// Gives access to the HIR node's parent for the HIR owner `key`.
254 ///
255 /// This can be conveniently accessed by `tcx.hir_*` methods.
256 /// Avoid calling this query directly.
257query hir_owner_parent_q(key: hir::OwnerId) -> hir::HirId {
258 desc { |tcx| "getting HIR parent of `{}`", tcx.def_path_str(key) }
259 }
260261/// Gives access to the HIR nodes and bodies inside `key` if it's a HIR owner.
262 ///
263 /// This can be conveniently accessed by `tcx.hir_*` methods.
264 /// Avoid calling this query directly.
265query opt_hir_owner_nodes(key: LocalDefId) -> Option<&'tcx hir::OwnerNodes<'tcx>> {
266 desc { |tcx| "getting HIR owner items in `{}`", tcx.def_path_str(key) }
267 feedable
268 }
269270/// Gives access to the HIR attributes inside the HIR owner `key`.
271 ///
272 /// This can be conveniently accessed by `tcx.hir_*` methods.
273 /// Avoid calling this query directly.
274query hir_attr_map(key: hir::OwnerId) -> &'tcx hir::AttributeMap<'tcx> {
275 desc { |tcx| "getting HIR owner attributes in `{}`", tcx.def_path_str(key) }
276 feedable
277 }
278279/// Gives access to lints emitted during ast lowering.
280 ///
281 /// This can be conveniently accessed by `tcx.hir_*` methods.
282 /// Avoid calling this query directly.
283query opt_ast_lowering_delayed_lints(key: hir::OwnerId) -> Option<&'tcx hir::lints::DelayedLints> {
284 desc { |tcx| "getting AST lowering delayed lints in `{}`", tcx.def_path_str(key) }
285 }
286287/// Returns the *default* of the const pararameter given by `DefId`.
288 ///
289 /// E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`.
290query const_param_default(param: DefId) -> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
291 desc { |tcx| "computing the default for const parameter `{}`", tcx.def_path_str(param) }
292 cache_on_disk_if { param.is_local() }
293 separate_provide_extern
294 }
295296/// Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`.
297 ///
298 /// When a const item is used in a type-level expression, like in equality for an assoc const
299 /// projection, this allows us to retrieve the typesystem-appropriate representation of the
300 /// const value.
301 ///
302 /// This query will ICE if given a const that is not marked with `#[type_const]`.
303query const_of_item(def_id: DefId) -> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
304 desc { |tcx| "computing the type-level value for `{}`", tcx.def_path_str(def_id) }
305 cache_on_disk_if { def_id.is_local() }
306 separate_provide_extern
307 }
308309/// Returns the *type* of the definition given by `DefId`.
310 ///
311 /// For type aliases (whether eager or lazy) and associated types, this returns
312 /// the underlying aliased type (not the corresponding [alias type]).
313 ///
314 /// For opaque types, this returns and thus reveals the hidden type! If you
315 /// want to detect cycle errors use `type_of_opaque` instead.
316 ///
317 /// To clarify, for type definitions, this does *not* return the "type of a type"
318 /// (aka *kind* or *sort*) in the type-theoretical sense! It merely returns
319 /// the type primarily *associated with* it.
320 ///
321 /// # Panics
322 ///
323 /// This query will panic if the given definition doesn't (and can't
324 /// conceptually) have an (underlying) type.
325 ///
326 /// [alias type]: rustc_middle::ty::AliasTy
327query type_of(key: DefId) -> ty::EarlyBinder<'tcx, Ty<'tcx>> {
328 desc { |tcx|
329"{action} `{path}`",
330 action = match tcx.def_kind(key) {
331 DefKind::TyAlias => "expanding type alias",
332 DefKind::TraitAlias => "expanding trait alias",
333_ => "computing type of",
334 },
335 path = tcx.def_path_str(key),
336 }
337 cache_on_disk_if { key.is_local() }
338 separate_provide_extern
339 feedable
340 }
341342/// Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred.
343 ///
344 /// This is a specialized instance of [`Self::type_of`] that detects query cycles.
345 /// Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead.
346 /// This is used to improve the error message in cases where revealing the hidden type
347 /// for auto-trait leakage cycles.
348 ///
349 /// # Panics
350 ///
351 /// This query will panic if the given definition is not an opaque type.
352query type_of_opaque(key: DefId) -> Result<ty::EarlyBinder<'tcx, Ty<'tcx>>, CyclePlaceholder> {
353 desc { |tcx|
354"computing type of opaque `{path}`",
355 path = tcx.def_path_str(key),
356 }
357 cycle_stash
358 }
359 query type_of_opaque_hir_typeck(key: LocalDefId) -> ty::EarlyBinder<'tcx, Ty<'tcx>> {
360 desc { |tcx|
361"computing type of opaque `{path}` via HIR typeck",
362 path = tcx.def_path_str(key),
363 }
364 }
365366/// Returns whether the type alias given by `DefId` is lazy.
367 ///
368 /// I.e., if the type alias expands / ought to expand to a [free] [alias type]
369 /// instead of the underlying aliased type.
370 ///
371 /// Relevant for features `lazy_type_alias` and `type_alias_impl_trait`.
372 ///
373 /// # Panics
374 ///
375 /// This query *may* panic if the given definition is not a type alias.
376 ///
377 /// [free]: rustc_middle::ty::Free
378 /// [alias type]: rustc_middle::ty::AliasTy
379query type_alias_is_lazy(key: DefId) -> bool {
380 desc { |tcx|
381"computing whether the type alias `{path}` is lazy",
382 path = tcx.def_path_str(key),
383 }
384 separate_provide_extern
385 }
386387 query collect_return_position_impl_trait_in_trait_tys(key: DefId)
388 -> Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx, Ty<'tcx>>>, ErrorGuaranteed>
389 {
390 desc { "comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process" }
391 cache_on_disk_if { key.is_local() }
392 separate_provide_extern
393 }
394395 query opaque_ty_origin(key: DefId) -> hir::OpaqueTyOrigin<DefId>
396 {
397 desc { "determine where the opaque originates from" }
398 separate_provide_extern
399 }
400401 query unsizing_params_for_adt(key: DefId) -> &'tcx rustc_index::bit_set::DenseBitSet<u32>
402 {
403 arena_cache
404 desc { |tcx|
405"determining what parameters of `{}` can participate in unsizing",
406 tcx.def_path_str(key),
407 }
408 }
409410/// The root query triggering all analysis passes like typeck or borrowck.
411query analysis(key: ()) {
412 eval_always
413 desc { |tcx|
414"running analysis passes on crate `{}`",
415 tcx.crate_name(LOCAL_CRATE),
416 }
417 }
418419/// This query checks the fulfillment of collected lint expectations.
420 /// All lint emitting queries have to be done before this is executed
421 /// to ensure that all expectations can be fulfilled.
422 ///
423 /// This is an extra query to enable other drivers (like rustdoc) to
424 /// only execute a small subset of the `analysis` query, while allowing
425 /// lints to be expected. In rustc, this query will be executed as part of
426 /// the `analysis` query and doesn't have to be called a second time.
427 ///
428 /// Tools can additionally pass in a tool filter. That will restrict the
429 /// expectations to only trigger for lints starting with the listed tool
430 /// name. This is useful for cases were not all linting code from rustc
431 /// was called. With the default `None` all registered lints will also
432 /// be checked for expectation fulfillment.
433query check_expectations(key: Option<Symbol>) {
434 eval_always
435 desc { "checking lint expectations (RFC 2383)" }
436 }
437438/// Returns the *generics* of the definition given by `DefId`.
439query generics_of(key: DefId) -> &'tcx ty::Generics {
440 desc { |tcx| "computing generics of `{}`", tcx.def_path_str(key) }
441 arena_cache
442 cache_on_disk_if { key.is_local() }
443 separate_provide_extern
444 feedable
445 }
446447/// Returns the (elaborated) *predicates* of the definition given by `DefId`
448 /// that must be proven true at usage sites (and which can be assumed at definition site).
449 ///
450 /// This is almost always *the* "predicates query" that you want.
451 ///
452 /// **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print
453 /// the result of this query for use in UI tests or for debugging purposes.
454query predicates_of(key: DefId) -> ty::GenericPredicates<'tcx> {
455 desc { |tcx| "computing predicates of `{}`", tcx.def_path_str(key) }
456 cache_on_disk_if { key.is_local() }
457 }
458459 query opaque_types_defined_by(
460 key: LocalDefId461 ) -> &'tcx ty::List<LocalDefId> {
462 desc {
463 |tcx| "computing the opaque types defined by `{}`",
464 tcx.def_path_str(key.to_def_id())
465 }
466 }
467468/// A list of all bodies inside of `key`, nested bodies are always stored
469 /// before their parent.
470query nested_bodies_within(
471 key: LocalDefId472 ) -> &'tcx ty::List<LocalDefId> {
473 desc {
474 |tcx| "computing the coroutines defined within `{}`",
475 tcx.def_path_str(key.to_def_id())
476 }
477 }
478479/// Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`
480 /// that must be proven true at definition site (and which can be assumed at usage sites).
481 ///
482 /// For associated types, these must be satisfied for an implementation
483 /// to be well-formed, and for opaque types, these are required to be
484 /// satisfied by the hidden type of the opaque.
485 ///
486 /// Bounds from the parent (e.g. with nested `impl Trait`) are not included.
487 ///
488 /// Syntactially, these are the bounds written on associated types in trait
489 /// definitions, or those after the `impl` keyword for an opaque:
490 ///
491 /// ```ignore (illustrative)
492 /// trait Trait { type X: Bound + 'lt; }
493 /// // ^^^^^^^^^^^
494 /// fn function() -> impl Debug + Display { /*...*/ }
495 /// // ^^^^^^^^^^^^^^^
496 /// ```
497query explicit_item_bounds(key: DefId) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
498 desc { |tcx| "finding item bounds for `{}`", tcx.def_path_str(key) }
499 cache_on_disk_if { key.is_local() }
500 separate_provide_extern
501 feedable
502 }
503504/// Returns the explicitly user-written *bounds* that share the `Self` type of the item.
505 ///
506 /// These are a subset of the [explicit item bounds] that may explicitly be used for things
507 /// like closure signature deduction.
508 ///
509 /// [explicit item bounds]: Self::explicit_item_bounds
510query explicit_item_self_bounds(key: DefId) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
511 desc { |tcx| "finding item bounds for `{}`", tcx.def_path_str(key) }
512 cache_on_disk_if { key.is_local() }
513 separate_provide_extern
514 feedable
515 }
516517/// Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`
518 /// that must be proven true at definition site (and which can be assumed at usage sites).
519 ///
520 /// Bounds from the parent (e.g. with nested `impl Trait`) are not included.
521 ///
522 /// **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print
523 /// the result of this query for use in UI tests or for debugging purposes.
524 ///
525 /// # Examples
526 ///
527 /// ```
528 /// trait Trait { type Assoc: Eq + ?Sized; }
529 /// ```
530 ///
531 /// While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`
532 /// here, `item_bounds` returns:
533 ///
534 /// ```text
535 /// [
536 /// <Self as Trait>::Assoc: Eq,
537 /// <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>
538 /// ]
539 /// ```
540query item_bounds(key: DefId) -> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
541 desc { |tcx| "elaborating item bounds for `{}`", tcx.def_path_str(key) }
542 }
543544 query item_self_bounds(key: DefId) -> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
545 desc { |tcx| "elaborating item assumptions for `{}`", tcx.def_path_str(key) }
546 }
547548 query item_non_self_bounds(key: DefId) -> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
549 desc { |tcx| "elaborating item assumptions for `{}`", tcx.def_path_str(key) }
550 }
551552 query impl_super_outlives(key: DefId) -> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
553 desc { |tcx| "elaborating supertrait outlives for trait of `{}`", tcx.def_path_str(key) }
554 }
555556/// Look up all native libraries this crate depends on.
557 /// These are assembled from the following places:
558 /// - `extern` blocks (depending on their `link` attributes)
559 /// - the `libs` (`-l`) option
560query native_libraries(_: CrateNum) -> &'tcx Vec<NativeLib> {
561 arena_cache
562 desc { "looking up the native libraries of a linked crate" }
563 separate_provide_extern
564 }
565566 query shallow_lint_levels_on(key: hir::OwnerId) -> &'tcx rustc_middle::lint::ShallowLintLevelMap {
567 arena_cache
568 desc { |tcx| "looking up lint levels for `{}`", tcx.def_path_str(key) }
569 }
570571 query lint_expectations(_: ()) -> &'tcx Vec<(LintExpectationId, LintExpectation)> {
572 arena_cache
573 desc { "computing `#[expect]`ed lints in this crate" }
574 }
575576 query lints_that_dont_need_to_run(_: ()) -> &'tcx UnordSet<LintId> {
577 arena_cache
578 desc { "Computing all lints that are explicitly enabled or with a default level greater than Allow" }
579 }
580581 query expn_that_defined(key: DefId) -> rustc_span::ExpnId {
582 desc { |tcx| "getting the expansion that defined `{}`", tcx.def_path_str(key) }
583 separate_provide_extern
584 }
585586 query is_panic_runtime(_: CrateNum) -> bool {
587 cycle_fatal
588 desc { "checking if the crate is_panic_runtime" }
589 separate_provide_extern
590 }
591592/// Checks whether a type is representable or infinitely sized
593query representability(_: LocalDefId) -> rustc_middle::ty::Representability {
594 desc { "checking if `{}` is representable", tcx.def_path_str(key) }
595// infinitely sized types will cause a cycle
596cycle_delay_bug
597// we don't want recursive representability calls to be forced with
598 // incremental compilation because, if a cycle occurs, we need the
599 // entire cycle to be in memory for diagnostics
600anon
601 }
602603/// An implementation detail for the `representability` query
604query representability_adt_ty(_: Ty<'tcx>) -> rustc_middle::ty::Representability {
605 desc { "checking if `{}` is representable", key }
606 cycle_delay_bug
607 anon
608 }
609610/// Set of param indexes for type params that are in the type's representation
611query params_in_repr(key: DefId) -> &'tcx rustc_index::bit_set::DenseBitSet<u32> {
612 desc { "finding type parameters in the representation" }
613 arena_cache
614 no_hash
615 separate_provide_extern
616 }
617618/// Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless
619 /// `-Zno-steal-thir` is on.
620query thir_body(key: LocalDefId) -> Result<(&'tcx Steal<thir::Thir<'tcx>>, thir::ExprId), ErrorGuaranteed> {
621// Perf tests revealed that hashing THIR is inefficient (see #85729).
622no_hash
623 desc { |tcx| "building THIR for `{}`", tcx.def_path_str(key) }
624 }
625626/// Set of all the `DefId`s in this crate that have MIR associated with
627 /// them. This includes all the body owners, but also things like struct
628 /// constructors.
629query mir_keys(_: ()) -> &'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId> {
630 arena_cache
631 desc { "getting a list of all mir_keys" }
632 }
633634/// Maps DefId's that have an associated `mir::Body` to the result
635 /// of the MIR const-checking pass. This is the set of qualifs in
636 /// the final value of a `const`.
637query mir_const_qualif(key: DefId) -> mir::ConstQualifs {
638 desc { |tcx| "const checking `{}`", tcx.def_path_str(key) }
639 cache_on_disk_if { key.is_local() }
640 separate_provide_extern
641 }
642643/// Build the MIR for a given `DefId` and prepare it for const qualification.
644 ///
645 /// See the [rustc dev guide] for more info.
646 ///
647 /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html
648query mir_built(key: LocalDefId) -> &'tcx Steal<mir::Body<'tcx>> {
649 desc { |tcx| "building MIR for `{}`", tcx.def_path_str(key) }
650 feedable
651 }
652653/// Try to build an abstract representation of the given constant.
654query thir_abstract_const(
655 key: DefId656 ) -> Result<Option<ty::EarlyBinder<'tcx, ty::Const<'tcx>>>, ErrorGuaranteed> {
657 desc {
658 |tcx| "building an abstract representation for `{}`", tcx.def_path_str(key),
659 }
660 separate_provide_extern
661 }
662663 query mir_drops_elaborated_and_const_checked(key: LocalDefId) -> &'tcx Steal<mir::Body<'tcx>> {
664 no_hash
665 desc { |tcx| "elaborating drops for `{}`", tcx.def_path_str(key) }
666 }
667668 query mir_for_ctfe(
669 key: DefId670 ) -> &'tcx mir::Body<'tcx> {
671 desc { |tcx| "caching mir of `{}` for CTFE", tcx.def_path_str(key) }
672 cache_on_disk_if { key.is_local() }
673 separate_provide_extern
674 }
675676 query mir_promoted(key: LocalDefId) -> (
677&'tcx Steal<mir::Body<'tcx>>,
678&'tcx Steal<IndexVec<mir::Promoted, mir::Body<'tcx>>>
679 ) {
680 no_hash
681 desc { |tcx| "promoting constants in MIR for `{}`", tcx.def_path_str(key) }
682 }
683684 query closure_typeinfo(key: LocalDefId) -> ty::ClosureTypeInfo<'tcx> {
685 desc {
686 |tcx| "finding symbols for captures of closure `{}`",
687 tcx.def_path_str(key)
688 }
689 }
690691/// Returns names of captured upvars for closures and coroutines.
692 ///
693 /// Here are some examples:
694 /// - `name__field1__field2` when the upvar is captured by value.
695 /// - `_ref__name__field` when the upvar is captured by reference.
696 ///
697 /// For coroutines this only contains upvars that are shared by all states.
698query closure_saved_names_of_captured_variables(def_id: DefId) -> &'tcx IndexVec<abi::FieldIdx, Symbol> {
699 arena_cache
700 desc { |tcx| "computing debuginfo for closure `{}`", tcx.def_path_str(def_id) }
701 separate_provide_extern
702 }
703704 query mir_coroutine_witnesses(key: DefId) -> Option<&'tcx mir::CoroutineLayout<'tcx>> {
705 arena_cache
706 desc { |tcx| "coroutine witness types for `{}`", tcx.def_path_str(key) }
707 cache_on_disk_if { key.is_local() }
708 separate_provide_extern
709 }
710711 query check_coroutine_obligations(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
712 desc { |tcx| "verify auto trait bounds for coroutine interior type `{}`", tcx.def_path_str(key) }
713 return_result_from_ensure_ok
714 }
715716/// Used in case `mir_borrowck` fails to prove an obligation. We generally assume that
717 /// all goals we prove in MIR type check hold as we've already checked them in HIR typeck.
718 ///
719 /// However, we replace each free region in the MIR body with a unique region inference
720 /// variable. As we may rely on structural identity when proving goals this may cause a
721 /// goal to no longer hold. We store obligations for which this may happen during HIR
722 /// typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck
723 /// encounters an unexpected error. We expect this to result in an error when used and
724 /// delay a bug if it does not.
725query check_potentially_region_dependent_goals(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
726 desc {
727 |tcx| "reproving potentially region dependent HIR typeck goals for `{}",
728 tcx.def_path_str(key)
729 }
730 }
731732/// MIR after our optimization passes have run. This is MIR that is ready
733 /// for codegen. This is also the only query that can fetch non-local MIR, at present.
734query optimized_mir(key: DefId) -> &'tcx mir::Body<'tcx> {
735 desc { |tcx| "optimizing MIR for `{}`", tcx.def_path_str(key) }
736 cache_on_disk_if { key.is_local() }
737 separate_provide_extern
738 }
739740/// Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on
741 /// this def and any enclosing defs, up to the crate root.
742 ///
743 /// Returns `false` if `#[coverage(off)]` was found, or `true` if
744 /// either `#[coverage(on)]` or no coverage attribute was found.
745query coverage_attr_on(key: LocalDefId) -> bool {
746 desc { |tcx| "checking for `#[coverage(..)]` on `{}`", tcx.def_path_str(key) }
747 feedable
748 }
749750/// Scans through a function's MIR after MIR optimizations, to prepare the
751 /// information needed by codegen when `-Cinstrument-coverage` is active.
752 ///
753 /// This includes the details of where to insert `llvm.instrprof.increment`
754 /// intrinsics, and the expression tables to be embedded in the function's
755 /// coverage metadata.
756 ///
757 /// FIXME(Zalathar): This query's purpose has drifted a bit and should
758 /// probably be renamed, but that can wait until after the potential
759 /// follow-ups to #136053 have settled down.
760 ///
761 /// Returns `None` for functions that were not instrumented.
762query coverage_ids_info(key: ty::InstanceKind<'tcx>) -> Option<&'tcx mir::coverage::CoverageIdsInfo> {
763 desc { |tcx| "retrieving coverage IDs info from MIR for `{}`", tcx.def_path_str(key.def_id()) }
764 arena_cache
765 }
766767/// The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own
768 /// `DefId`. This function returns all promoteds in the specified body. The body references
769 /// promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because
770 /// after inlining a body may refer to promoteds from other bodies. In that case you still
771 /// need to use the `DefId` of the original body.
772query promoted_mir(key: DefId) -> &'tcx IndexVec<mir::Promoted, mir::Body<'tcx>> {
773 desc { |tcx| "optimizing promoted MIR for `{}`", tcx.def_path_str(key) }
774 cache_on_disk_if { key.is_local() }
775 separate_provide_extern
776 }
777778/// Erases regions from `ty` to yield a new type.
779 /// Normally you would just use `tcx.erase_and_anonymize_regions(value)`,
780 /// however, which uses this query as a kind of cache.
781query erase_and_anonymize_regions_ty(ty: Ty<'tcx>) -> Ty<'tcx> {
782// This query is not expected to have input -- as a result, it
783 // is not a good candidates for "replay" because it is essentially a
784 // pure function of its input (and hence the expectation is that
785 // no caller would be green **apart** from just these
786 // queries). Making it anonymous avoids hashing the result, which
787 // may save a bit of time.
788anon
789 desc { "erasing regions from `{}`", ty }
790 }
791792 query wasm_import_module_map(_: CrateNum) -> &'tcx DefIdMap<String> {
793 arena_cache
794 desc { "getting wasm import module map" }
795 }
796797/// Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`.
798 ///
799 /// Traits are unusual, because predicates on associated types are
800 /// converted into bounds on that type for backwards compatibility:
801 ///
802 /// ```
803 /// trait X where Self::U: Copy { type U; }
804 /// ```
805 ///
806 /// becomes
807 ///
808 /// ```
809 /// trait X { type U: Copy; }
810 /// ```
811 ///
812 /// [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will
813 /// then take the appropriate subsets of the predicates here.
814 ///
815 /// # Panics
816 ///
817 /// This query will panic if the given definition is not a trait.
818query trait_explicit_predicates_and_bounds(key: LocalDefId) -> ty::GenericPredicates<'tcx> {
819 desc { |tcx| "computing explicit predicates of trait `{}`", tcx.def_path_str(key) }
820 }
821822/// Returns the explicitly user-written *predicates* of the definition given by `DefId`
823 /// that must be proven true at usage sites (and which can be assumed at definition site).
824 ///
825 /// You should probably use [`Self::predicates_of`] unless you're looking for
826 /// predicates with explicit spans for diagnostics purposes.
827query explicit_predicates_of(key: DefId) -> ty::GenericPredicates<'tcx> {
828 desc { |tcx| "computing explicit predicates of `{}`", tcx.def_path_str(key) }
829 cache_on_disk_if { key.is_local() }
830 separate_provide_extern
831 feedable
832 }
833834/// Returns the *inferred outlives-predicates* of the item given by `DefId`.
835 ///
836 /// E.g., for `struct Foo<'a, T> { x: &'a T }`, this would return `[T: 'a]`.
837 ///
838 /// **Tip**: You can use `#[rustc_outlives]` on an item to basically print the
839 /// result of this query for use in UI tests or for debugging purposes.
840query inferred_outlives_of(key: DefId) -> &'tcx [(ty::Clause<'tcx>, Span)] {
841 desc { |tcx| "computing inferred outlives-predicates of `{}`", tcx.def_path_str(key) }
842 cache_on_disk_if { key.is_local() }
843 separate_provide_extern
844 feedable
845 }
846847/// Returns the explicitly user-written *super-predicates* of the trait given by `DefId`.
848 ///
849 /// These predicates are unelaborated and consequently don't contain transitive super-predicates.
850 ///
851 /// This is a subset of the full list of predicates. We store these in a separate map
852 /// because we must evaluate them even during type conversion, often before the full
853 /// predicates are available (note that super-predicates must not be cyclic).
854query explicit_super_predicates_of(key: DefId) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
855 desc { |tcx| "computing the super predicates of `{}`", tcx.def_path_str(key) }
856 cache_on_disk_if { key.is_local() }
857 separate_provide_extern
858 }
859860/// The predicates of the trait that are implied during elaboration.
861 ///
862 /// This is a superset of the super-predicates of the trait, but a subset of the predicates
863 /// of the trait. For regular traits, this includes all super-predicates and their
864 /// associated type bounds. For trait aliases, currently, this includes all of the
865 /// predicates of the trait alias.
866query explicit_implied_predicates_of(key: DefId) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
867 desc { |tcx| "computing the implied predicates of `{}`", tcx.def_path_str(key) }
868 cache_on_disk_if { key.is_local() }
869 separate_provide_extern
870 }
871872/// The Ident is the name of an associated type.The query returns only the subset
873 /// of supertraits that define the given associated type. This is used to avoid
874 /// cycles in resolving type-dependent associated item paths like `T::Item`.
875query explicit_supertraits_containing_assoc_item(
876 key: (DefId, rustc_span::Ident)
877 ) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
878 desc { |tcx| "computing the super traits of `{}` with associated type name `{}`",
879 tcx.def_path_str(key.0),
880 key.1
881}
882 }
883884/// Compute the conditions that need to hold for a conditionally-const item to be const.
885 /// That is, compute the set of `[const]` where clauses for a given item.
886 ///
887 /// This can be thought of as the `[const]` equivalent of `predicates_of`. These are the
888 /// predicates that need to be proven at usage sites, and can be assumed at definition.
889 ///
890 /// This query also computes the `[const]` where clauses for associated types, which are
891 /// not "const", but which have item bounds which may be `[const]`. These must hold for
892 /// the `[const]` item bound to hold.
893query const_conditions(
894 key: DefId895 ) -> ty::ConstConditions<'tcx> {
896 desc { |tcx| "computing the conditions for `{}` to be considered const",
897 tcx.def_path_str(key)
898 }
899 separate_provide_extern
900 }
901902/// Compute the const bounds that are implied for a conditionally-const item.
903 ///
904 /// This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These
905 /// are the predicates that need to proven at definition sites, and can be assumed at
906 /// usage sites.
907query explicit_implied_const_bounds(
908 key: DefId909 ) -> ty::EarlyBinder<'tcx, &'tcx [(ty::PolyTraitRef<'tcx>, Span)]> {
910 desc { |tcx| "computing the implied `[const]` bounds for `{}`",
911 tcx.def_path_str(key)
912 }
913 separate_provide_extern
914 }
915916/// To avoid cycles within the predicates of a single item we compute
917 /// per-type-parameter predicates for resolving `T::AssocTy`.
918query type_param_predicates(
919 key: (LocalDefId, LocalDefId, rustc_span::Ident)
920 ) -> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
921 desc { |tcx| "computing the bounds for type parameter `{}`", tcx.hir_ty_param_name(key.1) }
922 }
923924 query trait_def(key: DefId) -> &'tcx ty::TraitDef {
925 desc { |tcx| "computing trait definition for `{}`", tcx.def_path_str(key) }
926 arena_cache
927 cache_on_disk_if { key.is_local() }
928 separate_provide_extern
929 }
930 query adt_def(key: DefId) -> ty::AdtDef<'tcx> {
931 desc { |tcx| "computing ADT definition for `{}`", tcx.def_path_str(key) }
932 cache_on_disk_if { key.is_local() }
933 separate_provide_extern
934 }
935 query adt_destructor(key: DefId) -> Option<ty::Destructor> {
936 desc { |tcx| "computing `Drop` impl for `{}`", tcx.def_path_str(key) }
937 cache_on_disk_if { key.is_local() }
938 separate_provide_extern
939 }
940 query adt_async_destructor(key: DefId) -> Option<ty::AsyncDestructor> {
941 desc { |tcx| "computing `AsyncDrop` impl for `{}`", tcx.def_path_str(key) }
942 cache_on_disk_if { key.is_local() }
943 separate_provide_extern
944 }
945 query adt_sizedness_constraint(
946 key: (DefId, SizedTraitKind)
947 ) -> Option<ty::EarlyBinder<'tcx, Ty<'tcx>>> {
948 desc { |tcx| "computing the sizedness constraint for `{}`", tcx.def_path_str(key.0) }
949 }
950951 query adt_dtorck_constraint(
952 key: DefId953 ) -> &'tcx DropckConstraint<'tcx> {
954 desc { |tcx| "computing drop-check constraints for `{}`", tcx.def_path_str(key) }
955 }
956957/// Returns the constness of the function-like[^1] definition given by `DefId`.
958 ///
959 /// Tuple struct/variant constructors are *always* const, foreign functions are
960 /// *never* const. The rest is const iff marked with keyword `const` (or rather
961 /// its parent in the case of associated functions).
962 ///
963 /// <div class="warning">
964 ///
965 /// **Do not call this query** directly. It is only meant to cache the base data for the
966 /// higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead.
967 ///
968 /// Also note that neither of them takes into account feature gates, stability and
969 /// const predicates/conditions!
970 ///
971 /// </div>
972 ///
973 /// # Panics
974 ///
975 /// This query will panic if the given definition is not function-like[^1].
976 ///
977 /// [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions.
978query constness(key: DefId) -> hir::Constness {
979 desc { |tcx| "checking if item is const: `{}`", tcx.def_path_str(key) }
980 separate_provide_extern
981 feedable
982 }
983984 query asyncness(key: DefId) -> ty::Asyncness {
985 desc { |tcx| "checking if the function is async: `{}`", tcx.def_path_str(key) }
986 separate_provide_extern
987 }
988989/// Returns `true` if calls to the function may be promoted.
990 ///
991 /// This is either because the function is e.g., a tuple-struct or tuple-variant
992 /// constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should
993 /// be removed in the future in favour of some form of check which figures out whether the
994 /// function does not inspect the bits of any of its arguments (so is essentially just a
995 /// constructor function).
996query is_promotable_const_fn(key: DefId) -> bool {
997 desc { |tcx| "checking if item is promotable: `{}`", tcx.def_path_str(key) }
998 }
9991000/// The body of the coroutine, modified to take its upvars by move rather than by ref.
1001 ///
1002 /// This is used by coroutine-closures, which must return a different flavor of coroutine
1003 /// when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which
1004 /// is run right after building the initial MIR, and will only be populated for coroutines
1005 /// which come out of the async closure desugaring.
1006query coroutine_by_move_body_def_id(def_id: DefId) -> DefId {
1007 desc { |tcx| "looking up the coroutine by-move body for `{}`", tcx.def_path_str(def_id) }
1008 separate_provide_extern
1009 }
10101011/// Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine.
1012query coroutine_kind(def_id: DefId) -> Option<hir::CoroutineKind> {
1013 desc { |tcx| "looking up coroutine kind of `{}`", tcx.def_path_str(def_id) }
1014 separate_provide_extern
1015 feedable
1016 }
10171018 query coroutine_for_closure(def_id: DefId) -> DefId {
1019 desc { |_tcx| "Given a coroutine-closure def id, return the def id of the coroutine returned by it" }
1020 separate_provide_extern
1021 }
10221023 query coroutine_hidden_types(
1024 def_id: DefId,
1025 ) -> ty::EarlyBinder<'tcx, ty::Binder<'tcx, ty::CoroutineWitnessTypes<TyCtxt<'tcx>>>> {
1026 desc { "looking up the hidden types stored across await points in a coroutine" }
1027 }
10281029/// Gets a map with the variances of every item in the local crate.
1030 ///
1031 /// <div class="warning">
1032 ///
1033 /// **Do not call this query** directly, use [`Self::variances_of`] instead.
1034 ///
1035 /// </div>
1036query crate_variances(_: ()) -> &'tcx ty::CrateVariancesMap<'tcx> {
1037 arena_cache
1038 desc { "computing the variances for items in this crate" }
1039 }
10401041/// Returns the (inferred) variances of the item given by `DefId`.
1042 ///
1043 /// The list of variances corresponds to the list of (early-bound) generic
1044 /// parameters of the item (including its parents).
1045 ///
1046 /// **Tip**: You can use `#[rustc_variance]` on an item to basically print the
1047 /// result of this query for use in UI tests or for debugging purposes.
1048query variances_of(def_id: DefId) -> &'tcx [ty::Variance] {
1049 desc { |tcx| "computing the variances of `{}`", tcx.def_path_str(def_id) }
1050 cache_on_disk_if { def_id.is_local() }
1051 separate_provide_extern
1052 cycle_delay_bug
1053 }
10541055/// Gets a map with the inferred outlives-predicates of every item in the local crate.
1056 ///
1057 /// <div class="warning">
1058 ///
1059 /// **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead.
1060 ///
1061 /// </div>
1062query inferred_outlives_crate(_: ()) -> &'tcx ty::CratePredicatesMap<'tcx> {
1063 arena_cache
1064 desc { "computing the inferred outlives-predicates for items in this crate" }
1065 }
10661067/// Maps from an impl/trait or struct/variant `DefId`
1068 /// to a list of the `DefId`s of its associated items or fields.
1069query associated_item_def_ids(key: DefId) -> &'tcx [DefId] {
1070 desc { |tcx| "collecting associated items or fields of `{}`", tcx.def_path_str(key) }
1071 cache_on_disk_if { key.is_local() }
1072 separate_provide_extern
1073 }
10741075/// Maps from a trait/impl item to the trait/impl item "descriptor".
1076query associated_item(key: DefId) -> ty::AssocItem {
1077 desc { |tcx| "computing associated item data for `{}`", tcx.def_path_str(key) }
1078 cache_on_disk_if { key.is_local() }
1079 separate_provide_extern
1080 feedable
1081 }
10821083/// Collects the associated items defined on a trait or impl.
1084query associated_items(key: DefId) -> &'tcx ty::AssocItems {
1085 arena_cache
1086 desc { |tcx| "collecting associated items of `{}`", tcx.def_path_str(key) }
1087 }
10881089/// Maps from associated items on a trait to the corresponding associated
1090 /// item on the impl specified by `impl_id`.
1091 ///
1092 /// For example, with the following code
1093 ///
1094 /// ```
1095 /// struct Type {}
1096 /// // DefId
1097 /// trait Trait { // trait_id
1098 /// fn f(); // trait_f
1099 /// fn g() {} // trait_g
1100 /// }
1101 ///
1102 /// impl Trait for Type { // impl_id
1103 /// fn f() {} // impl_f
1104 /// fn g() {} // impl_g
1105 /// }
1106 /// ```
1107 ///
1108 /// The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be
1109 ///`{ trait_f: impl_f, trait_g: impl_g }`
1110query impl_item_implementor_ids(impl_id: DefId) -> &'tcx DefIdMap<DefId> {
1111 arena_cache
1112 desc { |tcx| "comparing impl items against trait for `{}`", tcx.def_path_str(impl_id) }
1113 }
11141115/// Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id
1116 /// to its associated type items that correspond to the RPITITs in its signature.
1117query associated_types_for_impl_traits_in_trait_or_impl(item_def_id: DefId) -> &'tcx DefIdMap<Vec<DefId>> {
1118 arena_cache
1119 desc { |tcx| "synthesizing RPITIT items for the opaque types for methods in `{}`", tcx.def_path_str(item_def_id) }
1120 separate_provide_extern
1121 }
11221123/// Given an `impl_id`, return the trait it implements along with some header information.
1124query impl_trait_header(impl_id: DefId) -> ty::ImplTraitHeader<'tcx> {
1125 desc { |tcx| "computing trait implemented by `{}`", tcx.def_path_str(impl_id) }
1126 cache_on_disk_if { impl_id.is_local() }
1127 separate_provide_extern
1128 }
11291130/// Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due
1131 /// to either being one of the built-in unsized types (str/slice/dyn) or to be a struct
1132 /// whose tail is one of those types.
1133query impl_self_is_guaranteed_unsized(impl_def_id: DefId) -> bool {
1134 desc { |tcx| "computing whether `{}` has a guaranteed unsized self type", tcx.def_path_str(impl_def_id) }
1135 }
11361137/// Maps a `DefId` of a type to a list of its inherent impls.
1138 /// Contains implementations of methods that are inherent to a type.
1139 /// Methods in these implementations don't need to be exported.
1140query inherent_impls(key: DefId) -> &'tcx [DefId] {
1141 desc { |tcx| "collecting inherent impls for `{}`", tcx.def_path_str(key) }
1142 cache_on_disk_if { key.is_local() }
1143 separate_provide_extern
1144 }
11451146 query incoherent_impls(key: SimplifiedType) -> &'tcx [DefId] {
1147 desc { |tcx| "collecting all inherent impls for `{:?}`", key }
1148 }
11491150/// Unsafety-check this `LocalDefId`.
1151query check_transmutes(key: LocalDefId) {
1152 desc { |tcx| "check transmute calls inside `{}`", tcx.def_path_str(key) }
1153 }
11541155/// Unsafety-check this `LocalDefId`.
1156query check_unsafety(key: LocalDefId) {
1157 desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key) }
1158 }
11591160/// Checks well-formedness of tail calls (`become f()`).
1161query check_tail_calls(key: LocalDefId) -> Result<(), rustc_errors::ErrorGuaranteed> {
1162 desc { |tcx| "tail-call-checking `{}`", tcx.def_path_str(key) }
1163 return_result_from_ensure_ok
1164 }
11651166/// Returns the types assumed to be well formed while "inside" of the given item.
1167 ///
1168 /// Note that we've liberated the late bound regions of function signatures, so
1169 /// this can not be used to check whether these types are well formed.
1170query assumed_wf_types(key: LocalDefId) -> &'tcx [(Ty<'tcx>, Span)] {
1171 desc { |tcx| "computing the implied bounds of `{}`", tcx.def_path_str(key) }
1172 }
11731174/// We need to store the assumed_wf_types for an RPITIT so that impls of foreign
1175 /// traits with return-position impl trait in traits can inherit the right wf types.
1176query assumed_wf_types_for_rpitit(key: DefId) -> &'tcx [(Ty<'tcx>, Span)] {
1177 desc { |tcx| "computing the implied bounds of `{}`", tcx.def_path_str(key) }
1178 separate_provide_extern
1179 }
11801181/// Computes the signature of the function.
1182query fn_sig(key: DefId) -> ty::EarlyBinder<'tcx, ty::PolyFnSig<'tcx>> {
1183 desc { |tcx| "computing function signature of `{}`", tcx.def_path_str(key) }
1184 cache_on_disk_if { key.is_local() }
1185 separate_provide_extern
1186 cycle_delay_bug
1187 }
11881189/// Performs lint checking for the module.
1190query lint_mod(key: LocalModDefId) {
1191 desc { |tcx| "linting {}", describe_as_module(key, tcx) }
1192 }
11931194 query check_unused_traits(_: ()) {
1195 desc { "checking unused trait imports in crate" }
1196 }
11971198/// Checks the attributes in the module.
1199query check_mod_attrs(key: LocalModDefId) {
1200 desc { |tcx| "checking attributes in {}", describe_as_module(key, tcx) }
1201 }
12021203/// Checks for uses of unstable APIs in the module.
1204query check_mod_unstable_api_usage(key: LocalModDefId) {
1205 desc { |tcx| "checking for unstable API usage in {}", describe_as_module(key, tcx) }
1206 }
12071208 query check_mod_privacy(key: LocalModDefId) {
1209 desc { |tcx| "checking privacy in {}", describe_as_module(key.to_local_def_id(), tcx) }
1210 }
12111212 query check_liveness(key: LocalDefId) -> &'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx> {
1213 arena_cache
1214 desc { |tcx| "checking liveness of variables in `{}`", tcx.def_path_str(key.to_def_id()) }
1215 cache_on_disk_if(tcx) { tcx.is_typeck_child(key.to_def_id()) }
1216 }
12171218/// Return the live symbols in the crate for dead code check.
1219 ///
1220 /// The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone).
1221query live_symbols_and_ignored_derived_traits(_: ()) -> &'tcx Result<(
1222 LocalDefIdSet,
1223 LocalDefIdMap<FxIndexSet<DefId>>,
1224 ), ErrorGuaranteed> {
1225 arena_cache
1226 desc { "finding live symbols in crate" }
1227 }
12281229 query check_mod_deathness(key: LocalModDefId) {
1230 desc { |tcx| "checking deathness of variables in {}", describe_as_module(key, tcx) }
1231 }
12321233 query check_type_wf(key: ()) -> Result<(), ErrorGuaranteed> {
1234 desc { "checking that types are well-formed" }
1235 return_result_from_ensure_ok
1236 }
12371238/// Caches `CoerceUnsized` kinds for impls on custom types.
1239query coerce_unsized_info(key: DefId) -> Result<ty::adjustment::CoerceUnsizedInfo, ErrorGuaranteed> {
1240 desc { |tcx| "computing CoerceUnsized info for `{}`", tcx.def_path_str(key) }
1241 cache_on_disk_if { key.is_local() }
1242 separate_provide_extern
1243 return_result_from_ensure_ok
1244 }
12451246 query typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
1247 desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
1248 cache_on_disk_if(tcx) { !tcx.is_typeck_child(key.to_def_id()) }
1249 }
12501251 query used_trait_imports(key: LocalDefId) -> &'tcx UnordSet<LocalDefId> {
1252 desc { |tcx| "finding used_trait_imports `{}`", tcx.def_path_str(key) }
1253 cache_on_disk_if { true }
1254 }
12551256 query coherent_trait(def_id: DefId) -> Result<(), ErrorGuaranteed> {
1257 desc { |tcx| "coherence checking all impls of trait `{}`", tcx.def_path_str(def_id) }
1258 return_result_from_ensure_ok
1259 }
12601261/// Borrow-checks the given typeck root, e.g. functions, const/static items,
1262 /// and its children, e.g. closures, inline consts.
1263query mir_borrowck(key: LocalDefId) -> Result<
1264&'tcx FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
1265 ErrorGuaranteed
1266 > {
1267 desc { |tcx| "borrow-checking `{}`", tcx.def_path_str(key) }
1268 }
12691270/// Gets a complete map from all types to their inherent impls.
1271 ///
1272 /// <div class="warning">
1273 ///
1274 /// **Not meant to be used** directly outside of coherence.
1275 ///
1276 /// </div>
1277query crate_inherent_impls(k: ()) -> (&'tcx CrateInherentImpls, Result<(), ErrorGuaranteed>) {
1278 desc { "finding all inherent impls defined in crate" }
1279 }
12801281/// Checks all types in the crate for overlap in their inherent impls. Reports errors.
1282 ///
1283 /// <div class="warning">
1284 ///
1285 /// **Not meant to be used** directly outside of coherence.
1286 ///
1287 /// </div>
1288query crate_inherent_impls_validity_check(_: ()) -> Result<(), ErrorGuaranteed> {
1289 desc { "check for inherent impls that should not be defined in crate" }
1290 return_result_from_ensure_ok
1291 }
12921293/// Checks all types in the crate for overlap in their inherent impls. Reports errors.
1294 ///
1295 /// <div class="warning">
1296 ///
1297 /// **Not meant to be used** directly outside of coherence.
1298 ///
1299 /// </div>
1300query crate_inherent_impls_overlap_check(_: ()) -> Result<(), ErrorGuaranteed> {
1301 desc { "check for overlap between inherent impls defined in this crate" }
1302 return_result_from_ensure_ok
1303 }
13041305/// Checks whether all impls in the crate pass the overlap check, returning
1306 /// which impls fail it. If all impls are correct, the returned slice is empty.
1307query orphan_check_impl(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
1308 desc { |tcx|
1309"checking whether impl `{}` follows the orphan rules",
1310 tcx.def_path_str(key),
1311 }
1312 return_result_from_ensure_ok
1313 }
13141315/// Return the set of (transitive) callees that may result in a recursive call to `key`,
1316 /// if we were able to walk all callees.
1317query mir_callgraph_cyclic(key: LocalDefId) -> &'tcx Option<UnordSet<LocalDefId>> {
1318 cycle_fatal
1319 arena_cache
1320 desc { |tcx|
1321"computing (transitive) callees of `{}` that may recurse",
1322 tcx.def_path_str(key),
1323 }
1324 cache_on_disk_if { true }
1325 }
13261327/// Obtain all the calls into other local functions
1328query mir_inliner_callees(key: ty::InstanceKind<'tcx>) -> &'tcx [(DefId, GenericArgsRef<'tcx>)] {
1329 cycle_fatal
1330 desc { |tcx|
1331"computing all local function calls in `{}`",
1332 tcx.def_path_str(key.def_id()),
1333 }
1334 }
13351336/// Computes the tag (if any) for a given type and variant.
1337 ///
1338 /// `None` means that the variant doesn't need a tag (because it is niched).
1339 ///
1340 /// # Panics
1341 ///
1342 /// This query will panic for uninhabited variants and if the passed type is not an enum.
1343query tag_for_variant(
1344 key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>,
1345 ) -> Option<ty::ScalarInt> {
1346 desc { "computing variant tag for enum" }
1347 }
13481349/// Evaluates a constant and returns the computed allocation.
1350 ///
1351 /// <div class="warning">
1352 ///
1353 /// **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or
1354 /// [`Self::eval_to_valtree`] instead.
1355 ///
1356 /// </div>
1357query eval_to_allocation_raw(key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
1358 -> EvalToAllocationRawResult<'tcx> {
1359 desc { |tcx|
1360"const-evaluating + checking `{}`",
1361 key.value.display(tcx)
1362 }
1363 cache_on_disk_if { true }
1364 }
13651366/// Evaluate a static's initializer, returning the allocation of the initializer's memory.
1367query eval_static_initializer(key: DefId) -> EvalStaticInitializerRawResult<'tcx> {
1368 desc { |tcx|
1369"evaluating initializer of static `{}`",
1370 tcx.def_path_str(key)
1371 }
1372 cache_on_disk_if { key.is_local() }
1373 separate_provide_extern
1374 feedable
1375 }
13761377/// Evaluates const items or anonymous constants[^1] into a representation
1378 /// suitable for the type system and const generics.
1379 ///
1380 /// <div class="warning">
1381 ///
1382 /// **Do not call this** directly, use one of the following wrappers:
1383 /// [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],
1384 /// [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`].
1385 ///
1386 /// </div>
1387 ///
1388 /// [^1]: Such as enum variant explicit discriminants or array lengths.
1389query eval_to_const_value_raw(key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
1390 -> EvalToConstValueResult<'tcx> {
1391 desc { |tcx|
1392"simplifying constant for the type system `{}`",
1393 key.value.display(tcx)
1394 }
1395 depth_limit
1396 cache_on_disk_if { true }
1397 }
13981399/// Evaluate a constant and convert it to a type level constant or
1400 /// return `None` if that is not possible.
1401query eval_to_valtree(
1402 key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>
1403 ) -> EvalToValTreeResult<'tcx> {
1404 desc { "evaluating type-level constant" }
1405 }
14061407/// Converts a type-level constant value into a MIR constant value.
1408query valtree_to_const_val(key: ty::Value<'tcx>) -> mir::ConstValue {
1409 desc { "converting type-level constant value to MIR constant value"}
1410 }
14111412// FIXME get rid of this with valtrees
1413query lit_to_const(
1414 key: LitToConstInput<'tcx>
1415 ) -> ty::Const<'tcx> {
1416 desc { "converting literal to const" }
1417 }
14181419 query check_match(key: LocalDefId) -> Result<(), rustc_errors::ErrorGuaranteed> {
1420 desc { |tcx| "match-checking `{}`", tcx.def_path_str(key) }
1421 return_result_from_ensure_ok
1422 }
14231424/// Performs part of the privacy check and computes effective visibilities.
1425query effective_visibilities(_: ()) -> &'tcx EffectiveVisibilities {
1426 eval_always
1427 desc { "checking effective visibilities" }
1428 }
1429 query check_private_in_public(module_def_id: LocalModDefId) {
1430 desc { |tcx|
1431"checking for private elements in public interfaces for {}",
1432 describe_as_module(module_def_id, tcx)
1433 }
1434 }
14351436 query reachable_set(_: ()) -> &'tcx LocalDefIdSet {
1437 arena_cache
1438 desc { "reachability" }
1439 cache_on_disk_if { true }
1440 }
14411442/// Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;
1443 /// in the case of closures, this will be redirected to the enclosing function.
1444query region_scope_tree(def_id: DefId) -> &'tcx crate::middle::region::ScopeTree {
1445 desc { |tcx| "computing drop scopes for `{}`", tcx.def_path_str(def_id) }
1446 }
14471448/// Generates a MIR body for the shim.
1449query mir_shims(key: ty::InstanceKind<'tcx>) -> &'tcx mir::Body<'tcx> {
1450 arena_cache
1451 desc {
1452 |tcx| "generating MIR shim for `{}`, instance={:?}",
1453 tcx.def_path_str(key.def_id()),
1454 key
1455 }
1456 }
14571458/// The `symbol_name` query provides the symbol name for calling a
1459 /// given instance from the local crate. In particular, it will also
1460 /// look up the correct symbol name of instances from upstream crates.
1461query symbol_name(key: ty::Instance<'tcx>) -> ty::SymbolName<'tcx> {
1462 desc { "computing the symbol for `{}`", key }
1463 cache_on_disk_if { true }
1464 }
14651466 query def_kind(def_id: DefId) -> DefKind {
1467 desc { |tcx| "looking up definition kind of `{}`", tcx.def_path_str(def_id) }
1468 cache_on_disk_if { def_id.is_local() }
1469 separate_provide_extern
1470 feedable
1471 }
14721473/// Gets the span for the definition.
1474query def_span(def_id: DefId) -> Span {
1475 desc { |tcx| "looking up span for `{}`", tcx.def_path_str(def_id) }
1476 cache_on_disk_if { def_id.is_local() }
1477 separate_provide_extern
1478 feedable
1479 }
14801481/// Gets the span for the identifier of the definition.
1482query def_ident_span(def_id: DefId) -> Option<Span> {
1483 desc { |tcx| "looking up span for `{}`'s identifier", tcx.def_path_str(def_id) }
1484 cache_on_disk_if { def_id.is_local() }
1485 separate_provide_extern
1486 feedable
1487 }
14881489/// Gets the span for the type of the definition.
1490 /// Panics if it is not a definition that has a single type.
1491query ty_span(def_id: LocalDefId) -> Span {
1492 desc { |tcx| "looking up span for `{}`'s type", tcx.def_path_str(def_id) }
1493 cache_on_disk_if { true }
1494 }
14951496 query lookup_stability(def_id: DefId) -> Option<hir::Stability> {
1497 desc { |tcx| "looking up stability of `{}`", tcx.def_path_str(def_id) }
1498 cache_on_disk_if { def_id.is_local() }
1499 separate_provide_extern
1500 }
15011502 query lookup_const_stability(def_id: DefId) -> Option<hir::ConstStability> {
1503 desc { |tcx| "looking up const stability of `{}`", tcx.def_path_str(def_id) }
1504 cache_on_disk_if { def_id.is_local() }
1505 separate_provide_extern
1506 }
15071508 query lookup_default_body_stability(def_id: DefId) -> Option<hir::DefaultBodyStability> {
1509 desc { |tcx| "looking up default body stability of `{}`", tcx.def_path_str(def_id) }
1510 separate_provide_extern
1511 }
15121513 query should_inherit_track_caller(def_id: DefId) -> bool {
1514 desc { |tcx| "computing should_inherit_track_caller of `{}`", tcx.def_path_str(def_id) }
1515 }
15161517 query inherited_align(def_id: DefId) -> Option<Align> {
1518 desc { |tcx| "computing inherited_align of `{}`", tcx.def_path_str(def_id) }
1519 }
15201521 query lookup_deprecation_entry(def_id: DefId) -> Option<DeprecationEntry> {
1522 desc { |tcx| "checking whether `{}` is deprecated", tcx.def_path_str(def_id) }
1523 cache_on_disk_if { def_id.is_local() }
1524 separate_provide_extern
1525 }
15261527/// Determines whether an item is annotated with `#[doc(hidden)]`.
1528query is_doc_hidden(def_id: DefId) -> bool {
1529 desc { |tcx| "checking whether `{}` is `doc(hidden)`", tcx.def_path_str(def_id) }
1530 separate_provide_extern
1531 }
15321533/// Determines whether an item is annotated with `#[doc(notable_trait)]`.
1534query is_doc_notable_trait(def_id: DefId) -> bool {
1535 desc { |tcx| "checking whether `{}` is `doc(notable_trait)`", tcx.def_path_str(def_id) }
1536 }
15371538/// Returns the attributes on the item at `def_id`.
1539 ///
1540 /// Do not use this directly, use `tcx.get_attrs` instead.
1541query attrs_for_def(def_id: DefId) -> &'tcx [hir::Attribute] {
1542 desc { |tcx| "collecting attributes of `{}`", tcx.def_path_str(def_id) }
1543 separate_provide_extern
1544 }
15451546/// Returns the `CodegenFnAttrs` for the item at `def_id`.
1547 ///
1548 /// If possible, use `tcx.codegen_instance_attrs` instead. That function takes the
1549 /// instance kind into account.
1550 ///
1551 /// For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,
1552 /// but should not be applied if the instance kind is `InstanceKind::ReifyShim`.
1553 /// Using this query would include the attribute regardless of the actual instance
1554 /// kind at the call site.
1555query codegen_fn_attrs(def_id: DefId) -> &'tcx CodegenFnAttrs {
1556 desc { |tcx| "computing codegen attributes of `{}`", tcx.def_path_str(def_id) }
1557 arena_cache
1558 cache_on_disk_if { def_id.is_local() }
1559 separate_provide_extern
1560 feedable
1561 }
15621563 query asm_target_features(def_id: DefId) -> &'tcx FxIndexSet<Symbol> {
1564 desc { |tcx| "computing target features for inline asm of `{}`", tcx.def_path_str(def_id) }
1565 }
15661567 query fn_arg_idents(def_id: DefId) -> &'tcx [Option<rustc_span::Ident>] {
1568 desc { |tcx| "looking up function parameter identifiers for `{}`", tcx.def_path_str(def_id) }
1569 separate_provide_extern
1570 }
15711572/// Gets the rendered value of the specified constant or associated constant.
1573 /// Used by rustdoc.
1574query rendered_const(def_id: DefId) -> &'tcx String {
1575 arena_cache
1576 desc { |tcx| "rendering constant initializer of `{}`", tcx.def_path_str(def_id) }
1577 separate_provide_extern
1578 }
15791580/// Gets the rendered precise capturing args for an opaque for use in rustdoc.
1581query rendered_precise_capturing_args(def_id: DefId) -> Option<&'tcx [PreciseCapturingArgKind<Symbol, Symbol>]> {
1582 desc { |tcx| "rendering precise capturing args for `{}`", tcx.def_path_str(def_id) }
1583 separate_provide_extern
1584 }
15851586 query impl_parent(def_id: DefId) -> Option<DefId> {
1587 desc { |tcx| "computing specialization parent impl of `{}`", tcx.def_path_str(def_id) }
1588 separate_provide_extern
1589 }
15901591 query is_mir_available(key: DefId) -> bool {
1592 desc { |tcx| "checking if item has MIR available: `{}`", tcx.def_path_str(key) }
1593 cache_on_disk_if { key.is_local() }
1594 separate_provide_extern
1595 }
15961597 query own_existential_vtable_entries(
1598 key: DefId1599 ) -> &'tcx [DefId] {
1600 desc { |tcx| "finding all existential vtable entries for trait `{}`", tcx.def_path_str(key) }
1601 }
16021603 query vtable_entries(key: ty::TraitRef<'tcx>)
1604 -> &'tcx [ty::VtblEntry<'tcx>] {
1605 desc { |tcx| "finding all vtable entries for trait `{}`", tcx.def_path_str(key.def_id) }
1606 }
16071608 query first_method_vtable_slot(key: ty::TraitRef<'tcx>) -> usize {
1609 desc { |tcx| "finding the slot within the vtable of `{}` for the implementation of `{}`", key.self_ty(), key.print_only_trait_name() }
1610 }
16111612 query supertrait_vtable_slot(key: (Ty<'tcx>, Ty<'tcx>)) -> Option<usize> {
1613 desc { |tcx| "finding the slot within vtable for trait object `{}` vtable ptr during trait upcasting coercion from `{}` vtable",
1614 key.1, key.0 }
1615 }
16161617 query vtable_allocation(key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>)) -> mir::interpret::AllocId {
1618 desc { |tcx| "vtable const allocation for <{} as {}>",
1619 key.0,
1620 key.1.map(|trait_ref| format!("{trait_ref}")).unwrap_or_else(|| "_".to_owned())
1621 }
1622 }
16231624 query codegen_select_candidate(
1625 key: PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>
1626 ) -> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> {
1627 cache_on_disk_if { true }
1628 desc { |tcx| "computing candidate for `{}`", key.value }
1629 }
16301631/// Return all `impl` blocks in the current crate.
1632query all_local_trait_impls(_: ()) -> &'tcx rustc_data_structures::fx::FxIndexMap<DefId, Vec<LocalDefId>> {
1633 desc { "finding local trait impls" }
1634 }
16351636/// Return all `impl` blocks of the given trait in the current crate.
1637query local_trait_impls(trait_id: DefId) -> &'tcx [LocalDefId] {
1638 desc { "finding local trait impls of `{}`", tcx.def_path_str(trait_id) }
1639 }
16401641/// Given a trait `trait_id`, return all known `impl` blocks.
1642query trait_impls_of(trait_id: DefId) -> &'tcx ty::trait_def::TraitImpls {
1643 arena_cache
1644 desc { |tcx| "finding trait impls of `{}`", tcx.def_path_str(trait_id) }
1645 }
16461647 query specialization_graph_of(trait_id: DefId) -> Result<&'tcx specialization_graph::Graph, ErrorGuaranteed> {
1648 desc { |tcx| "building specialization graph of trait `{}`", tcx.def_path_str(trait_id) }
1649 cache_on_disk_if { true }
1650 return_result_from_ensure_ok
1651 }
1652 query dyn_compatibility_violations(trait_id: DefId) -> &'tcx [DynCompatibilityViolation] {
1653 desc { |tcx| "determining dyn-compatibility of trait `{}`", tcx.def_path_str(trait_id) }
1654 }
1655 query is_dyn_compatible(trait_id: DefId) -> bool {
1656 desc { |tcx| "checking if trait `{}` is dyn-compatible", tcx.def_path_str(trait_id) }
1657 }
16581659/// Gets the ParameterEnvironment for a given item; this environment
1660 /// will be in "user-facing" mode, meaning that it is suitable for
1661 /// type-checking etc, and it does not normalize specializable
1662 /// associated types.
1663 ///
1664 /// You should almost certainly not use this. If you already have an InferCtxt, then
1665 /// you should also probably have a `ParamEnv` from when it was built. If you don't,
1666 /// then you should take a `TypingEnv` to ensure that you handle opaque types correctly.
1667query param_env(def_id: DefId) -> ty::ParamEnv<'tcx> {
1668 desc { |tcx| "computing normalized predicates of `{}`", tcx.def_path_str(def_id) }
1669 feedable
1670 }
16711672/// Like `param_env`, but returns the `ParamEnv` after all opaque types have been
1673 /// replaced with their hidden type. This is used in the old trait solver
1674 /// when in `PostAnalysis` mode and should not be called directly.
1675query typing_env_normalized_for_post_analysis(def_id: DefId) -> ty::TypingEnv<'tcx> {
1676 desc { |tcx| "computing revealed normalized predicates of `{}`", tcx.def_path_str(def_id) }
1677 }
16781679/// Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,
1680 /// `ty.is_copy()`, etc, since that will prune the environment where possible.
1681query is_copy_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1682 desc { "computing whether `{}` is `Copy`", env.value }
1683 }
1684/// Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,
1685 /// `ty.is_use_cloned()`, etc, since that will prune the environment where possible.
1686query is_use_cloned_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1687 desc { "computing whether `{}` is `UseCloned`", env.value }
1688 }
1689/// Query backing `Ty::is_sized`.
1690query is_sized_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1691 desc { "computing whether `{}` is `Sized`", env.value }
1692 }
1693/// Query backing `Ty::is_freeze`.
1694query is_freeze_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1695 desc { "computing whether `{}` is freeze", env.value }
1696 }
1697/// Query backing `Ty::is_unpin`.
1698query is_unpin_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1699 desc { "computing whether `{}` is `Unpin`", env.value }
1700 }
1701/// Query backing `Ty::is_async_drop`.
1702query is_async_drop_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1703 desc { "computing whether `{}` is `AsyncDrop`", env.value }
1704 }
1705/// Query backing `Ty::needs_drop`.
1706query needs_drop_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1707 desc { "computing whether `{}` needs drop", env.value }
1708 }
1709/// Query backing `Ty::needs_async_drop`.
1710query needs_async_drop_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1711 desc { "computing whether `{}` needs async drop", env.value }
1712 }
1713/// Query backing `Ty::has_significant_drop_raw`.
1714query has_significant_drop_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
1715 desc { "computing whether `{}` has a significant drop", env.value }
1716 }
17171718/// Query backing `Ty::is_structural_eq_shallow`.
1719 ///
1720 /// This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types
1721 /// correctly.
1722query has_structural_eq_impl(ty: Ty<'tcx>) -> bool {
1723 desc {
1724"computing whether `{}` implements `StructuralPartialEq`",
1725 ty
1726 }
1727 }
17281729/// A list of types where the ADT requires drop if and only if any of
1730 /// those types require drop. If the ADT is known to always need drop
1731 /// then `Err(AlwaysRequiresDrop)` is returned.
1732query adt_drop_tys(def_id: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
1733 desc { |tcx| "computing when `{}` needs drop", tcx.def_path_str(def_id) }
1734 cache_on_disk_if { true }
1735 }
17361737/// A list of types where the ADT requires async drop if and only if any of
1738 /// those types require async drop. If the ADT is known to always need async drop
1739 /// then `Err(AlwaysRequiresDrop)` is returned.
1740query adt_async_drop_tys(def_id: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
1741 desc { |tcx| "computing when `{}` needs async drop", tcx.def_path_str(def_id) }
1742 cache_on_disk_if { true }
1743 }
17441745/// A list of types where the ADT requires drop if and only if any of those types
1746 /// has significant drop. A type marked with the attribute `rustc_insignificant_dtor`
1747 /// is considered to not be significant. A drop is significant if it is implemented
1748 /// by the user or does anything that will have any observable behavior (other than
1749 /// freeing up memory). If the ADT is known to have a significant destructor then
1750 /// `Err(AlwaysRequiresDrop)` is returned.
1751query adt_significant_drop_tys(def_id: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
1752 desc { |tcx| "computing when `{}` has a significant destructor", tcx.def_path_str(def_id) }
1753 }
17541755/// Returns a list of types which (a) have a potentially significant destructor
1756 /// and (b) may be dropped as a result of dropping a value of some type `ty`
1757 /// (in the given environment).
1758 ///
1759 /// The idea of "significant" drop is somewhat informal and is used only for
1760 /// diagnostics and edition migrations. The idea is that a significant drop may have
1761 /// some visible side-effect on execution; freeing memory is NOT considered a side-effect.
1762 /// The rules are as follows:
1763 /// * Type with no explicit drop impl do not have significant drop.
1764 /// * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation.
1765 ///
1766 /// Note that insignificant drop is a "shallow" property. A type like `Vec<LockGuard>` does not
1767 /// have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`
1768 /// then the return value would be `&[LockGuard]`.
1769 /// *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,
1770 /// because this query partially depends on that query.
1771 /// Otherwise, there is a risk of query cycles.
1772query list_significant_drop_tys(ty: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> &'tcx ty::List<Ty<'tcx>> {
1773 desc { |tcx| "computing when `{}` has a significant destructor", ty.value }
1774 }
17751776/// Computes the layout of a type. Note that this implicitly
1777 /// executes in `TypingMode::PostAnalysis`, and will normalize the input type.
1778query layout_of(
1779 key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>
1780 ) -> Result<ty::layout::TyAndLayout<'tcx>, &'tcx ty::layout::LayoutError<'tcx>> {
1781 depth_limit
1782 desc { "computing layout of `{}`", key.value }
1783// we emit our own error during query cycle handling
1784cycle_delay_bug
1785 }
17861787/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
1788 ///
1789 /// NB: this doesn't handle virtual calls - those should use `fn_abi_of_instance`
1790 /// instead, where the instance is an `InstanceKind::Virtual`.
1791query fn_abi_of_fn_ptr(
1792 key: ty::PseudoCanonicalInput<'tcx, (ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>
1793 ) -> Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>, &'tcx ty::layout::FnAbiError<'tcx>> {
1794 desc { "computing call ABI of `{}` function pointers", key.value.0 }
1795 }
17961797/// Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for
1798 /// direct calls to an `fn`.
1799 ///
1800 /// NB: that includes virtual calls, which are represented by "direct calls"
1801 /// to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`).
1802query fn_abi_of_instance(
1803 key: ty::PseudoCanonicalInput<'tcx, (ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>
1804 ) -> Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>, &'tcx ty::layout::FnAbiError<'tcx>> {
1805 desc { "computing call ABI of `{}`", key.value.0 }
1806 }
18071808 query dylib_dependency_formats(_: CrateNum)
1809 -> &'tcx [(CrateNum, LinkagePreference)] {
1810 desc { "getting dylib dependency formats of crate" }
1811 separate_provide_extern
1812 }
18131814 query dependency_formats(_: ()) -> &'tcx Arc<crate::middle::dependency_format::Dependencies> {
1815 arena_cache
1816 desc { "getting the linkage format of all dependencies" }
1817 }
18181819 query is_compiler_builtins(_: CrateNum) -> bool {
1820 cycle_fatal
1821 desc { "checking if the crate is_compiler_builtins" }
1822 separate_provide_extern
1823 }
1824 query has_global_allocator(_: CrateNum) -> bool {
1825// This query depends on untracked global state in CStore
1826eval_always
1827 cycle_fatal
1828 desc { "checking if the crate has_global_allocator" }
1829 separate_provide_extern
1830 }
1831 query has_alloc_error_handler(_: CrateNum) -> bool {
1832// This query depends on untracked global state in CStore
1833eval_always
1834 cycle_fatal
1835 desc { "checking if the crate has_alloc_error_handler" }
1836 separate_provide_extern
1837 }
1838 query has_panic_handler(_: CrateNum) -> bool {
1839 cycle_fatal
1840 desc { "checking if the crate has_panic_handler" }
1841 separate_provide_extern
1842 }
1843 query is_profiler_runtime(_: CrateNum) -> bool {
1844 cycle_fatal
1845 desc { "checking if a crate is `#![profiler_runtime]`" }
1846 separate_provide_extern
1847 }
1848 query has_ffi_unwind_calls(key: LocalDefId) -> bool {
1849 desc { |tcx| "checking if `{}` contains FFI-unwind calls", tcx.def_path_str(key) }
1850 cache_on_disk_if { true }
1851 }
1852 query required_panic_strategy(_: CrateNum) -> Option<PanicStrategy> {
1853 cycle_fatal
1854 desc { "getting a crate's required panic strategy" }
1855 separate_provide_extern
1856 }
1857 query panic_in_drop_strategy(_: CrateNum) -> PanicStrategy {
1858 cycle_fatal
1859 desc { "getting a crate's configured panic-in-drop strategy" }
1860 separate_provide_extern
1861 }
1862 query is_no_builtins(_: CrateNum) -> bool {
1863 cycle_fatal
1864 desc { "getting whether a crate has `#![no_builtins]`" }
1865 separate_provide_extern
1866 }
1867 query symbol_mangling_version(_: CrateNum) -> SymbolManglingVersion {
1868 cycle_fatal
1869 desc { "getting a crate's symbol mangling version" }
1870 separate_provide_extern
1871 }
18721873 query extern_crate(def_id: CrateNum) -> Option<&'tcx ExternCrate> {
1874 eval_always
1875 desc { "getting crate's ExternCrateData" }
1876 separate_provide_extern
1877 }
18781879 query specialization_enabled_in(cnum: CrateNum) -> bool {
1880 desc { "checking whether the crate enabled `specialization`/`min_specialization`" }
1881 separate_provide_extern
1882 }
18831884 query specializes(_: (DefId, DefId)) -> bool {
1885 desc { "computing whether impls specialize one another" }
1886 }
1887 query in_scope_traits_map(_: hir::OwnerId)
1888 -> Option<&'tcx ItemLocalMap<Box<[TraitCandidate]>>> {
1889 desc { "getting traits in scope at a block" }
1890 }
18911892/// Returns whether the impl or associated function has the `default` keyword.
1893 /// Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`.
1894query defaultness(def_id: DefId) -> hir::Defaultness {
1895 desc { |tcx| "looking up whether `{}` has `default`", tcx.def_path_str(def_id) }
1896 separate_provide_extern
1897 feedable
1898 }
18991900/// Returns whether the field corresponding to the `DefId` has a default field value.
1901query default_field(def_id: DefId) -> Option<DefId> {
1902 desc { |tcx| "looking up the `const` corresponding to the default for `{}`", tcx.def_path_str(def_id) }
1903 separate_provide_extern
1904 }
19051906 query check_well_formed(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
1907 desc { |tcx| "checking that `{}` is well-formed", tcx.def_path_str(key) }
1908 return_result_from_ensure_ok
1909 }
19101911 query enforce_impl_non_lifetime_params_are_constrained(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
1912 desc { |tcx| "checking that `{}`'s generics are constrained by the impl header", tcx.def_path_str(key) }
1913 return_result_from_ensure_ok
1914 }
19151916// The `DefId`s of all non-generic functions and statics in the given crate
1917 // that can be reached from outside the crate.
1918 //
1919 // We expect this items to be available for being linked to.
1920 //
1921 // This query can also be called for `LOCAL_CRATE`. In this case it will
1922 // compute which items will be reachable to other crates, taking into account
1923 // the kind of crate that is currently compiled. Crates with only a
1924 // C interface have fewer reachable things.
1925 //
1926 // Does not include external symbols that don't have a corresponding DefId,
1927 // like the compiler-generated `main` function and so on.
1928query reachable_non_generics(_: CrateNum)
1929 -> &'tcx DefIdMap<SymbolExportInfo> {
1930 arena_cache
1931 desc { "looking up the exported symbols of a crate" }
1932 separate_provide_extern
1933 }
1934 query is_reachable_non_generic(def_id: DefId) -> bool {
1935 desc { |tcx| "checking whether `{}` is an exported symbol", tcx.def_path_str(def_id) }
1936 cache_on_disk_if { def_id.is_local() }
1937 separate_provide_extern
1938 }
1939 query is_unreachable_local_definition(def_id: LocalDefId) -> bool {
1940 desc { |tcx|
1941"checking whether `{}` is reachable from outside the crate",
1942 tcx.def_path_str(def_id),
1943 }
1944 }
19451946/// The entire set of monomorphizations the local crate can safely
1947 /// link to because they are exported from upstream crates. Do
1948 /// not depend on this directly, as its value changes anytime
1949 /// a monomorphization gets added or removed in any upstream
1950 /// crate. Instead use the narrower `upstream_monomorphizations_for`,
1951 /// `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,
1952 /// even better, `Instance::upstream_monomorphization()`.
1953query upstream_monomorphizations(_: ()) -> &'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>, CrateNum>> {
1954 arena_cache
1955 desc { "collecting available upstream monomorphizations" }
1956 }
19571958/// Returns the set of upstream monomorphizations available for the
1959 /// generic function identified by the given `def_id`. The query makes
1960 /// sure to make a stable selection if the same monomorphization is
1961 /// available in multiple upstream crates.
1962 ///
1963 /// You likely want to call `Instance::upstream_monomorphization()`
1964 /// instead of invoking this query directly.
1965query upstream_monomorphizations_for(def_id: DefId)
1966 -> Option<&'tcx UnordMap<GenericArgsRef<'tcx>, CrateNum>>
1967 {
1968 desc { |tcx|
1969"collecting available upstream monomorphizations for `{}`",
1970 tcx.def_path_str(def_id),
1971 }
1972 separate_provide_extern
1973 }
19741975/// Returns the upstream crate that exports drop-glue for the given
1976 /// type (`args` is expected to be a single-item list containing the
1977 /// type one wants drop-glue for).
1978 ///
1979 /// This is a subset of `upstream_monomorphizations_for` in order to
1980 /// increase dep-tracking granularity. Otherwise adding or removing any
1981 /// type with drop-glue in any upstream crate would invalidate all
1982 /// functions calling drop-glue of an upstream type.
1983 ///
1984 /// You likely want to call `Instance::upstream_monomorphization()`
1985 /// instead of invoking this query directly.
1986 ///
1987 /// NOTE: This query could easily be extended to also support other
1988 /// common functions that have are large set of monomorphizations
1989 /// (like `Clone::clone` for example).
1990query upstream_drop_glue_for(args: GenericArgsRef<'tcx>) -> Option<CrateNum> {
1991 desc { "available upstream drop-glue for `{:?}`", args }
1992 }
19931994/// Returns the upstream crate that exports async-drop-glue for
1995 /// the given type (`args` is expected to be a single-item list
1996 /// containing the type one wants async-drop-glue for).
1997 ///
1998 /// This is a subset of `upstream_monomorphizations_for` in order
1999 /// to increase dep-tracking granularity. Otherwise adding or
2000 /// removing any type with async-drop-glue in any upstream crate
2001 /// would invalidate all functions calling async-drop-glue of an
2002 /// upstream type.
2003 ///
2004 /// You likely want to call `Instance::upstream_monomorphization()`
2005 /// instead of invoking this query directly.
2006 ///
2007 /// NOTE: This query could easily be extended to also support other
2008 /// common functions that have are large set of monomorphizations
2009 /// (like `Clone::clone` for example).
2010query upstream_async_drop_glue_for(args: GenericArgsRef<'tcx>) -> Option<CrateNum> {
2011 desc { "available upstream async-drop-glue for `{:?}`", args }
2012 }
20132014/// Returns a list of all `extern` blocks of a crate.
2015query foreign_modules(_: CrateNum) -> &'tcx FxIndexMap<DefId, ForeignModule> {
2016 arena_cache
2017 desc { "looking up the foreign modules of a linked crate" }
2018 separate_provide_extern
2019 }
20202021/// Lint against `extern fn` declarations having incompatible types.
2022query clashing_extern_declarations(_: ()) {
2023 desc { "checking `extern fn` declarations are compatible" }
2024 }
20252026/// Identifies the entry-point (e.g., the `main` function) for a given
2027 /// crate, returning `None` if there is no entry point (such as for library crates).
2028query entry_fn(_: ()) -> Option<(DefId, EntryFnType)> {
2029 desc { "looking up the entry function of a crate" }
2030 }
20312032/// Finds the `rustc_proc_macro_decls` item of a crate.
2033query proc_macro_decls_static(_: ()) -> Option<LocalDefId> {
2034 desc { "looking up the proc macro declarations for a crate" }
2035 }
20362037// The macro which defines `rustc_metadata::provide_extern` depends on this query's name.
2038 // Changing the name should cause a compiler error, but in case that changes, be aware.
2039 //
2040 // The hash should not be calculated before the `analysis` pass is complete, specifically
2041 // until `tcx.untracked().definitions.freeze()` has been called, otherwise if incremental
2042 // compilation is enabled calculating this hash can freeze this structure too early in
2043 // compilation and cause subsequent crashes when attempting to write to `definitions`
2044query crate_hash(_: CrateNum) -> Svh {
2045 eval_always
2046 desc { "looking up the hash a crate" }
2047 separate_provide_extern
2048 }
20492050/// Gets the hash for the host proc macro. Used to support -Z dual-proc-macro.
2051query crate_host_hash(_: CrateNum) -> Option<Svh> {
2052 eval_always
2053 desc { "looking up the hash of a host version of a crate" }
2054 separate_provide_extern
2055 }
20562057/// Gets the extra data to put in each output filename for a crate.
2058 /// For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file.
2059query extra_filename(_: CrateNum) -> &'tcx String {
2060 arena_cache
2061 eval_always
2062 desc { "looking up the extra filename for a crate" }
2063 separate_provide_extern
2064 }
20652066/// Gets the paths where the crate came from in the file system.
2067query crate_extern_paths(_: CrateNum) -> &'tcx Vec<PathBuf> {
2068 arena_cache
2069 eval_always
2070 desc { "looking up the paths for extern crates" }
2071 separate_provide_extern
2072 }
20732074/// Given a crate and a trait, look up all impls of that trait in the crate.
2075 /// Return `(impl_id, self_ty)`.
2076query implementations_of_trait(_: (CrateNum, DefId)) -> &'tcx [(DefId, Option<SimplifiedType>)] {
2077 desc { "looking up implementations of a trait in a crate" }
2078 separate_provide_extern
2079 }
20802081/// Collects all incoherent impls for the given crate and type.
2082 ///
2083 /// Do not call this directly, but instead use the `incoherent_impls` query.
2084 /// This query is only used to get the data necessary for that query.
2085query crate_incoherent_impls(key: (CrateNum, SimplifiedType)) -> &'tcx [DefId] {
2086 desc { |tcx| "collecting all impls for a type in a crate" }
2087 separate_provide_extern
2088 }
20892090/// Get the corresponding native library from the `native_libraries` query
2091query native_library(def_id: DefId) -> Option<&'tcx NativeLib> {
2092 desc { |tcx| "getting the native library for `{}`", tcx.def_path_str(def_id) }
2093 }
20942095 query inherit_sig_for_delegation_item(def_id: LocalDefId) -> &'tcx [Ty<'tcx>] {
2096 desc { "inheriting delegation signature" }
2097 }
20982099/// Does lifetime resolution on items. Importantly, we can't resolve
2100 /// lifetimes directly on things like trait methods, because of trait params.
2101 /// See `rustc_resolve::late::lifetimes` for details.
2102query resolve_bound_vars(owner_id: hir::OwnerId) -> &'tcx ResolveBoundVars<'tcx> {
2103 arena_cache
2104 desc { |tcx| "resolving lifetimes for `{}`", tcx.def_path_str(owner_id) }
2105 }
2106 query named_variable_map(owner_id: hir::OwnerId) -> &'tcx SortedMap<ItemLocalId, ResolvedArg> {
2107 desc { |tcx| "looking up a named region inside `{}`", tcx.def_path_str(owner_id) }
2108 }
2109 query is_late_bound_map(owner_id: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
2110 desc { |tcx| "testing if a region is late bound inside `{}`", tcx.def_path_str(owner_id) }
2111 }
2112/// Returns the *default lifetime* to be used if a trait object type were to be passed for
2113 /// the type parameter given by `DefId`.
2114 ///
2115 /// **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically
2116 /// print the result of this query for use in UI tests or for debugging purposes.
2117 ///
2118 /// # Examples
2119 ///
2120 /// - For `T` in `struct Foo<'a, T: 'a>(&'a T);`, this would be `Param('a)`
2121 /// - For `T` in `struct Bar<'a, T>(&'a T);`, this would be `Empty`
2122 ///
2123 /// # Panics
2124 ///
2125 /// This query will panic if the given definition is not a type parameter.
2126query object_lifetime_default(def_id: DefId) -> ObjectLifetimeDefault {
2127 desc { "looking up lifetime defaults for type parameter `{}`", tcx.def_path_str(def_id) }
2128 separate_provide_extern
2129 }
2130 query late_bound_vars_map(owner_id: hir::OwnerId)
2131 -> &'tcx SortedMap<ItemLocalId, Vec<ty::BoundVariableKind<'tcx>>> {
2132 desc { |tcx| "looking up late bound vars inside `{}`", tcx.def_path_str(owner_id) }
2133 }
2134/// For an opaque type, return the list of (captured lifetime, inner generic param).
2135 /// ```ignore (illustrative)
2136 /// fn foo<'a: 'a, 'b, T>(&'b u8) -> impl Into<Self> + 'b { ... }
2137 /// ```
2138 ///
2139 /// We would return `[('a, '_a), ('b, '_b)]`, with `'a` early-bound and `'b` late-bound.
2140 ///
2141 /// After hir_ty_lowering, we get:
2142 /// ```ignore (pseudo-code)
2143 /// opaque foo::<'a>::opaque<'_a, '_b>: Into<Foo<'_a>> + '_b;
2144 /// ^^^^^^^^ inner generic params
2145 /// fn foo<'a>: for<'b> fn(&'b u8) -> foo::<'a>::opaque::<'a, 'b>
2146 /// ^^^^^^ captured lifetimes
2147 /// ```
2148query opaque_captured_lifetimes(def_id: LocalDefId) -> &'tcx [(ResolvedArg, LocalDefId)] {
2149 desc { |tcx| "listing captured lifetimes for opaque `{}`", tcx.def_path_str(def_id) }
2150 }
21512152/// Computes the visibility of the provided `def_id`.
2153 ///
2154 /// If the item from the `def_id` doesn't have a visibility, it will panic. For example
2155 /// a generic type parameter will panic if you call this method on it:
2156 ///
2157 /// ```
2158 /// use std::fmt::Debug;
2159 ///
2160 /// pub trait Foo<T: Debug> {}
2161 /// ```
2162 ///
2163 /// In here, if you call `visibility` on `T`, it'll panic.
2164query visibility(def_id: DefId) -> ty::Visibility<DefId> {
2165 desc { |tcx| "computing visibility of `{}`", tcx.def_path_str(def_id) }
2166 separate_provide_extern
2167 feedable
2168 }
21692170 query inhabited_predicate_adt(key: DefId) -> ty::inhabitedness::InhabitedPredicate<'tcx> {
2171 desc { "computing the uninhabited predicate of `{:?}`", key }
2172 }
21732174/// Do not call this query directly: invoke `Ty::inhabited_predicate` instead.
2175query inhabited_predicate_type(key: Ty<'tcx>) -> ty::inhabitedness::InhabitedPredicate<'tcx> {
2176 desc { "computing the uninhabited predicate of `{}`", key }
2177 }
21782179 query dep_kind(_: CrateNum) -> CrateDepKind {
2180 eval_always
2181 desc { "fetching what a dependency looks like" }
2182 separate_provide_extern
2183 }
21842185/// Gets the name of the crate.
2186query crate_name(_: CrateNum) -> Symbol {
2187 feedable
2188 desc { "fetching what a crate is named" }
2189 separate_provide_extern
2190 }
2191 query module_children(def_id: DefId) -> &'tcx [ModChild] {
2192 desc { |tcx| "collecting child items of module `{}`", tcx.def_path_str(def_id) }
2193 separate_provide_extern
2194 }
21952196/// Gets the number of definitions in a foreign crate.
2197 ///
2198 /// This allows external tools to iterate over all definitions in a foreign crate.
2199 ///
2200 /// This should never be used for the local crate, instead use `iter_local_def_id`.
2201query num_extern_def_ids(_: CrateNum) -> usize {
2202 desc { "fetching the number of definitions in a crate" }
2203 separate_provide_extern
2204 }
22052206 query lib_features(_: CrateNum) -> &'tcx LibFeatures {
2207 desc { "calculating the lib features defined in a crate" }
2208 separate_provide_extern
2209 arena_cache
2210 }
2211/// Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`
2212 /// attributes. If a `#[unstable(feature = "implier", implied_by = "impliee")]` attribute
2213 /// exists, then this map will have a `impliee -> implier` entry.
2214 ///
2215 /// This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should
2216 /// specify their implications (both `implies` and `implied_by`). If only one of the two
2217 /// attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this
2218 /// mapping is necessary for diagnostics. When a "unnecessary feature attribute" error is
2219 /// reported, only the `#[stable]` attribute information is available, so the map is necessary
2220 /// to know that the feature implies another feature. If it were reversed, and the `#[stable]`
2221 /// attribute had an `implies` meta item, then a map would be necessary when avoiding a "use of
2222 /// unstable feature" error for a feature that was implied.
2223query stability_implications(_: CrateNum) -> &'tcx UnordMap<Symbol, Symbol> {
2224 arena_cache
2225 desc { "calculating the implications between `#[unstable]` features defined in a crate" }
2226 separate_provide_extern
2227 }
2228/// Whether the function is an intrinsic
2229query intrinsic_raw(def_id: DefId) -> Option<rustc_middle::ty::IntrinsicDef> {
2230 desc { |tcx| "fetch intrinsic name if `{}` is an intrinsic", tcx.def_path_str(def_id) }
2231 separate_provide_extern
2232 }
2233/// Returns the lang items defined in another crate by loading it from metadata.
2234query get_lang_items(_: ()) -> &'tcx LanguageItems {
2235 arena_cache
2236 eval_always
2237 desc { "calculating the lang items map" }
2238 }
22392240/// Returns all diagnostic items defined in all crates.
2241query all_diagnostic_items(_: ()) -> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
2242 arena_cache
2243 eval_always
2244 desc { "calculating the diagnostic items map" }
2245 }
22462247/// Returns the lang items defined in another crate by loading it from metadata.
2248query defined_lang_items(_: CrateNum) -> &'tcx [(DefId, LangItem)] {
2249 desc { "calculating the lang items defined in a crate" }
2250 separate_provide_extern
2251 }
22522253/// Returns the diagnostic items defined in a crate.
2254query diagnostic_items(_: CrateNum) -> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
2255 arena_cache
2256 desc { "calculating the diagnostic items map in a crate" }
2257 separate_provide_extern
2258 }
22592260 query missing_lang_items(_: CrateNum) -> &'tcx [LangItem] {
2261 desc { "calculating the missing lang items in a crate" }
2262 separate_provide_extern
2263 }
22642265/// The visible parent map is a map from every item to a visible parent.
2266 /// It prefers the shortest visible path to an item.
2267 /// Used for diagnostics, for example path trimming.
2268 /// The parents are modules, enums or traits.
2269query visible_parent_map(_: ()) -> &'tcx DefIdMap<DefId> {
2270 arena_cache
2271 desc { "calculating the visible parent map" }
2272 }
2273/// Collects the "trimmed", shortest accessible paths to all items for diagnostics.
2274 /// See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info.
2275query trimmed_def_paths(_: ()) -> &'tcx DefIdMap<Symbol> {
2276 arena_cache
2277 desc { "calculating trimmed def paths" }
2278 }
2279 query missing_extern_crate_item(_: CrateNum) -> bool {
2280 eval_always
2281 desc { "seeing if we're missing an `extern crate` item for this crate" }
2282 separate_provide_extern
2283 }
2284 query used_crate_source(_: CrateNum) -> &'tcx Arc<CrateSource> {
2285 arena_cache
2286 eval_always
2287 desc { "looking at the source for a crate" }
2288 separate_provide_extern
2289 }
22902291/// Returns the debugger visualizers defined for this crate.
2292 /// NOTE: This query has to be marked `eval_always` because it reads data
2293 /// directly from disk that is not tracked anywhere else. I.e. it
2294 /// represents a genuine input to the query system.
2295query debugger_visualizers(_: CrateNum) -> &'tcx Vec<DebuggerVisualizerFile> {
2296 arena_cache
2297 desc { "looking up the debugger visualizers for this crate" }
2298 separate_provide_extern
2299 eval_always
2300 }
23012302 query postorder_cnums(_: ()) -> &'tcx [CrateNum] {
2303 eval_always
2304 desc { "generating a postorder list of CrateNums" }
2305 }
2306/// Returns whether or not the crate with CrateNum 'cnum'
2307 /// is marked as a private dependency
2308query is_private_dep(c: CrateNum) -> bool {
2309 eval_always
2310 desc { "checking whether crate `{}` is a private dependency", c }
2311 separate_provide_extern
2312 }
2313 query allocator_kind(_: ()) -> Option<AllocatorKind> {
2314 eval_always
2315 desc { "getting the allocator kind for the current crate" }
2316 }
2317 query alloc_error_handler_kind(_: ()) -> Option<AllocatorKind> {
2318 eval_always
2319 desc { "alloc error handler kind for the current crate" }
2320 }
23212322 query upvars_mentioned(def_id: DefId) -> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
2323 desc { |tcx| "collecting upvars mentioned in `{}`", tcx.def_path_str(def_id) }
2324 }
23252326/// All available crates in the graph, including those that should not be user-facing
2327 /// (such as private crates).
2328query crates(_: ()) -> &'tcx [CrateNum] {
2329 eval_always
2330 desc { "fetching all foreign CrateNum instances" }
2331 }
23322333// Crates that are loaded non-speculatively (not for diagnostics or doc links).
2334 // FIXME: This is currently only used for collecting lang items, but should be used instead of
2335 // `crates` in most other cases too.
2336query used_crates(_: ()) -> &'tcx [CrateNum] {
2337 eval_always
2338 desc { "fetching `CrateNum`s for all crates loaded non-speculatively" }
2339 }
23402341/// All crates that share the same name as crate `c`.
2342 ///
2343 /// This normally occurs when multiple versions of the same dependency are present in the
2344 /// dependency tree.
2345query duplicate_crate_names(c: CrateNum) -> &'tcx [CrateNum] {
2346 desc { "fetching `CrateNum`s with same name as `{c:?}`" }
2347 }
23482349/// A list of all traits in a crate, used by rustdoc and error reporting.
2350query traits(_: CrateNum) -> &'tcx [DefId] {
2351 desc { "fetching all traits in a crate" }
2352 separate_provide_extern
2353 }
23542355 query trait_impls_in_crate(_: CrateNum) -> &'tcx [DefId] {
2356 desc { "fetching all trait impls in a crate" }
2357 separate_provide_extern
2358 }
23592360 query stable_order_of_exportable_impls(_: CrateNum) -> &'tcx FxIndexMap<DefId, usize> {
2361 desc { "fetching the stable impl's order" }
2362 separate_provide_extern
2363 }
23642365 query exportable_items(_: CrateNum) -> &'tcx [DefId] {
2366 desc { "fetching all exportable items in a crate" }
2367 separate_provide_extern
2368 }
23692370/// The list of non-generic symbols exported from the given crate.
2371 ///
2372 /// This is separate from exported_generic_symbols to avoid having
2373 /// to deserialize all non-generic symbols too for upstream crates
2374 /// in the upstream_monomorphizations query.
2375 ///
2376 /// - All names contained in `exported_non_generic_symbols(cnum)` are
2377 /// guaranteed to correspond to a publicly visible symbol in `cnum`
2378 /// machine code.
2379 /// - The `exported_non_generic_symbols` and `exported_generic_symbols`
2380 /// sets of different crates do not intersect.
2381query exported_non_generic_symbols(cnum: CrateNum) -> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
2382 desc { "collecting exported non-generic symbols for crate `{}`", cnum}
2383 cache_on_disk_if { *cnum == LOCAL_CRATE }
2384 separate_provide_extern
2385 }
23862387/// The list of generic symbols exported from the given crate.
2388 ///
2389 /// - All names contained in `exported_generic_symbols(cnum)` are
2390 /// guaranteed to correspond to a publicly visible symbol in `cnum`
2391 /// machine code.
2392 /// - The `exported_non_generic_symbols` and `exported_generic_symbols`
2393 /// sets of different crates do not intersect.
2394query exported_generic_symbols(cnum: CrateNum) -> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
2395 desc { "collecting exported generic symbols for crate `{}`", cnum}
2396 cache_on_disk_if { *cnum == LOCAL_CRATE }
2397 separate_provide_extern
2398 }
23992400 query collect_and_partition_mono_items(_: ()) -> MonoItemPartitions<'tcx> {
2401 eval_always
2402 desc { "collect_and_partition_mono_items" }
2403 }
24042405 query is_codegened_item(def_id: DefId) -> bool {
2406 desc { |tcx| "determining whether `{}` needs codegen", tcx.def_path_str(def_id) }
2407 }
24082409 query codegen_unit(sym: Symbol) -> &'tcx CodegenUnit<'tcx> {
2410 desc { "getting codegen unit `{sym}`" }
2411 }
24122413 query backend_optimization_level(_: ()) -> OptLevel {
2414 desc { "optimization level used by backend" }
2415 }
24162417/// Return the filenames where output artefacts shall be stored.
2418 ///
2419 /// This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`
2420 /// has been destroyed.
2421query output_filenames(_: ()) -> &'tcx Arc<OutputFilenames> {
2422 feedable
2423 desc { "getting output filenames" }
2424 arena_cache
2425 }
24262427/// <div class="warning">
2428 ///
2429 /// Do not call this query directly: Invoke `normalize` instead.
2430 ///
2431 /// </div>
2432query normalize_canonicalized_projection(
2433 goal: CanonicalAliasGoal<'tcx>
2434 ) -> Result<
2435&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
2436 NoSolution,
2437 > {
2438 desc { "normalizing `{}`", goal.canonical.value.value }
2439 }
24402441/// <div class="warning">
2442 ///
2443 /// Do not call this query directly: Invoke `normalize` instead.
2444 ///
2445 /// </div>
2446query normalize_canonicalized_free_alias(
2447 goal: CanonicalAliasGoal<'tcx>
2448 ) -> Result<
2449&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
2450 NoSolution,
2451 > {
2452 desc { "normalizing `{}`", goal.canonical.value.value }
2453 }
24542455/// <div class="warning">
2456 ///
2457 /// Do not call this query directly: Invoke `normalize` instead.
2458 ///
2459 /// </div>
2460query normalize_canonicalized_inherent_projection(
2461 goal: CanonicalAliasGoal<'tcx>
2462 ) -> Result<
2463&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
2464 NoSolution,
2465 > {
2466 desc { "normalizing `{}`", goal.canonical.value.value }
2467 }
24682469/// Do not call this query directly: invoke `try_normalize_erasing_regions` instead.
2470query try_normalize_generic_arg_after_erasing_regions(
2471 goal: PseudoCanonicalInput<'tcx, GenericArg<'tcx>>
2472 ) -> Result<GenericArg<'tcx>, NoSolution> {
2473 desc { "normalizing `{}`", goal.value }
2474 }
24752476 query implied_outlives_bounds(
2477 key: (CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool)
2478 ) -> Result<
2479&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
2480 NoSolution,
2481 > {
2482 desc { "computing implied outlives bounds for `{}` (hack disabled = {:?})", key.0.canonical.value.value.ty, key.1 }
2483 }
24842485/// Do not call this query directly:
2486 /// invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead.
2487query dropck_outlives(
2488 goal: CanonicalDropckOutlivesGoal<'tcx>
2489 ) -> Result<
2490&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
2491 NoSolution,
2492 > {
2493 desc { "computing dropck types for `{}`", goal.canonical.value.value.dropped_ty }
2494 }
24952496/// Do not call this query directly: invoke `infcx.predicate_may_hold()` or
2497 /// `infcx.predicate_must_hold()` instead.
2498query evaluate_obligation(
2499 goal: CanonicalPredicateGoal<'tcx>
2500 ) -> Result<EvaluationResult, OverflowError> {
2501 desc { "evaluating trait selection obligation `{}`", goal.canonical.value.value }
2502 }
25032504/// Do not call this query directly: part of the `Eq` type-op
2505query type_op_ascribe_user_type(
2506 goal: CanonicalTypeOpAscribeUserTypeGoal<'tcx>
2507 ) -> Result<
2508&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
2509 NoSolution,
2510 > {
2511 desc { "evaluating `type_op_ascribe_user_type` `{:?}`", goal.canonical.value.value }
2512 }
25132514/// Do not call this query directly: part of the `ProvePredicate` type-op
2515query type_op_prove_predicate(
2516 goal: CanonicalTypeOpProvePredicateGoal<'tcx>
2517 ) -> Result<
2518&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
2519 NoSolution,
2520 > {
2521 desc { "evaluating `type_op_prove_predicate` `{:?}`", goal.canonical.value.value }
2522 }
25232524/// Do not call this query directly: part of the `Normalize` type-op
2525query type_op_normalize_ty(
2526 goal: CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>
2527 ) -> Result<
2528&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Ty<'tcx>>>,
2529 NoSolution,
2530 > {
2531 desc { "normalizing `{}`", goal.canonical.value.value.value }
2532 }
25332534/// Do not call this query directly: part of the `Normalize` type-op
2535query type_op_normalize_clause(
2536 goal: CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>
2537 ) -> Result<
2538&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::Clause<'tcx>>>,
2539 NoSolution,
2540 > {
2541 desc { "normalizing `{:?}`", goal.canonical.value.value.value }
2542 }
25432544/// Do not call this query directly: part of the `Normalize` type-op
2545query type_op_normalize_poly_fn_sig(
2546 goal: CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>
2547 ) -> Result<
2548&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
2549 NoSolution,
2550 > {
2551 desc { "normalizing `{:?}`", goal.canonical.value.value.value }
2552 }
25532554/// Do not call this query directly: part of the `Normalize` type-op
2555query type_op_normalize_fn_sig(
2556 goal: CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>
2557 ) -> Result<
2558&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>,
2559 NoSolution,
2560 > {
2561 desc { "normalizing `{:?}`", goal.canonical.value.value.value }
2562 }
25632564 query instantiate_and_check_impossible_predicates(key: (DefId, GenericArgsRef<'tcx>)) -> bool {
2565 desc { |tcx|
2566"checking impossible instantiated predicates: `{}`",
2567 tcx.def_path_str(key.0)
2568 }
2569 }
25702571 query is_impossible_associated_item(key: (DefId, DefId)) -> bool {
2572 desc { |tcx|
2573"checking if `{}` is impossible to reference within `{}`",
2574 tcx.def_path_str(key.1),
2575 tcx.def_path_str(key.0),
2576 }
2577 }
25782579 query method_autoderef_steps(
2580 goal: CanonicalMethodAutoderefStepsGoal<'tcx>
2581 ) -> MethodAutoderefStepsResult<'tcx> {
2582 desc { "computing autoderef types for `{}`", goal.canonical.value.value.self_ty }
2583 }
25842585/// Used by `-Znext-solver` to compute proof trees.
2586query evaluate_root_goal_for_proof_tree_raw(
2587 goal: solve::CanonicalInput<'tcx>,
2588 ) -> (solve::QueryResult<'tcx>, &'tcx solve::inspect::Probe<TyCtxt<'tcx>>) {
2589 no_hash
2590 desc { "computing proof tree for `{}`", goal.canonical.value.goal.predicate }
2591 }
25922593/// Returns the Rust target features for the current target. These are not always the same as LLVM target features!
2594query rust_target_features(_: CrateNum) -> &'tcx UnordMap<String, rustc_target::target_features::Stability> {
2595 arena_cache
2596 eval_always
2597 desc { "looking up Rust target features" }
2598 }
25992600 query implied_target_features(feature: Symbol) -> &'tcx Vec<Symbol> {
2601 arena_cache
2602 eval_always
2603 desc { "looking up implied target features" }
2604 }
26052606 query features_query(_: ()) -> &'tcx rustc_feature::Features {
2607 feedable
2608 desc { "looking up enabled feature gates" }
2609 }
26102611 query crate_for_resolver((): ()) -> &'tcx Steal<(rustc_ast::Crate, rustc_ast::AttrVec)> {
2612 feedable
2613 no_hash
2614 desc { "the ast before macro expansion and name resolution" }
2615 }
26162617/// Attempt to resolve the given `DefId` to an `Instance`, for the
2618 /// given generics args (`GenericArgsRef`), returning one of:
2619 /// * `Ok(Some(instance))` on success
2620 /// * `Ok(None)` when the `GenericArgsRef` are still too generic,
2621 /// and therefore don't allow finding the final `Instance`
2622 /// * `Err(ErrorGuaranteed)` when the `Instance` resolution process
2623 /// couldn't complete due to errors elsewhere - this is distinct
2624 /// from `Ok(None)` to avoid misleading diagnostics when an error
2625 /// has already been/will be emitted, for the original cause.
2626query resolve_instance_raw(
2627 key: ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>
2628 ) -> Result<Option<ty::Instance<'tcx>>, ErrorGuaranteed> {
2629 desc { "resolving instance `{}`", ty::Instance::new_raw(key.value.0, key.value.1) }
2630 }
26312632 query reveal_opaque_types_in_bounds(key: ty::Clauses<'tcx>) -> ty::Clauses<'tcx> {
2633 desc { "revealing opaque types in `{:?}`", key }
2634 }
26352636 query limits(key: ()) -> Limits {
2637 desc { "looking up limits" }
2638 }
26392640/// Performs an HIR-based well-formed check on the item with the given `HirId`. If
2641 /// we get an `Unimplemented` error that matches the provided `Predicate`, return
2642 /// the cause of the newly created obligation.
2643 ///
2644 /// This is only used by error-reporting code to get a better cause (in particular, a better
2645 /// span) for an *existing* error. Therefore, it is best-effort, and may never handle
2646 /// all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,
2647 /// because the `ty::Ty`-based wfcheck is always run.
2648query diagnostic_hir_wf_check(
2649 key: (ty::Predicate<'tcx>, WellFormedLoc)
2650 ) -> Option<&'tcx ObligationCause<'tcx>> {
2651 arena_cache
2652 eval_always
2653 no_hash
2654 desc { "performing HIR wf-checking for predicate `{:?}` at item `{:?}`", key.0, key.1 }
2655 }
26562657/// The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
2658 /// `--target` and similar).
2659query global_backend_features(_: ()) -> &'tcx Vec<String> {
2660 arena_cache
2661 eval_always
2662 desc { "computing the backend features for CLI flags" }
2663 }
26642665 query check_validity_requirement(key: (ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)) -> Result<bool, &'tcx ty::layout::LayoutError<'tcx>> {
2666 desc { "checking validity requirement for `{}`: {}", key.1.value, key.0 }
2667 }
26682669/// This takes the def-id of an associated item from a impl of a trait,
2670 /// and checks its validity against the trait item it corresponds to.
2671 ///
2672 /// Any other def id will ICE.
2673query compare_impl_item(key: LocalDefId) -> Result<(), ErrorGuaranteed> {
2674 desc { |tcx| "checking assoc item `{}` is compatible with trait definition", tcx.def_path_str(key) }
2675 return_result_from_ensure_ok
2676 }
26772678 query deduced_param_attrs(def_id: DefId) -> &'tcx [DeducedParamAttrs] {
2679 desc { |tcx| "deducing parameter attributes for {}", tcx.def_path_str(def_id) }
2680 separate_provide_extern
2681 }
26822683 query doc_link_resolutions(def_id: DefId) -> &'tcx DocLinkResMap {
2684 eval_always
2685 desc { "resolutions for documentation links for a module" }
2686 separate_provide_extern
2687 }
26882689 query doc_link_traits_in_scope(def_id: DefId) -> &'tcx [DefId] {
2690 eval_always
2691 desc { "traits in scope for documentation links for a module" }
2692 separate_provide_extern
2693 }
26942695/// Get all item paths that were stripped by a `#[cfg]` in a particular crate.
2696 /// Should not be called for the local crate before the resolver outputs are created, as it
2697 /// is only fed there.
2698query stripped_cfg_items(cnum: CrateNum) -> &'tcx [StrippedCfgItem] {
2699 desc { "getting cfg-ed out item names" }
2700 separate_provide_extern
2701 }
27022703 query generics_require_sized_self(def_id: DefId) -> bool {
2704 desc { "check whether the item has a `where Self: Sized` bound" }
2705 }
27062707 query cross_crate_inlinable(def_id: DefId) -> bool {
2708 desc { "whether the item should be made inlinable across crates" }
2709 separate_provide_extern
2710 }
27112712/// Perform monomorphization-time checking on this item.
2713 /// This is used for lints/errors that can only be checked once the instance is fully
2714 /// monomorphized.
2715query check_mono_item(key: ty::Instance<'tcx>) {
2716 desc { "monomorphization-time checking" }
2717 }
27182719/// Builds the set of functions that should be skipped for the move-size check.
2720query skip_move_check_fns(_: ()) -> &'tcx FxIndexSet<DefId> {
2721 arena_cache
2722 desc { "functions to skip for move-size check" }
2723 }
27242725 query items_of_instance(key: (ty::Instance<'tcx>, CollectionMode)) -> Result<(&'tcx [Spanned<MonoItem<'tcx>>], &'tcx [Spanned<MonoItem<'tcx>>]), NormalizationErrorInMono> {
2726 desc { "collecting items used by `{}`", key.0 }
2727 cache_on_disk_if { true }
2728 }
27292730 query size_estimate(key: ty::Instance<'tcx>) -> usize {
2731 desc { "estimating codegen size of `{}`", key }
2732 cache_on_disk_if { true }
2733 }
27342735 query anon_const_kind(def_id: DefId) -> ty::AnonConstKind {
2736 desc { |tcx| "looking up anon const kind of `{}`", tcx.def_path_str(def_id) }
2737 separate_provide_extern
2738 }
27392740 query trivial_const(def_id: DefId) -> Option<(mir::ConstValue, Ty<'tcx>)> {
2741 desc { |tcx| "checking if `{}` is a trivial const", tcx.def_path_str(def_id) }
2742 cache_on_disk_if { def_id.is_local() }
2743 separate_provide_extern
2744 }
27452746/// Checks for the nearest `#[sanitize(xyz = "off")]` or
2747 /// `#[sanitize(xyz = "on")]` on this def and any enclosing defs, up to the
2748 /// crate root.
2749 ///
2750 /// Returns the sanitizer settings for this def.
2751query sanitizer_settings_for(key: LocalDefId) -> SanitizerFnAttrs {
2752 desc { |tcx| "checking what set of sanitizers are enabled on `{}`", tcx.def_path_str(key) }
2753 feedable
2754 }
27552756 query check_externally_implementable_items(_: ()) {
2757 desc { "check externally implementable items" }
2758 }
27592760/// Returns a list of all `externally implementable items` crate.
2761query externally_implementable_items(cnum: CrateNum) -> &'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> {
2762 arena_cache
2763 desc { "looking up the externally implementable items of a crate" }
2764 cache_on_disk_if { *cnum == LOCAL_CRATE }
2765 separate_provide_extern
2766 }
2767}27682769#[allow(unused_lifetimes)]
pub mod externally_implementable_items {
use super::*;
use crate::query::erase::{self, Erased};
pub type Key<'tcx> = CrateNum;
pub type Value<'tcx> =
&'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)>;
pub type LocalKey<'tcx> =
<CrateNum as crate::query::AsLocalKey>::LocalKey;
/// This type alias specifies the type returned from query providers and the type
/// used for decoding. For regular queries this is the declared returned type `V`,
/// but `arena_cache` will use `<V as ArenaCached>::Provided` instead.
pub type ProvidedValue<'tcx> =
(<&'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> as
crate::query::arena_cached::ArenaCached<'tcx>>::Provided);
/// This function takes `ProvidedValue` and converts it to an erased `Value` by
/// allocating it on an arena if the query has the `arena_cache` modifier. The
/// value is then erased and returned. This will happen when computing the query
/// using a provider or decoding a stored result.
#[inline(always)]
pub fn provided_to_erased<'tcx>(_tcx: TyCtxt<'tcx>,
provided_value: ProvidedValue<'tcx>) -> Erased<Value<'tcx>> {
let value: Value<'tcx> =
{
use crate::query::arena_cached::ArenaCached;
if mem::needs_drop::<<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)> as
ArenaCached<'tcx>>::Allocated>() {
<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)> as
ArenaCached>::alloc_in_arena(|v|
_tcx.query_system.arenas.externally_implementable_items.alloc(v),
provided_value)
} else {
<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)> as
ArenaCached>::alloc_in_arena(|v|
_tcx.arena.dropless.alloc(v), provided_value)
}
};
erase::erase_val(value)
}
pub type Storage<'tcx> =
<CrateNum as
crate::query::Key>::Cache<Erased<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)>>>;
const _: () =
{
if size_of::<Key<'static>>() > 88 {
{
::core::panicking::panic_display(&"the query `externally_implementable_items` has a key type `CrateNum` that is too large");
};
}
};
const _: () =
{
if size_of::<Value<'static>>() > 64 {
{
::core::panicking::panic_display(&"the query `externally_implementable_items` has a value type `& \'tcx FxIndexMap < DefId, (EiiDecl, FxIndexMap < DefId, EiiImpl >) >` that is too large");
};
}
};
}
/// Holds per-query arenas for queries with the `arena_cache` modifier.
pub struct QueryArenas<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
pub derive_macro_expansion: (),
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
pub trigger_delayed_bug: (),
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
pub registered_tools: (TypedArena<<&'tcx ty::RegisteredTools as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
pub early_lint_checks: (),
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
pub env_var_os: (),
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
pub resolutions: (),
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
pub resolver_for_lowering_raw: (),
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
pub source_span: (),
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
pub hir_crate: (TypedArena<<&'tcx Crate<'tcx> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " All items in the crate."]
pub hir_crate_items: (TypedArena<<&'tcx rustc_middle::hir::ModuleItems as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
pub hir_module_items: (TypedArena<<&'tcx rustc_middle::hir::ModuleItems as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Returns HIR ID for the given `LocalDefId`."]
pub local_def_id_to_hir_id: (),
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub hir_owner_parent_q: (),
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub opt_hir_owner_nodes: (),
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub hir_attr_map: (),
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub opt_ast_lowering_delayed_lints: (),
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
pub const_param_default: (),
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
pub const_of_item: (),
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
pub type_of: (),
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
pub type_of_opaque: (),
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
pub type_of_opaque_hir_typeck: (),
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
pub type_alias_is_lazy: (),
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
pub collect_return_position_impl_trait_in_trait_tys: (),
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
pub opaque_ty_origin: (),
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
pub unsizing_params_for_adt: (TypedArena<<&'tcx rustc_index::bit_set::DenseBitSet<u32>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
pub analysis: (),
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
pub check_expectations: (),
#[doc = " Returns the *generics* of the definition given by `DefId`."]
pub generics_of: (TypedArena<<&'tcx ty::Generics as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
pub predicates_of: (),
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
pub opaque_types_defined_by: (),
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
pub nested_bodies_within: (),
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
pub explicit_item_bounds: (),
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
pub explicit_item_self_bounds: (),
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
pub item_bounds: (),
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
pub item_self_bounds: (),
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
pub item_non_self_bounds: (),
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
pub impl_super_outlives: (),
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
pub native_libraries: (TypedArena<<&'tcx Vec<NativeLib> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
pub shallow_lint_levels_on: (TypedArena<<&'tcx rustc_middle::lint::ShallowLintLevelMap
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
pub lint_expectations: (TypedArena<<&'tcx Vec<(LintExpectationId,
LintExpectation)> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
pub lints_that_dont_need_to_run: (TypedArena<<&'tcx UnordSet<LintId> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
pub expn_that_defined: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
pub is_panic_runtime: (),
#[doc = " Checks whether a type is representable or infinitely sized"]
pub representability: (),
#[doc = " An implementation detail for the `representability` query"]
pub representability_adt_ty: (),
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
pub params_in_repr: (TypedArena<<&'tcx rustc_index::bit_set::DenseBitSet<u32>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
pub thir_body: (),
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
pub mir_keys: (TypedArena<<&'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
pub mir_const_qualif: (),
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
pub mir_built: (),
#[doc = " Try to build an abstract representation of the given constant."]
pub thir_abstract_const: (),
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
pub mir_drops_elaborated_and_const_checked: (),
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
pub mir_for_ctfe: (),
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
pub mir_promoted: (),
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
pub closure_typeinfo: (),
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
pub closure_saved_names_of_captured_variables: (TypedArena<<&'tcx IndexVec<abi::FieldIdx,
Symbol> as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
pub mir_coroutine_witnesses: (TypedArena<<Option<&'tcx mir::CoroutineLayout<'tcx>>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
pub check_coroutine_obligations: (),
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
pub check_potentially_region_dependent_goals: (),
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
pub optimized_mir: (),
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
pub coverage_attr_on: (),
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
pub coverage_ids_info: (TypedArena<<Option<&'tcx mir::coverage::CoverageIdsInfo>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
pub promoted_mir: (),
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
pub erase_and_anonymize_regions_ty: (),
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
pub wasm_import_module_map: (TypedArena<<&'tcx DefIdMap<String> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
pub trait_explicit_predicates_and_bounds: (),
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
pub explicit_predicates_of: (),
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
pub inferred_outlives_of: (),
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
pub explicit_super_predicates_of: (),
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
pub explicit_implied_predicates_of: (),
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
pub explicit_supertraits_containing_assoc_item: (),
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
pub const_conditions: (),
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
pub explicit_implied_const_bounds: (),
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
pub type_param_predicates: (),
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
pub trait_def: (TypedArena<<&'tcx ty::TraitDef as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
pub adt_def: (),
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
pub adt_destructor: (),
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
pub adt_async_destructor: (),
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
pub adt_sizedness_constraint: (),
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
pub adt_dtorck_constraint: (),
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
pub constness: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
pub asyncness: (),
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
pub is_promotable_const_fn: (),
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
pub coroutine_by_move_body_def_id: (),
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
pub coroutine_kind: (),
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
pub coroutine_for_closure: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
pub coroutine_hidden_types: (),
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub crate_variances: (TypedArena<<&'tcx ty::CrateVariancesMap<'tcx> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
pub variances_of: (),
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub inferred_outlives_crate: (TypedArena<<&'tcx ty::CratePredicatesMap<'tcx>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
pub associated_item_def_ids: (),
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
pub associated_item: (),
#[doc = " Collects the associated items defined on a trait or impl."]
pub associated_items: (TypedArena<<&'tcx ty::AssocItems as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
pub impl_item_implementor_ids: (TypedArena<<&'tcx DefIdMap<DefId> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
pub associated_types_for_impl_traits_in_trait_or_impl: (TypedArena<<&'tcx DefIdMap<Vec<DefId>>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
pub impl_trait_header: (),
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
pub impl_self_is_guaranteed_unsized: (),
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
pub inherent_impls: (),
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
pub incoherent_impls: (),
#[doc = " Unsafety-check this `LocalDefId`."]
pub check_transmutes: (),
#[doc = " Unsafety-check this `LocalDefId`."]
pub check_unsafety: (),
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
pub check_tail_calls: (),
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
pub assumed_wf_types: (),
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
pub assumed_wf_types_for_rpitit: (),
#[doc = " Computes the signature of the function."]
pub fn_sig: (),
#[doc = " Performs lint checking for the module."]
pub lint_mod: (),
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
pub check_unused_traits: (),
#[doc = " Checks the attributes in the module."]
pub check_mod_attrs: (),
#[doc = " Checks for uses of unstable APIs in the module."]
pub check_mod_unstable_api_usage: (),
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
pub check_mod_privacy: (),
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
pub check_liveness: (TypedArena<<&'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
pub live_symbols_and_ignored_derived_traits: (TypedArena<<&'tcx Result<(LocalDefIdSet,
LocalDefIdMap<FxIndexSet<DefId>>), ErrorGuaranteed> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
pub check_mod_deathness: (),
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
pub check_type_wf: (),
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
pub coerce_unsized_info: (),
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
pub typeck: (),
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
pub used_trait_imports: (),
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
pub coherent_trait: (),
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
pub mir_borrowck: (),
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls: (),
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls_validity_check: (),
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls_overlap_check: (),
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
pub orphan_check_impl: (),
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
pub mir_callgraph_cyclic: (TypedArena<<&'tcx Option<UnordSet<LocalDefId>>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Obtain all the calls into other local functions"]
pub mir_inliner_callees: (),
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
pub tag_for_variant: (),
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub eval_to_allocation_raw: (),
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
pub eval_static_initializer: (),
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
pub eval_to_const_value_raw: (),
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
pub eval_to_valtree: (),
#[doc =
" Converts a type-level constant value into a MIR constant value."]
pub valtree_to_const_val: (),
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
pub lit_to_const: (),
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
pub check_match: (),
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
pub effective_visibilities: (),
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
pub check_private_in_public: (),
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
pub reachable_set: (TypedArena<<&'tcx LocalDefIdSet as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
pub region_scope_tree: (),
#[doc = " Generates a MIR body for the shim."]
pub mir_shims: (TypedArena<<&'tcx mir::Body<'tcx> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
pub symbol_name: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
pub def_kind: (),
#[doc = " Gets the span for the definition."]
pub def_span: (),
#[doc = " Gets the span for the identifier of the definition."]
pub def_ident_span: (),
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
pub ty_span: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
pub lookup_stability: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
pub lookup_const_stability: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
pub lookup_default_body_stability: (),
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
pub should_inherit_track_caller: (),
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
pub inherited_align: (),
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
pub lookup_deprecation_entry: (),
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
pub is_doc_hidden: (),
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
pub is_doc_notable_trait: (),
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
pub attrs_for_def: (),
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
pub codegen_fn_attrs: (TypedArena<<&'tcx CodegenFnAttrs as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
pub asm_target_features: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
pub fn_arg_idents: (),
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
pub rendered_const: (TypedArena<<&'tcx String as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
pub rendered_precise_capturing_args: (),
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
pub impl_parent: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
pub is_mir_available: (),
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
pub own_existential_vtable_entries: (),
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
pub vtable_entries: (),
#[doc =
"[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()` "]
pub first_method_vtable_slot: (),
#[doc =
"[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"]
pub supertrait_vtable_slot: (),
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
pub vtable_allocation: (),
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
pub codegen_select_candidate: (),
#[doc = " Return all `impl` blocks in the current crate."]
pub all_local_trait_impls: (),
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
pub local_trait_impls: (),
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
pub trait_impls_of: (TypedArena<<&'tcx ty::trait_def::TraitImpls as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
pub specialization_graph_of: (),
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
pub dyn_compatibility_violations: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
pub is_dyn_compatible: (),
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
pub param_env: (),
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
pub typing_env_normalized_for_post_analysis: (),
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
pub is_copy_raw: (),
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
pub is_use_cloned_raw: (),
#[doc = " Query backing `Ty::is_sized`."]
pub is_sized_raw: (),
#[doc = " Query backing `Ty::is_freeze`."]
pub is_freeze_raw: (),
#[doc = " Query backing `Ty::is_unpin`."]
pub is_unpin_raw: (),
#[doc = " Query backing `Ty::is_async_drop`."]
pub is_async_drop_raw: (),
#[doc = " Query backing `Ty::needs_drop`."]
pub needs_drop_raw: (),
#[doc = " Query backing `Ty::needs_async_drop`."]
pub needs_async_drop_raw: (),
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
pub has_significant_drop_raw: (),
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
pub has_structural_eq_impl: (),
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
pub adt_drop_tys: (),
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
pub adt_async_drop_tys: (),
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
pub adt_significant_drop_tys: (),
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
pub list_significant_drop_tys: (),
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
pub layout_of: (),
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
pub fn_abi_of_fn_ptr: (),
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
pub fn_abi_of_instance: (),
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
pub dylib_dependency_formats: (),
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
pub dependency_formats: (TypedArena<<&'tcx Arc<crate::middle::dependency_format::Dependencies>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
pub is_compiler_builtins: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
pub has_global_allocator: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
pub has_alloc_error_handler: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
pub has_panic_handler: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
pub is_profiler_runtime: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
pub has_ffi_unwind_calls: (),
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
pub required_panic_strategy: (),
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
pub panic_in_drop_strategy: (),
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
pub is_no_builtins: (),
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
pub symbol_mangling_version: (),
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
pub extern_crate: (),
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
pub specialization_enabled_in: (),
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
pub specializes: (),
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
pub in_scope_traits_map: (),
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
pub defaultness: (),
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
pub default_field: (),
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
pub check_well_formed: (),
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
pub enforce_impl_non_lifetime_params_are_constrained: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
pub reachable_non_generics: (TypedArena<<&'tcx DefIdMap<SymbolExportInfo>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
pub is_reachable_non_generic: (),
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
pub is_unreachable_local_definition: (),
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
pub upstream_monomorphizations: (TypedArena<<&'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>,
CrateNum>> as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
pub upstream_monomorphizations_for: (),
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
pub upstream_drop_glue_for: (),
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
pub upstream_async_drop_glue_for: (),
#[doc = " Returns a list of all `extern` blocks of a crate."]
pub foreign_modules: (TypedArena<<&'tcx FxIndexMap<DefId, ForeignModule>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
pub clashing_extern_declarations: (),
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
pub entry_fn: (),
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
pub proc_macro_decls_static: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
pub crate_hash: (),
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
pub crate_host_hash: (),
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
pub extra_filename: (TypedArena<<&'tcx String as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Gets the paths where the crate came from in the file system."]
pub crate_extern_paths: (TypedArena<<&'tcx Vec<PathBuf> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
pub implementations_of_trait: (),
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
pub crate_incoherent_impls: (),
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
pub native_library: (),
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
pub inherit_sig_for_delegation_item: (),
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
pub resolve_bound_vars: (TypedArena<<&'tcx ResolveBoundVars<'tcx> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
pub named_variable_map: (),
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
pub is_late_bound_map: (),
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
pub object_lifetime_default: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
pub late_bound_vars_map: (),
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
pub opaque_captured_lifetimes: (),
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
pub visibility: (),
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
pub inhabited_predicate_adt: (),
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
pub inhabited_predicate_type: (),
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
pub dep_kind: (),
#[doc = " Gets the name of the crate."]
pub crate_name: (),
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
pub module_children: (),
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
pub num_extern_def_ids: (),
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
pub lib_features: (TypedArena<<&'tcx LibFeatures as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
pub stability_implications: (TypedArena<<&'tcx UnordMap<Symbol, Symbol> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Whether the function is an intrinsic"]
pub intrinsic_raw: (),
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
pub get_lang_items: (TypedArena<<&'tcx LanguageItems as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Returns all diagnostic items defined in all crates."]
pub all_diagnostic_items: (TypedArena<<&'tcx rustc_hir::diagnostic_items::DiagnosticItems
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
pub defined_lang_items: (),
#[doc = " Returns the diagnostic items defined in a crate."]
pub diagnostic_items: (TypedArena<<&'tcx rustc_hir::diagnostic_items::DiagnosticItems
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
pub missing_lang_items: (),
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
pub visible_parent_map: (TypedArena<<&'tcx DefIdMap<DefId> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
pub trimmed_def_paths: (TypedArena<<&'tcx DefIdMap<Symbol> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
pub missing_extern_crate_item: (),
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
pub used_crate_source: (TypedArena<<&'tcx Arc<CrateSource> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
pub debugger_visualizers: (TypedArena<<&'tcx Vec<DebuggerVisualizerFile>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
pub postorder_cnums: (),
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
pub is_private_dep: (),
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
pub allocator_kind: (),
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
pub alloc_error_handler_kind: (),
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
pub upvars_mentioned: (),
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
pub crates: (),
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
pub used_crates: (),
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
pub duplicate_crate_names: (),
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
pub traits: (),
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
pub trait_impls_in_crate: (),
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
pub stable_order_of_exportable_impls: (),
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
pub exportable_items: (),
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
pub exported_non_generic_symbols: (),
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
pub exported_generic_symbols: (),
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
pub collect_and_partition_mono_items: (),
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
pub is_codegened_item: (),
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
pub codegen_unit: (),
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
pub backend_optimization_level: (),
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
pub output_filenames: (TypedArena<<&'tcx Arc<OutputFilenames> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_projection: (),
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_free_alias: (),
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_inherent_projection: (),
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
pub try_normalize_generic_arg_after_erasing_regions: (),
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
pub implied_outlives_bounds: (),
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
pub dropck_outlives: (),
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
pub evaluate_obligation: (),
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
pub type_op_ascribe_user_type: (),
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
pub type_op_prove_predicate: (),
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_ty: (),
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_clause: (),
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_poly_fn_sig: (),
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_fn_sig: (),
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
pub instantiate_and_check_impossible_predicates: (),
#[doc =
"[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)` "]
pub is_impossible_associated_item: (),
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
pub method_autoderef_steps: (),
#[doc = " Used by `-Znext-solver` to compute proof trees."]
pub evaluate_root_goal_for_proof_tree_raw: (),
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
pub rust_target_features: (TypedArena<<&'tcx UnordMap<String,
rustc_target::target_features::Stability> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
pub implied_target_features: (TypedArena<<&'tcx Vec<Symbol> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
pub features_query: (),
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
pub crate_for_resolver: (),
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
pub resolve_instance_raw: (),
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
pub reveal_opaque_types_in_bounds: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
pub limits: (),
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
pub diagnostic_hir_wf_check: (TypedArena<<Option<&'tcx ObligationCause<'tcx>>
as crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
pub global_backend_features: (TypedArena<<&'tcx Vec<String> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
pub check_validity_requirement: (),
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
pub compare_impl_item: (),
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
pub deduced_param_attrs: (),
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
pub doc_link_resolutions: (),
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
pub doc_link_traits_in_scope: (),
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
pub stripped_cfg_items: (),
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
pub generics_require_sized_self: (),
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
pub cross_crate_inlinable: (),
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
pub check_mono_item: (),
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
pub skip_move_check_fns: (TypedArena<<&'tcx FxIndexSet<DefId> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
pub items_of_instance: (),
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
pub size_estimate: (),
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
pub anon_const_kind: (),
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
pub trivial_const: (),
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
pub sanitizer_settings_for: (),
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
pub check_externally_implementable_items: (),
#[doc = " Returns a list of all `externally implementable items` crate."]
pub externally_implementable_items: (TypedArena<<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)> as
crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>),
}
#[automatically_derived]
impl<'tcx> ::core::default::Default for QueryArenas<'tcx> {
#[inline]
fn default() -> QueryArenas<'tcx> {
QueryArenas {
derive_macro_expansion: ::core::default::Default::default(),
trigger_delayed_bug: ::core::default::Default::default(),
registered_tools: ::core::default::Default::default(),
early_lint_checks: ::core::default::Default::default(),
env_var_os: ::core::default::Default::default(),
resolutions: ::core::default::Default::default(),
resolver_for_lowering_raw: ::core::default::Default::default(),
source_span: ::core::default::Default::default(),
hir_crate: ::core::default::Default::default(),
hir_crate_items: ::core::default::Default::default(),
hir_module_items: ::core::default::Default::default(),
local_def_id_to_hir_id: ::core::default::Default::default(),
hir_owner_parent_q: ::core::default::Default::default(),
opt_hir_owner_nodes: ::core::default::Default::default(),
hir_attr_map: ::core::default::Default::default(),
opt_ast_lowering_delayed_lints: ::core::default::Default::default(),
const_param_default: ::core::default::Default::default(),
const_of_item: ::core::default::Default::default(),
type_of: ::core::default::Default::default(),
type_of_opaque: ::core::default::Default::default(),
type_of_opaque_hir_typeck: ::core::default::Default::default(),
type_alias_is_lazy: ::core::default::Default::default(),
collect_return_position_impl_trait_in_trait_tys: ::core::default::Default::default(),
opaque_ty_origin: ::core::default::Default::default(),
unsizing_params_for_adt: ::core::default::Default::default(),
analysis: ::core::default::Default::default(),
check_expectations: ::core::default::Default::default(),
generics_of: ::core::default::Default::default(),
predicates_of: ::core::default::Default::default(),
opaque_types_defined_by: ::core::default::Default::default(),
nested_bodies_within: ::core::default::Default::default(),
explicit_item_bounds: ::core::default::Default::default(),
explicit_item_self_bounds: ::core::default::Default::default(),
item_bounds: ::core::default::Default::default(),
item_self_bounds: ::core::default::Default::default(),
item_non_self_bounds: ::core::default::Default::default(),
impl_super_outlives: ::core::default::Default::default(),
native_libraries: ::core::default::Default::default(),
shallow_lint_levels_on: ::core::default::Default::default(),
lint_expectations: ::core::default::Default::default(),
lints_that_dont_need_to_run: ::core::default::Default::default(),
expn_that_defined: ::core::default::Default::default(),
is_panic_runtime: ::core::default::Default::default(),
representability: ::core::default::Default::default(),
representability_adt_ty: ::core::default::Default::default(),
params_in_repr: ::core::default::Default::default(),
thir_body: ::core::default::Default::default(),
mir_keys: ::core::default::Default::default(),
mir_const_qualif: ::core::default::Default::default(),
mir_built: ::core::default::Default::default(),
thir_abstract_const: ::core::default::Default::default(),
mir_drops_elaborated_and_const_checked: ::core::default::Default::default(),
mir_for_ctfe: ::core::default::Default::default(),
mir_promoted: ::core::default::Default::default(),
closure_typeinfo: ::core::default::Default::default(),
closure_saved_names_of_captured_variables: ::core::default::Default::default(),
mir_coroutine_witnesses: ::core::default::Default::default(),
check_coroutine_obligations: ::core::default::Default::default(),
check_potentially_region_dependent_goals: ::core::default::Default::default(),
optimized_mir: ::core::default::Default::default(),
coverage_attr_on: ::core::default::Default::default(),
coverage_ids_info: ::core::default::Default::default(),
promoted_mir: ::core::default::Default::default(),
erase_and_anonymize_regions_ty: ::core::default::Default::default(),
wasm_import_module_map: ::core::default::Default::default(),
trait_explicit_predicates_and_bounds: ::core::default::Default::default(),
explicit_predicates_of: ::core::default::Default::default(),
inferred_outlives_of: ::core::default::Default::default(),
explicit_super_predicates_of: ::core::default::Default::default(),
explicit_implied_predicates_of: ::core::default::Default::default(),
explicit_supertraits_containing_assoc_item: ::core::default::Default::default(),
const_conditions: ::core::default::Default::default(),
explicit_implied_const_bounds: ::core::default::Default::default(),
type_param_predicates: ::core::default::Default::default(),
trait_def: ::core::default::Default::default(),
adt_def: ::core::default::Default::default(),
adt_destructor: ::core::default::Default::default(),
adt_async_destructor: ::core::default::Default::default(),
adt_sizedness_constraint: ::core::default::Default::default(),
adt_dtorck_constraint: ::core::default::Default::default(),
constness: ::core::default::Default::default(),
asyncness: ::core::default::Default::default(),
is_promotable_const_fn: ::core::default::Default::default(),
coroutine_by_move_body_def_id: ::core::default::Default::default(),
coroutine_kind: ::core::default::Default::default(),
coroutine_for_closure: ::core::default::Default::default(),
coroutine_hidden_types: ::core::default::Default::default(),
crate_variances: ::core::default::Default::default(),
variances_of: ::core::default::Default::default(),
inferred_outlives_crate: ::core::default::Default::default(),
associated_item_def_ids: ::core::default::Default::default(),
associated_item: ::core::default::Default::default(),
associated_items: ::core::default::Default::default(),
impl_item_implementor_ids: ::core::default::Default::default(),
associated_types_for_impl_traits_in_trait_or_impl: ::core::default::Default::default(),
impl_trait_header: ::core::default::Default::default(),
impl_self_is_guaranteed_unsized: ::core::default::Default::default(),
inherent_impls: ::core::default::Default::default(),
incoherent_impls: ::core::default::Default::default(),
check_transmutes: ::core::default::Default::default(),
check_unsafety: ::core::default::Default::default(),
check_tail_calls: ::core::default::Default::default(),
assumed_wf_types: ::core::default::Default::default(),
assumed_wf_types_for_rpitit: ::core::default::Default::default(),
fn_sig: ::core::default::Default::default(),
lint_mod: ::core::default::Default::default(),
check_unused_traits: ::core::default::Default::default(),
check_mod_attrs: ::core::default::Default::default(),
check_mod_unstable_api_usage: ::core::default::Default::default(),
check_mod_privacy: ::core::default::Default::default(),
check_liveness: ::core::default::Default::default(),
live_symbols_and_ignored_derived_traits: ::core::default::Default::default(),
check_mod_deathness: ::core::default::Default::default(),
check_type_wf: ::core::default::Default::default(),
coerce_unsized_info: ::core::default::Default::default(),
typeck: ::core::default::Default::default(),
used_trait_imports: ::core::default::Default::default(),
coherent_trait: ::core::default::Default::default(),
mir_borrowck: ::core::default::Default::default(),
crate_inherent_impls: ::core::default::Default::default(),
crate_inherent_impls_validity_check: ::core::default::Default::default(),
crate_inherent_impls_overlap_check: ::core::default::Default::default(),
orphan_check_impl: ::core::default::Default::default(),
mir_callgraph_cyclic: ::core::default::Default::default(),
mir_inliner_callees: ::core::default::Default::default(),
tag_for_variant: ::core::default::Default::default(),
eval_to_allocation_raw: ::core::default::Default::default(),
eval_static_initializer: ::core::default::Default::default(),
eval_to_const_value_raw: ::core::default::Default::default(),
eval_to_valtree: ::core::default::Default::default(),
valtree_to_const_val: ::core::default::Default::default(),
lit_to_const: ::core::default::Default::default(),
check_match: ::core::default::Default::default(),
effective_visibilities: ::core::default::Default::default(),
check_private_in_public: ::core::default::Default::default(),
reachable_set: ::core::default::Default::default(),
region_scope_tree: ::core::default::Default::default(),
mir_shims: ::core::default::Default::default(),
symbol_name: ::core::default::Default::default(),
def_kind: ::core::default::Default::default(),
def_span: ::core::default::Default::default(),
def_ident_span: ::core::default::Default::default(),
ty_span: ::core::default::Default::default(),
lookup_stability: ::core::default::Default::default(),
lookup_const_stability: ::core::default::Default::default(),
lookup_default_body_stability: ::core::default::Default::default(),
should_inherit_track_caller: ::core::default::Default::default(),
inherited_align: ::core::default::Default::default(),
lookup_deprecation_entry: ::core::default::Default::default(),
is_doc_hidden: ::core::default::Default::default(),
is_doc_notable_trait: ::core::default::Default::default(),
attrs_for_def: ::core::default::Default::default(),
codegen_fn_attrs: ::core::default::Default::default(),
asm_target_features: ::core::default::Default::default(),
fn_arg_idents: ::core::default::Default::default(),
rendered_const: ::core::default::Default::default(),
rendered_precise_capturing_args: ::core::default::Default::default(),
impl_parent: ::core::default::Default::default(),
is_mir_available: ::core::default::Default::default(),
own_existential_vtable_entries: ::core::default::Default::default(),
vtable_entries: ::core::default::Default::default(),
first_method_vtable_slot: ::core::default::Default::default(),
supertrait_vtable_slot: ::core::default::Default::default(),
vtable_allocation: ::core::default::Default::default(),
codegen_select_candidate: ::core::default::Default::default(),
all_local_trait_impls: ::core::default::Default::default(),
local_trait_impls: ::core::default::Default::default(),
trait_impls_of: ::core::default::Default::default(),
specialization_graph_of: ::core::default::Default::default(),
dyn_compatibility_violations: ::core::default::Default::default(),
is_dyn_compatible: ::core::default::Default::default(),
param_env: ::core::default::Default::default(),
typing_env_normalized_for_post_analysis: ::core::default::Default::default(),
is_copy_raw: ::core::default::Default::default(),
is_use_cloned_raw: ::core::default::Default::default(),
is_sized_raw: ::core::default::Default::default(),
is_freeze_raw: ::core::default::Default::default(),
is_unpin_raw: ::core::default::Default::default(),
is_async_drop_raw: ::core::default::Default::default(),
needs_drop_raw: ::core::default::Default::default(),
needs_async_drop_raw: ::core::default::Default::default(),
has_significant_drop_raw: ::core::default::Default::default(),
has_structural_eq_impl: ::core::default::Default::default(),
adt_drop_tys: ::core::default::Default::default(),
adt_async_drop_tys: ::core::default::Default::default(),
adt_significant_drop_tys: ::core::default::Default::default(),
list_significant_drop_tys: ::core::default::Default::default(),
layout_of: ::core::default::Default::default(),
fn_abi_of_fn_ptr: ::core::default::Default::default(),
fn_abi_of_instance: ::core::default::Default::default(),
dylib_dependency_formats: ::core::default::Default::default(),
dependency_formats: ::core::default::Default::default(),
is_compiler_builtins: ::core::default::Default::default(),
has_global_allocator: ::core::default::Default::default(),
has_alloc_error_handler: ::core::default::Default::default(),
has_panic_handler: ::core::default::Default::default(),
is_profiler_runtime: ::core::default::Default::default(),
has_ffi_unwind_calls: ::core::default::Default::default(),
required_panic_strategy: ::core::default::Default::default(),
panic_in_drop_strategy: ::core::default::Default::default(),
is_no_builtins: ::core::default::Default::default(),
symbol_mangling_version: ::core::default::Default::default(),
extern_crate: ::core::default::Default::default(),
specialization_enabled_in: ::core::default::Default::default(),
specializes: ::core::default::Default::default(),
in_scope_traits_map: ::core::default::Default::default(),
defaultness: ::core::default::Default::default(),
default_field: ::core::default::Default::default(),
check_well_formed: ::core::default::Default::default(),
enforce_impl_non_lifetime_params_are_constrained: ::core::default::Default::default(),
reachable_non_generics: ::core::default::Default::default(),
is_reachable_non_generic: ::core::default::Default::default(),
is_unreachable_local_definition: ::core::default::Default::default(),
upstream_monomorphizations: ::core::default::Default::default(),
upstream_monomorphizations_for: ::core::default::Default::default(),
upstream_drop_glue_for: ::core::default::Default::default(),
upstream_async_drop_glue_for: ::core::default::Default::default(),
foreign_modules: ::core::default::Default::default(),
clashing_extern_declarations: ::core::default::Default::default(),
entry_fn: ::core::default::Default::default(),
proc_macro_decls_static: ::core::default::Default::default(),
crate_hash: ::core::default::Default::default(),
crate_host_hash: ::core::default::Default::default(),
extra_filename: ::core::default::Default::default(),
crate_extern_paths: ::core::default::Default::default(),
implementations_of_trait: ::core::default::Default::default(),
crate_incoherent_impls: ::core::default::Default::default(),
native_library: ::core::default::Default::default(),
inherit_sig_for_delegation_item: ::core::default::Default::default(),
resolve_bound_vars: ::core::default::Default::default(),
named_variable_map: ::core::default::Default::default(),
is_late_bound_map: ::core::default::Default::default(),
object_lifetime_default: ::core::default::Default::default(),
late_bound_vars_map: ::core::default::Default::default(),
opaque_captured_lifetimes: ::core::default::Default::default(),
visibility: ::core::default::Default::default(),
inhabited_predicate_adt: ::core::default::Default::default(),
inhabited_predicate_type: ::core::default::Default::default(),
dep_kind: ::core::default::Default::default(),
crate_name: ::core::default::Default::default(),
module_children: ::core::default::Default::default(),
num_extern_def_ids: ::core::default::Default::default(),
lib_features: ::core::default::Default::default(),
stability_implications: ::core::default::Default::default(),
intrinsic_raw: ::core::default::Default::default(),
get_lang_items: ::core::default::Default::default(),
all_diagnostic_items: ::core::default::Default::default(),
defined_lang_items: ::core::default::Default::default(),
diagnostic_items: ::core::default::Default::default(),
missing_lang_items: ::core::default::Default::default(),
visible_parent_map: ::core::default::Default::default(),
trimmed_def_paths: ::core::default::Default::default(),
missing_extern_crate_item: ::core::default::Default::default(),
used_crate_source: ::core::default::Default::default(),
debugger_visualizers: ::core::default::Default::default(),
postorder_cnums: ::core::default::Default::default(),
is_private_dep: ::core::default::Default::default(),
allocator_kind: ::core::default::Default::default(),
alloc_error_handler_kind: ::core::default::Default::default(),
upvars_mentioned: ::core::default::Default::default(),
crates: ::core::default::Default::default(),
used_crates: ::core::default::Default::default(),
duplicate_crate_names: ::core::default::Default::default(),
traits: ::core::default::Default::default(),
trait_impls_in_crate: ::core::default::Default::default(),
stable_order_of_exportable_impls: ::core::default::Default::default(),
exportable_items: ::core::default::Default::default(),
exported_non_generic_symbols: ::core::default::Default::default(),
exported_generic_symbols: ::core::default::Default::default(),
collect_and_partition_mono_items: ::core::default::Default::default(),
is_codegened_item: ::core::default::Default::default(),
codegen_unit: ::core::default::Default::default(),
backend_optimization_level: ::core::default::Default::default(),
output_filenames: ::core::default::Default::default(),
normalize_canonicalized_projection: ::core::default::Default::default(),
normalize_canonicalized_free_alias: ::core::default::Default::default(),
normalize_canonicalized_inherent_projection: ::core::default::Default::default(),
try_normalize_generic_arg_after_erasing_regions: ::core::default::Default::default(),
implied_outlives_bounds: ::core::default::Default::default(),
dropck_outlives: ::core::default::Default::default(),
evaluate_obligation: ::core::default::Default::default(),
type_op_ascribe_user_type: ::core::default::Default::default(),
type_op_prove_predicate: ::core::default::Default::default(),
type_op_normalize_ty: ::core::default::Default::default(),
type_op_normalize_clause: ::core::default::Default::default(),
type_op_normalize_poly_fn_sig: ::core::default::Default::default(),
type_op_normalize_fn_sig: ::core::default::Default::default(),
instantiate_and_check_impossible_predicates: ::core::default::Default::default(),
is_impossible_associated_item: ::core::default::Default::default(),
method_autoderef_steps: ::core::default::Default::default(),
evaluate_root_goal_for_proof_tree_raw: ::core::default::Default::default(),
rust_target_features: ::core::default::Default::default(),
implied_target_features: ::core::default::Default::default(),
features_query: ::core::default::Default::default(),
crate_for_resolver: ::core::default::Default::default(),
resolve_instance_raw: ::core::default::Default::default(),
reveal_opaque_types_in_bounds: ::core::default::Default::default(),
limits: ::core::default::Default::default(),
diagnostic_hir_wf_check: ::core::default::Default::default(),
global_backend_features: ::core::default::Default::default(),
check_validity_requirement: ::core::default::Default::default(),
compare_impl_item: ::core::default::Default::default(),
deduced_param_attrs: ::core::default::Default::default(),
doc_link_resolutions: ::core::default::Default::default(),
doc_link_traits_in_scope: ::core::default::Default::default(),
stripped_cfg_items: ::core::default::Default::default(),
generics_require_sized_self: ::core::default::Default::default(),
cross_crate_inlinable: ::core::default::Default::default(),
check_mono_item: ::core::default::Default::default(),
skip_move_check_fns: ::core::default::Default::default(),
items_of_instance: ::core::default::Default::default(),
size_estimate: ::core::default::Default::default(),
anon_const_kind: ::core::default::Default::default(),
trivial_const: ::core::default::Default::default(),
sanitizer_settings_for: ::core::default::Default::default(),
check_externally_implementable_items: ::core::default::Default::default(),
externally_implementable_items: ::core::default::Default::default(),
}
}
}
pub struct QueryCaches<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
pub derive_macro_expansion: derive_macro_expansion::Storage<'tcx>,
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
pub trigger_delayed_bug: trigger_delayed_bug::Storage<'tcx>,
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
pub registered_tools: registered_tools::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
pub early_lint_checks: early_lint_checks::Storage<'tcx>,
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
pub env_var_os: env_var_os::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
pub resolutions: resolutions::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
pub resolver_for_lowering_raw: resolver_for_lowering_raw::Storage<'tcx>,
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
pub source_span: source_span::Storage<'tcx>,
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
pub hir_crate: hir_crate::Storage<'tcx>,
#[doc = " All items in the crate."]
pub hir_crate_items: hir_crate_items::Storage<'tcx>,
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
pub hir_module_items: hir_module_items::Storage<'tcx>,
#[doc = " Returns HIR ID for the given `LocalDefId`."]
pub local_def_id_to_hir_id: local_def_id_to_hir_id::Storage<'tcx>,
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub hir_owner_parent_q: hir_owner_parent_q::Storage<'tcx>,
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub opt_hir_owner_nodes: opt_hir_owner_nodes::Storage<'tcx>,
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub hir_attr_map: hir_attr_map::Storage<'tcx>,
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
pub opt_ast_lowering_delayed_lints: opt_ast_lowering_delayed_lints::Storage<'tcx>,
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
pub const_param_default: const_param_default::Storage<'tcx>,
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
pub const_of_item: const_of_item::Storage<'tcx>,
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
pub type_of: type_of::Storage<'tcx>,
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
pub type_of_opaque: type_of_opaque::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
pub type_of_opaque_hir_typeck: type_of_opaque_hir_typeck::Storage<'tcx>,
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
pub type_alias_is_lazy: type_alias_is_lazy::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
pub collect_return_position_impl_trait_in_trait_tys: collect_return_position_impl_trait_in_trait_tys::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
pub opaque_ty_origin: opaque_ty_origin::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
pub unsizing_params_for_adt: unsizing_params_for_adt::Storage<'tcx>,
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
pub analysis: analysis::Storage<'tcx>,
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
pub check_expectations: check_expectations::Storage<'tcx>,
#[doc = " Returns the *generics* of the definition given by `DefId`."]
pub generics_of: generics_of::Storage<'tcx>,
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
pub predicates_of: predicates_of::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
pub opaque_types_defined_by: opaque_types_defined_by::Storage<'tcx>,
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
pub nested_bodies_within: nested_bodies_within::Storage<'tcx>,
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
pub explicit_item_bounds: explicit_item_bounds::Storage<'tcx>,
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
pub explicit_item_self_bounds: explicit_item_self_bounds::Storage<'tcx>,
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
pub item_bounds: item_bounds::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
pub item_self_bounds: item_self_bounds::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
pub item_non_self_bounds: item_non_self_bounds::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
pub impl_super_outlives: impl_super_outlives::Storage<'tcx>,
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
pub native_libraries: native_libraries::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
pub shallow_lint_levels_on: shallow_lint_levels_on::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
pub lint_expectations: lint_expectations::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
pub lints_that_dont_need_to_run: lints_that_dont_need_to_run::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
pub expn_that_defined: expn_that_defined::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
pub is_panic_runtime: is_panic_runtime::Storage<'tcx>,
#[doc = " Checks whether a type is representable or infinitely sized"]
pub representability: representability::Storage<'tcx>,
#[doc = " An implementation detail for the `representability` query"]
pub representability_adt_ty: representability_adt_ty::Storage<'tcx>,
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
pub params_in_repr: params_in_repr::Storage<'tcx>,
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
pub thir_body: thir_body::Storage<'tcx>,
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
pub mir_keys: mir_keys::Storage<'tcx>,
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
pub mir_const_qualif: mir_const_qualif::Storage<'tcx>,
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
pub mir_built: mir_built::Storage<'tcx>,
#[doc = " Try to build an abstract representation of the given constant."]
pub thir_abstract_const: thir_abstract_const::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
pub mir_drops_elaborated_and_const_checked: mir_drops_elaborated_and_const_checked::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
pub mir_for_ctfe: mir_for_ctfe::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
pub mir_promoted: mir_promoted::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
pub closure_typeinfo: closure_typeinfo::Storage<'tcx>,
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
pub closure_saved_names_of_captured_variables: closure_saved_names_of_captured_variables::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
pub mir_coroutine_witnesses: mir_coroutine_witnesses::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
pub check_coroutine_obligations: check_coroutine_obligations::Storage<'tcx>,
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
pub check_potentially_region_dependent_goals: check_potentially_region_dependent_goals::Storage<'tcx>,
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
pub optimized_mir: optimized_mir::Storage<'tcx>,
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
pub coverage_attr_on: coverage_attr_on::Storage<'tcx>,
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
pub coverage_ids_info: coverage_ids_info::Storage<'tcx>,
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
pub promoted_mir: promoted_mir::Storage<'tcx>,
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
pub erase_and_anonymize_regions_ty: erase_and_anonymize_regions_ty::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
pub wasm_import_module_map: wasm_import_module_map::Storage<'tcx>,
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
pub trait_explicit_predicates_and_bounds: trait_explicit_predicates_and_bounds::Storage<'tcx>,
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
pub explicit_predicates_of: explicit_predicates_of::Storage<'tcx>,
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
pub inferred_outlives_of: inferred_outlives_of::Storage<'tcx>,
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
pub explicit_super_predicates_of: explicit_super_predicates_of::Storage<'tcx>,
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
pub explicit_implied_predicates_of: explicit_implied_predicates_of::Storage<'tcx>,
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
pub explicit_supertraits_containing_assoc_item: explicit_supertraits_containing_assoc_item::Storage<'tcx>,
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
pub const_conditions: const_conditions::Storage<'tcx>,
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
pub explicit_implied_const_bounds: explicit_implied_const_bounds::Storage<'tcx>,
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
pub type_param_predicates: type_param_predicates::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
pub trait_def: trait_def::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
pub adt_def: adt_def::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
pub adt_destructor: adt_destructor::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
pub adt_async_destructor: adt_async_destructor::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
pub adt_sizedness_constraint: adt_sizedness_constraint::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
pub adt_dtorck_constraint: adt_dtorck_constraint::Storage<'tcx>,
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
pub constness: constness::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
pub asyncness: asyncness::Storage<'tcx>,
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
pub is_promotable_const_fn: is_promotable_const_fn::Storage<'tcx>,
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
pub coroutine_by_move_body_def_id: coroutine_by_move_body_def_id::Storage<'tcx>,
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
pub coroutine_kind: coroutine_kind::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
pub coroutine_for_closure: coroutine_for_closure::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
pub coroutine_hidden_types: coroutine_hidden_types::Storage<'tcx>,
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub crate_variances: crate_variances::Storage<'tcx>,
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
pub variances_of: variances_of::Storage<'tcx>,
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub inferred_outlives_crate: inferred_outlives_crate::Storage<'tcx>,
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
pub associated_item_def_ids: associated_item_def_ids::Storage<'tcx>,
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
pub associated_item: associated_item::Storage<'tcx>,
#[doc = " Collects the associated items defined on a trait or impl."]
pub associated_items: associated_items::Storage<'tcx>,
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
pub impl_item_implementor_ids: impl_item_implementor_ids::Storage<'tcx>,
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
pub associated_types_for_impl_traits_in_trait_or_impl: associated_types_for_impl_traits_in_trait_or_impl::Storage<'tcx>,
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
pub impl_trait_header: impl_trait_header::Storage<'tcx>,
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
pub impl_self_is_guaranteed_unsized: impl_self_is_guaranteed_unsized::Storage<'tcx>,
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
pub inherent_impls: inherent_impls::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
pub incoherent_impls: incoherent_impls::Storage<'tcx>,
#[doc = " Unsafety-check this `LocalDefId`."]
pub check_transmutes: check_transmutes::Storage<'tcx>,
#[doc = " Unsafety-check this `LocalDefId`."]
pub check_unsafety: check_unsafety::Storage<'tcx>,
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
pub check_tail_calls: check_tail_calls::Storage<'tcx>,
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
pub assumed_wf_types: assumed_wf_types::Storage<'tcx>,
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
pub assumed_wf_types_for_rpitit: assumed_wf_types_for_rpitit::Storage<'tcx>,
#[doc = " Computes the signature of the function."]
pub fn_sig: fn_sig::Storage<'tcx>,
#[doc = " Performs lint checking for the module."]
pub lint_mod: lint_mod::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
pub check_unused_traits: check_unused_traits::Storage<'tcx>,
#[doc = " Checks the attributes in the module."]
pub check_mod_attrs: check_mod_attrs::Storage<'tcx>,
#[doc = " Checks for uses of unstable APIs in the module."]
pub check_mod_unstable_api_usage: check_mod_unstable_api_usage::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
pub check_mod_privacy: check_mod_privacy::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
pub check_liveness: check_liveness::Storage<'tcx>,
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
pub live_symbols_and_ignored_derived_traits: live_symbols_and_ignored_derived_traits::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
pub check_mod_deathness: check_mod_deathness::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
pub check_type_wf: check_type_wf::Storage<'tcx>,
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
pub coerce_unsized_info: coerce_unsized_info::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
pub typeck: typeck::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
pub used_trait_imports: used_trait_imports::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
pub coherent_trait: coherent_trait::Storage<'tcx>,
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
pub mir_borrowck: mir_borrowck::Storage<'tcx>,
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls: crate_inherent_impls::Storage<'tcx>,
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls_validity_check: crate_inherent_impls_validity_check::Storage<'tcx>,
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
pub crate_inherent_impls_overlap_check: crate_inherent_impls_overlap_check::Storage<'tcx>,
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
pub orphan_check_impl: orphan_check_impl::Storage<'tcx>,
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
pub mir_callgraph_cyclic: mir_callgraph_cyclic::Storage<'tcx>,
#[doc = " Obtain all the calls into other local functions"]
pub mir_inliner_callees: mir_inliner_callees::Storage<'tcx>,
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
pub tag_for_variant: tag_for_variant::Storage<'tcx>,
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
pub eval_to_allocation_raw: eval_to_allocation_raw::Storage<'tcx>,
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
pub eval_static_initializer: eval_static_initializer::Storage<'tcx>,
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
pub eval_to_const_value_raw: eval_to_const_value_raw::Storage<'tcx>,
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
pub eval_to_valtree: eval_to_valtree::Storage<'tcx>,
#[doc =
" Converts a type-level constant value into a MIR constant value."]
pub valtree_to_const_val: valtree_to_const_val::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
pub lit_to_const: lit_to_const::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
pub check_match: check_match::Storage<'tcx>,
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
pub effective_visibilities: effective_visibilities::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
pub check_private_in_public: check_private_in_public::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
pub reachable_set: reachable_set::Storage<'tcx>,
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
pub region_scope_tree: region_scope_tree::Storage<'tcx>,
#[doc = " Generates a MIR body for the shim."]
pub mir_shims: mir_shims::Storage<'tcx>,
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
pub symbol_name: symbol_name::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
pub def_kind: def_kind::Storage<'tcx>,
#[doc = " Gets the span for the definition."]
pub def_span: def_span::Storage<'tcx>,
#[doc = " Gets the span for the identifier of the definition."]
pub def_ident_span: def_ident_span::Storage<'tcx>,
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
pub ty_span: ty_span::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
pub lookup_stability: lookup_stability::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
pub lookup_const_stability: lookup_const_stability::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
pub lookup_default_body_stability: lookup_default_body_stability::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
pub should_inherit_track_caller: should_inherit_track_caller::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
pub inherited_align: inherited_align::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
pub lookup_deprecation_entry: lookup_deprecation_entry::Storage<'tcx>,
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
pub is_doc_hidden: is_doc_hidden::Storage<'tcx>,
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
pub is_doc_notable_trait: is_doc_notable_trait::Storage<'tcx>,
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
pub attrs_for_def: attrs_for_def::Storage<'tcx>,
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
pub codegen_fn_attrs: codegen_fn_attrs::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
pub asm_target_features: asm_target_features::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
pub fn_arg_idents: fn_arg_idents::Storage<'tcx>,
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
pub rendered_const: rendered_const::Storage<'tcx>,
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
pub rendered_precise_capturing_args: rendered_precise_capturing_args::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
pub impl_parent: impl_parent::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
pub is_mir_available: is_mir_available::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
pub own_existential_vtable_entries: own_existential_vtable_entries::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
pub vtable_entries: vtable_entries::Storage<'tcx>,
#[doc =
"[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()` "]
pub first_method_vtable_slot: first_method_vtable_slot::Storage<'tcx>,
#[doc =
"[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"]
pub supertrait_vtable_slot: supertrait_vtable_slot::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
pub vtable_allocation: vtable_allocation::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
pub codegen_select_candidate: codegen_select_candidate::Storage<'tcx>,
#[doc = " Return all `impl` blocks in the current crate."]
pub all_local_trait_impls: all_local_trait_impls::Storage<'tcx>,
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
pub local_trait_impls: local_trait_impls::Storage<'tcx>,
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
pub trait_impls_of: trait_impls_of::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
pub specialization_graph_of: specialization_graph_of::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
pub dyn_compatibility_violations: dyn_compatibility_violations::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
pub is_dyn_compatible: is_dyn_compatible::Storage<'tcx>,
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
pub param_env: param_env::Storage<'tcx>,
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
pub typing_env_normalized_for_post_analysis: typing_env_normalized_for_post_analysis::Storage<'tcx>,
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
pub is_copy_raw: is_copy_raw::Storage<'tcx>,
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
pub is_use_cloned_raw: is_use_cloned_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::is_sized`."]
pub is_sized_raw: is_sized_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::is_freeze`."]
pub is_freeze_raw: is_freeze_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::is_unpin`."]
pub is_unpin_raw: is_unpin_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::is_async_drop`."]
pub is_async_drop_raw: is_async_drop_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::needs_drop`."]
pub needs_drop_raw: needs_drop_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::needs_async_drop`."]
pub needs_async_drop_raw: needs_async_drop_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
pub has_significant_drop_raw: has_significant_drop_raw::Storage<'tcx>,
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
pub has_structural_eq_impl: has_structural_eq_impl::Storage<'tcx>,
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
pub adt_drop_tys: adt_drop_tys::Storage<'tcx>,
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
pub adt_async_drop_tys: adt_async_drop_tys::Storage<'tcx>,
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
pub adt_significant_drop_tys: adt_significant_drop_tys::Storage<'tcx>,
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
pub list_significant_drop_tys: list_significant_drop_tys::Storage<'tcx>,
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
pub layout_of: layout_of::Storage<'tcx>,
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
pub fn_abi_of_fn_ptr: fn_abi_of_fn_ptr::Storage<'tcx>,
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
pub fn_abi_of_instance: fn_abi_of_instance::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
pub dylib_dependency_formats: dylib_dependency_formats::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
pub dependency_formats: dependency_formats::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
pub is_compiler_builtins: is_compiler_builtins::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
pub has_global_allocator: has_global_allocator::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
pub has_alloc_error_handler: has_alloc_error_handler::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
pub has_panic_handler: has_panic_handler::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
pub is_profiler_runtime: is_profiler_runtime::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
pub has_ffi_unwind_calls: has_ffi_unwind_calls::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
pub required_panic_strategy: required_panic_strategy::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
pub panic_in_drop_strategy: panic_in_drop_strategy::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
pub is_no_builtins: is_no_builtins::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
pub symbol_mangling_version: symbol_mangling_version::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
pub extern_crate: extern_crate::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
pub specialization_enabled_in: specialization_enabled_in::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
pub specializes: specializes::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
pub in_scope_traits_map: in_scope_traits_map::Storage<'tcx>,
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
pub defaultness: defaultness::Storage<'tcx>,
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
pub default_field: default_field::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
pub check_well_formed: check_well_formed::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
pub enforce_impl_non_lifetime_params_are_constrained: enforce_impl_non_lifetime_params_are_constrained::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
pub reachable_non_generics: reachable_non_generics::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
pub is_reachable_non_generic: is_reachable_non_generic::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
pub is_unreachable_local_definition: is_unreachable_local_definition::Storage<'tcx>,
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
pub upstream_monomorphizations: upstream_monomorphizations::Storage<'tcx>,
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
pub upstream_monomorphizations_for: upstream_monomorphizations_for::Storage<'tcx>,
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
pub upstream_drop_glue_for: upstream_drop_glue_for::Storage<'tcx>,
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
pub upstream_async_drop_glue_for: upstream_async_drop_glue_for::Storage<'tcx>,
#[doc = " Returns a list of all `extern` blocks of a crate."]
pub foreign_modules: foreign_modules::Storage<'tcx>,
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
pub clashing_extern_declarations: clashing_extern_declarations::Storage<'tcx>,
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
pub entry_fn: entry_fn::Storage<'tcx>,
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
pub proc_macro_decls_static: proc_macro_decls_static::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
pub crate_hash: crate_hash::Storage<'tcx>,
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
pub crate_host_hash: crate_host_hash::Storage<'tcx>,
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
pub extra_filename: extra_filename::Storage<'tcx>,
#[doc = " Gets the paths where the crate came from in the file system."]
pub crate_extern_paths: crate_extern_paths::Storage<'tcx>,
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
pub implementations_of_trait: implementations_of_trait::Storage<'tcx>,
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
pub crate_incoherent_impls: crate_incoherent_impls::Storage<'tcx>,
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
pub native_library: native_library::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
pub inherit_sig_for_delegation_item: inherit_sig_for_delegation_item::Storage<'tcx>,
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
pub resolve_bound_vars: resolve_bound_vars::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
pub named_variable_map: named_variable_map::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
pub is_late_bound_map: is_late_bound_map::Storage<'tcx>,
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
pub object_lifetime_default: object_lifetime_default::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
pub late_bound_vars_map: late_bound_vars_map::Storage<'tcx>,
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
pub opaque_captured_lifetimes: opaque_captured_lifetimes::Storage<'tcx>,
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
pub visibility: visibility::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
pub inhabited_predicate_adt: inhabited_predicate_adt::Storage<'tcx>,
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
pub inhabited_predicate_type: inhabited_predicate_type::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
pub dep_kind: dep_kind::Storage<'tcx>,
#[doc = " Gets the name of the crate."]
pub crate_name: crate_name::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
pub module_children: module_children::Storage<'tcx>,
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
pub num_extern_def_ids: num_extern_def_ids::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
pub lib_features: lib_features::Storage<'tcx>,
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
pub stability_implications: stability_implications::Storage<'tcx>,
#[doc = " Whether the function is an intrinsic"]
pub intrinsic_raw: intrinsic_raw::Storage<'tcx>,
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
pub get_lang_items: get_lang_items::Storage<'tcx>,
#[doc = " Returns all diagnostic items defined in all crates."]
pub all_diagnostic_items: all_diagnostic_items::Storage<'tcx>,
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
pub defined_lang_items: defined_lang_items::Storage<'tcx>,
#[doc = " Returns the diagnostic items defined in a crate."]
pub diagnostic_items: diagnostic_items::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
pub missing_lang_items: missing_lang_items::Storage<'tcx>,
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
pub visible_parent_map: visible_parent_map::Storage<'tcx>,
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
pub trimmed_def_paths: trimmed_def_paths::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
pub missing_extern_crate_item: missing_extern_crate_item::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
pub used_crate_source: used_crate_source::Storage<'tcx>,
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
pub debugger_visualizers: debugger_visualizers::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
pub postorder_cnums: postorder_cnums::Storage<'tcx>,
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
pub is_private_dep: is_private_dep::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
pub allocator_kind: allocator_kind::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
pub alloc_error_handler_kind: alloc_error_handler_kind::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
pub upvars_mentioned: upvars_mentioned::Storage<'tcx>,
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
pub crates: crates::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
pub used_crates: used_crates::Storage<'tcx>,
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
pub duplicate_crate_names: duplicate_crate_names::Storage<'tcx>,
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
pub traits: traits::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
pub trait_impls_in_crate: trait_impls_in_crate::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
pub stable_order_of_exportable_impls: stable_order_of_exportable_impls::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
pub exportable_items: exportable_items::Storage<'tcx>,
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
pub exported_non_generic_symbols: exported_non_generic_symbols::Storage<'tcx>,
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
pub exported_generic_symbols: exported_generic_symbols::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
pub collect_and_partition_mono_items: collect_and_partition_mono_items::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
pub is_codegened_item: is_codegened_item::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
pub codegen_unit: codegen_unit::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
pub backend_optimization_level: backend_optimization_level::Storage<'tcx>,
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
pub output_filenames: output_filenames::Storage<'tcx>,
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_projection: normalize_canonicalized_projection::Storage<'tcx>,
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_free_alias: normalize_canonicalized_free_alias::Storage<'tcx>,
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
pub normalize_canonicalized_inherent_projection: normalize_canonicalized_inherent_projection::Storage<'tcx>,
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
pub try_normalize_generic_arg_after_erasing_regions: try_normalize_generic_arg_after_erasing_regions::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
pub implied_outlives_bounds: implied_outlives_bounds::Storage<'tcx>,
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
pub dropck_outlives: dropck_outlives::Storage<'tcx>,
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
pub evaluate_obligation: evaluate_obligation::Storage<'tcx>,
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
pub type_op_ascribe_user_type: type_op_ascribe_user_type::Storage<'tcx>,
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
pub type_op_prove_predicate: type_op_prove_predicate::Storage<'tcx>,
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_ty: type_op_normalize_ty::Storage<'tcx>,
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_clause: type_op_normalize_clause::Storage<'tcx>,
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_poly_fn_sig: type_op_normalize_poly_fn_sig::Storage<'tcx>,
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
pub type_op_normalize_fn_sig: type_op_normalize_fn_sig::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
pub instantiate_and_check_impossible_predicates: instantiate_and_check_impossible_predicates::Storage<'tcx>,
#[doc =
"[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)` "]
pub is_impossible_associated_item: is_impossible_associated_item::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
pub method_autoderef_steps: method_autoderef_steps::Storage<'tcx>,
#[doc = " Used by `-Znext-solver` to compute proof trees."]
pub evaluate_root_goal_for_proof_tree_raw: evaluate_root_goal_for_proof_tree_raw::Storage<'tcx>,
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
pub rust_target_features: rust_target_features::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
pub implied_target_features: implied_target_features::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
pub features_query: features_query::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
pub crate_for_resolver: crate_for_resolver::Storage<'tcx>,
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
pub resolve_instance_raw: resolve_instance_raw::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
pub reveal_opaque_types_in_bounds: reveal_opaque_types_in_bounds::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
pub limits: limits::Storage<'tcx>,
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
pub diagnostic_hir_wf_check: diagnostic_hir_wf_check::Storage<'tcx>,
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
pub global_backend_features: global_backend_features::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
pub check_validity_requirement: check_validity_requirement::Storage<'tcx>,
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
pub compare_impl_item: compare_impl_item::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
pub deduced_param_attrs: deduced_param_attrs::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
pub doc_link_resolutions: doc_link_resolutions::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
pub doc_link_traits_in_scope: doc_link_traits_in_scope::Storage<'tcx>,
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
pub stripped_cfg_items: stripped_cfg_items::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
pub generics_require_sized_self: generics_require_sized_self::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
pub cross_crate_inlinable: cross_crate_inlinable::Storage<'tcx>,
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
pub check_mono_item: check_mono_item::Storage<'tcx>,
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
pub skip_move_check_fns: skip_move_check_fns::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
pub items_of_instance: items_of_instance::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
pub size_estimate: size_estimate::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
pub anon_const_kind: anon_const_kind::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
pub trivial_const: trivial_const::Storage<'tcx>,
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
pub sanitizer_settings_for: sanitizer_settings_for::Storage<'tcx>,
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
pub check_externally_implementable_items: check_externally_implementable_items::Storage<'tcx>,
#[doc = " Returns a list of all `externally implementable items` crate."]
pub externally_implementable_items: externally_implementable_items::Storage<'tcx>,
}
#[automatically_derived]
impl<'tcx> ::core::default::Default for QueryCaches<'tcx> {
#[inline]
fn default() -> QueryCaches<'tcx> {
QueryCaches {
derive_macro_expansion: ::core::default::Default::default(),
trigger_delayed_bug: ::core::default::Default::default(),
registered_tools: ::core::default::Default::default(),
early_lint_checks: ::core::default::Default::default(),
env_var_os: ::core::default::Default::default(),
resolutions: ::core::default::Default::default(),
resolver_for_lowering_raw: ::core::default::Default::default(),
source_span: ::core::default::Default::default(),
hir_crate: ::core::default::Default::default(),
hir_crate_items: ::core::default::Default::default(),
hir_module_items: ::core::default::Default::default(),
local_def_id_to_hir_id: ::core::default::Default::default(),
hir_owner_parent_q: ::core::default::Default::default(),
opt_hir_owner_nodes: ::core::default::Default::default(),
hir_attr_map: ::core::default::Default::default(),
opt_ast_lowering_delayed_lints: ::core::default::Default::default(),
const_param_default: ::core::default::Default::default(),
const_of_item: ::core::default::Default::default(),
type_of: ::core::default::Default::default(),
type_of_opaque: ::core::default::Default::default(),
type_of_opaque_hir_typeck: ::core::default::Default::default(),
type_alias_is_lazy: ::core::default::Default::default(),
collect_return_position_impl_trait_in_trait_tys: ::core::default::Default::default(),
opaque_ty_origin: ::core::default::Default::default(),
unsizing_params_for_adt: ::core::default::Default::default(),
analysis: ::core::default::Default::default(),
check_expectations: ::core::default::Default::default(),
generics_of: ::core::default::Default::default(),
predicates_of: ::core::default::Default::default(),
opaque_types_defined_by: ::core::default::Default::default(),
nested_bodies_within: ::core::default::Default::default(),
explicit_item_bounds: ::core::default::Default::default(),
explicit_item_self_bounds: ::core::default::Default::default(),
item_bounds: ::core::default::Default::default(),
item_self_bounds: ::core::default::Default::default(),
item_non_self_bounds: ::core::default::Default::default(),
impl_super_outlives: ::core::default::Default::default(),
native_libraries: ::core::default::Default::default(),
shallow_lint_levels_on: ::core::default::Default::default(),
lint_expectations: ::core::default::Default::default(),
lints_that_dont_need_to_run: ::core::default::Default::default(),
expn_that_defined: ::core::default::Default::default(),
is_panic_runtime: ::core::default::Default::default(),
representability: ::core::default::Default::default(),
representability_adt_ty: ::core::default::Default::default(),
params_in_repr: ::core::default::Default::default(),
thir_body: ::core::default::Default::default(),
mir_keys: ::core::default::Default::default(),
mir_const_qualif: ::core::default::Default::default(),
mir_built: ::core::default::Default::default(),
thir_abstract_const: ::core::default::Default::default(),
mir_drops_elaborated_and_const_checked: ::core::default::Default::default(),
mir_for_ctfe: ::core::default::Default::default(),
mir_promoted: ::core::default::Default::default(),
closure_typeinfo: ::core::default::Default::default(),
closure_saved_names_of_captured_variables: ::core::default::Default::default(),
mir_coroutine_witnesses: ::core::default::Default::default(),
check_coroutine_obligations: ::core::default::Default::default(),
check_potentially_region_dependent_goals: ::core::default::Default::default(),
optimized_mir: ::core::default::Default::default(),
coverage_attr_on: ::core::default::Default::default(),
coverage_ids_info: ::core::default::Default::default(),
promoted_mir: ::core::default::Default::default(),
erase_and_anonymize_regions_ty: ::core::default::Default::default(),
wasm_import_module_map: ::core::default::Default::default(),
trait_explicit_predicates_and_bounds: ::core::default::Default::default(),
explicit_predicates_of: ::core::default::Default::default(),
inferred_outlives_of: ::core::default::Default::default(),
explicit_super_predicates_of: ::core::default::Default::default(),
explicit_implied_predicates_of: ::core::default::Default::default(),
explicit_supertraits_containing_assoc_item: ::core::default::Default::default(),
const_conditions: ::core::default::Default::default(),
explicit_implied_const_bounds: ::core::default::Default::default(),
type_param_predicates: ::core::default::Default::default(),
trait_def: ::core::default::Default::default(),
adt_def: ::core::default::Default::default(),
adt_destructor: ::core::default::Default::default(),
adt_async_destructor: ::core::default::Default::default(),
adt_sizedness_constraint: ::core::default::Default::default(),
adt_dtorck_constraint: ::core::default::Default::default(),
constness: ::core::default::Default::default(),
asyncness: ::core::default::Default::default(),
is_promotable_const_fn: ::core::default::Default::default(),
coroutine_by_move_body_def_id: ::core::default::Default::default(),
coroutine_kind: ::core::default::Default::default(),
coroutine_for_closure: ::core::default::Default::default(),
coroutine_hidden_types: ::core::default::Default::default(),
crate_variances: ::core::default::Default::default(),
variances_of: ::core::default::Default::default(),
inferred_outlives_crate: ::core::default::Default::default(),
associated_item_def_ids: ::core::default::Default::default(),
associated_item: ::core::default::Default::default(),
associated_items: ::core::default::Default::default(),
impl_item_implementor_ids: ::core::default::Default::default(),
associated_types_for_impl_traits_in_trait_or_impl: ::core::default::Default::default(),
impl_trait_header: ::core::default::Default::default(),
impl_self_is_guaranteed_unsized: ::core::default::Default::default(),
inherent_impls: ::core::default::Default::default(),
incoherent_impls: ::core::default::Default::default(),
check_transmutes: ::core::default::Default::default(),
check_unsafety: ::core::default::Default::default(),
check_tail_calls: ::core::default::Default::default(),
assumed_wf_types: ::core::default::Default::default(),
assumed_wf_types_for_rpitit: ::core::default::Default::default(),
fn_sig: ::core::default::Default::default(),
lint_mod: ::core::default::Default::default(),
check_unused_traits: ::core::default::Default::default(),
check_mod_attrs: ::core::default::Default::default(),
check_mod_unstable_api_usage: ::core::default::Default::default(),
check_mod_privacy: ::core::default::Default::default(),
check_liveness: ::core::default::Default::default(),
live_symbols_and_ignored_derived_traits: ::core::default::Default::default(),
check_mod_deathness: ::core::default::Default::default(),
check_type_wf: ::core::default::Default::default(),
coerce_unsized_info: ::core::default::Default::default(),
typeck: ::core::default::Default::default(),
used_trait_imports: ::core::default::Default::default(),
coherent_trait: ::core::default::Default::default(),
mir_borrowck: ::core::default::Default::default(),
crate_inherent_impls: ::core::default::Default::default(),
crate_inherent_impls_validity_check: ::core::default::Default::default(),
crate_inherent_impls_overlap_check: ::core::default::Default::default(),
orphan_check_impl: ::core::default::Default::default(),
mir_callgraph_cyclic: ::core::default::Default::default(),
mir_inliner_callees: ::core::default::Default::default(),
tag_for_variant: ::core::default::Default::default(),
eval_to_allocation_raw: ::core::default::Default::default(),
eval_static_initializer: ::core::default::Default::default(),
eval_to_const_value_raw: ::core::default::Default::default(),
eval_to_valtree: ::core::default::Default::default(),
valtree_to_const_val: ::core::default::Default::default(),
lit_to_const: ::core::default::Default::default(),
check_match: ::core::default::Default::default(),
effective_visibilities: ::core::default::Default::default(),
check_private_in_public: ::core::default::Default::default(),
reachable_set: ::core::default::Default::default(),
region_scope_tree: ::core::default::Default::default(),
mir_shims: ::core::default::Default::default(),
symbol_name: ::core::default::Default::default(),
def_kind: ::core::default::Default::default(),
def_span: ::core::default::Default::default(),
def_ident_span: ::core::default::Default::default(),
ty_span: ::core::default::Default::default(),
lookup_stability: ::core::default::Default::default(),
lookup_const_stability: ::core::default::Default::default(),
lookup_default_body_stability: ::core::default::Default::default(),
should_inherit_track_caller: ::core::default::Default::default(),
inherited_align: ::core::default::Default::default(),
lookup_deprecation_entry: ::core::default::Default::default(),
is_doc_hidden: ::core::default::Default::default(),
is_doc_notable_trait: ::core::default::Default::default(),
attrs_for_def: ::core::default::Default::default(),
codegen_fn_attrs: ::core::default::Default::default(),
asm_target_features: ::core::default::Default::default(),
fn_arg_idents: ::core::default::Default::default(),
rendered_const: ::core::default::Default::default(),
rendered_precise_capturing_args: ::core::default::Default::default(),
impl_parent: ::core::default::Default::default(),
is_mir_available: ::core::default::Default::default(),
own_existential_vtable_entries: ::core::default::Default::default(),
vtable_entries: ::core::default::Default::default(),
first_method_vtable_slot: ::core::default::Default::default(),
supertrait_vtable_slot: ::core::default::Default::default(),
vtable_allocation: ::core::default::Default::default(),
codegen_select_candidate: ::core::default::Default::default(),
all_local_trait_impls: ::core::default::Default::default(),
local_trait_impls: ::core::default::Default::default(),
trait_impls_of: ::core::default::Default::default(),
specialization_graph_of: ::core::default::Default::default(),
dyn_compatibility_violations: ::core::default::Default::default(),
is_dyn_compatible: ::core::default::Default::default(),
param_env: ::core::default::Default::default(),
typing_env_normalized_for_post_analysis: ::core::default::Default::default(),
is_copy_raw: ::core::default::Default::default(),
is_use_cloned_raw: ::core::default::Default::default(),
is_sized_raw: ::core::default::Default::default(),
is_freeze_raw: ::core::default::Default::default(),
is_unpin_raw: ::core::default::Default::default(),
is_async_drop_raw: ::core::default::Default::default(),
needs_drop_raw: ::core::default::Default::default(),
needs_async_drop_raw: ::core::default::Default::default(),
has_significant_drop_raw: ::core::default::Default::default(),
has_structural_eq_impl: ::core::default::Default::default(),
adt_drop_tys: ::core::default::Default::default(),
adt_async_drop_tys: ::core::default::Default::default(),
adt_significant_drop_tys: ::core::default::Default::default(),
list_significant_drop_tys: ::core::default::Default::default(),
layout_of: ::core::default::Default::default(),
fn_abi_of_fn_ptr: ::core::default::Default::default(),
fn_abi_of_instance: ::core::default::Default::default(),
dylib_dependency_formats: ::core::default::Default::default(),
dependency_formats: ::core::default::Default::default(),
is_compiler_builtins: ::core::default::Default::default(),
has_global_allocator: ::core::default::Default::default(),
has_alloc_error_handler: ::core::default::Default::default(),
has_panic_handler: ::core::default::Default::default(),
is_profiler_runtime: ::core::default::Default::default(),
has_ffi_unwind_calls: ::core::default::Default::default(),
required_panic_strategy: ::core::default::Default::default(),
panic_in_drop_strategy: ::core::default::Default::default(),
is_no_builtins: ::core::default::Default::default(),
symbol_mangling_version: ::core::default::Default::default(),
extern_crate: ::core::default::Default::default(),
specialization_enabled_in: ::core::default::Default::default(),
specializes: ::core::default::Default::default(),
in_scope_traits_map: ::core::default::Default::default(),
defaultness: ::core::default::Default::default(),
default_field: ::core::default::Default::default(),
check_well_formed: ::core::default::Default::default(),
enforce_impl_non_lifetime_params_are_constrained: ::core::default::Default::default(),
reachable_non_generics: ::core::default::Default::default(),
is_reachable_non_generic: ::core::default::Default::default(),
is_unreachable_local_definition: ::core::default::Default::default(),
upstream_monomorphizations: ::core::default::Default::default(),
upstream_monomorphizations_for: ::core::default::Default::default(),
upstream_drop_glue_for: ::core::default::Default::default(),
upstream_async_drop_glue_for: ::core::default::Default::default(),
foreign_modules: ::core::default::Default::default(),
clashing_extern_declarations: ::core::default::Default::default(),
entry_fn: ::core::default::Default::default(),
proc_macro_decls_static: ::core::default::Default::default(),
crate_hash: ::core::default::Default::default(),
crate_host_hash: ::core::default::Default::default(),
extra_filename: ::core::default::Default::default(),
crate_extern_paths: ::core::default::Default::default(),
implementations_of_trait: ::core::default::Default::default(),
crate_incoherent_impls: ::core::default::Default::default(),
native_library: ::core::default::Default::default(),
inherit_sig_for_delegation_item: ::core::default::Default::default(),
resolve_bound_vars: ::core::default::Default::default(),
named_variable_map: ::core::default::Default::default(),
is_late_bound_map: ::core::default::Default::default(),
object_lifetime_default: ::core::default::Default::default(),
late_bound_vars_map: ::core::default::Default::default(),
opaque_captured_lifetimes: ::core::default::Default::default(),
visibility: ::core::default::Default::default(),
inhabited_predicate_adt: ::core::default::Default::default(),
inhabited_predicate_type: ::core::default::Default::default(),
dep_kind: ::core::default::Default::default(),
crate_name: ::core::default::Default::default(),
module_children: ::core::default::Default::default(),
num_extern_def_ids: ::core::default::Default::default(),
lib_features: ::core::default::Default::default(),
stability_implications: ::core::default::Default::default(),
intrinsic_raw: ::core::default::Default::default(),
get_lang_items: ::core::default::Default::default(),
all_diagnostic_items: ::core::default::Default::default(),
defined_lang_items: ::core::default::Default::default(),
diagnostic_items: ::core::default::Default::default(),
missing_lang_items: ::core::default::Default::default(),
visible_parent_map: ::core::default::Default::default(),
trimmed_def_paths: ::core::default::Default::default(),
missing_extern_crate_item: ::core::default::Default::default(),
used_crate_source: ::core::default::Default::default(),
debugger_visualizers: ::core::default::Default::default(),
postorder_cnums: ::core::default::Default::default(),
is_private_dep: ::core::default::Default::default(),
allocator_kind: ::core::default::Default::default(),
alloc_error_handler_kind: ::core::default::Default::default(),
upvars_mentioned: ::core::default::Default::default(),
crates: ::core::default::Default::default(),
used_crates: ::core::default::Default::default(),
duplicate_crate_names: ::core::default::Default::default(),
traits: ::core::default::Default::default(),
trait_impls_in_crate: ::core::default::Default::default(),
stable_order_of_exportable_impls: ::core::default::Default::default(),
exportable_items: ::core::default::Default::default(),
exported_non_generic_symbols: ::core::default::Default::default(),
exported_generic_symbols: ::core::default::Default::default(),
collect_and_partition_mono_items: ::core::default::Default::default(),
is_codegened_item: ::core::default::Default::default(),
codegen_unit: ::core::default::Default::default(),
backend_optimization_level: ::core::default::Default::default(),
output_filenames: ::core::default::Default::default(),
normalize_canonicalized_projection: ::core::default::Default::default(),
normalize_canonicalized_free_alias: ::core::default::Default::default(),
normalize_canonicalized_inherent_projection: ::core::default::Default::default(),
try_normalize_generic_arg_after_erasing_regions: ::core::default::Default::default(),
implied_outlives_bounds: ::core::default::Default::default(),
dropck_outlives: ::core::default::Default::default(),
evaluate_obligation: ::core::default::Default::default(),
type_op_ascribe_user_type: ::core::default::Default::default(),
type_op_prove_predicate: ::core::default::Default::default(),
type_op_normalize_ty: ::core::default::Default::default(),
type_op_normalize_clause: ::core::default::Default::default(),
type_op_normalize_poly_fn_sig: ::core::default::Default::default(),
type_op_normalize_fn_sig: ::core::default::Default::default(),
instantiate_and_check_impossible_predicates: ::core::default::Default::default(),
is_impossible_associated_item: ::core::default::Default::default(),
method_autoderef_steps: ::core::default::Default::default(),
evaluate_root_goal_for_proof_tree_raw: ::core::default::Default::default(),
rust_target_features: ::core::default::Default::default(),
implied_target_features: ::core::default::Default::default(),
features_query: ::core::default::Default::default(),
crate_for_resolver: ::core::default::Default::default(),
resolve_instance_raw: ::core::default::Default::default(),
reveal_opaque_types_in_bounds: ::core::default::Default::default(),
limits: ::core::default::Default::default(),
diagnostic_hir_wf_check: ::core::default::Default::default(),
global_backend_features: ::core::default::Default::default(),
check_validity_requirement: ::core::default::Default::default(),
compare_impl_item: ::core::default::Default::default(),
deduced_param_attrs: ::core::default::Default::default(),
doc_link_resolutions: ::core::default::Default::default(),
doc_link_traits_in_scope: ::core::default::Default::default(),
stripped_cfg_items: ::core::default::Default::default(),
generics_require_sized_self: ::core::default::Default::default(),
cross_crate_inlinable: ::core::default::Default::default(),
check_mono_item: ::core::default::Default::default(),
skip_move_check_fns: ::core::default::Default::default(),
items_of_instance: ::core::default::Default::default(),
size_estimate: ::core::default::Default::default(),
anon_const_kind: ::core::default::Default::default(),
trivial_const: ::core::default::Default::default(),
sanitizer_settings_for: ::core::default::Default::default(),
check_externally_implementable_items: ::core::default::Default::default(),
externally_implementable_items: ::core::default::Default::default(),
}
}
}
impl<'tcx> crate::query::TyCtxtEnsureOk<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
#[inline(always)]
pub fn derive_macro_expansion(self, key: (LocalExpnId, &'tcx TokenStream))
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.derive_macro_expansion,
&self.tcx.query_system.caches.derive_macro_expansion,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
#[inline(always)]
pub fn trigger_delayed_bug(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trigger_delayed_bug,
&self.tcx.query_system.caches.trigger_delayed_bug,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
#[inline(always)]
pub fn registered_tools(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.registered_tools,
&self.tcx.query_system.caches.registered_tools,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
#[inline(always)]
pub fn early_lint_checks(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.early_lint_checks,
&self.tcx.query_system.caches.early_lint_checks,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
#[inline(always)]
pub fn env_var_os(self, key: &'tcx OsStr) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.env_var_os,
&self.tcx.query_system.caches.env_var_os,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
#[inline(always)]
pub fn resolutions(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolutions,
&self.tcx.query_system.caches.resolutions,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
#[inline(always)]
pub fn resolver_for_lowering_raw(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolver_for_lowering_raw,
&self.tcx.query_system.caches.resolver_for_lowering_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
#[inline(always)]
pub fn source_span(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.source_span,
&self.tcx.query_system.caches.source_span,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
#[inline(always)]
pub fn hir_crate(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_crate,
&self.tcx.query_system.caches.hir_crate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " All items in the crate."]
#[inline(always)]
pub fn hir_crate_items(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_crate_items,
&self.tcx.query_system.caches.hir_crate_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_module_items(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_module_items,
&self.tcx.query_system.caches.hir_module_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns HIR ID for the given `LocalDefId`."]
#[inline(always)]
pub fn local_def_id_to_hir_id(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.local_def_id_to_hir_id,
&self.tcx.query_system.caches.local_def_id_to_hir_id,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_owner_parent_q(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_owner_parent_q,
&self.tcx.query_system.caches.hir_owner_parent_q,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_hir_owner_nodes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opt_hir_owner_nodes,
&self.tcx.query_system.caches.opt_hir_owner_nodes,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_attr_map(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_attr_map,
&self.tcx.query_system.caches.hir_attr_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_ast_lowering_delayed_lints(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opt_ast_lowering_delayed_lints,
&self.tcx.query_system.caches.opt_ast_lowering_delayed_lints,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
#[inline(always)]
pub fn const_param_default(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_param_default,
&self.tcx.query_system.caches.const_param_default,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
#[inline(always)]
pub fn const_of_item(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_of_item,
&self.tcx.query_system.caches.const_of_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of,
&self.tcx.query_system.caches.type_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
#[inline(always)]
pub fn type_of_opaque(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque,
&self.tcx.query_system.caches.type_of_opaque,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
#[inline(always)]
pub fn type_of_opaque_hir_typeck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque_hir_typeck,
&self.tcx.query_system.caches.type_of_opaque_hir_typeck,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_alias_is_lazy(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_alias_is_lazy,
&self.tcx.query_system.caches.type_alias_is_lazy,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
#[inline(always)]
pub fn collect_return_position_impl_trait_in_trait_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.collect_return_position_impl_trait_in_trait_tys,
&self.tcx.query_system.caches.collect_return_position_impl_trait_in_trait_tys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
#[inline(always)]
pub fn opaque_ty_origin(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_ty_origin,
&self.tcx.query_system.caches.opaque_ty_origin,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
#[inline(always)]
pub fn unsizing_params_for_adt(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.unsizing_params_for_adt,
&self.tcx.query_system.caches.unsizing_params_for_adt,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
#[inline(always)]
pub fn analysis(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.analysis,
&self.tcx.query_system.caches.analysis,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
#[inline(always)]
pub fn check_expectations(self, key: Option<Symbol>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_expectations,
&self.tcx.query_system.caches.check_expectations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the *generics* of the definition given by `DefId`."]
#[inline(always)]
pub fn generics_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.generics_of,
&self.tcx.query_system.caches.generics_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn predicates_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.predicates_of,
&self.tcx.query_system.caches.predicates_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn opaque_types_defined_by(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_types_defined_by,
&self.tcx.query_system.caches.opaque_types_defined_by,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
#[inline(always)]
pub fn nested_bodies_within(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.nested_bodies_within,
&self.tcx.query_system.caches.nested_bodies_within,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
#[inline(always)]
pub fn explicit_item_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_bounds,
&self.tcx.query_system.caches.explicit_item_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
#[inline(always)]
pub fn explicit_item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_self_bounds,
&self.tcx.query_system.caches.explicit_item_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
#[inline(always)]
pub fn item_bounds(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_bounds,
&self.tcx.query_system.caches.item_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_self_bounds,
&self.tcx.query_system.caches.item_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_non_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_non_self_bounds,
&self.tcx.query_system.caches.item_non_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn impl_super_outlives(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_super_outlives,
&self.tcx.query_system.caches.impl_super_outlives,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
#[inline(always)]
pub fn native_libraries(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.native_libraries,
&self.tcx.query_system.caches.native_libraries,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn shallow_lint_levels_on(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.shallow_lint_levels_on,
&self.tcx.query_system.caches.shallow_lint_levels_on,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
#[inline(always)]
pub fn lint_expectations(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lint_expectations,
&self.tcx.query_system.caches.lint_expectations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
#[inline(always)]
pub fn lints_that_dont_need_to_run(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lints_that_dont_need_to_run,
&self.tcx.query_system.caches.lints_that_dont_need_to_run,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn expn_that_defined(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.expn_that_defined,
&self.tcx.query_system.caches.expn_that_defined,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
#[inline(always)]
pub fn is_panic_runtime(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_panic_runtime,
&self.tcx.query_system.caches.is_panic_runtime,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Checks whether a type is representable or infinitely sized"]
#[inline(always)]
pub fn representability(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.representability,
&self.tcx.query_system.caches.representability,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " An implementation detail for the `representability` query"]
#[inline(always)]
pub fn representability_adt_ty(self, key: Ty<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.representability_adt_ty,
&self.tcx.query_system.caches.representability_adt_ty,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
#[inline(always)]
pub fn params_in_repr(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.params_in_repr,
&self.tcx.query_system.caches.params_in_repr,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
#[inline(always)]
pub fn thir_body(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.thir_body,
&self.tcx.query_system.caches.thir_body,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
#[inline(always)]
pub fn mir_keys(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_keys,
&self.tcx.query_system.caches.mir_keys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
#[inline(always)]
pub fn mir_const_qualif(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_const_qualif,
&self.tcx.query_system.caches.mir_const_qualif,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
#[inline(always)]
pub fn mir_built(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_built,
&self.tcx.query_system.caches.mir_built,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Try to build an abstract representation of the given constant."]
#[inline(always)]
pub fn thir_abstract_const(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.thir_abstract_const,
&self.tcx.query_system.caches.thir_abstract_const,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_drops_elaborated_and_const_checked(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_drops_elaborated_and_const_checked,
&self.tcx.query_system.caches.mir_drops_elaborated_and_const_checked,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
#[inline(always)]
pub fn mir_for_ctfe(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_for_ctfe,
&self.tcx.query_system.caches.mir_for_ctfe,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_promoted(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_promoted,
&self.tcx.query_system.caches.mir_promoted,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn closure_typeinfo(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.closure_typeinfo,
&self.tcx.query_system.caches.closure_typeinfo,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
#[inline(always)]
pub fn closure_saved_names_of_captured_variables(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.closure_saved_names_of_captured_variables,
&self.tcx.query_system.caches.closure_saved_names_of_captured_variables,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_coroutine_witnesses(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_coroutine_witnesses,
&self.tcx.query_system.caches.mir_coroutine_witnesses,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_coroutine_obligations(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.check_coroutine_obligations,
&self.tcx.query_system.caches.check_coroutine_obligations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
#[inline(always)]
pub fn check_potentially_region_dependent_goals(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_potentially_region_dependent_goals,
&self.tcx.query_system.caches.check_potentially_region_dependent_goals,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
#[inline(always)]
pub fn optimized_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.optimized_mir,
&self.tcx.query_system.caches.optimized_mir,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
#[inline(always)]
pub fn coverage_attr_on(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coverage_attr_on,
&self.tcx.query_system.caches.coverage_attr_on,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
#[inline(always)]
pub fn coverage_ids_info(self, key: ty::InstanceKind<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coverage_ids_info,
&self.tcx.query_system.caches.coverage_ids_info,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
#[inline(always)]
pub fn promoted_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.promoted_mir,
&self.tcx.query_system.caches.promoted_mir,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
#[inline(always)]
pub fn erase_and_anonymize_regions_ty(self, key: Ty<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.erase_and_anonymize_regions_ty,
&self.tcx.query_system.caches.erase_and_anonymize_regions_ty,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
#[inline(always)]
pub fn wasm_import_module_map(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.wasm_import_module_map,
&self.tcx.query_system.caches.wasm_import_module_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
#[inline(always)]
pub fn trait_explicit_predicates_and_bounds(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_explicit_predicates_and_bounds,
&self.tcx.query_system.caches.trait_explicit_predicates_and_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
#[inline(always)]
pub fn explicit_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_predicates_of,
&self.tcx.query_system.caches.explicit_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn inferred_outlives_of(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_of,
&self.tcx.query_system.caches.inferred_outlives_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
#[inline(always)]
pub fn explicit_super_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_super_predicates_of,
&self.tcx.query_system.caches.explicit_super_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
#[inline(always)]
pub fn explicit_implied_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_predicates_of,
&self.tcx.query_system.caches.explicit_implied_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
#[inline(always)]
pub fn explicit_supertraits_containing_assoc_item(self,
key: (DefId, rustc_span::Ident)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_supertraits_containing_assoc_item,
&self.tcx.query_system.caches.explicit_supertraits_containing_assoc_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
#[inline(always)]
pub fn const_conditions(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_conditions,
&self.tcx.query_system.caches.const_conditions,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
#[inline(always)]
pub fn explicit_implied_const_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_const_bounds,
&self.tcx.query_system.caches.explicit_implied_const_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
#[inline(always)]
pub fn type_param_predicates(self,
key: (LocalDefId, LocalDefId, rustc_span::Ident)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_param_predicates,
&self.tcx.query_system.caches.type_param_predicates,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn trait_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_def,
&self.tcx.query_system.caches.trait_def,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_def,
&self.tcx.query_system.caches.adt_def,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_destructor(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_destructor,
&self.tcx.query_system.caches.adt_destructor,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_async_destructor(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_async_destructor,
&self.tcx.query_system.caches.adt_async_destructor,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn adt_sizedness_constraint(self, key: (DefId, SizedTraitKind))
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_sizedness_constraint,
&self.tcx.query_system.caches.adt_sizedness_constraint,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_dtorck_constraint(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_dtorck_constraint,
&self.tcx.query_system.caches.adt_dtorck_constraint,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
#[inline(always)]
pub fn constness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.constness,
&self.tcx.query_system.caches.constness,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn asyncness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.asyncness,
&self.tcx.query_system.caches.asyncness,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
#[inline(always)]
pub fn is_promotable_const_fn(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_promotable_const_fn,
&self.tcx.query_system.caches.is_promotable_const_fn,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
#[inline(always)]
pub fn coroutine_by_move_body_def_id(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_by_move_body_def_id,
&self.tcx.query_system.caches.coroutine_by_move_body_def_id,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
#[inline(always)]
pub fn coroutine_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_kind,
&self.tcx.query_system.caches.coroutine_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
#[inline(always)]
pub fn coroutine_for_closure(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_for_closure,
&self.tcx.query_system.caches.coroutine_for_closure,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
#[inline(always)]
pub fn coroutine_hidden_types(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_hidden_types,
&self.tcx.query_system.caches.coroutine_hidden_types,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_variances(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_variances,
&self.tcx.query_system.caches.crate_variances,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn variances_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.variances_of,
&self.tcx.query_system.caches.variances_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn inferred_outlives_crate(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_crate,
&self.tcx.query_system.caches.inferred_outlives_crate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
#[inline(always)]
pub fn associated_item_def_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_item_def_ids,
&self.tcx.query_system.caches.associated_item_def_ids,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
#[inline(always)]
pub fn associated_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_item,
&self.tcx.query_system.caches.associated_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Collects the associated items defined on a trait or impl."]
#[inline(always)]
pub fn associated_items(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_items,
&self.tcx.query_system.caches.associated_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
#[inline(always)]
pub fn impl_item_implementor_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_item_implementor_ids,
&self.tcx.query_system.caches.impl_item_implementor_ids,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
#[inline(always)]
pub fn associated_types_for_impl_traits_in_trait_or_impl(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_types_for_impl_traits_in_trait_or_impl,
&self.tcx.query_system.caches.associated_types_for_impl_traits_in_trait_or_impl,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
#[inline(always)]
pub fn impl_trait_header(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_trait_header,
&self.tcx.query_system.caches.impl_trait_header,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
#[inline(always)]
pub fn impl_self_is_guaranteed_unsized(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_self_is_guaranteed_unsized,
&self.tcx.query_system.caches.impl_self_is_guaranteed_unsized,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
#[inline(always)]
pub fn inherent_impls(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherent_impls,
&self.tcx.query_system.caches.inherent_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
#[inline(always)]
pub fn incoherent_impls(self, key: SimplifiedType) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.incoherent_impls,
&self.tcx.query_system.caches.incoherent_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_transmutes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_transmutes,
&self.tcx.query_system.caches.check_transmutes,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_unsafety(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_unsafety,
&self.tcx.query_system.caches.check_unsafety,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
#[inline(always)]
pub fn check_tail_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.check_tail_calls,
&self.tcx.query_system.caches.check_tail_calls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
#[inline(always)]
pub fn assumed_wf_types(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types,
&self.tcx.query_system.caches.assumed_wf_types,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
#[inline(always)]
pub fn assumed_wf_types_for_rpitit(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types_for_rpitit,
&self.tcx.query_system.caches.assumed_wf_types_for_rpitit,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Computes the signature of the function."]
#[inline(always)]
pub fn fn_sig(self, key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_sig,
&self.tcx.query_system.caches.fn_sig,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Performs lint checking for the module."]
#[inline(always)]
pub fn lint_mod(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lint_mod,
&self.tcx.query_system.caches.lint_mod,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
#[inline(always)]
pub fn check_unused_traits(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_unused_traits,
&self.tcx.query_system.caches.check_unused_traits,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Checks the attributes in the module."]
#[inline(always)]
pub fn check_mod_attrs(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_attrs,
&self.tcx.query_system.caches.check_mod_attrs,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Checks for uses of unstable APIs in the module."]
#[inline(always)]
pub fn check_mod_unstable_api_usage(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_unstable_api_usage,
&self.tcx.query_system.caches.check_mod_unstable_api_usage,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
#[inline(always)]
pub fn check_mod_privacy(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_privacy,
&self.tcx.query_system.caches.check_mod_privacy,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn check_liveness(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_liveness,
&self.tcx.query_system.caches.check_liveness,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
#[inline(always)]
pub fn live_symbols_and_ignored_derived_traits(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.live_symbols_and_ignored_derived_traits,
&self.tcx.query_system.caches.live_symbols_and_ignored_derived_traits,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
#[inline(always)]
pub fn check_mod_deathness(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_deathness,
&self.tcx.query_system.caches.check_mod_deathness,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
#[inline(always)]
pub fn check_type_wf(self, key: ()) -> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.check_type_wf,
&self.tcx.query_system.caches.check_type_wf,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
#[inline(always)]
pub fn coerce_unsized_info(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.coerce_unsized_info,
&self.tcx.query_system.caches.coerce_unsized_info,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn typeck(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.typeck,
&self.tcx.query_system.caches.typeck,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn used_trait_imports(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_trait_imports,
&self.tcx.query_system.caches.used_trait_imports,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn coherent_trait(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.coherent_trait,
&self.tcx.query_system.caches.coherent_trait,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
#[inline(always)]
pub fn mir_borrowck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_borrowck,
&self.tcx.query_system.caches.mir_borrowck,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls,
&self.tcx.query_system.caches.crate_inherent_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_validity_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_validity_check,
&self.tcx.query_system.caches.crate_inherent_impls_validity_check,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_overlap_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_overlap_check,
&self.tcx.query_system.caches.crate_inherent_impls_overlap_check,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
#[inline(always)]
pub fn orphan_check_impl(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.orphan_check_impl,
&self.tcx.query_system.caches.orphan_check_impl,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
#[inline(always)]
pub fn mir_callgraph_cyclic(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_callgraph_cyclic,
&self.tcx.query_system.caches.mir_callgraph_cyclic,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Obtain all the calls into other local functions"]
#[inline(always)]
pub fn mir_inliner_callees(self, key: ty::InstanceKind<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_inliner_callees,
&self.tcx.query_system.caches.mir_inliner_callees,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
#[inline(always)]
pub fn tag_for_variant(self,
key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.tag_for_variant,
&self.tcx.query_system.caches.tag_for_variant,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn eval_to_allocation_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_allocation_raw,
&self.tcx.query_system.caches.eval_to_allocation_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
#[inline(always)]
pub fn eval_static_initializer(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_static_initializer,
&self.tcx.query_system.caches.eval_static_initializer,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
#[inline(always)]
pub fn eval_to_const_value_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_const_value_raw,
&self.tcx.query_system.caches.eval_to_const_value_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
#[inline(always)]
pub fn eval_to_valtree(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_valtree,
&self.tcx.query_system.caches.eval_to_valtree,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Converts a type-level constant value into a MIR constant value."]
#[inline(always)]
pub fn valtree_to_const_val(self, key: ty::Value<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.valtree_to_const_val,
&self.tcx.query_system.caches.valtree_to_const_val,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
#[inline(always)]
pub fn lit_to_const(self, key: LitToConstInput<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lit_to_const,
&self.tcx.query_system.caches.lit_to_const,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_match(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.check_match,
&self.tcx.query_system.caches.check_match,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
#[inline(always)]
pub fn effective_visibilities(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.effective_visibilities,
&self.tcx.query_system.caches.effective_visibilities,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
#[inline(always)]
pub fn check_private_in_public(self, key: LocalModDefId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_private_in_public,
&self.tcx.query_system.caches.check_private_in_public,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
#[inline(always)]
pub fn reachable_set(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reachable_set,
&self.tcx.query_system.caches.reachable_set,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
#[inline(always)]
pub fn region_scope_tree(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.region_scope_tree,
&self.tcx.query_system.caches.region_scope_tree,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Generates a MIR body for the shim."]
#[inline(always)]
pub fn mir_shims(self, key: ty::InstanceKind<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_shims,
&self.tcx.query_system.caches.mir_shims,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
#[inline(always)]
pub fn symbol_name(self, key: ty::Instance<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.symbol_name,
&self.tcx.query_system.caches.symbol_name,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn def_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_kind,
&self.tcx.query_system.caches.def_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the span for the definition."]
#[inline(always)]
pub fn def_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_span,
&self.tcx.query_system.caches.def_span,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the span for the identifier of the definition."]
#[inline(always)]
pub fn def_ident_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_ident_span,
&self.tcx.query_system.caches.def_ident_span,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
#[inline(always)]
pub fn ty_span(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.ty_span,
&self.tcx.query_system.caches.ty_span,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_stability,
&self.tcx.query_system.caches.lookup_stability,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_const_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_const_stability,
&self.tcx.query_system.caches.lookup_const_stability,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_default_body_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_default_body_stability,
&self.tcx.query_system.caches.lookup_default_body_stability,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn should_inherit_track_caller(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.should_inherit_track_caller,
&self.tcx.query_system.caches.should_inherit_track_caller,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn inherited_align(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherited_align,
&self.tcx.query_system.caches.inherited_align,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
#[inline(always)]
pub fn lookup_deprecation_entry(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_deprecation_entry,
&self.tcx.query_system.caches.lookup_deprecation_entry,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
#[inline(always)]
pub fn is_doc_hidden(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_doc_hidden,
&self.tcx.query_system.caches.is_doc_hidden,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
#[inline(always)]
pub fn is_doc_notable_trait(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_doc_notable_trait,
&self.tcx.query_system.caches.is_doc_notable_trait,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
#[inline(always)]
pub fn attrs_for_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.attrs_for_def,
&self.tcx.query_system.caches.attrs_for_def,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
#[inline(always)]
pub fn codegen_fn_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_fn_attrs,
&self.tcx.query_system.caches.codegen_fn_attrs,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn asm_target_features(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.asm_target_features,
&self.tcx.query_system.caches.asm_target_features,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn fn_arg_idents(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_arg_idents,
&self.tcx.query_system.caches.fn_arg_idents,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
#[inline(always)]
pub fn rendered_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rendered_const,
&self.tcx.query_system.caches.rendered_const,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
#[inline(always)]
pub fn rendered_precise_capturing_args(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rendered_precise_capturing_args,
&self.tcx.query_system.caches.rendered_precise_capturing_args,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn impl_parent(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_parent,
&self.tcx.query_system.caches.impl_parent,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn is_mir_available(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_mir_available,
&self.tcx.query_system.caches.is_mir_available,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn own_existential_vtable_entries(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.own_existential_vtable_entries,
&self.tcx.query_system.caches.own_existential_vtable_entries,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
#[inline(always)]
pub fn vtable_entries(self, key: ty::TraitRef<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.vtable_entries,
&self.tcx.query_system.caches.vtable_entries,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[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()` "]
#[inline(always)]
pub fn first_method_vtable_slot(self, key: ty::TraitRef<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.first_method_vtable_slot,
&self.tcx.query_system.caches.first_method_vtable_slot,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[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"]
#[inline(always)]
pub fn supertrait_vtable_slot(self, key: (Ty<'tcx>, Ty<'tcx>)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.supertrait_vtable_slot,
&self.tcx.query_system.caches.supertrait_vtable_slot,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
#[inline(always)]
pub fn vtable_allocation(self,
key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.vtable_allocation,
&self.tcx.query_system.caches.vtable_allocation,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
#[inline(always)]
pub fn codegen_select_candidate(self,
key: PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_select_candidate,
&self.tcx.query_system.caches.codegen_select_candidate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Return all `impl` blocks in the current crate."]
#[inline(always)]
pub fn all_local_trait_impls(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.all_local_trait_impls,
&self.tcx.query_system.caches.all_local_trait_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
#[inline(always)]
pub fn local_trait_impls(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.local_trait_impls,
&self.tcx.query_system.caches.local_trait_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
#[inline(always)]
pub fn trait_impls_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_of,
&self.tcx.query_system.caches.trait_impls_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn specialization_graph_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.specialization_graph_of,
&self.tcx.query_system.caches.specialization_graph_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn dyn_compatibility_violations(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dyn_compatibility_violations,
&self.tcx.query_system.caches.dyn_compatibility_violations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
#[inline(always)]
pub fn is_dyn_compatible(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_dyn_compatible,
&self.tcx.query_system.caches.is_dyn_compatible,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
#[inline(always)]
pub fn param_env(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.param_env,
&self.tcx.query_system.caches.param_env,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
#[inline(always)]
pub fn typing_env_normalized_for_post_analysis(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.typing_env_normalized_for_post_analysis,
&self.tcx.query_system.caches.typing_env_normalized_for_post_analysis,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_copy_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_copy_raw,
&self.tcx.query_system.caches.is_copy_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_use_cloned_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_use_cloned_raw,
&self.tcx.query_system.caches.is_use_cloned_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::is_sized`."]
#[inline(always)]
pub fn is_sized_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_sized_raw,
&self.tcx.query_system.caches.is_sized_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::is_freeze`."]
#[inline(always)]
pub fn is_freeze_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_freeze_raw,
&self.tcx.query_system.caches.is_freeze_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::is_unpin`."]
#[inline(always)]
pub fn is_unpin_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_unpin_raw,
&self.tcx.query_system.caches.is_unpin_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::is_async_drop`."]
#[inline(always)]
pub fn is_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_async_drop_raw,
&self.tcx.query_system.caches.is_async_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::needs_drop`."]
#[inline(always)]
pub fn needs_drop_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.needs_drop_raw,
&self.tcx.query_system.caches.needs_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::needs_async_drop`."]
#[inline(always)]
pub fn needs_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.needs_async_drop_raw,
&self.tcx.query_system.caches.needs_async_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
#[inline(always)]
pub fn has_significant_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_significant_drop_raw,
&self.tcx.query_system.caches.has_significant_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
#[inline(always)]
pub fn has_structural_eq_impl(self, key: Ty<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_structural_eq_impl,
&self.tcx.query_system.caches.has_structural_eq_impl,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_drop_tys(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_drop_tys,
&self.tcx.query_system.caches.adt_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_async_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_async_drop_tys,
&self.tcx.query_system.caches.adt_async_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_significant_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_significant_drop_tys,
&self.tcx.query_system.caches.adt_significant_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
#[inline(always)]
pub fn list_significant_drop_tys(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.list_significant_drop_tys,
&self.tcx.query_system.caches.list_significant_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
#[inline(always)]
pub fn layout_of(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.layout_of,
&self.tcx.query_system.caches.layout_of,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
#[inline(always)]
pub fn fn_abi_of_fn_ptr(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_fn_ptr,
&self.tcx.query_system.caches.fn_abi_of_fn_ptr,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
#[inline(always)]
pub fn fn_abi_of_instance(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_instance,
&self.tcx.query_system.caches.fn_abi_of_instance,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
#[inline(always)]
pub fn dylib_dependency_formats(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dylib_dependency_formats,
&self.tcx.query_system.caches.dylib_dependency_formats,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
#[inline(always)]
pub fn dependency_formats(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dependency_formats,
&self.tcx.query_system.caches.dependency_formats,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
#[inline(always)]
pub fn is_compiler_builtins(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_compiler_builtins,
&self.tcx.query_system.caches.is_compiler_builtins,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
#[inline(always)]
pub fn has_global_allocator(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_global_allocator,
&self.tcx.query_system.caches.has_global_allocator,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
#[inline(always)]
pub fn has_alloc_error_handler(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_alloc_error_handler,
&self.tcx.query_system.caches.has_alloc_error_handler,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
#[inline(always)]
pub fn has_panic_handler(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_panic_handler,
&self.tcx.query_system.caches.has_panic_handler,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
#[inline(always)]
pub fn is_profiler_runtime(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_profiler_runtime,
&self.tcx.query_system.caches.is_profiler_runtime,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
#[inline(always)]
pub fn has_ffi_unwind_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_ffi_unwind_calls,
&self.tcx.query_system.caches.has_ffi_unwind_calls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
#[inline(always)]
pub fn required_panic_strategy(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.required_panic_strategy,
&self.tcx.query_system.caches.required_panic_strategy,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
#[inline(always)]
pub fn panic_in_drop_strategy(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.panic_in_drop_strategy,
&self.tcx.query_system.caches.panic_in_drop_strategy,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
#[inline(always)]
pub fn is_no_builtins(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_no_builtins,
&self.tcx.query_system.caches.is_no_builtins,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
#[inline(always)]
pub fn symbol_mangling_version(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.symbol_mangling_version,
&self.tcx.query_system.caches.symbol_mangling_version,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
#[inline(always)]
pub fn extern_crate(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.extern_crate,
&self.tcx.query_system.caches.extern_crate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
#[inline(always)]
pub fn specialization_enabled_in(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.specialization_enabled_in,
&self.tcx.query_system.caches.specialization_enabled_in,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
#[inline(always)]
pub fn specializes(self, key: (DefId, DefId)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.specializes,
&self.tcx.query_system.caches.specializes,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
#[inline(always)]
pub fn in_scope_traits_map(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.in_scope_traits_map,
&self.tcx.query_system.caches.in_scope_traits_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
#[inline(always)]
pub fn defaultness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.defaultness,
&self.tcx.query_system.caches.defaultness,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
#[inline(always)]
pub fn default_field(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.default_field,
&self.tcx.query_system.caches.default_field,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
#[inline(always)]
pub fn check_well_formed(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.check_well_formed,
&self.tcx.query_system.caches.check_well_formed,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
#[inline(always)]
pub fn enforce_impl_non_lifetime_params_are_constrained(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.enforce_impl_non_lifetime_params_are_constrained,
&self.tcx.query_system.caches.enforce_impl_non_lifetime_params_are_constrained,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
#[inline(always)]
pub fn reachable_non_generics(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reachable_non_generics,
&self.tcx.query_system.caches.reachable_non_generics,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
#[inline(always)]
pub fn is_reachable_non_generic(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_reachable_non_generic,
&self.tcx.query_system.caches.is_reachable_non_generic,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
#[inline(always)]
pub fn is_unreachable_local_definition(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_unreachable_local_definition,
&self.tcx.query_system.caches.is_unreachable_local_definition,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
#[inline(always)]
pub fn upstream_monomorphizations(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations,
&self.tcx.query_system.caches.upstream_monomorphizations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[inline(always)]
pub fn upstream_monomorphizations_for(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations_for,
&self.tcx.query_system.caches.upstream_monomorphizations_for,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_drop_glue_for(self, key: GenericArgsRef<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_drop_glue_for,
&self.tcx.query_system.caches.upstream_drop_glue_for,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_async_drop_glue_for(self, key: GenericArgsRef<'tcx>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_async_drop_glue_for,
&self.tcx.query_system.caches.upstream_async_drop_glue_for,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns a list of all `extern` blocks of a crate."]
#[inline(always)]
pub fn foreign_modules(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.foreign_modules,
&self.tcx.query_system.caches.foreign_modules,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
#[inline(always)]
pub fn clashing_extern_declarations(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.clashing_extern_declarations,
&self.tcx.query_system.caches.clashing_extern_declarations,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
#[inline(always)]
pub fn entry_fn(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.entry_fn,
&self.tcx.query_system.caches.entry_fn,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
#[inline(always)]
pub fn proc_macro_decls_static(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.proc_macro_decls_static,
&self.tcx.query_system.caches.proc_macro_decls_static,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
#[inline(always)]
pub fn crate_hash(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_hash,
&self.tcx.query_system.caches.crate_hash,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
#[inline(always)]
pub fn crate_host_hash(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_host_hash,
&self.tcx.query_system.caches.crate_host_hash,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
#[inline(always)]
pub fn extra_filename(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.extra_filename,
&self.tcx.query_system.caches.extra_filename,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the paths where the crate came from in the file system."]
#[inline(always)]
pub fn crate_extern_paths(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_extern_paths,
&self.tcx.query_system.caches.crate_extern_paths,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
#[inline(always)]
pub fn implementations_of_trait(self, key: (CrateNum, DefId)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implementations_of_trait,
&self.tcx.query_system.caches.implementations_of_trait,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
#[inline(always)]
pub fn crate_incoherent_impls(self, key: (CrateNum, SimplifiedType))
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_incoherent_impls,
&self.tcx.query_system.caches.crate_incoherent_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
#[inline(always)]
pub fn native_library(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.native_library,
&self.tcx.query_system.caches.native_library,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
#[inline(always)]
pub fn inherit_sig_for_delegation_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherit_sig_for_delegation_item,
&self.tcx.query_system.caches.inherit_sig_for_delegation_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
#[inline(always)]
pub fn resolve_bound_vars(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolve_bound_vars,
&self.tcx.query_system.caches.resolve_bound_vars,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn named_variable_map(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.named_variable_map,
&self.tcx.query_system.caches.named_variable_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn is_late_bound_map(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_late_bound_map,
&self.tcx.query_system.caches.is_late_bound_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
#[inline(always)]
pub fn object_lifetime_default(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.object_lifetime_default,
&self.tcx.query_system.caches.object_lifetime_default,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn late_bound_vars_map(self, key: hir::OwnerId) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.late_bound_vars_map,
&self.tcx.query_system.caches.late_bound_vars_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
#[inline(always)]
pub fn opaque_captured_lifetimes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_captured_lifetimes,
&self.tcx.query_system.caches.opaque_captured_lifetimes,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
#[inline(always)]
pub fn visibility(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.visibility,
&self.tcx.query_system.caches.visibility,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
#[inline(always)]
pub fn inhabited_predicate_adt(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_adt,
&self.tcx.query_system.caches.inhabited_predicate_adt,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
#[inline(always)]
pub fn inhabited_predicate_type(self, key: Ty<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_type,
&self.tcx.query_system.caches.inhabited_predicate_type,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
#[inline(always)]
pub fn dep_kind(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dep_kind,
&self.tcx.query_system.caches.dep_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the name of the crate."]
#[inline(always)]
pub fn crate_name(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_name,
&self.tcx.query_system.caches.crate_name,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn module_children(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.module_children,
&self.tcx.query_system.caches.module_children,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
#[inline(always)]
pub fn num_extern_def_ids(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.num_extern_def_ids,
&self.tcx.query_system.caches.num_extern_def_ids,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
#[inline(always)]
pub fn lib_features(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lib_features,
&self.tcx.query_system.caches.lib_features,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
#[inline(always)]
pub fn stability_implications(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stability_implications,
&self.tcx.query_system.caches.stability_implications,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Whether the function is an intrinsic"]
#[inline(always)]
pub fn intrinsic_raw(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.intrinsic_raw,
&self.tcx.query_system.caches.intrinsic_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn get_lang_items(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.get_lang_items,
&self.tcx.query_system.caches.get_lang_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns all diagnostic items defined in all crates."]
#[inline(always)]
pub fn all_diagnostic_items(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.all_diagnostic_items,
&self.tcx.query_system.caches.all_diagnostic_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn defined_lang_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.defined_lang_items,
&self.tcx.query_system.caches.defined_lang_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the diagnostic items defined in a crate."]
#[inline(always)]
pub fn diagnostic_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_items,
&self.tcx.query_system.caches.diagnostic_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
#[inline(always)]
pub fn missing_lang_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.missing_lang_items,
&self.tcx.query_system.caches.missing_lang_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
#[inline(always)]
pub fn visible_parent_map(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.visible_parent_map,
&self.tcx.query_system.caches.visible_parent_map,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
#[inline(always)]
pub fn trimmed_def_paths(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trimmed_def_paths,
&self.tcx.query_system.caches.trimmed_def_paths,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
#[inline(always)]
pub fn missing_extern_crate_item(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.missing_extern_crate_item,
&self.tcx.query_system.caches.missing_extern_crate_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
#[inline(always)]
pub fn used_crate_source(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_crate_source,
&self.tcx.query_system.caches.used_crate_source,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
#[inline(always)]
pub fn debugger_visualizers(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.debugger_visualizers,
&self.tcx.query_system.caches.debugger_visualizers,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
#[inline(always)]
pub fn postorder_cnums(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.postorder_cnums,
&self.tcx.query_system.caches.postorder_cnums,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
#[inline(always)]
pub fn is_private_dep(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_private_dep,
&self.tcx.query_system.caches.is_private_dep,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
#[inline(always)]
pub fn allocator_kind(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.allocator_kind,
&self.tcx.query_system.caches.allocator_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
#[inline(always)]
pub fn alloc_error_handler_kind(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.alloc_error_handler_kind,
&self.tcx.query_system.caches.alloc_error_handler_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn upvars_mentioned(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upvars_mentioned,
&self.tcx.query_system.caches.upvars_mentioned,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
#[inline(always)]
pub fn crates(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crates,
&self.tcx.query_system.caches.crates,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
#[inline(always)]
pub fn used_crates(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_crates,
&self.tcx.query_system.caches.used_crates,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
#[inline(always)]
pub fn duplicate_crate_names(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.duplicate_crate_names,
&self.tcx.query_system.caches.duplicate_crate_names,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
#[inline(always)]
pub fn traits(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.traits,
&self.tcx.query_system.caches.traits,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
#[inline(always)]
pub fn trait_impls_in_crate(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_in_crate,
&self.tcx.query_system.caches.trait_impls_in_crate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
#[inline(always)]
pub fn stable_order_of_exportable_impls(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stable_order_of_exportable_impls,
&self.tcx.query_system.caches.stable_order_of_exportable_impls,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
#[inline(always)]
pub fn exportable_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exportable_items,
&self.tcx.query_system.caches.exportable_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_non_generic_symbols(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exported_non_generic_symbols,
&self.tcx.query_system.caches.exported_non_generic_symbols,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_generic_symbols(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exported_generic_symbols,
&self.tcx.query_system.caches.exported_generic_symbols,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
#[inline(always)]
pub fn collect_and_partition_mono_items(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.collect_and_partition_mono_items,
&self.tcx.query_system.caches.collect_and_partition_mono_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
#[inline(always)]
pub fn is_codegened_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_codegened_item,
&self.tcx.query_system.caches.is_codegened_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
#[inline(always)]
pub fn codegen_unit(self, key: Symbol) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_unit,
&self.tcx.query_system.caches.codegen_unit,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
#[inline(always)]
pub fn backend_optimization_level(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.backend_optimization_level,
&self.tcx.query_system.caches.backend_optimization_level,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
#[inline(always)]
pub fn output_filenames(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.output_filenames,
&self.tcx.query_system.caches.output_filenames,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_projection(self,
key: CanonicalAliasGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_projection,
&self.tcx.query_system.caches.normalize_canonicalized_projection,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_free_alias(self,
key: CanonicalAliasGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_free_alias,
&self.tcx.query_system.caches.normalize_canonicalized_free_alias,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_inherent_projection(self,
key: CanonicalAliasGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_inherent_projection,
&self.tcx.query_system.caches.normalize_canonicalized_inherent_projection,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
#[inline(always)]
pub fn try_normalize_generic_arg_after_erasing_regions(self,
key: PseudoCanonicalInput<'tcx, GenericArg<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.try_normalize_generic_arg_after_erasing_regions,
&self.tcx.query_system.caches.try_normalize_generic_arg_after_erasing_regions,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
#[inline(always)]
pub fn implied_outlives_bounds(self,
key: (CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implied_outlives_bounds,
&self.tcx.query_system.caches.implied_outlives_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
#[inline(always)]
pub fn dropck_outlives(self, key: CanonicalDropckOutlivesGoal<'tcx>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dropck_outlives,
&self.tcx.query_system.caches.dropck_outlives,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
#[inline(always)]
pub fn evaluate_obligation(self, key: CanonicalPredicateGoal<'tcx>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.evaluate_obligation,
&self.tcx.query_system.caches.evaluate_obligation,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
#[inline(always)]
pub fn type_op_ascribe_user_type(self,
key: CanonicalTypeOpAscribeUserTypeGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_ascribe_user_type,
&self.tcx.query_system.caches.type_op_ascribe_user_type,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
#[inline(always)]
pub fn type_op_prove_predicate(self,
key: CanonicalTypeOpProvePredicateGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_prove_predicate,
&self.tcx.query_system.caches.type_op_prove_predicate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_ty(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_ty,
&self.tcx.query_system.caches.type_op_normalize_ty,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_clause(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_clause,
&self.tcx.query_system.caches.type_op_normalize_clause,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_poly_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_poly_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_poly_fn_sig,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_fn_sig,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn instantiate_and_check_impossible_predicates(self,
key: (DefId, GenericArgsRef<'tcx>)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.instantiate_and_check_impossible_predicates,
&self.tcx.query_system.caches.instantiate_and_check_impossible_predicates,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[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)` "]
#[inline(always)]
pub fn is_impossible_associated_item(self, key: (DefId, DefId)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_impossible_associated_item,
&self.tcx.query_system.caches.is_impossible_associated_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
#[inline(always)]
pub fn method_autoderef_steps(self,
key: CanonicalMethodAutoderefStepsGoal<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.method_autoderef_steps,
&self.tcx.query_system.caches.method_autoderef_steps,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Used by `-Znext-solver` to compute proof trees."]
#[inline(always)]
pub fn evaluate_root_goal_for_proof_tree_raw(self,
key: solve::CanonicalInput<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.evaluate_root_goal_for_proof_tree_raw,
&self.tcx.query_system.caches.evaluate_root_goal_for_proof_tree_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
#[inline(always)]
pub fn rust_target_features(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rust_target_features,
&self.tcx.query_system.caches.rust_target_features,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
#[inline(always)]
pub fn implied_target_features(self, key: Symbol) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implied_target_features,
&self.tcx.query_system.caches.implied_target_features,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
#[inline(always)]
pub fn features_query(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.features_query,
&self.tcx.query_system.caches.features_query,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
#[inline(always)]
pub fn crate_for_resolver(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_for_resolver,
&self.tcx.query_system.caches.crate_for_resolver,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
#[inline(always)]
pub fn resolve_instance_raw(self,
key: ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolve_instance_raw,
&self.tcx.query_system.caches.resolve_instance_raw,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
#[inline(always)]
pub fn reveal_opaque_types_in_bounds(self, key: ty::Clauses<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reveal_opaque_types_in_bounds,
&self.tcx.query_system.caches.reveal_opaque_types_in_bounds,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
#[inline(always)]
pub fn limits(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.limits,
&self.tcx.query_system.caches.limits,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
#[inline(always)]
pub fn diagnostic_hir_wf_check(self,
key: (ty::Predicate<'tcx>, WellFormedLoc)) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_hir_wf_check,
&self.tcx.query_system.caches.diagnostic_hir_wf_check,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
#[inline(always)]
pub fn global_backend_features(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.global_backend_features,
&self.tcx.query_system.caches.global_backend_features,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
#[inline(always)]
pub fn check_validity_requirement(self,
key: (ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>))
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_validity_requirement,
&self.tcx.query_system.caches.check_validity_requirement,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
#[inline(always)]
pub fn compare_impl_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
crate::query::inner::query_ensure_error_guaranteed(self.tcx,
self.tcx.query_system.fns.engine.compare_impl_item,
&self.tcx.query_system.caches.compare_impl_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn deduced_param_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.deduced_param_attrs,
&self.tcx.query_system.caches.deduced_param_attrs,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
#[inline(always)]
pub fn doc_link_resolutions(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.doc_link_resolutions,
&self.tcx.query_system.caches.doc_link_resolutions,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
#[inline(always)]
pub fn doc_link_traits_in_scope(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.doc_link_traits_in_scope,
&self.tcx.query_system.caches.doc_link_traits_in_scope,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
#[inline(always)]
pub fn stripped_cfg_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stripped_cfg_items,
&self.tcx.query_system.caches.stripped_cfg_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
#[inline(always)]
pub fn generics_require_sized_self(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.generics_require_sized_self,
&self.tcx.query_system.caches.generics_require_sized_self,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
#[inline(always)]
pub fn cross_crate_inlinable(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.cross_crate_inlinable,
&self.tcx.query_system.caches.cross_crate_inlinable,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
#[inline(always)]
pub fn check_mono_item(self, key: ty::Instance<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mono_item,
&self.tcx.query_system.caches.check_mono_item,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
#[inline(always)]
pub fn skip_move_check_fns(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.skip_move_check_fns,
&self.tcx.query_system.caches.skip_move_check_fns,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
#[inline(always)]
pub fn items_of_instance(self, key: (ty::Instance<'tcx>, CollectionMode))
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.items_of_instance,
&self.tcx.query_system.caches.items_of_instance,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
#[inline(always)]
pub fn size_estimate(self, key: ty::Instance<'tcx>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.size_estimate,
&self.tcx.query_system.caches.size_estimate,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn anon_const_kind(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.anon_const_kind,
&self.tcx.query_system.caches.anon_const_kind,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
#[inline(always)]
pub fn trivial_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trivial_const,
&self.tcx.query_system.caches.trivial_const,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
#[inline(always)]
pub fn sanitizer_settings_for(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.sanitizer_settings_for,
&self.tcx.query_system.caches.sanitizer_settings_for,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
#[inline(always)]
pub fn check_externally_implementable_items(self, key: ()) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_externally_implementable_items,
&self.tcx.query_system.caches.check_externally_implementable_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
#[doc = " Returns a list of all `externally implementable items` crate."]
#[inline(always)]
pub fn externally_implementable_items(self, key: CrateNum) -> () {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.externally_implementable_items,
&self.tcx.query_system.caches.externally_implementable_items,
crate::query::IntoQueryParam::into_query_param(key), false)
}
}
impl<'tcx> crate::query::TyCtxtEnsureDone<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
#[inline(always)]
pub fn derive_macro_expansion(self,
key: (LocalExpnId, &'tcx TokenStream)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.derive_macro_expansion,
&self.tcx.query_system.caches.derive_macro_expansion,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
#[inline(always)]
pub fn trigger_delayed_bug(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trigger_delayed_bug,
&self.tcx.query_system.caches.trigger_delayed_bug,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
#[inline(always)]
pub fn registered_tools(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.registered_tools,
&self.tcx.query_system.caches.registered_tools,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
#[inline(always)]
pub fn early_lint_checks(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.early_lint_checks,
&self.tcx.query_system.caches.early_lint_checks,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
#[inline(always)]
pub fn env_var_os(self, key: &'tcx OsStr) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.env_var_os,
&self.tcx.query_system.caches.env_var_os,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
#[inline(always)]
pub fn resolutions(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolutions,
&self.tcx.query_system.caches.resolutions,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
#[inline(always)]
pub fn resolver_for_lowering_raw(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolver_for_lowering_raw,
&self.tcx.query_system.caches.resolver_for_lowering_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
#[inline(always)]
pub fn source_span(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.source_span,
&self.tcx.query_system.caches.source_span,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
#[inline(always)]
pub fn hir_crate(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_crate,
&self.tcx.query_system.caches.hir_crate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " All items in the crate."]
#[inline(always)]
pub fn hir_crate_items(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_crate_items,
&self.tcx.query_system.caches.hir_crate_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_module_items(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_module_items,
&self.tcx.query_system.caches.hir_module_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns HIR ID for the given `LocalDefId`."]
#[inline(always)]
pub fn local_def_id_to_hir_id(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.local_def_id_to_hir_id,
&self.tcx.query_system.caches.local_def_id_to_hir_id,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_owner_parent_q(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_owner_parent_q,
&self.tcx.query_system.caches.hir_owner_parent_q,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_hir_owner_nodes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opt_hir_owner_nodes,
&self.tcx.query_system.caches.opt_hir_owner_nodes,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_attr_map(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.hir_attr_map,
&self.tcx.query_system.caches.hir_attr_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_ast_lowering_delayed_lints(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opt_ast_lowering_delayed_lints,
&self.tcx.query_system.caches.opt_ast_lowering_delayed_lints,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
#[inline(always)]
pub fn const_param_default(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_param_default,
&self.tcx.query_system.caches.const_param_default,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
#[inline(always)]
pub fn const_of_item(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_of_item,
&self.tcx.query_system.caches.const_of_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_of(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of,
&self.tcx.query_system.caches.type_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
#[inline(always)]
pub fn type_of_opaque(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque,
&self.tcx.query_system.caches.type_of_opaque,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
#[inline(always)]
pub fn type_of_opaque_hir_typeck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque_hir_typeck,
&self.tcx.query_system.caches.type_of_opaque_hir_typeck,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_alias_is_lazy(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_alias_is_lazy,
&self.tcx.query_system.caches.type_alias_is_lazy,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
#[inline(always)]
pub fn collect_return_position_impl_trait_in_trait_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.collect_return_position_impl_trait_in_trait_tys,
&self.tcx.query_system.caches.collect_return_position_impl_trait_in_trait_tys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
#[inline(always)]
pub fn opaque_ty_origin(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_ty_origin,
&self.tcx.query_system.caches.opaque_ty_origin,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
#[inline(always)]
pub fn unsizing_params_for_adt(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.unsizing_params_for_adt,
&self.tcx.query_system.caches.unsizing_params_for_adt,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
#[inline(always)]
pub fn analysis(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.analysis,
&self.tcx.query_system.caches.analysis,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
#[inline(always)]
pub fn check_expectations(self, key: Option<Symbol>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_expectations,
&self.tcx.query_system.caches.check_expectations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the *generics* of the definition given by `DefId`."]
#[inline(always)]
pub fn generics_of(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.generics_of,
&self.tcx.query_system.caches.generics_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.predicates_of,
&self.tcx.query_system.caches.predicates_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn opaque_types_defined_by(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_types_defined_by,
&self.tcx.query_system.caches.opaque_types_defined_by,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
#[inline(always)]
pub fn nested_bodies_within(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.nested_bodies_within,
&self.tcx.query_system.caches.nested_bodies_within,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
#[inline(always)]
pub fn explicit_item_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_bounds,
&self.tcx.query_system.caches.explicit_item_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
#[inline(always)]
pub fn explicit_item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_self_bounds,
&self.tcx.query_system.caches.explicit_item_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
#[inline(always)]
pub fn item_bounds(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_bounds,
&self.tcx.query_system.caches.item_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_self_bounds,
&self.tcx.query_system.caches.item_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_non_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.item_non_self_bounds,
&self.tcx.query_system.caches.item_non_self_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn impl_super_outlives(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_super_outlives,
&self.tcx.query_system.caches.impl_super_outlives,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
#[inline(always)]
pub fn native_libraries(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.native_libraries,
&self.tcx.query_system.caches.native_libraries,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn shallow_lint_levels_on(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.shallow_lint_levels_on,
&self.tcx.query_system.caches.shallow_lint_levels_on,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
#[inline(always)]
pub fn lint_expectations(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lint_expectations,
&self.tcx.query_system.caches.lint_expectations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
#[inline(always)]
pub fn lints_that_dont_need_to_run(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lints_that_dont_need_to_run,
&self.tcx.query_system.caches.lints_that_dont_need_to_run,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn expn_that_defined(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.expn_that_defined,
&self.tcx.query_system.caches.expn_that_defined,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
#[inline(always)]
pub fn is_panic_runtime(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_panic_runtime,
&self.tcx.query_system.caches.is_panic_runtime,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Checks whether a type is representable or infinitely sized"]
#[inline(always)]
pub fn representability(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.representability,
&self.tcx.query_system.caches.representability,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " An implementation detail for the `representability` query"]
#[inline(always)]
pub fn representability_adt_ty(self, key: Ty<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.representability_adt_ty,
&self.tcx.query_system.caches.representability_adt_ty,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
#[inline(always)]
pub fn params_in_repr(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.params_in_repr,
&self.tcx.query_system.caches.params_in_repr,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
#[inline(always)]
pub fn thir_body(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.thir_body,
&self.tcx.query_system.caches.thir_body,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
#[inline(always)]
pub fn mir_keys(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_keys,
&self.tcx.query_system.caches.mir_keys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
#[inline(always)]
pub fn mir_const_qualif(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_const_qualif,
&self.tcx.query_system.caches.mir_const_qualif,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
#[inline(always)]
pub fn mir_built(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_built,
&self.tcx.query_system.caches.mir_built,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Try to build an abstract representation of the given constant."]
#[inline(always)]
pub fn thir_abstract_const(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.thir_abstract_const,
&self.tcx.query_system.caches.thir_abstract_const,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_drops_elaborated_and_const_checked(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_drops_elaborated_and_const_checked,
&self.tcx.query_system.caches.mir_drops_elaborated_and_const_checked,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
#[inline(always)]
pub fn mir_for_ctfe(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_for_ctfe,
&self.tcx.query_system.caches.mir_for_ctfe,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_promoted(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_promoted,
&self.tcx.query_system.caches.mir_promoted,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn closure_typeinfo(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.closure_typeinfo,
&self.tcx.query_system.caches.closure_typeinfo,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
#[inline(always)]
pub fn closure_saved_names_of_captured_variables(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.closure_saved_names_of_captured_variables,
&self.tcx.query_system.caches.closure_saved_names_of_captured_variables,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_coroutine_witnesses(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_coroutine_witnesses,
&self.tcx.query_system.caches.mir_coroutine_witnesses,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_coroutine_obligations(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_coroutine_obligations,
&self.tcx.query_system.caches.check_coroutine_obligations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
#[inline(always)]
pub fn check_potentially_region_dependent_goals(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_potentially_region_dependent_goals,
&self.tcx.query_system.caches.check_potentially_region_dependent_goals,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
#[inline(always)]
pub fn optimized_mir(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.optimized_mir,
&self.tcx.query_system.caches.optimized_mir,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
#[inline(always)]
pub fn coverage_attr_on(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coverage_attr_on,
&self.tcx.query_system.caches.coverage_attr_on,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
#[inline(always)]
pub fn coverage_ids_info(self, key: ty::InstanceKind<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coverage_ids_info,
&self.tcx.query_system.caches.coverage_ids_info,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
#[inline(always)]
pub fn promoted_mir(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.promoted_mir,
&self.tcx.query_system.caches.promoted_mir,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
#[inline(always)]
pub fn erase_and_anonymize_regions_ty(self, key: Ty<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.erase_and_anonymize_regions_ty,
&self.tcx.query_system.caches.erase_and_anonymize_regions_ty,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
#[inline(always)]
pub fn wasm_import_module_map(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.wasm_import_module_map,
&self.tcx.query_system.caches.wasm_import_module_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
#[inline(always)]
pub fn trait_explicit_predicates_and_bounds(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_explicit_predicates_and_bounds,
&self.tcx.query_system.caches.trait_explicit_predicates_and_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
#[inline(always)]
pub fn explicit_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_predicates_of,
&self.tcx.query_system.caches.explicit_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn inferred_outlives_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_of,
&self.tcx.query_system.caches.inferred_outlives_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
#[inline(always)]
pub fn explicit_super_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_super_predicates_of,
&self.tcx.query_system.caches.explicit_super_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
#[inline(always)]
pub fn explicit_implied_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_predicates_of,
&self.tcx.query_system.caches.explicit_implied_predicates_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
#[inline(always)]
pub fn explicit_supertraits_containing_assoc_item(self,
key: (DefId, rustc_span::Ident)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_supertraits_containing_assoc_item,
&self.tcx.query_system.caches.explicit_supertraits_containing_assoc_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
#[inline(always)]
pub fn const_conditions(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.const_conditions,
&self.tcx.query_system.caches.const_conditions,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
#[inline(always)]
pub fn explicit_implied_const_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_const_bounds,
&self.tcx.query_system.caches.explicit_implied_const_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
#[inline(always)]
pub fn type_param_predicates(self,
key: (LocalDefId, LocalDefId, rustc_span::Ident)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_param_predicates,
&self.tcx.query_system.caches.type_param_predicates,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn trait_def(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_def,
&self.tcx.query_system.caches.trait_def,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_def(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_def,
&self.tcx.query_system.caches.adt_def,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_destructor(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_destructor,
&self.tcx.query_system.caches.adt_destructor,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_async_destructor(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_async_destructor,
&self.tcx.query_system.caches.adt_async_destructor,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn adt_sizedness_constraint(self, key: (DefId, SizedTraitKind)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_sizedness_constraint,
&self.tcx.query_system.caches.adt_sizedness_constraint,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_dtorck_constraint(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_dtorck_constraint,
&self.tcx.query_system.caches.adt_dtorck_constraint,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
#[inline(always)]
pub fn constness(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.constness,
&self.tcx.query_system.caches.constness,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn asyncness(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.asyncness,
&self.tcx.query_system.caches.asyncness,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
#[inline(always)]
pub fn is_promotable_const_fn(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_promotable_const_fn,
&self.tcx.query_system.caches.is_promotable_const_fn,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
#[inline(always)]
pub fn coroutine_by_move_body_def_id(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_by_move_body_def_id,
&self.tcx.query_system.caches.coroutine_by_move_body_def_id,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
#[inline(always)]
pub fn coroutine_kind(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_kind,
&self.tcx.query_system.caches.coroutine_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
#[inline(always)]
pub fn coroutine_for_closure(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_for_closure,
&self.tcx.query_system.caches.coroutine_for_closure,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
#[inline(always)]
pub fn coroutine_hidden_types(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coroutine_hidden_types,
&self.tcx.query_system.caches.coroutine_hidden_types,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_variances(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_variances,
&self.tcx.query_system.caches.crate_variances,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn variances_of(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.variances_of,
&self.tcx.query_system.caches.variances_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn inferred_outlives_crate(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_crate,
&self.tcx.query_system.caches.inferred_outlives_crate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
#[inline(always)]
pub fn associated_item_def_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_item_def_ids,
&self.tcx.query_system.caches.associated_item_def_ids,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
#[inline(always)]
pub fn associated_item(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_item,
&self.tcx.query_system.caches.associated_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Collects the associated items defined on a trait or impl."]
#[inline(always)]
pub fn associated_items(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_items,
&self.tcx.query_system.caches.associated_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
#[inline(always)]
pub fn impl_item_implementor_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_item_implementor_ids,
&self.tcx.query_system.caches.impl_item_implementor_ids,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
#[inline(always)]
pub fn associated_types_for_impl_traits_in_trait_or_impl(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.associated_types_for_impl_traits_in_trait_or_impl,
&self.tcx.query_system.caches.associated_types_for_impl_traits_in_trait_or_impl,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
#[inline(always)]
pub fn impl_trait_header(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_trait_header,
&self.tcx.query_system.caches.impl_trait_header,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
#[inline(always)]
pub fn impl_self_is_guaranteed_unsized(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_self_is_guaranteed_unsized,
&self.tcx.query_system.caches.impl_self_is_guaranteed_unsized,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
#[inline(always)]
pub fn inherent_impls(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherent_impls,
&self.tcx.query_system.caches.inherent_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
#[inline(always)]
pub fn incoherent_impls(self, key: SimplifiedType) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.incoherent_impls,
&self.tcx.query_system.caches.incoherent_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_transmutes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_transmutes,
&self.tcx.query_system.caches.check_transmutes,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_unsafety(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_unsafety,
&self.tcx.query_system.caches.check_unsafety,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
#[inline(always)]
pub fn check_tail_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_tail_calls,
&self.tcx.query_system.caches.check_tail_calls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
#[inline(always)]
pub fn assumed_wf_types(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types,
&self.tcx.query_system.caches.assumed_wf_types,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
#[inline(always)]
pub fn assumed_wf_types_for_rpitit(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types_for_rpitit,
&self.tcx.query_system.caches.assumed_wf_types_for_rpitit,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Computes the signature of the function."]
#[inline(always)]
pub fn fn_sig(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_sig,
&self.tcx.query_system.caches.fn_sig,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Performs lint checking for the module."]
#[inline(always)]
pub fn lint_mod(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lint_mod,
&self.tcx.query_system.caches.lint_mod,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
#[inline(always)]
pub fn check_unused_traits(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_unused_traits,
&self.tcx.query_system.caches.check_unused_traits,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Checks the attributes in the module."]
#[inline(always)]
pub fn check_mod_attrs(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_attrs,
&self.tcx.query_system.caches.check_mod_attrs,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Checks for uses of unstable APIs in the module."]
#[inline(always)]
pub fn check_mod_unstable_api_usage(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_unstable_api_usage,
&self.tcx.query_system.caches.check_mod_unstable_api_usage,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
#[inline(always)]
pub fn check_mod_privacy(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_privacy,
&self.tcx.query_system.caches.check_mod_privacy,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn check_liveness(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_liveness,
&self.tcx.query_system.caches.check_liveness,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
#[inline(always)]
pub fn live_symbols_and_ignored_derived_traits(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.live_symbols_and_ignored_derived_traits,
&self.tcx.query_system.caches.live_symbols_and_ignored_derived_traits,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
#[inline(always)]
pub fn check_mod_deathness(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mod_deathness,
&self.tcx.query_system.caches.check_mod_deathness,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
#[inline(always)]
pub fn check_type_wf(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_type_wf,
&self.tcx.query_system.caches.check_type_wf,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
#[inline(always)]
pub fn coerce_unsized_info(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coerce_unsized_info,
&self.tcx.query_system.caches.coerce_unsized_info,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn typeck(self, key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.typeck,
&self.tcx.query_system.caches.typeck,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn used_trait_imports(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_trait_imports,
&self.tcx.query_system.caches.used_trait_imports,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn coherent_trait(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.coherent_trait,
&self.tcx.query_system.caches.coherent_trait,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
#[inline(always)]
pub fn mir_borrowck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_borrowck,
&self.tcx.query_system.caches.mir_borrowck,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls,
&self.tcx.query_system.caches.crate_inherent_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_validity_check(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_validity_check,
&self.tcx.query_system.caches.crate_inherent_impls_validity_check,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_overlap_check(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_overlap_check,
&self.tcx.query_system.caches.crate_inherent_impls_overlap_check,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
#[inline(always)]
pub fn orphan_check_impl(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.orphan_check_impl,
&self.tcx.query_system.caches.orphan_check_impl,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
#[inline(always)]
pub fn mir_callgraph_cyclic(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_callgraph_cyclic,
&self.tcx.query_system.caches.mir_callgraph_cyclic,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Obtain all the calls into other local functions"]
#[inline(always)]
pub fn mir_inliner_callees(self, key: ty::InstanceKind<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_inliner_callees,
&self.tcx.query_system.caches.mir_inliner_callees,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
#[inline(always)]
pub fn tag_for_variant(self,
key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.tag_for_variant,
&self.tcx.query_system.caches.tag_for_variant,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn eval_to_allocation_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_allocation_raw,
&self.tcx.query_system.caches.eval_to_allocation_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
#[inline(always)]
pub fn eval_static_initializer(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_static_initializer,
&self.tcx.query_system.caches.eval_static_initializer,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
#[inline(always)]
pub fn eval_to_const_value_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_const_value_raw,
&self.tcx.query_system.caches.eval_to_const_value_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
#[inline(always)]
pub fn eval_to_valtree(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.eval_to_valtree,
&self.tcx.query_system.caches.eval_to_valtree,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Converts a type-level constant value into a MIR constant value."]
#[inline(always)]
pub fn valtree_to_const_val(self, key: ty::Value<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.valtree_to_const_val,
&self.tcx.query_system.caches.valtree_to_const_val,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
#[inline(always)]
pub fn lit_to_const(self, key: LitToConstInput<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lit_to_const,
&self.tcx.query_system.caches.lit_to_const,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_match(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_match,
&self.tcx.query_system.caches.check_match,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
#[inline(always)]
pub fn effective_visibilities(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.effective_visibilities,
&self.tcx.query_system.caches.effective_visibilities,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
#[inline(always)]
pub fn check_private_in_public(self, key: LocalModDefId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_private_in_public,
&self.tcx.query_system.caches.check_private_in_public,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
#[inline(always)]
pub fn reachable_set(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reachable_set,
&self.tcx.query_system.caches.reachable_set,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
#[inline(always)]
pub fn region_scope_tree(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.region_scope_tree,
&self.tcx.query_system.caches.region_scope_tree,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Generates a MIR body for the shim."]
#[inline(always)]
pub fn mir_shims(self, key: ty::InstanceKind<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.mir_shims,
&self.tcx.query_system.caches.mir_shims,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
#[inline(always)]
pub fn symbol_name(self, key: ty::Instance<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.symbol_name,
&self.tcx.query_system.caches.symbol_name,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn def_kind(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_kind,
&self.tcx.query_system.caches.def_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the span for the definition."]
#[inline(always)]
pub fn def_span(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_span,
&self.tcx.query_system.caches.def_span,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the span for the identifier of the definition."]
#[inline(always)]
pub fn def_ident_span(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.def_ident_span,
&self.tcx.query_system.caches.def_ident_span,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
#[inline(always)]
pub fn ty_span(self, key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.ty_span,
&self.tcx.query_system.caches.ty_span,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_stability,
&self.tcx.query_system.caches.lookup_stability,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_const_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_const_stability,
&self.tcx.query_system.caches.lookup_const_stability,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_default_body_stability(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_default_body_stability,
&self.tcx.query_system.caches.lookup_default_body_stability,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn should_inherit_track_caller(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.should_inherit_track_caller,
&self.tcx.query_system.caches.should_inherit_track_caller,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn inherited_align(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherited_align,
&self.tcx.query_system.caches.inherited_align,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
#[inline(always)]
pub fn lookup_deprecation_entry(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lookup_deprecation_entry,
&self.tcx.query_system.caches.lookup_deprecation_entry,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
#[inline(always)]
pub fn is_doc_hidden(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_doc_hidden,
&self.tcx.query_system.caches.is_doc_hidden,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
#[inline(always)]
pub fn is_doc_notable_trait(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_doc_notable_trait,
&self.tcx.query_system.caches.is_doc_notable_trait,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
#[inline(always)]
pub fn attrs_for_def(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.attrs_for_def,
&self.tcx.query_system.caches.attrs_for_def,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
#[inline(always)]
pub fn codegen_fn_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_fn_attrs,
&self.tcx.query_system.caches.codegen_fn_attrs,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn asm_target_features(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.asm_target_features,
&self.tcx.query_system.caches.asm_target_features,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn fn_arg_idents(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_arg_idents,
&self.tcx.query_system.caches.fn_arg_idents,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
#[inline(always)]
pub fn rendered_const(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rendered_const,
&self.tcx.query_system.caches.rendered_const,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
#[inline(always)]
pub fn rendered_precise_capturing_args(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rendered_precise_capturing_args,
&self.tcx.query_system.caches.rendered_precise_capturing_args,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn impl_parent(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.impl_parent,
&self.tcx.query_system.caches.impl_parent,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn is_mir_available(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_mir_available,
&self.tcx.query_system.caches.is_mir_available,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn own_existential_vtable_entries(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.own_existential_vtable_entries,
&self.tcx.query_system.caches.own_existential_vtable_entries,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
#[inline(always)]
pub fn vtable_entries(self, key: ty::TraitRef<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.vtable_entries,
&self.tcx.query_system.caches.vtable_entries,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[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()` "]
#[inline(always)]
pub fn first_method_vtable_slot(self, key: ty::TraitRef<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.first_method_vtable_slot,
&self.tcx.query_system.caches.first_method_vtable_slot,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[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"]
#[inline(always)]
pub fn supertrait_vtable_slot(self, key: (Ty<'tcx>, Ty<'tcx>)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.supertrait_vtable_slot,
&self.tcx.query_system.caches.supertrait_vtable_slot,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
#[inline(always)]
pub fn vtable_allocation(self,
key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.vtable_allocation,
&self.tcx.query_system.caches.vtable_allocation,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
#[inline(always)]
pub fn codegen_select_candidate(self,
key: PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_select_candidate,
&self.tcx.query_system.caches.codegen_select_candidate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Return all `impl` blocks in the current crate."]
#[inline(always)]
pub fn all_local_trait_impls(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.all_local_trait_impls,
&self.tcx.query_system.caches.all_local_trait_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
#[inline(always)]
pub fn local_trait_impls(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.local_trait_impls,
&self.tcx.query_system.caches.local_trait_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
#[inline(always)]
pub fn trait_impls_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_of,
&self.tcx.query_system.caches.trait_impls_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn specialization_graph_of(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.specialization_graph_of,
&self.tcx.query_system.caches.specialization_graph_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn dyn_compatibility_violations(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dyn_compatibility_violations,
&self.tcx.query_system.caches.dyn_compatibility_violations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
#[inline(always)]
pub fn is_dyn_compatible(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_dyn_compatible,
&self.tcx.query_system.caches.is_dyn_compatible,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
#[inline(always)]
pub fn param_env(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.param_env,
&self.tcx.query_system.caches.param_env,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
#[inline(always)]
pub fn typing_env_normalized_for_post_analysis(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.typing_env_normalized_for_post_analysis,
&self.tcx.query_system.caches.typing_env_normalized_for_post_analysis,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_copy_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_copy_raw,
&self.tcx.query_system.caches.is_copy_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_use_cloned_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_use_cloned_raw,
&self.tcx.query_system.caches.is_use_cloned_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::is_sized`."]
#[inline(always)]
pub fn is_sized_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_sized_raw,
&self.tcx.query_system.caches.is_sized_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::is_freeze`."]
#[inline(always)]
pub fn is_freeze_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_freeze_raw,
&self.tcx.query_system.caches.is_freeze_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::is_unpin`."]
#[inline(always)]
pub fn is_unpin_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_unpin_raw,
&self.tcx.query_system.caches.is_unpin_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::is_async_drop`."]
#[inline(always)]
pub fn is_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_async_drop_raw,
&self.tcx.query_system.caches.is_async_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::needs_drop`."]
#[inline(always)]
pub fn needs_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.needs_drop_raw,
&self.tcx.query_system.caches.needs_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::needs_async_drop`."]
#[inline(always)]
pub fn needs_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.needs_async_drop_raw,
&self.tcx.query_system.caches.needs_async_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
#[inline(always)]
pub fn has_significant_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_significant_drop_raw,
&self.tcx.query_system.caches.has_significant_drop_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
#[inline(always)]
pub fn has_structural_eq_impl(self, key: Ty<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_structural_eq_impl,
&self.tcx.query_system.caches.has_structural_eq_impl,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_drop_tys(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_drop_tys,
&self.tcx.query_system.caches.adt_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_async_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_async_drop_tys,
&self.tcx.query_system.caches.adt_async_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_significant_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.adt_significant_drop_tys,
&self.tcx.query_system.caches.adt_significant_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
#[inline(always)]
pub fn list_significant_drop_tys(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.list_significant_drop_tys,
&self.tcx.query_system.caches.list_significant_drop_tys,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
#[inline(always)]
pub fn layout_of(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.layout_of,
&self.tcx.query_system.caches.layout_of,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
#[inline(always)]
pub fn fn_abi_of_fn_ptr(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_fn_ptr,
&self.tcx.query_system.caches.fn_abi_of_fn_ptr,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
#[inline(always)]
pub fn fn_abi_of_instance(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_instance,
&self.tcx.query_system.caches.fn_abi_of_instance,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
#[inline(always)]
pub fn dylib_dependency_formats(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dylib_dependency_formats,
&self.tcx.query_system.caches.dylib_dependency_formats,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
#[inline(always)]
pub fn dependency_formats(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dependency_formats,
&self.tcx.query_system.caches.dependency_formats,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
#[inline(always)]
pub fn is_compiler_builtins(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_compiler_builtins,
&self.tcx.query_system.caches.is_compiler_builtins,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
#[inline(always)]
pub fn has_global_allocator(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_global_allocator,
&self.tcx.query_system.caches.has_global_allocator,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
#[inline(always)]
pub fn has_alloc_error_handler(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_alloc_error_handler,
&self.tcx.query_system.caches.has_alloc_error_handler,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
#[inline(always)]
pub fn has_panic_handler(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_panic_handler,
&self.tcx.query_system.caches.has_panic_handler,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
#[inline(always)]
pub fn is_profiler_runtime(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_profiler_runtime,
&self.tcx.query_system.caches.is_profiler_runtime,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
#[inline(always)]
pub fn has_ffi_unwind_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.has_ffi_unwind_calls,
&self.tcx.query_system.caches.has_ffi_unwind_calls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
#[inline(always)]
pub fn required_panic_strategy(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.required_panic_strategy,
&self.tcx.query_system.caches.required_panic_strategy,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
#[inline(always)]
pub fn panic_in_drop_strategy(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.panic_in_drop_strategy,
&self.tcx.query_system.caches.panic_in_drop_strategy,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
#[inline(always)]
pub fn is_no_builtins(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_no_builtins,
&self.tcx.query_system.caches.is_no_builtins,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
#[inline(always)]
pub fn symbol_mangling_version(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.symbol_mangling_version,
&self.tcx.query_system.caches.symbol_mangling_version,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
#[inline(always)]
pub fn extern_crate(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.extern_crate,
&self.tcx.query_system.caches.extern_crate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
#[inline(always)]
pub fn specialization_enabled_in(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.specialization_enabled_in,
&self.tcx.query_system.caches.specialization_enabled_in,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
#[inline(always)]
pub fn specializes(self, key: (DefId, DefId)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.specializes,
&self.tcx.query_system.caches.specializes,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
#[inline(always)]
pub fn in_scope_traits_map(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.in_scope_traits_map,
&self.tcx.query_system.caches.in_scope_traits_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
#[inline(always)]
pub fn defaultness(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.defaultness,
&self.tcx.query_system.caches.defaultness,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
#[inline(always)]
pub fn default_field(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.default_field,
&self.tcx.query_system.caches.default_field,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
#[inline(always)]
pub fn check_well_formed(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_well_formed,
&self.tcx.query_system.caches.check_well_formed,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
#[inline(always)]
pub fn enforce_impl_non_lifetime_params_are_constrained(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.enforce_impl_non_lifetime_params_are_constrained,
&self.tcx.query_system.caches.enforce_impl_non_lifetime_params_are_constrained,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
#[inline(always)]
pub fn reachable_non_generics(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reachable_non_generics,
&self.tcx.query_system.caches.reachable_non_generics,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
#[inline(always)]
pub fn is_reachable_non_generic(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_reachable_non_generic,
&self.tcx.query_system.caches.is_reachable_non_generic,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
#[inline(always)]
pub fn is_unreachable_local_definition(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_unreachable_local_definition,
&self.tcx.query_system.caches.is_unreachable_local_definition,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
#[inline(always)]
pub fn upstream_monomorphizations(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations,
&self.tcx.query_system.caches.upstream_monomorphizations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[inline(always)]
pub fn upstream_monomorphizations_for(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations_for,
&self.tcx.query_system.caches.upstream_monomorphizations_for,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_drop_glue_for(self, key: GenericArgsRef<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_drop_glue_for,
&self.tcx.query_system.caches.upstream_drop_glue_for,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_async_drop_glue_for(self, key: GenericArgsRef<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upstream_async_drop_glue_for,
&self.tcx.query_system.caches.upstream_async_drop_glue_for,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns a list of all `extern` blocks of a crate."]
#[inline(always)]
pub fn foreign_modules(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.foreign_modules,
&self.tcx.query_system.caches.foreign_modules,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
#[inline(always)]
pub fn clashing_extern_declarations(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.clashing_extern_declarations,
&self.tcx.query_system.caches.clashing_extern_declarations,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
#[inline(always)]
pub fn entry_fn(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.entry_fn,
&self.tcx.query_system.caches.entry_fn,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
#[inline(always)]
pub fn proc_macro_decls_static(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.proc_macro_decls_static,
&self.tcx.query_system.caches.proc_macro_decls_static,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
#[inline(always)]
pub fn crate_hash(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_hash,
&self.tcx.query_system.caches.crate_hash,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
#[inline(always)]
pub fn crate_host_hash(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_host_hash,
&self.tcx.query_system.caches.crate_host_hash,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
#[inline(always)]
pub fn extra_filename(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.extra_filename,
&self.tcx.query_system.caches.extra_filename,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the paths where the crate came from in the file system."]
#[inline(always)]
pub fn crate_extern_paths(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_extern_paths,
&self.tcx.query_system.caches.crate_extern_paths,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
#[inline(always)]
pub fn implementations_of_trait(self, key: (CrateNum, DefId)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implementations_of_trait,
&self.tcx.query_system.caches.implementations_of_trait,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
#[inline(always)]
pub fn crate_incoherent_impls(self, key: (CrateNum, SimplifiedType)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_incoherent_impls,
&self.tcx.query_system.caches.crate_incoherent_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
#[inline(always)]
pub fn native_library(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.native_library,
&self.tcx.query_system.caches.native_library,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
#[inline(always)]
pub fn inherit_sig_for_delegation_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inherit_sig_for_delegation_item,
&self.tcx.query_system.caches.inherit_sig_for_delegation_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
#[inline(always)]
pub fn resolve_bound_vars(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolve_bound_vars,
&self.tcx.query_system.caches.resolve_bound_vars,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn named_variable_map(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.named_variable_map,
&self.tcx.query_system.caches.named_variable_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn is_late_bound_map(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_late_bound_map,
&self.tcx.query_system.caches.is_late_bound_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
#[inline(always)]
pub fn object_lifetime_default(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.object_lifetime_default,
&self.tcx.query_system.caches.object_lifetime_default,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn late_bound_vars_map(self, key: hir::OwnerId) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.late_bound_vars_map,
&self.tcx.query_system.caches.late_bound_vars_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
#[inline(always)]
pub fn opaque_captured_lifetimes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.opaque_captured_lifetimes,
&self.tcx.query_system.caches.opaque_captured_lifetimes,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
#[inline(always)]
pub fn visibility(self, key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.visibility,
&self.tcx.query_system.caches.visibility,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
#[inline(always)]
pub fn inhabited_predicate_adt(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_adt,
&self.tcx.query_system.caches.inhabited_predicate_adt,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
#[inline(always)]
pub fn inhabited_predicate_type(self, key: Ty<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_type,
&self.tcx.query_system.caches.inhabited_predicate_type,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
#[inline(always)]
pub fn dep_kind(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dep_kind,
&self.tcx.query_system.caches.dep_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the name of the crate."]
#[inline(always)]
pub fn crate_name(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_name,
&self.tcx.query_system.caches.crate_name,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn module_children(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.module_children,
&self.tcx.query_system.caches.module_children,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
#[inline(always)]
pub fn num_extern_def_ids(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.num_extern_def_ids,
&self.tcx.query_system.caches.num_extern_def_ids,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
#[inline(always)]
pub fn lib_features(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.lib_features,
&self.tcx.query_system.caches.lib_features,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
#[inline(always)]
pub fn stability_implications(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stability_implications,
&self.tcx.query_system.caches.stability_implications,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Whether the function is an intrinsic"]
#[inline(always)]
pub fn intrinsic_raw(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.intrinsic_raw,
&self.tcx.query_system.caches.intrinsic_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn get_lang_items(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.get_lang_items,
&self.tcx.query_system.caches.get_lang_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns all diagnostic items defined in all crates."]
#[inline(always)]
pub fn all_diagnostic_items(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.all_diagnostic_items,
&self.tcx.query_system.caches.all_diagnostic_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn defined_lang_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.defined_lang_items,
&self.tcx.query_system.caches.defined_lang_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the diagnostic items defined in a crate."]
#[inline(always)]
pub fn diagnostic_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_items,
&self.tcx.query_system.caches.diagnostic_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
#[inline(always)]
pub fn missing_lang_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.missing_lang_items,
&self.tcx.query_system.caches.missing_lang_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
#[inline(always)]
pub fn visible_parent_map(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.visible_parent_map,
&self.tcx.query_system.caches.visible_parent_map,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
#[inline(always)]
pub fn trimmed_def_paths(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trimmed_def_paths,
&self.tcx.query_system.caches.trimmed_def_paths,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
#[inline(always)]
pub fn missing_extern_crate_item(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.missing_extern_crate_item,
&self.tcx.query_system.caches.missing_extern_crate_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
#[inline(always)]
pub fn used_crate_source(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_crate_source,
&self.tcx.query_system.caches.used_crate_source,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
#[inline(always)]
pub fn debugger_visualizers(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.debugger_visualizers,
&self.tcx.query_system.caches.debugger_visualizers,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
#[inline(always)]
pub fn postorder_cnums(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.postorder_cnums,
&self.tcx.query_system.caches.postorder_cnums,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
#[inline(always)]
pub fn is_private_dep(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_private_dep,
&self.tcx.query_system.caches.is_private_dep,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
#[inline(always)]
pub fn allocator_kind(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.allocator_kind,
&self.tcx.query_system.caches.allocator_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
#[inline(always)]
pub fn alloc_error_handler_kind(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.alloc_error_handler_kind,
&self.tcx.query_system.caches.alloc_error_handler_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn upvars_mentioned(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.upvars_mentioned,
&self.tcx.query_system.caches.upvars_mentioned,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
#[inline(always)]
pub fn crates(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crates,
&self.tcx.query_system.caches.crates,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
#[inline(always)]
pub fn used_crates(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.used_crates,
&self.tcx.query_system.caches.used_crates,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
#[inline(always)]
pub fn duplicate_crate_names(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.duplicate_crate_names,
&self.tcx.query_system.caches.duplicate_crate_names,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
#[inline(always)]
pub fn traits(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.traits,
&self.tcx.query_system.caches.traits,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
#[inline(always)]
pub fn trait_impls_in_crate(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_in_crate,
&self.tcx.query_system.caches.trait_impls_in_crate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
#[inline(always)]
pub fn stable_order_of_exportable_impls(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stable_order_of_exportable_impls,
&self.tcx.query_system.caches.stable_order_of_exportable_impls,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
#[inline(always)]
pub fn exportable_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exportable_items,
&self.tcx.query_system.caches.exportable_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_non_generic_symbols(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exported_non_generic_symbols,
&self.tcx.query_system.caches.exported_non_generic_symbols,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_generic_symbols(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.exported_generic_symbols,
&self.tcx.query_system.caches.exported_generic_symbols,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
#[inline(always)]
pub fn collect_and_partition_mono_items(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.collect_and_partition_mono_items,
&self.tcx.query_system.caches.collect_and_partition_mono_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
#[inline(always)]
pub fn is_codegened_item(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_codegened_item,
&self.tcx.query_system.caches.is_codegened_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
#[inline(always)]
pub fn codegen_unit(self, key: Symbol) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.codegen_unit,
&self.tcx.query_system.caches.codegen_unit,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
#[inline(always)]
pub fn backend_optimization_level(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.backend_optimization_level,
&self.tcx.query_system.caches.backend_optimization_level,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
#[inline(always)]
pub fn output_filenames(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.output_filenames,
&self.tcx.query_system.caches.output_filenames,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_projection(self,
key: CanonicalAliasGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_projection,
&self.tcx.query_system.caches.normalize_canonicalized_projection,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_free_alias(self,
key: CanonicalAliasGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_free_alias,
&self.tcx.query_system.caches.normalize_canonicalized_free_alias,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_inherent_projection(self,
key: CanonicalAliasGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_inherent_projection,
&self.tcx.query_system.caches.normalize_canonicalized_inherent_projection,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
#[inline(always)]
pub fn try_normalize_generic_arg_after_erasing_regions(self,
key: PseudoCanonicalInput<'tcx, GenericArg<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.try_normalize_generic_arg_after_erasing_regions,
&self.tcx.query_system.caches.try_normalize_generic_arg_after_erasing_regions,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
#[inline(always)]
pub fn implied_outlives_bounds(self,
key: (CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implied_outlives_bounds,
&self.tcx.query_system.caches.implied_outlives_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
#[inline(always)]
pub fn dropck_outlives(self, key: CanonicalDropckOutlivesGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.dropck_outlives,
&self.tcx.query_system.caches.dropck_outlives,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
#[inline(always)]
pub fn evaluate_obligation(self, key: CanonicalPredicateGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.evaluate_obligation,
&self.tcx.query_system.caches.evaluate_obligation,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
#[inline(always)]
pub fn type_op_ascribe_user_type(self,
key: CanonicalTypeOpAscribeUserTypeGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_ascribe_user_type,
&self.tcx.query_system.caches.type_op_ascribe_user_type,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
#[inline(always)]
pub fn type_op_prove_predicate(self,
key: CanonicalTypeOpProvePredicateGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_prove_predicate,
&self.tcx.query_system.caches.type_op_prove_predicate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_ty(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_ty,
&self.tcx.query_system.caches.type_op_normalize_ty,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_clause(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_clause,
&self.tcx.query_system.caches.type_op_normalize_clause,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_poly_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_poly_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_poly_fn_sig,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_fn_sig,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn instantiate_and_check_impossible_predicates(self,
key: (DefId, GenericArgsRef<'tcx>)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.instantiate_and_check_impossible_predicates,
&self.tcx.query_system.caches.instantiate_and_check_impossible_predicates,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[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)` "]
#[inline(always)]
pub fn is_impossible_associated_item(self, key: (DefId, DefId)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.is_impossible_associated_item,
&self.tcx.query_system.caches.is_impossible_associated_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
#[inline(always)]
pub fn method_autoderef_steps(self,
key: CanonicalMethodAutoderefStepsGoal<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.method_autoderef_steps,
&self.tcx.query_system.caches.method_autoderef_steps,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Used by `-Znext-solver` to compute proof trees."]
#[inline(always)]
pub fn evaluate_root_goal_for_proof_tree_raw(self,
key: solve::CanonicalInput<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.evaluate_root_goal_for_proof_tree_raw,
&self.tcx.query_system.caches.evaluate_root_goal_for_proof_tree_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
#[inline(always)]
pub fn rust_target_features(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.rust_target_features,
&self.tcx.query_system.caches.rust_target_features,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
#[inline(always)]
pub fn implied_target_features(self, key: Symbol) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.implied_target_features,
&self.tcx.query_system.caches.implied_target_features,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
#[inline(always)]
pub fn features_query(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.features_query,
&self.tcx.query_system.caches.features_query,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
#[inline(always)]
pub fn crate_for_resolver(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.crate_for_resolver,
&self.tcx.query_system.caches.crate_for_resolver,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
#[inline(always)]
pub fn resolve_instance_raw(self,
key: ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.resolve_instance_raw,
&self.tcx.query_system.caches.resolve_instance_raw,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
#[inline(always)]
pub fn reveal_opaque_types_in_bounds(self, key: ty::Clauses<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.reveal_opaque_types_in_bounds,
&self.tcx.query_system.caches.reveal_opaque_types_in_bounds,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
#[inline(always)]
pub fn limits(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.limits,
&self.tcx.query_system.caches.limits,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
#[inline(always)]
pub fn diagnostic_hir_wf_check(self,
key: (ty::Predicate<'tcx>, WellFormedLoc)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_hir_wf_check,
&self.tcx.query_system.caches.diagnostic_hir_wf_check,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
#[inline(always)]
pub fn global_backend_features(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.global_backend_features,
&self.tcx.query_system.caches.global_backend_features,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
#[inline(always)]
pub fn check_validity_requirement(self,
key:
(ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_validity_requirement,
&self.tcx.query_system.caches.check_validity_requirement,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
#[inline(always)]
pub fn compare_impl_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.compare_impl_item,
&self.tcx.query_system.caches.compare_impl_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn deduced_param_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.deduced_param_attrs,
&self.tcx.query_system.caches.deduced_param_attrs,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
#[inline(always)]
pub fn doc_link_resolutions(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.doc_link_resolutions,
&self.tcx.query_system.caches.doc_link_resolutions,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
#[inline(always)]
pub fn doc_link_traits_in_scope(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.doc_link_traits_in_scope,
&self.tcx.query_system.caches.doc_link_traits_in_scope,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
#[inline(always)]
pub fn stripped_cfg_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.stripped_cfg_items,
&self.tcx.query_system.caches.stripped_cfg_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
#[inline(always)]
pub fn generics_require_sized_self(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.generics_require_sized_self,
&self.tcx.query_system.caches.generics_require_sized_self,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
#[inline(always)]
pub fn cross_crate_inlinable(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.cross_crate_inlinable,
&self.tcx.query_system.caches.cross_crate_inlinable,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
#[inline(always)]
pub fn check_mono_item(self, key: ty::Instance<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_mono_item,
&self.tcx.query_system.caches.check_mono_item,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
#[inline(always)]
pub fn skip_move_check_fns(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.skip_move_check_fns,
&self.tcx.query_system.caches.skip_move_check_fns,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
#[inline(always)]
pub fn items_of_instance(self,
key: (ty::Instance<'tcx>, CollectionMode)) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.items_of_instance,
&self.tcx.query_system.caches.items_of_instance,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
#[inline(always)]
pub fn size_estimate(self, key: ty::Instance<'tcx>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.size_estimate,
&self.tcx.query_system.caches.size_estimate,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn anon_const_kind(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.anon_const_kind,
&self.tcx.query_system.caches.anon_const_kind,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
#[inline(always)]
pub fn trivial_const(self,
key: impl crate::query::IntoQueryParam<DefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.trivial_const,
&self.tcx.query_system.caches.trivial_const,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
#[inline(always)]
pub fn sanitizer_settings_for(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.sanitizer_settings_for,
&self.tcx.query_system.caches.sanitizer_settings_for,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
#[inline(always)]
pub fn check_externally_implementable_items(self, key: ()) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.check_externally_implementable_items,
&self.tcx.query_system.caches.check_externally_implementable_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
#[doc = " Returns a list of all `externally implementable items` crate."]
#[inline(always)]
pub fn externally_implementable_items(self, key: CrateNum) {
crate::query::inner::query_ensure(self.tcx,
self.tcx.query_system.fns.engine.externally_implementable_items,
&self.tcx.query_system.caches.externally_implementable_items,
crate::query::IntoQueryParam::into_query_param(key), true);
}
}
impl<'tcx> TyCtxt<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
#[inline(always)]
#[must_use]
pub fn derive_macro_expansion(self, key: (LocalExpnId, &'tcx TokenStream))
-> Result<&'tcx TokenStream, ()> {
self.at(DUMMY_SP).derive_macro_expansion(key)
}
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
#[inline(always)]
#[must_use]
pub fn trigger_delayed_bug(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
self.at(DUMMY_SP).trigger_delayed_bug(key)
}
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
#[inline(always)]
#[must_use]
pub fn registered_tools(self, key: ()) -> &'tcx ty::RegisteredTools {
self.at(DUMMY_SP).registered_tools(key)
}
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
#[inline(always)]
#[must_use]
pub fn early_lint_checks(self, key: ()) -> () {
self.at(DUMMY_SP).early_lint_checks(key)
}
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
#[inline(always)]
#[must_use]
pub fn env_var_os(self, key: &'tcx OsStr) -> Option<&'tcx OsStr> {
self.at(DUMMY_SP).env_var_os(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
#[inline(always)]
#[must_use]
pub fn resolutions(self, key: ()) -> &'tcx ty::ResolverGlobalCtxt {
self.at(DUMMY_SP).resolutions(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
#[inline(always)]
#[must_use]
pub fn resolver_for_lowering_raw(self, key: ())
->
(&'tcx Steal<(ty::ResolverAstLowering, Arc<ast::Crate>)>,
&'tcx ty::ResolverGlobalCtxt) {
self.at(DUMMY_SP).resolver_for_lowering_raw(key)
}
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
#[inline(always)]
#[must_use]
pub fn source_span(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> Span {
self.at(DUMMY_SP).source_span(key)
}
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
#[inline(always)]
#[must_use]
pub fn hir_crate(self, key: ()) -> &'tcx Crate<'tcx> {
self.at(DUMMY_SP).hir_crate(key)
}
#[doc = " All items in the crate."]
#[inline(always)]
#[must_use]
pub fn hir_crate_items(self, key: ())
-> &'tcx rustc_middle::hir::ModuleItems {
self.at(DUMMY_SP).hir_crate_items(key)
}
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
#[must_use]
pub fn hir_module_items(self, key: LocalModDefId)
-> &'tcx rustc_middle::hir::ModuleItems {
self.at(DUMMY_SP).hir_module_items(key)
}
#[doc = " Returns HIR ID for the given `LocalDefId`."]
#[inline(always)]
#[must_use]
pub fn local_def_id_to_hir_id(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> hir::HirId {
self.at(DUMMY_SP).local_def_id_to_hir_id(key)
}
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
#[must_use]
pub fn hir_owner_parent_q(self, key: hir::OwnerId) -> hir::HirId {
self.at(DUMMY_SP).hir_owner_parent_q(key)
}
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
#[must_use]
pub fn opt_hir_owner_nodes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Option<&'tcx hir::OwnerNodes<'tcx>> {
self.at(DUMMY_SP).opt_hir_owner_nodes(key)
}
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
#[must_use]
pub fn hir_attr_map(self, key: hir::OwnerId)
-> &'tcx hir::AttributeMap<'tcx> {
self.at(DUMMY_SP).hir_attr_map(key)
}
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
#[must_use]
pub fn opt_ast_lowering_delayed_lints(self, key: hir::OwnerId)
-> Option<&'tcx hir::lints::DelayedLints> {
self.at(DUMMY_SP).opt_ast_lowering_delayed_lints(key)
}
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
#[inline(always)]
#[must_use]
pub fn const_param_default(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
self.at(DUMMY_SP).const_param_default(key)
}
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
#[inline(always)]
#[must_use]
pub fn const_of_item(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
self.at(DUMMY_SP).const_of_item(key)
}
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
#[must_use]
pub fn type_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, Ty<'tcx>> {
self.at(DUMMY_SP).type_of(key)
}
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
#[inline(always)]
#[must_use]
pub fn type_of_opaque(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<ty::EarlyBinder<'tcx, Ty<'tcx>>, CyclePlaceholder> {
self.at(DUMMY_SP).type_of_opaque(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
#[inline(always)]
#[must_use]
pub fn type_of_opaque_hir_typeck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::EarlyBinder<'tcx, Ty<'tcx>> {
self.at(DUMMY_SP).type_of_opaque_hir_typeck(key)
}
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
#[must_use]
pub fn type_alias_is_lazy(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).type_alias_is_lazy(key)
}
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
#[inline(always)]
#[must_use]
pub fn collect_return_position_impl_trait_in_trait_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx, Ty<'tcx>>>,
ErrorGuaranteed> {
self.at(DUMMY_SP).collect_return_position_impl_trait_in_trait_tys(key)
}
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
#[inline(always)]
#[must_use]
pub fn opaque_ty_origin(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> hir::OpaqueTyOrigin<DefId> {
self.at(DUMMY_SP).opaque_ty_origin(key)
}
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
#[inline(always)]
#[must_use]
pub fn unsizing_params_for_adt(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<u32> {
self.at(DUMMY_SP).unsizing_params_for_adt(key)
}
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
#[inline(always)]
#[must_use]
pub fn analysis(self, key: ()) -> () { self.at(DUMMY_SP).analysis(key) }
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
#[inline(always)]
#[must_use]
pub fn check_expectations(self, key: Option<Symbol>) -> () {
self.at(DUMMY_SP).check_expectations(key)
}
#[doc = " Returns the *generics* of the definition given by `DefId`."]
#[inline(always)]
#[must_use]
pub fn generics_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::Generics {
self.at(DUMMY_SP).generics_of(key)
}
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
#[must_use]
pub fn predicates_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::GenericPredicates<'tcx> {
self.at(DUMMY_SP).predicates_of(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
#[must_use]
pub fn opaque_types_defined_by(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::List<LocalDefId> {
self.at(DUMMY_SP).opaque_types_defined_by(key)
}
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
#[inline(always)]
#[must_use]
pub fn nested_bodies_within(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::List<LocalDefId> {
self.at(DUMMY_SP).nested_bodies_within(key)
}
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
#[inline(always)]
#[must_use]
pub fn explicit_item_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_item_bounds(key)
}
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
#[inline(always)]
#[must_use]
pub fn explicit_item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_item_self_bounds(key)
}
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
#[inline(always)]
#[must_use]
pub fn item_bounds(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
self.at(DUMMY_SP).item_bounds(key)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
self.at(DUMMY_SP).item_self_bounds(key)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn item_non_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
self.at(DUMMY_SP).item_non_self_bounds(key)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn impl_super_outlives(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
self.at(DUMMY_SP).impl_super_outlives(key)
}
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
#[inline(always)]
#[must_use]
pub fn native_libraries(self, key: CrateNum) -> &'tcx Vec<NativeLib> {
self.at(DUMMY_SP).native_libraries(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn shallow_lint_levels_on(self, key: hir::OwnerId)
-> &'tcx rustc_middle::lint::ShallowLintLevelMap {
self.at(DUMMY_SP).shallow_lint_levels_on(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
#[inline(always)]
#[must_use]
pub fn lint_expectations(self, key: ())
-> &'tcx Vec<(LintExpectationId, LintExpectation)> {
self.at(DUMMY_SP).lint_expectations(key)
}
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
#[inline(always)]
#[must_use]
pub fn lints_that_dont_need_to_run(self, key: ())
-> &'tcx UnordSet<LintId> {
self.at(DUMMY_SP).lints_that_dont_need_to_run(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn expn_that_defined(self,
key: impl crate::query::IntoQueryParam<DefId>) -> rustc_span::ExpnId {
self.at(DUMMY_SP).expn_that_defined(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
#[inline(always)]
#[must_use]
pub fn is_panic_runtime(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).is_panic_runtime(key)
}
#[doc = " Checks whether a type is representable or infinitely sized"]
#[inline(always)]
#[must_use]
pub fn representability(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> rustc_middle::ty::Representability {
self.at(DUMMY_SP).representability(key)
}
#[doc = " An implementation detail for the `representability` query"]
#[inline(always)]
#[must_use]
pub fn representability_adt_ty(self, key: Ty<'tcx>)
-> rustc_middle::ty::Representability {
self.at(DUMMY_SP).representability_adt_ty(key)
}
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
#[inline(always)]
#[must_use]
pub fn params_in_repr(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<u32> {
self.at(DUMMY_SP).params_in_repr(key)
}
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
#[inline(always)]
#[must_use]
pub fn thir_body(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
->
Result<(&'tcx Steal<thir::Thir<'tcx>>, thir::ExprId),
ErrorGuaranteed> {
self.at(DUMMY_SP).thir_body(key)
}
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
#[inline(always)]
#[must_use]
pub fn mir_keys(self, key: ())
-> &'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId> {
self.at(DUMMY_SP).mir_keys(key)
}
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
#[inline(always)]
#[must_use]
pub fn mir_const_qualif(self,
key: impl crate::query::IntoQueryParam<DefId>) -> mir::ConstQualifs {
self.at(DUMMY_SP).mir_const_qualif(key)
}
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
#[inline(always)]
#[must_use]
pub fn mir_built(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Steal<mir::Body<'tcx>> {
self.at(DUMMY_SP).mir_built(key)
}
#[doc = " Try to build an abstract representation of the given constant."]
#[inline(always)]
#[must_use]
pub fn thir_abstract_const(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
Result<Option<ty::EarlyBinder<'tcx, ty::Const<'tcx>>>,
ErrorGuaranteed> {
self.at(DUMMY_SP).thir_abstract_const(key)
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn mir_drops_elaborated_and_const_checked(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Steal<mir::Body<'tcx>> {
self.at(DUMMY_SP).mir_drops_elaborated_and_const_checked(key)
}
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
#[inline(always)]
#[must_use]
pub fn mir_for_ctfe(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx mir::Body<'tcx> {
self.at(DUMMY_SP).mir_for_ctfe(key)
}
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn mir_promoted(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
->
(&'tcx Steal<mir::Body<'tcx>>,
&'tcx Steal<IndexVec<mir::Promoted, mir::Body<'tcx>>>) {
self.at(DUMMY_SP).mir_promoted(key)
}
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn closure_typeinfo(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::ClosureTypeInfo<'tcx> {
self.at(DUMMY_SP).closure_typeinfo(key)
}
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
#[inline(always)]
#[must_use]
pub fn closure_saved_names_of_captured_variables(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx IndexVec<abi::FieldIdx, Symbol> {
self.at(DUMMY_SP).closure_saved_names_of_captured_variables(key)
}
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn mir_coroutine_witnesses(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx mir::CoroutineLayout<'tcx>> {
self.at(DUMMY_SP).mir_coroutine_witnesses(key)
}
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn check_coroutine_obligations(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).check_coroutine_obligations(key)
}
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
#[inline(always)]
#[must_use]
pub fn check_potentially_region_dependent_goals(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).check_potentially_region_dependent_goals(key)
}
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
#[inline(always)]
#[must_use]
pub fn optimized_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx mir::Body<'tcx> {
self.at(DUMMY_SP).optimized_mir(key)
}
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
#[inline(always)]
#[must_use]
pub fn coverage_attr_on(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
self.at(DUMMY_SP).coverage_attr_on(key)
}
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
#[inline(always)]
#[must_use]
pub fn coverage_ids_info(self, key: ty::InstanceKind<'tcx>)
-> Option<&'tcx mir::coverage::CoverageIdsInfo> {
self.at(DUMMY_SP).coverage_ids_info(key)
}
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
#[inline(always)]
#[must_use]
pub fn promoted_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx IndexVec<mir::Promoted, mir::Body<'tcx>> {
self.at(DUMMY_SP).promoted_mir(key)
}
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
#[inline(always)]
#[must_use]
pub fn erase_and_anonymize_regions_ty(self, key: Ty<'tcx>) -> Ty<'tcx> {
self.at(DUMMY_SP).erase_and_anonymize_regions_ty(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
#[inline(always)]
#[must_use]
pub fn wasm_import_module_map(self, key: CrateNum)
-> &'tcx DefIdMap<String> {
self.at(DUMMY_SP).wasm_import_module_map(key)
}
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
#[inline(always)]
#[must_use]
pub fn trait_explicit_predicates_and_bounds(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::GenericPredicates<'tcx> {
self.at(DUMMY_SP).trait_explicit_predicates_and_bounds(key)
}
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
#[inline(always)]
#[must_use]
pub fn explicit_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::GenericPredicates<'tcx> {
self.at(DUMMY_SP).explicit_predicates_of(key)
}
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
#[must_use]
pub fn inferred_outlives_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [(ty::Clause<'tcx>, Span)] {
self.at(DUMMY_SP).inferred_outlives_of(key)
}
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
#[inline(always)]
#[must_use]
pub fn explicit_super_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_super_predicates_of(key)
}
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
#[inline(always)]
#[must_use]
pub fn explicit_implied_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_implied_predicates_of(key)
}
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
#[inline(always)]
#[must_use]
pub fn explicit_supertraits_containing_assoc_item(self,
key: (DefId, rustc_span::Ident))
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_supertraits_containing_assoc_item(key)
}
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
#[inline(always)]
#[must_use]
pub fn const_conditions(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ConstConditions<'tcx> {
self.at(DUMMY_SP).const_conditions(key)
}
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
#[inline(always)]
#[must_use]
pub fn explicit_implied_const_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::PolyTraitRef<'tcx>, Span)]> {
self.at(DUMMY_SP).explicit_implied_const_bounds(key)
}
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
#[inline(always)]
#[must_use]
pub fn type_param_predicates(self,
key: (LocalDefId, LocalDefId, rustc_span::Ident))
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
self.at(DUMMY_SP).type_param_predicates(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn trait_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::TraitDef {
self.at(DUMMY_SP).trait_def(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn adt_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::AdtDef<'tcx> {
self.at(DUMMY_SP).adt_def(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn adt_destructor(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<ty::Destructor> {
self.at(DUMMY_SP).adt_destructor(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn adt_async_destructor(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<ty::AsyncDestructor> {
self.at(DUMMY_SP).adt_async_destructor(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
#[inline(always)]
#[must_use]
pub fn adt_sizedness_constraint(self, key: (DefId, SizedTraitKind))
-> Option<ty::EarlyBinder<'tcx, Ty<'tcx>>> {
self.at(DUMMY_SP).adt_sizedness_constraint(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn adt_dtorck_constraint(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DropckConstraint<'tcx> {
self.at(DUMMY_SP).adt_dtorck_constraint(key)
}
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
#[inline(always)]
#[must_use]
pub fn constness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> hir::Constness {
self.at(DUMMY_SP).constness(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn asyncness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::Asyncness {
self.at(DUMMY_SP).asyncness(key)
}
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
#[inline(always)]
#[must_use]
pub fn is_promotable_const_fn(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_promotable_const_fn(key)
}
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
#[inline(always)]
#[must_use]
pub fn coroutine_by_move_body_def_id(self,
key: impl crate::query::IntoQueryParam<DefId>) -> DefId {
self.at(DUMMY_SP).coroutine_by_move_body_def_id(key)
}
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
#[inline(always)]
#[must_use]
pub fn coroutine_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::CoroutineKind> {
self.at(DUMMY_SP).coroutine_kind(key)
}
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
#[inline(always)]
#[must_use]
pub fn coroutine_for_closure(self,
key: impl crate::query::IntoQueryParam<DefId>) -> DefId {
self.at(DUMMY_SP).coroutine_for_closure(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
#[inline(always)]
#[must_use]
pub fn coroutine_hidden_types(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
ty::EarlyBinder<'tcx,
ty::Binder<'tcx, ty::CoroutineWitnessTypes<TyCtxt<'tcx>>>> {
self.at(DUMMY_SP).coroutine_hidden_types(key)
}
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn crate_variances(self, key: ())
-> &'tcx ty::CrateVariancesMap<'tcx> {
self.at(DUMMY_SP).crate_variances(key)
}
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
#[must_use]
pub fn variances_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [ty::Variance] {
self.at(DUMMY_SP).variances_of(key)
}
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn inferred_outlives_crate(self, key: ())
-> &'tcx ty::CratePredicatesMap<'tcx> {
self.at(DUMMY_SP).inferred_outlives_crate(key)
}
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
#[inline(always)]
#[must_use]
pub fn associated_item_def_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
self.at(DUMMY_SP).associated_item_def_ids(key)
}
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
#[inline(always)]
#[must_use]
pub fn associated_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> ty::AssocItem {
self.at(DUMMY_SP).associated_item(key)
}
#[doc = " Collects the associated items defined on a trait or impl."]
#[inline(always)]
#[must_use]
pub fn associated_items(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::AssocItems {
self.at(DUMMY_SP).associated_items(key)
}
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
#[inline(always)]
#[must_use]
pub fn impl_item_implementor_ids(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DefIdMap<DefId> {
self.at(DUMMY_SP).impl_item_implementor_ids(key)
}
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
#[inline(always)]
#[must_use]
pub fn associated_types_for_impl_traits_in_trait_or_impl(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DefIdMap<Vec<DefId>> {
self.at(DUMMY_SP).associated_types_for_impl_traits_in_trait_or_impl(key)
}
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
#[inline(always)]
#[must_use]
pub fn impl_trait_header(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ImplTraitHeader<'tcx> {
self.at(DUMMY_SP).impl_trait_header(key)
}
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
#[inline(always)]
#[must_use]
pub fn impl_self_is_guaranteed_unsized(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).impl_self_is_guaranteed_unsized(key)
}
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
#[inline(always)]
#[must_use]
pub fn inherent_impls(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DefId] {
self.at(DUMMY_SP).inherent_impls(key)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
#[inline(always)]
#[must_use]
pub fn incoherent_impls(self, key: SimplifiedType) -> &'tcx [DefId] {
self.at(DUMMY_SP).incoherent_impls(key)
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
#[must_use]
pub fn check_transmutes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
self.at(DUMMY_SP).check_transmutes(key)
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
#[must_use]
pub fn check_unsafety(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
self.at(DUMMY_SP).check_unsafety(key)
}
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
#[inline(always)]
#[must_use]
pub fn check_tail_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), rustc_errors::ErrorGuaranteed> {
self.at(DUMMY_SP).check_tail_calls(key)
}
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
#[inline(always)]
#[must_use]
pub fn assumed_wf_types(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [(Ty<'tcx>, Span)] {
self.at(DUMMY_SP).assumed_wf_types(key)
}
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
#[inline(always)]
#[must_use]
pub fn assumed_wf_types_for_rpitit(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [(Ty<'tcx>, Span)] {
self.at(DUMMY_SP).assumed_wf_types_for_rpitit(key)
}
#[doc = " Computes the signature of the function."]
#[inline(always)]
#[must_use]
pub fn fn_sig(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::PolyFnSig<'tcx>> {
self.at(DUMMY_SP).fn_sig(key)
}
#[doc = " Performs lint checking for the module."]
#[inline(always)]
#[must_use]
pub fn lint_mod(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).lint_mod(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
#[inline(always)]
#[must_use]
pub fn check_unused_traits(self, key: ()) -> () {
self.at(DUMMY_SP).check_unused_traits(key)
}
#[doc = " Checks the attributes in the module."]
#[inline(always)]
#[must_use]
pub fn check_mod_attrs(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).check_mod_attrs(key)
}
#[doc = " Checks for uses of unstable APIs in the module."]
#[inline(always)]
#[must_use]
pub fn check_mod_unstable_api_usage(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).check_mod_unstable_api_usage(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
#[inline(always)]
#[must_use]
pub fn check_mod_privacy(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).check_mod_privacy(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
#[must_use]
pub fn check_liveness(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx> {
self.at(DUMMY_SP).check_liveness(key)
}
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
#[inline(always)]
#[must_use]
pub fn live_symbols_and_ignored_derived_traits(self, key: ())
->
&'tcx Result<(LocalDefIdSet, LocalDefIdMap<FxIndexSet<DefId>>),
ErrorGuaranteed> {
self.at(DUMMY_SP).live_symbols_and_ignored_derived_traits(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
#[inline(always)]
#[must_use]
pub fn check_mod_deathness(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).check_mod_deathness(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
#[inline(always)]
#[must_use]
pub fn check_type_wf(self, key: ()) -> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).check_type_wf(key)
}
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
#[inline(always)]
#[must_use]
pub fn coerce_unsized_info(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<ty::adjustment::CoerceUnsizedInfo, ErrorGuaranteed> {
self.at(DUMMY_SP).coerce_unsized_info(key)
}
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn typeck(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::TypeckResults<'tcx> {
self.at(DUMMY_SP).typeck(key)
}
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn used_trait_imports(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx UnordSet<LocalDefId> {
self.at(DUMMY_SP).used_trait_imports(key)
}
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn coherent_trait(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).coherent_trait(key)
}
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
#[inline(always)]
#[must_use]
pub fn mir_borrowck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
->
Result<&'tcx FxIndexMap<LocalDefId,
ty::DefinitionSiteHiddenType<'tcx>>, ErrorGuaranteed> {
self.at(DUMMY_SP).mir_borrowck(key)
}
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn crate_inherent_impls(self, key: ())
-> (&'tcx CrateInherentImpls, Result<(), ErrorGuaranteed>) {
self.at(DUMMY_SP).crate_inherent_impls(key)
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn crate_inherent_impls_validity_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).crate_inherent_impls_validity_check(key)
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn crate_inherent_impls_overlap_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).crate_inherent_impls_overlap_check(key)
}
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
#[inline(always)]
#[must_use]
pub fn orphan_check_impl(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).orphan_check_impl(key)
}
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
#[inline(always)]
#[must_use]
pub fn mir_callgraph_cyclic(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Option<UnordSet<LocalDefId>> {
self.at(DUMMY_SP).mir_callgraph_cyclic(key)
}
#[doc = " Obtain all the calls into other local functions"]
#[inline(always)]
#[must_use]
pub fn mir_inliner_callees(self, key: ty::InstanceKind<'tcx>)
-> &'tcx [(DefId, GenericArgsRef<'tcx>)] {
self.at(DUMMY_SP).mir_inliner_callees(key)
}
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
#[inline(always)]
#[must_use]
pub fn tag_for_variant(self,
key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>)
-> Option<ty::ScalarInt> {
self.at(DUMMY_SP).tag_for_variant(key)
}
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn eval_to_allocation_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToAllocationRawResult<'tcx> {
self.at(DUMMY_SP).eval_to_allocation_raw(key)
}
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
#[inline(always)]
#[must_use]
pub fn eval_static_initializer(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> EvalStaticInitializerRawResult<'tcx> {
self.at(DUMMY_SP).eval_static_initializer(key)
}
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
#[inline(always)]
#[must_use]
pub fn eval_to_const_value_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToConstValueResult<'tcx> {
self.at(DUMMY_SP).eval_to_const_value_raw(key)
}
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
#[inline(always)]
#[must_use]
pub fn eval_to_valtree(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToValTreeResult<'tcx> {
self.at(DUMMY_SP).eval_to_valtree(key)
}
#[doc =
" Converts a type-level constant value into a MIR constant value."]
#[inline(always)]
#[must_use]
pub fn valtree_to_const_val(self, key: ty::Value<'tcx>)
-> mir::ConstValue {
self.at(DUMMY_SP).valtree_to_const_val(key)
}
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
#[inline(always)]
#[must_use]
pub fn lit_to_const(self, key: LitToConstInput<'tcx>) -> ty::Const<'tcx> {
self.at(DUMMY_SP).lit_to_const(key)
}
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn check_match(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), rustc_errors::ErrorGuaranteed> {
self.at(DUMMY_SP).check_match(key)
}
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
#[inline(always)]
#[must_use]
pub fn effective_visibilities(self, key: ())
-> &'tcx EffectiveVisibilities {
self.at(DUMMY_SP).effective_visibilities(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
#[inline(always)]
#[must_use]
pub fn check_private_in_public(self, key: LocalModDefId) -> () {
self.at(DUMMY_SP).check_private_in_public(key)
}
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
#[inline(always)]
#[must_use]
pub fn reachable_set(self, key: ()) -> &'tcx LocalDefIdSet {
self.at(DUMMY_SP).reachable_set(key)
}
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
#[inline(always)]
#[must_use]
pub fn region_scope_tree(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx crate::middle::region::ScopeTree {
self.at(DUMMY_SP).region_scope_tree(key)
}
#[doc = " Generates a MIR body for the shim."]
#[inline(always)]
#[must_use]
pub fn mir_shims(self, key: ty::InstanceKind<'tcx>)
-> &'tcx mir::Body<'tcx> {
self.at(DUMMY_SP).mir_shims(key)
}
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
#[inline(always)]
#[must_use]
pub fn symbol_name(self, key: ty::Instance<'tcx>)
-> ty::SymbolName<'tcx> {
self.at(DUMMY_SP).symbol_name(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn def_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> DefKind {
self.at(DUMMY_SP).def_kind(key)
}
#[doc = " Gets the span for the definition."]
#[inline(always)]
#[must_use]
pub fn def_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Span {
self.at(DUMMY_SP).def_span(key)
}
#[doc = " Gets the span for the identifier of the definition."]
#[inline(always)]
#[must_use]
pub fn def_ident_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<Span> {
self.at(DUMMY_SP).def_ident_span(key)
}
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
#[inline(always)]
#[must_use]
pub fn ty_span(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Span {
self.at(DUMMY_SP).ty_span(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn lookup_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::Stability> {
self.at(DUMMY_SP).lookup_stability(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn lookup_const_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::ConstStability> {
self.at(DUMMY_SP).lookup_const_stability(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn lookup_default_body_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::DefaultBodyStability> {
self.at(DUMMY_SP).lookup_default_body_stability(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn should_inherit_track_caller(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).should_inherit_track_caller(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn inherited_align(self,
key: impl crate::query::IntoQueryParam<DefId>) -> Option<Align> {
self.at(DUMMY_SP).inherited_align(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
#[inline(always)]
#[must_use]
pub fn lookup_deprecation_entry(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DeprecationEntry> {
self.at(DUMMY_SP).lookup_deprecation_entry(key)
}
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
#[inline(always)]
#[must_use]
pub fn is_doc_hidden(self, key: impl crate::query::IntoQueryParam<DefId>)
-> bool {
self.at(DUMMY_SP).is_doc_hidden(key)
}
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
#[inline(always)]
#[must_use]
pub fn is_doc_notable_trait(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_doc_notable_trait(key)
}
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
#[inline(always)]
#[must_use]
pub fn attrs_for_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [hir::Attribute] {
self.at(DUMMY_SP).attrs_for_def(key)
}
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
#[inline(always)]
#[must_use]
pub fn codegen_fn_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx CodegenFnAttrs {
self.at(DUMMY_SP).codegen_fn_attrs(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn asm_target_features(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx FxIndexSet<Symbol> {
self.at(DUMMY_SP).asm_target_features(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn fn_arg_idents(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [Option<rustc_span::Ident>] {
self.at(DUMMY_SP).fn_arg_idents(key)
}
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
#[inline(always)]
#[must_use]
pub fn rendered_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx String {
self.at(DUMMY_SP).rendered_const(key)
}
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
#[inline(always)]
#[must_use]
pub fn rendered_precise_capturing_args(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx [PreciseCapturingArgKind<Symbol, Symbol>]> {
self.at(DUMMY_SP).rendered_precise_capturing_args(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn impl_parent(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DefId> {
self.at(DUMMY_SP).impl_parent(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn is_mir_available(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_mir_available(key)
}
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
#[inline(always)]
#[must_use]
pub fn own_existential_vtable_entries(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
self.at(DUMMY_SP).own_existential_vtable_entries(key)
}
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
#[inline(always)]
#[must_use]
pub fn vtable_entries(self, key: ty::TraitRef<'tcx>)
-> &'tcx [ty::VtblEntry<'tcx>] {
self.at(DUMMY_SP).vtable_entries(key)
}
#[doc =
"[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()` "]
#[inline(always)]
#[must_use]
pub fn first_method_vtable_slot(self, key: ty::TraitRef<'tcx>) -> usize {
self.at(DUMMY_SP).first_method_vtable_slot(key)
}
#[doc =
"[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"]
#[inline(always)]
#[must_use]
pub fn supertrait_vtable_slot(self, key: (Ty<'tcx>, Ty<'tcx>))
-> Option<usize> {
self.at(DUMMY_SP).supertrait_vtable_slot(key)
}
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
#[inline(always)]
#[must_use]
pub fn vtable_allocation(self,
key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>))
-> mir::interpret::AllocId {
self.at(DUMMY_SP).vtable_allocation(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
#[inline(always)]
#[must_use]
pub fn codegen_select_candidate(self,
key: PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>)
-> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> {
self.at(DUMMY_SP).codegen_select_candidate(key)
}
#[doc = " Return all `impl` blocks in the current crate."]
#[inline(always)]
#[must_use]
pub fn all_local_trait_impls(self, key: ())
->
&'tcx rustc_data_structures::fx::FxIndexMap<DefId,
Vec<LocalDefId>> {
self.at(DUMMY_SP).all_local_trait_impls(key)
}
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
#[inline(always)]
#[must_use]
pub fn local_trait_impls(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [LocalDefId] {
self.at(DUMMY_SP).local_trait_impls(key)
}
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
#[inline(always)]
#[must_use]
pub fn trait_impls_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::trait_def::TraitImpls {
self.at(DUMMY_SP).trait_impls_of(key)
}
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
#[must_use]
pub fn specialization_graph_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx specialization_graph::Graph, ErrorGuaranteed> {
self.at(DUMMY_SP).specialization_graph_of(key)
}
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
#[must_use]
pub fn dyn_compatibility_violations(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DynCompatibilityViolation] {
self.at(DUMMY_SP).dyn_compatibility_violations(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
#[inline(always)]
#[must_use]
pub fn is_dyn_compatible(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_dyn_compatible(key)
}
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
#[inline(always)]
#[must_use]
pub fn param_env(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ParamEnv<'tcx> {
self.at(DUMMY_SP).param_env(key)
}
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
#[inline(always)]
#[must_use]
pub fn typing_env_normalized_for_post_analysis(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::TypingEnv<'tcx> {
self.at(DUMMY_SP).typing_env_normalized_for_post_analysis(key)
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
#[inline(always)]
#[must_use]
pub fn is_copy_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
self.at(DUMMY_SP).is_copy_raw(key)
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
#[inline(always)]
#[must_use]
pub fn is_use_cloned_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
self.at(DUMMY_SP).is_use_cloned_raw(key)
}
#[doc = " Query backing `Ty::is_sized`."]
#[inline(always)]
#[must_use]
pub fn is_sized_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
self.at(DUMMY_SP).is_sized_raw(key)
}
#[doc = " Query backing `Ty::is_freeze`."]
#[inline(always)]
#[must_use]
pub fn is_freeze_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
self.at(DUMMY_SP).is_freeze_raw(key)
}
#[doc = " Query backing `Ty::is_unpin`."]
#[inline(always)]
#[must_use]
pub fn is_unpin_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
self.at(DUMMY_SP).is_unpin_raw(key)
}
#[doc = " Query backing `Ty::is_async_drop`."]
#[inline(always)]
#[must_use]
pub fn is_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
self.at(DUMMY_SP).is_async_drop_raw(key)
}
#[doc = " Query backing `Ty::needs_drop`."]
#[inline(always)]
#[must_use]
pub fn needs_drop_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
self.at(DUMMY_SP).needs_drop_raw(key)
}
#[doc = " Query backing `Ty::needs_async_drop`."]
#[inline(always)]
#[must_use]
pub fn needs_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
self.at(DUMMY_SP).needs_async_drop_raw(key)
}
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
#[inline(always)]
#[must_use]
pub fn has_significant_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
self.at(DUMMY_SP).has_significant_drop_raw(key)
}
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
#[inline(always)]
#[must_use]
pub fn has_structural_eq_impl(self, key: Ty<'tcx>) -> bool {
self.at(DUMMY_SP).has_structural_eq_impl(key)
}
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
#[must_use]
pub fn adt_drop_tys(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
self.at(DUMMY_SP).adt_drop_tys(key)
}
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
#[must_use]
pub fn adt_async_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
self.at(DUMMY_SP).adt_async_drop_tys(key)
}
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
#[must_use]
pub fn adt_significant_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
self.at(DUMMY_SP).adt_significant_drop_tys(key)
}
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
#[inline(always)]
#[must_use]
pub fn list_significant_drop_tys(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> &'tcx ty::List<Ty<'tcx>> {
self.at(DUMMY_SP).list_significant_drop_tys(key)
}
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
#[inline(always)]
#[must_use]
pub fn layout_of(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
->
Result<ty::layout::TyAndLayout<'tcx>,
&'tcx ty::layout::LayoutError<'tcx>> {
self.at(DUMMY_SP).layout_of(key)
}
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
#[inline(always)]
#[must_use]
pub fn fn_abi_of_fn_ptr(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>)
->
Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>> {
self.at(DUMMY_SP).fn_abi_of_fn_ptr(key)
}
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
#[inline(always)]
#[must_use]
pub fn fn_abi_of_instance(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>)
->
Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>> {
self.at(DUMMY_SP).fn_abi_of_instance(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
#[inline(always)]
#[must_use]
pub fn dylib_dependency_formats(self, key: CrateNum)
-> &'tcx [(CrateNum, LinkagePreference)] {
self.at(DUMMY_SP).dylib_dependency_formats(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
#[inline(always)]
#[must_use]
pub fn dependency_formats(self, key: ())
-> &'tcx Arc<crate::middle::dependency_format::Dependencies> {
self.at(DUMMY_SP).dependency_formats(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
#[inline(always)]
#[must_use]
pub fn is_compiler_builtins(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).is_compiler_builtins(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
#[inline(always)]
#[must_use]
pub fn has_global_allocator(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).has_global_allocator(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
#[inline(always)]
#[must_use]
pub fn has_alloc_error_handler(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).has_alloc_error_handler(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
#[inline(always)]
#[must_use]
pub fn has_panic_handler(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).has_panic_handler(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
#[inline(always)]
#[must_use]
pub fn is_profiler_runtime(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).is_profiler_runtime(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
#[inline(always)]
#[must_use]
pub fn has_ffi_unwind_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
self.at(DUMMY_SP).has_ffi_unwind_calls(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
#[inline(always)]
#[must_use]
pub fn required_panic_strategy(self, key: CrateNum)
-> Option<PanicStrategy> {
self.at(DUMMY_SP).required_panic_strategy(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
#[inline(always)]
#[must_use]
pub fn panic_in_drop_strategy(self, key: CrateNum) -> PanicStrategy {
self.at(DUMMY_SP).panic_in_drop_strategy(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
#[inline(always)]
#[must_use]
pub fn is_no_builtins(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).is_no_builtins(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
#[inline(always)]
#[must_use]
pub fn symbol_mangling_version(self, key: CrateNum)
-> SymbolManglingVersion {
self.at(DUMMY_SP).symbol_mangling_version(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
#[inline(always)]
#[must_use]
pub fn extern_crate(self, key: CrateNum) -> Option<&'tcx ExternCrate> {
self.at(DUMMY_SP).extern_crate(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
#[inline(always)]
#[must_use]
pub fn specialization_enabled_in(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).specialization_enabled_in(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
#[inline(always)]
#[must_use]
pub fn specializes(self, key: (DefId, DefId)) -> bool {
self.at(DUMMY_SP).specializes(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
#[inline(always)]
#[must_use]
pub fn in_scope_traits_map(self, key: hir::OwnerId)
-> Option<&'tcx ItemLocalMap<Box<[TraitCandidate]>>> {
self.at(DUMMY_SP).in_scope_traits_map(key)
}
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
#[inline(always)]
#[must_use]
pub fn defaultness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> hir::Defaultness {
self.at(DUMMY_SP).defaultness(key)
}
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
#[inline(always)]
#[must_use]
pub fn default_field(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DefId> {
self.at(DUMMY_SP).default_field(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
#[inline(always)]
#[must_use]
pub fn check_well_formed(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).check_well_formed(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
#[inline(always)]
#[must_use]
pub fn enforce_impl_non_lifetime_params_are_constrained(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).enforce_impl_non_lifetime_params_are_constrained(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
#[inline(always)]
#[must_use]
pub fn reachable_non_generics(self, key: CrateNum)
-> &'tcx DefIdMap<SymbolExportInfo> {
self.at(DUMMY_SP).reachable_non_generics(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
#[inline(always)]
#[must_use]
pub fn is_reachable_non_generic(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_reachable_non_generic(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
#[inline(always)]
#[must_use]
pub fn is_unreachable_local_definition(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
self.at(DUMMY_SP).is_unreachable_local_definition(key)
}
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
#[inline(always)]
#[must_use]
pub fn upstream_monomorphizations(self, key: ())
-> &'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>, CrateNum>> {
self.at(DUMMY_SP).upstream_monomorphizations(key)
}
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[inline(always)]
#[must_use]
pub fn upstream_monomorphizations_for(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx UnordMap<GenericArgsRef<'tcx>, CrateNum>> {
self.at(DUMMY_SP).upstream_monomorphizations_for(key)
}
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
#[must_use]
pub fn upstream_drop_glue_for(self, key: GenericArgsRef<'tcx>)
-> Option<CrateNum> {
self.at(DUMMY_SP).upstream_drop_glue_for(key)
}
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
#[must_use]
pub fn upstream_async_drop_glue_for(self, key: GenericArgsRef<'tcx>)
-> Option<CrateNum> {
self.at(DUMMY_SP).upstream_async_drop_glue_for(key)
}
#[doc = " Returns a list of all `extern` blocks of a crate."]
#[inline(always)]
#[must_use]
pub fn foreign_modules(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, ForeignModule> {
self.at(DUMMY_SP).foreign_modules(key)
}
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
#[inline(always)]
#[must_use]
pub fn clashing_extern_declarations(self, key: ()) -> () {
self.at(DUMMY_SP).clashing_extern_declarations(key)
}
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
#[inline(always)]
#[must_use]
pub fn entry_fn(self, key: ()) -> Option<(DefId, EntryFnType)> {
self.at(DUMMY_SP).entry_fn(key)
}
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
#[inline(always)]
#[must_use]
pub fn proc_macro_decls_static(self, key: ()) -> Option<LocalDefId> {
self.at(DUMMY_SP).proc_macro_decls_static(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
#[inline(always)]
#[must_use]
pub fn crate_hash(self, key: CrateNum) -> Svh {
self.at(DUMMY_SP).crate_hash(key)
}
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
#[inline(always)]
#[must_use]
pub fn crate_host_hash(self, key: CrateNum) -> Option<Svh> {
self.at(DUMMY_SP).crate_host_hash(key)
}
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
#[inline(always)]
#[must_use]
pub fn extra_filename(self, key: CrateNum) -> &'tcx String {
self.at(DUMMY_SP).extra_filename(key)
}
#[doc = " Gets the paths where the crate came from in the file system."]
#[inline(always)]
#[must_use]
pub fn crate_extern_paths(self, key: CrateNum) -> &'tcx Vec<PathBuf> {
self.at(DUMMY_SP).crate_extern_paths(key)
}
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
#[inline(always)]
#[must_use]
pub fn implementations_of_trait(self, key: (CrateNum, DefId))
-> &'tcx [(DefId, Option<SimplifiedType>)] {
self.at(DUMMY_SP).implementations_of_trait(key)
}
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
#[inline(always)]
#[must_use]
pub fn crate_incoherent_impls(self, key: (CrateNum, SimplifiedType))
-> &'tcx [DefId] {
self.at(DUMMY_SP).crate_incoherent_impls(key)
}
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
#[inline(always)]
#[must_use]
pub fn native_library(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx NativeLib> {
self.at(DUMMY_SP).native_library(key)
}
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
#[inline(always)]
#[must_use]
pub fn inherit_sig_for_delegation_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [Ty<'tcx>] {
self.at(DUMMY_SP).inherit_sig_for_delegation_item(key)
}
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
#[inline(always)]
#[must_use]
pub fn resolve_bound_vars(self, key: hir::OwnerId)
-> &'tcx ResolveBoundVars<'tcx> {
self.at(DUMMY_SP).resolve_bound_vars(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
#[must_use]
pub fn named_variable_map(self, key: hir::OwnerId)
-> &'tcx SortedMap<ItemLocalId, ResolvedArg> {
self.at(DUMMY_SP).named_variable_map(key)
}
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
#[must_use]
pub fn is_late_bound_map(self, key: hir::OwnerId)
-> Option<&'tcx FxIndexSet<ItemLocalId>> {
self.at(DUMMY_SP).is_late_bound_map(key)
}
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
#[inline(always)]
#[must_use]
pub fn object_lifetime_default(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ObjectLifetimeDefault {
self.at(DUMMY_SP).object_lifetime_default(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
#[must_use]
pub fn late_bound_vars_map(self, key: hir::OwnerId)
-> &'tcx SortedMap<ItemLocalId, Vec<ty::BoundVariableKind<'tcx>>> {
self.at(DUMMY_SP).late_bound_vars_map(key)
}
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
#[inline(always)]
#[must_use]
pub fn opaque_captured_lifetimes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [(ResolvedArg, LocalDefId)] {
self.at(DUMMY_SP).opaque_captured_lifetimes(key)
}
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
#[inline(always)]
#[must_use]
pub fn visibility(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::Visibility<DefId> {
self.at(DUMMY_SP).visibility(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
#[inline(always)]
#[must_use]
pub fn inhabited_predicate_adt(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::inhabitedness::InhabitedPredicate<'tcx> {
self.at(DUMMY_SP).inhabited_predicate_adt(key)
}
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
#[inline(always)]
#[must_use]
pub fn inhabited_predicate_type(self, key: Ty<'tcx>)
-> ty::inhabitedness::InhabitedPredicate<'tcx> {
self.at(DUMMY_SP).inhabited_predicate_type(key)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
#[inline(always)]
#[must_use]
pub fn dep_kind(self, key: CrateNum) -> CrateDepKind {
self.at(DUMMY_SP).dep_kind(key)
}
#[doc = " Gets the name of the crate."]
#[inline(always)]
#[must_use]
pub fn crate_name(self, key: CrateNum) -> Symbol {
self.at(DUMMY_SP).crate_name(key)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn module_children(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [ModChild] {
self.at(DUMMY_SP).module_children(key)
}
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
#[inline(always)]
#[must_use]
pub fn num_extern_def_ids(self, key: CrateNum) -> usize {
self.at(DUMMY_SP).num_extern_def_ids(key)
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
#[inline(always)]
#[must_use]
pub fn lib_features(self, key: CrateNum) -> &'tcx LibFeatures {
self.at(DUMMY_SP).lib_features(key)
}
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
#[inline(always)]
#[must_use]
pub fn stability_implications(self, key: CrateNum)
-> &'tcx UnordMap<Symbol, Symbol> {
self.at(DUMMY_SP).stability_implications(key)
}
#[doc = " Whether the function is an intrinsic"]
#[inline(always)]
#[must_use]
pub fn intrinsic_raw(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<rustc_middle::ty::IntrinsicDef> {
self.at(DUMMY_SP).intrinsic_raw(key)
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
#[must_use]
pub fn get_lang_items(self, key: ()) -> &'tcx LanguageItems {
self.at(DUMMY_SP).get_lang_items(key)
}
#[doc = " Returns all diagnostic items defined in all crates."]
#[inline(always)]
#[must_use]
pub fn all_diagnostic_items(self, key: ())
-> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
self.at(DUMMY_SP).all_diagnostic_items(key)
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
#[must_use]
pub fn defined_lang_items(self, key: CrateNum)
-> &'tcx [(DefId, LangItem)] {
self.at(DUMMY_SP).defined_lang_items(key)
}
#[doc = " Returns the diagnostic items defined in a crate."]
#[inline(always)]
#[must_use]
pub fn diagnostic_items(self, key: CrateNum)
-> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
self.at(DUMMY_SP).diagnostic_items(key)
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
#[inline(always)]
#[must_use]
pub fn missing_lang_items(self, key: CrateNum) -> &'tcx [LangItem] {
self.at(DUMMY_SP).missing_lang_items(key)
}
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
#[inline(always)]
#[must_use]
pub fn visible_parent_map(self, key: ()) -> &'tcx DefIdMap<DefId> {
self.at(DUMMY_SP).visible_parent_map(key)
}
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
#[inline(always)]
#[must_use]
pub fn trimmed_def_paths(self, key: ()) -> &'tcx DefIdMap<Symbol> {
self.at(DUMMY_SP).trimmed_def_paths(key)
}
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
#[inline(always)]
#[must_use]
pub fn missing_extern_crate_item(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).missing_extern_crate_item(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
#[inline(always)]
#[must_use]
pub fn used_crate_source(self, key: CrateNum) -> &'tcx Arc<CrateSource> {
self.at(DUMMY_SP).used_crate_source(key)
}
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
#[inline(always)]
#[must_use]
pub fn debugger_visualizers(self, key: CrateNum)
-> &'tcx Vec<DebuggerVisualizerFile> {
self.at(DUMMY_SP).debugger_visualizers(key)
}
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
#[inline(always)]
#[must_use]
pub fn postorder_cnums(self, key: ()) -> &'tcx [CrateNum] {
self.at(DUMMY_SP).postorder_cnums(key)
}
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
#[inline(always)]
#[must_use]
pub fn is_private_dep(self, key: CrateNum) -> bool {
self.at(DUMMY_SP).is_private_dep(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
#[inline(always)]
#[must_use]
pub fn allocator_kind(self, key: ()) -> Option<AllocatorKind> {
self.at(DUMMY_SP).allocator_kind(key)
}
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
#[inline(always)]
#[must_use]
pub fn alloc_error_handler_kind(self, key: ()) -> Option<AllocatorKind> {
self.at(DUMMY_SP).alloc_error_handler_kind(key)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn upvars_mentioned(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
self.at(DUMMY_SP).upvars_mentioned(key)
}
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
#[inline(always)]
#[must_use]
pub fn crates(self, key: ()) -> &'tcx [CrateNum] {
self.at(DUMMY_SP).crates(key)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
#[inline(always)]
#[must_use]
pub fn used_crates(self, key: ()) -> &'tcx [CrateNum] {
self.at(DUMMY_SP).used_crates(key)
}
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
#[inline(always)]
#[must_use]
pub fn duplicate_crate_names(self, key: CrateNum) -> &'tcx [CrateNum] {
self.at(DUMMY_SP).duplicate_crate_names(key)
}
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
#[inline(always)]
#[must_use]
pub fn traits(self, key: CrateNum) -> &'tcx [DefId] {
self.at(DUMMY_SP).traits(key)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
#[inline(always)]
#[must_use]
pub fn trait_impls_in_crate(self, key: CrateNum) -> &'tcx [DefId] {
self.at(DUMMY_SP).trait_impls_in_crate(key)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
#[inline(always)]
#[must_use]
pub fn stable_order_of_exportable_impls(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, usize> {
self.at(DUMMY_SP).stable_order_of_exportable_impls(key)
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
#[inline(always)]
#[must_use]
pub fn exportable_items(self, key: CrateNum) -> &'tcx [DefId] {
self.at(DUMMY_SP).exportable_items(key)
}
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
#[must_use]
pub fn exported_non_generic_symbols(self, key: CrateNum)
-> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
self.at(DUMMY_SP).exported_non_generic_symbols(key)
}
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
#[must_use]
pub fn exported_generic_symbols(self, key: CrateNum)
-> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
self.at(DUMMY_SP).exported_generic_symbols(key)
}
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
#[inline(always)]
#[must_use]
pub fn collect_and_partition_mono_items(self, key: ())
-> MonoItemPartitions<'tcx> {
self.at(DUMMY_SP).collect_and_partition_mono_items(key)
}
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
#[inline(always)]
#[must_use]
pub fn is_codegened_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).is_codegened_item(key)
}
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
#[inline(always)]
#[must_use]
pub fn codegen_unit(self, key: Symbol) -> &'tcx CodegenUnit<'tcx> {
self.at(DUMMY_SP).codegen_unit(key)
}
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
#[inline(always)]
#[must_use]
pub fn backend_optimization_level(self, key: ()) -> OptLevel {
self.at(DUMMY_SP).backend_optimization_level(key)
}
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
#[inline(always)]
#[must_use]
pub fn output_filenames(self, key: ()) -> &'tcx Arc<OutputFilenames> {
self.at(DUMMY_SP).output_filenames(key)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn normalize_canonicalized_projection(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
self.at(DUMMY_SP).normalize_canonicalized_projection(key)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn normalize_canonicalized_free_alias(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
self.at(DUMMY_SP).normalize_canonicalized_free_alias(key)
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
#[must_use]
pub fn normalize_canonicalized_inherent_projection(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
self.at(DUMMY_SP).normalize_canonicalized_inherent_projection(key)
}
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
#[inline(always)]
#[must_use]
pub fn try_normalize_generic_arg_after_erasing_regions(self,
key: PseudoCanonicalInput<'tcx, GenericArg<'tcx>>)
-> Result<GenericArg<'tcx>, NoSolution> {
self.at(DUMMY_SP).try_normalize_generic_arg_after_erasing_regions(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
#[inline(always)]
#[must_use]
pub fn implied_outlives_bounds(self,
key: (CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool))
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
NoSolution> {
self.at(DUMMY_SP).implied_outlives_bounds(key)
}
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
#[inline(always)]
#[must_use]
pub fn dropck_outlives(self, key: CanonicalDropckOutlivesGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
NoSolution> {
self.at(DUMMY_SP).dropck_outlives(key)
}
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
#[inline(always)]
#[must_use]
pub fn evaluate_obligation(self, key: CanonicalPredicateGoal<'tcx>)
-> Result<EvaluationResult, OverflowError> {
self.at(DUMMY_SP).evaluate_obligation(key)
}
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_ascribe_user_type(self,
key: CanonicalTypeOpAscribeUserTypeGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution> {
self.at(DUMMY_SP).type_op_ascribe_user_type(key)
}
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_prove_predicate(self,
key: CanonicalTypeOpProvePredicateGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution> {
self.at(DUMMY_SP).type_op_prove_predicate(key)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_normalize_ty(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Ty<'tcx>>>, NoSolution> {
self.at(DUMMY_SP).type_op_normalize_ty(key)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_normalize_clause(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::Clause<'tcx>>>, NoSolution> {
self.at(DUMMY_SP).type_op_normalize_clause(key)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_normalize_poly_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
NoSolution> {
self.at(DUMMY_SP).type_op_normalize_poly_fn_sig(key)
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
#[must_use]
pub fn type_op_normalize_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>, NoSolution> {
self.at(DUMMY_SP).type_op_normalize_fn_sig(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
#[inline(always)]
#[must_use]
pub fn instantiate_and_check_impossible_predicates(self,
key: (DefId, GenericArgsRef<'tcx>)) -> bool {
self.at(DUMMY_SP).instantiate_and_check_impossible_predicates(key)
}
#[doc =
"[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)` "]
#[inline(always)]
#[must_use]
pub fn is_impossible_associated_item(self, key: (DefId, DefId)) -> bool {
self.at(DUMMY_SP).is_impossible_associated_item(key)
}
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
#[inline(always)]
#[must_use]
pub fn method_autoderef_steps(self,
key: CanonicalMethodAutoderefStepsGoal<'tcx>)
-> MethodAutoderefStepsResult<'tcx> {
self.at(DUMMY_SP).method_autoderef_steps(key)
}
#[doc = " Used by `-Znext-solver` to compute proof trees."]
#[inline(always)]
#[must_use]
pub fn evaluate_root_goal_for_proof_tree_raw(self,
key: solve::CanonicalInput<'tcx>)
->
(solve::QueryResult<'tcx>,
&'tcx solve::inspect::Probe<TyCtxt<'tcx>>) {
self.at(DUMMY_SP).evaluate_root_goal_for_proof_tree_raw(key)
}
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
#[inline(always)]
#[must_use]
pub fn rust_target_features(self, key: CrateNum)
-> &'tcx UnordMap<String, rustc_target::target_features::Stability> {
self.at(DUMMY_SP).rust_target_features(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
#[inline(always)]
#[must_use]
pub fn implied_target_features(self, key: Symbol) -> &'tcx Vec<Symbol> {
self.at(DUMMY_SP).implied_target_features(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
#[inline(always)]
#[must_use]
pub fn features_query(self, key: ()) -> &'tcx rustc_feature::Features {
self.at(DUMMY_SP).features_query(key)
}
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
#[inline(always)]
#[must_use]
pub fn crate_for_resolver(self, key: ())
-> &'tcx Steal<(rustc_ast::Crate, rustc_ast::AttrVec)> {
self.at(DUMMY_SP).crate_for_resolver(key)
}
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
#[inline(always)]
#[must_use]
pub fn resolve_instance_raw(self,
key: ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>)
-> Result<Option<ty::Instance<'tcx>>, ErrorGuaranteed> {
self.at(DUMMY_SP).resolve_instance_raw(key)
}
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
#[inline(always)]
#[must_use]
pub fn reveal_opaque_types_in_bounds(self, key: ty::Clauses<'tcx>)
-> ty::Clauses<'tcx> {
self.at(DUMMY_SP).reveal_opaque_types_in_bounds(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
#[inline(always)]
#[must_use]
pub fn limits(self, key: ()) -> Limits { self.at(DUMMY_SP).limits(key) }
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
#[inline(always)]
#[must_use]
pub fn diagnostic_hir_wf_check(self,
key: (ty::Predicate<'tcx>, WellFormedLoc))
-> Option<&'tcx ObligationCause<'tcx>> {
self.at(DUMMY_SP).diagnostic_hir_wf_check(key)
}
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
#[inline(always)]
#[must_use]
pub fn global_backend_features(self, key: ()) -> &'tcx Vec<String> {
self.at(DUMMY_SP).global_backend_features(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
#[inline(always)]
#[must_use]
pub fn check_validity_requirement(self,
key: (ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>))
-> Result<bool, &'tcx ty::layout::LayoutError<'tcx>> {
self.at(DUMMY_SP).check_validity_requirement(key)
}
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
#[inline(always)]
#[must_use]
pub fn compare_impl_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
self.at(DUMMY_SP).compare_impl_item(key)
}
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn deduced_param_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DeducedParamAttrs] {
self.at(DUMMY_SP).deduced_param_attrs(key)
}
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
#[inline(always)]
#[must_use]
pub fn doc_link_resolutions(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DocLinkResMap {
self.at(DUMMY_SP).doc_link_resolutions(key)
}
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
#[inline(always)]
#[must_use]
pub fn doc_link_traits_in_scope(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
self.at(DUMMY_SP).doc_link_traits_in_scope(key)
}
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
#[inline(always)]
#[must_use]
pub fn stripped_cfg_items(self, key: CrateNum)
-> &'tcx [StrippedCfgItem] {
self.at(DUMMY_SP).stripped_cfg_items(key)
}
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
#[inline(always)]
#[must_use]
pub fn generics_require_sized_self(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).generics_require_sized_self(key)
}
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
#[inline(always)]
#[must_use]
pub fn cross_crate_inlinable(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
self.at(DUMMY_SP).cross_crate_inlinable(key)
}
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
#[inline(always)]
#[must_use]
pub fn check_mono_item(self, key: ty::Instance<'tcx>) -> () {
self.at(DUMMY_SP).check_mono_item(key)
}
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
#[inline(always)]
#[must_use]
pub fn skip_move_check_fns(self, key: ()) -> &'tcx FxIndexSet<DefId> {
self.at(DUMMY_SP).skip_move_check_fns(key)
}
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
#[inline(always)]
#[must_use]
pub fn items_of_instance(self, key: (ty::Instance<'tcx>, CollectionMode))
->
Result<(&'tcx [Spanned<MonoItem<'tcx>>],
&'tcx [Spanned<MonoItem<'tcx>>]), NormalizationErrorInMono> {
self.at(DUMMY_SP).items_of_instance(key)
}
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
#[inline(always)]
#[must_use]
pub fn size_estimate(self, key: ty::Instance<'tcx>) -> usize {
self.at(DUMMY_SP).size_estimate(key)
}
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
#[must_use]
pub fn anon_const_kind(self,
key: impl crate::query::IntoQueryParam<DefId>) -> ty::AnonConstKind {
self.at(DUMMY_SP).anon_const_kind(key)
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
#[inline(always)]
#[must_use]
pub fn trivial_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<(mir::ConstValue, Ty<'tcx>)> {
self.at(DUMMY_SP).trivial_const(key)
}
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
#[inline(always)]
#[must_use]
pub fn sanitizer_settings_for(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> SanitizerFnAttrs {
self.at(DUMMY_SP).sanitizer_settings_for(key)
}
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
#[inline(always)]
#[must_use]
pub fn check_externally_implementable_items(self, key: ()) -> () {
self.at(DUMMY_SP).check_externally_implementable_items(key)
}
#[doc = " Returns a list of all `externally implementable items` crate."]
#[inline(always)]
#[must_use]
pub fn externally_implementable_items(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> {
self.at(DUMMY_SP).externally_implementable_items(key)
}
}
impl<'tcx> crate::query::TyCtxtAt<'tcx> {
#[doc =
" Caches the expansion of a derive proc macro, e.g. `#[derive(Serialize)]`."]
#[doc = " The key is:"]
#[doc = " - A unique key corresponding to the invocation of a macro."]
#[doc = " - Token stream which serves as an input to the macro."]
#[doc = ""]
#[doc = " The output is the token stream generated by the proc macro."]
#[inline(always)]
pub fn derive_macro_expansion(self, key: (LocalExpnId, &'tcx TokenStream))
-> Result<&'tcx TokenStream, ()> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx TokenStream,
()>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.derive_macro_expansion,
&self.tcx.query_system.caches.derive_macro_expansion,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" This exists purely for testing the interactions between delayed bugs and incremental."]
#[inline(always)]
pub fn trigger_delayed_bug(self,
key: impl crate::query::IntoQueryParam<DefId>) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trigger_delayed_bug,
&self.tcx.query_system.caches.trigger_delayed_bug, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Collects the list of all tools registered using `#![register_tool]`."]
#[inline(always)]
pub fn registered_tools(self, key: ()) -> &'tcx ty::RegisteredTools {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::RegisteredTools>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.registered_tools,
&self.tcx.query_system.caches.registered_tools, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
#[inline(always)]
pub fn early_lint_checks(self, key: ()) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.early_lint_checks,
&self.tcx.query_system.caches.early_lint_checks, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Tracked access to environment variables."]
#[doc = ""]
#[doc =
" Useful for the implementation of `std::env!`, `proc-macro`s change"]
#[doc =
" detection and other changes in the compiler\'s behaviour that is easier"]
#[doc = " to control with an environment variable than a flag."]
#[doc = ""]
#[doc = " NOTE: This currently does not work with dependency info in the"]
#[doc =
" analysis, codegen and linking passes, place extra code at the top of"]
#[doc = " `rustc_interface::passes::write_dep_info` to make that work."]
#[inline(always)]
pub fn env_var_os(self, key: &'tcx OsStr) -> Option<&'tcx OsStr> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx OsStr>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.env_var_os,
&self.tcx.query_system.caches.env_var_os, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver outputs"]
#[inline(always)]
pub fn resolutions(self, key: ()) -> &'tcx ty::ResolverGlobalCtxt {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::ResolverGlobalCtxt>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.resolutions,
&self.tcx.query_system.caches.resolutions, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting the resolver for lowering"]
#[inline(always)]
pub fn resolver_for_lowering_raw(self, key: ())
->
(&'tcx Steal<(ty::ResolverAstLowering, Arc<ast::Crate>)>,
&'tcx ty::ResolverGlobalCtxt) {
use crate::query::{erase, inner};
erase::restore_val::<(&'tcx Steal<(ty::ResolverAstLowering,
Arc<ast::Crate>)>,
&'tcx ty::ResolverGlobalCtxt)>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.resolver_for_lowering_raw,
&self.tcx.query_system.caches.resolver_for_lowering_raw,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Return the span for a definition."]
#[doc = ""]
#[doc =
" Contrary to `def_span` below, this query returns the full absolute span of the definition."]
#[doc =
" This span is meant for dep-tracking rather than diagnostics. It should not be used outside"]
#[doc = " of rustc_middle::hir::source_map."]
#[inline(always)]
pub fn source_span(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> Span {
use crate::query::{erase, inner};
erase::restore_val::<Span>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.source_span,
&self.tcx.query_system.caches.source_span, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Represents crate as a whole (as distinct from the top-level crate module)."]
#[doc = ""]
#[doc =
" If you call `tcx.hir_crate(())` we will have to assume that any change"]
#[doc =
" means that you need to be recompiled. This is because the `hir_crate`"]
#[doc =
" query gives you access to all other items. To avoid this fate, do not"]
#[doc = " call `tcx.hir_crate(())`; instead, prefer wrappers like"]
#[doc = " [`TyCtxt::hir_visit_all_item_likes_in_crate`]."]
#[inline(always)]
pub fn hir_crate(self, key: ()) -> &'tcx Crate<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Crate<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.hir_crate,
&self.tcx.query_system.caches.hir_crate, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " All items in the crate."]
#[inline(always)]
pub fn hir_crate_items(self, key: ())
-> &'tcx rustc_middle::hir::ModuleItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_middle::hir::ModuleItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.hir_crate_items,
&self.tcx.query_system.caches.hir_crate_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " The items in a module."]
#[doc = ""]
#[doc =
" This can be conveniently accessed by `tcx.hir_visit_item_likes_in_module`."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_module_items(self, key: LocalModDefId)
-> &'tcx rustc_middle::hir::ModuleItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_middle::hir::ModuleItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.hir_module_items,
&self.tcx.query_system.caches.hir_module_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns HIR ID for the given `LocalDefId`."]
#[inline(always)]
pub fn local_def_id_to_hir_id(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> hir::HirId {
use crate::query::{erase, inner};
erase::restore_val::<hir::HirId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.local_def_id_to_hir_id,
&self.tcx.query_system.caches.local_def_id_to_hir_id,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gives access to the HIR node\'s parent for the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_owner_parent_q(self, key: hir::OwnerId) -> hir::HirId {
use crate::query::{erase, inner};
erase::restore_val::<hir::HirId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.hir_owner_parent_q,
&self.tcx.query_system.caches.hir_owner_parent_q, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gives access to the HIR nodes and bodies inside `key` if it\'s a HIR owner."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_hir_owner_nodes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Option<&'tcx hir::OwnerNodes<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx hir::OwnerNodes<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.opt_hir_owner_nodes,
&self.tcx.query_system.caches.opt_hir_owner_nodes, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gives access to the HIR attributes inside the HIR owner `key`."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn hir_attr_map(self, key: hir::OwnerId)
-> &'tcx hir::AttributeMap<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx hir::AttributeMap<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.hir_attr_map,
&self.tcx.query_system.caches.hir_attr_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gives access to lints emitted during ast lowering."]
#[doc = ""]
#[doc = " This can be conveniently accessed by `tcx.hir_*` methods."]
#[doc = " Avoid calling this query directly."]
#[inline(always)]
pub fn opt_ast_lowering_delayed_lints(self, key: hir::OwnerId)
-> Option<&'tcx hir::lints::DelayedLints> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx hir::lints::DelayedLints>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.opt_ast_lowering_delayed_lints,
&self.tcx.query_system.caches.opt_ast_lowering_delayed_lints,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the *default* of the const pararameter given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., given `struct Ty<const N: usize = 3>;` this returns `3` for `N`."]
#[inline(always)]
pub fn const_param_default(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.const_param_default,
&self.tcx.query_system.caches.const_param_default, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the const of the RHS of a (free or assoc) const item, if it is a `#[type_const]`."]
#[doc = ""]
#[doc =
" When a const item is used in a type-level expression, like in equality for an assoc const"]
#[doc =
" projection, this allows us to retrieve the typesystem-appropriate representation of the"]
#[doc = " const value."]
#[doc = ""]
#[doc =
" This query will ICE if given a const that is not marked with `#[type_const]`."]
#[inline(always)]
pub fn const_of_item(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Const<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.const_of_item,
&self.tcx.query_system.caches.const_of_item, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the *type* of the definition given by `DefId`."]
#[doc = ""]
#[doc =
" For type aliases (whether eager or lazy) and associated types, this returns"]
#[doc =
" the underlying aliased type (not the corresponding [alias type])."]
#[doc = ""]
#[doc =
" For opaque types, this returns and thus reveals the hidden type! If you"]
#[doc = " want to detect cycle errors use `type_of_opaque` instead."]
#[doc = ""]
#[doc =
" To clarify, for type definitions, this does *not* return the \"type of a type\""]
#[doc =
" (aka *kind* or *sort*) in the type-theoretical sense! It merely returns"]
#[doc = " the type primarily *associated with* it."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition doesn\'t (and can\'t"]
#[doc = " conceptually) have an (underlying) type."]
#[doc = ""]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, Ty<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
Ty<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_of,
&self.tcx.query_system.caches.type_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the *hidden type* of the opaque type given by `DefId` unless a cycle occurred."]
#[doc = ""]
#[doc =
" This is a specialized instance of [`Self::type_of`] that detects query cycles."]
#[doc =
" Unless `CyclePlaceholder` needs to be handled separately, call [`Self::type_of`] instead."]
#[doc =
" This is used to improve the error message in cases where revealing the hidden type"]
#[doc = " for auto-trait leakage cycles."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not an opaque type."]
#[inline(always)]
pub fn type_of_opaque(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<ty::EarlyBinder<'tcx, Ty<'tcx>>, CyclePlaceholder> {
use crate::query::{erase, inner};
erase::restore_val::<Result<ty::EarlyBinder<'tcx, Ty<'tcx>>,
CyclePlaceholder>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque,
&self.tcx.query_system.caches.type_of_opaque, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing type of opaque `{path}` via HIR typeck"]
#[inline(always)]
pub fn type_of_opaque_hir_typeck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::EarlyBinder<'tcx, Ty<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
Ty<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_of_opaque_hir_typeck,
&self.tcx.query_system.caches.type_of_opaque_hir_typeck,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns whether the type alias given by `DefId` is lazy."]
#[doc = ""]
#[doc =
" I.e., if the type alias expands / ought to expand to a [free] [alias type]"]
#[doc = " instead of the underlying aliased type."]
#[doc = ""]
#[doc =
" Relevant for features `lazy_type_alias` and `type_alias_impl_trait`."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query *may* panic if the given definition is not a type alias."]
#[doc = ""]
#[doc = " [free]: rustc_middle::ty::Free"]
#[doc = " [alias type]: rustc_middle::ty::AliasTy"]
#[inline(always)]
pub fn type_alias_is_lazy(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_alias_is_lazy,
&self.tcx.query_system.caches.type_alias_is_lazy, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process"]
#[inline(always)]
pub fn collect_return_position_impl_trait_in_trait_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx, Ty<'tcx>>>,
ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx,
Ty<'tcx>>>,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.collect_return_position_impl_trait_in_trait_tys,
&self.tcx.query_system.caches.collect_return_position_impl_trait_in_trait_tys,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] determine where the opaque originates from"]
#[inline(always)]
pub fn opaque_ty_origin(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> hir::OpaqueTyOrigin<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<hir::OpaqueTyOrigin<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.opaque_ty_origin,
&self.tcx.query_system.caches.opaque_ty_origin, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] determining what parameters of `tcx.def_path_str(key)` can participate in unsizing"]
#[inline(always)]
pub fn unsizing_params_for_adt(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<u32> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_index::bit_set::DenseBitSet<u32>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.unsizing_params_for_adt,
&self.tcx.query_system.caches.unsizing_params_for_adt,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The root query triggering all analysis passes like typeck or borrowck."]
#[inline(always)]
pub fn analysis(self, key: ()) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.analysis,
&self.tcx.query_system.caches.analysis, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" This query checks the fulfillment of collected lint expectations."]
#[doc =
" All lint emitting queries have to be done before this is executed"]
#[doc = " to ensure that all expectations can be fulfilled."]
#[doc = ""]
#[doc =
" This is an extra query to enable other drivers (like rustdoc) to"]
#[doc =
" only execute a small subset of the `analysis` query, while allowing"]
#[doc =
" lints to be expected. In rustc, this query will be executed as part of"]
#[doc =
" the `analysis` query and doesn\'t have to be called a second time."]
#[doc = ""]
#[doc =
" Tools can additionally pass in a tool filter. That will restrict the"]
#[doc =
" expectations to only trigger for lints starting with the listed tool"]
#[doc =
" name. This is useful for cases were not all linting code from rustc"]
#[doc =
" was called. With the default `None` all registered lints will also"]
#[doc = " be checked for expectation fulfillment."]
#[inline(always)]
pub fn check_expectations(self, key: Option<Symbol>) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_expectations,
&self.tcx.query_system.caches.check_expectations, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the *generics* of the definition given by `DefId`."]
#[inline(always)]
pub fn generics_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::Generics {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::Generics>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.generics_of,
&self.tcx.query_system.caches.generics_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the (elaborated) *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" This is almost always *the* \"predicates query\" that you want."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_predicates]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn predicates_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::GenericPredicates<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::GenericPredicates<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.predicates_of,
&self.tcx.query_system.caches.predicates_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing the opaque types defined by `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn opaque_types_defined_by(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::List<LocalDefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::List<LocalDefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.opaque_types_defined_by,
&self.tcx.query_system.caches.opaque_types_defined_by,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" A list of all bodies inside of `key`, nested bodies are always stored"]
#[doc = " before their parent."]
#[inline(always)]
pub fn nested_bodies_within(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::List<LocalDefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::List<LocalDefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.nested_bodies_within,
&self.tcx.query_system.caches.nested_bodies_within, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the explicitly user-written *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" For associated types, these must be satisfied for an implementation"]
#[doc =
" to be well-formed, and for opaque types, these are required to be"]
#[doc = " satisfied by the hidden type of the opaque."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" Syntactially, these are the bounds written on associated types in trait"]
#[doc = " definitions, or those after the `impl` keyword for an opaque:"]
#[doc = ""]
#[doc = " ```ignore (illustrative)"]
#[doc = " trait Trait { type X: Bound + \'lt; }"]
#[doc = " // ^^^^^^^^^^^"]
#[doc = " fn function() -> impl Debug + Display { /*...*/ }"]
#[doc = " // ^^^^^^^^^^^^^^^"]
#[doc = " ```"]
#[inline(always)]
pub fn explicit_item_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_bounds,
&self.tcx.query_system.caches.explicit_item_bounds, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the explicitly user-written *bounds* that share the `Self` type of the item."]
#[doc = ""]
#[doc =
" These are a subset of the [explicit item bounds] that may explicitly be used for things"]
#[doc = " like closure signature deduction."]
#[doc = ""]
#[doc = " [explicit item bounds]: Self::explicit_item_bounds"]
#[inline(always)]
pub fn explicit_item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_item_self_bounds,
&self.tcx.query_system.caches.explicit_item_self_bounds,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the (elaborated) *bounds* on the associated or opaque type given by `DefId`"]
#[doc =
" that must be proven true at definition site (and which can be assumed at usage sites)."]
#[doc = ""]
#[doc =
" Bounds from the parent (e.g. with nested `impl Trait`) are not included."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_dump_item_bounds]` on an item to basically print"]
#[doc =
" the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait Trait { type Assoc: Eq + ?Sized; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" While [`Self::explicit_item_bounds`] returns `[<Self as Trait>::Assoc: Eq]`"]
#[doc = " here, `item_bounds` returns:"]
#[doc = ""]
#[doc = " ```text"]
#[doc = " ["]
#[doc = " <Self as Trait>::Assoc: Eq,"]
#[doc = " <Self as Trait>::Assoc: PartialEq<<Self as Trait>::Assoc>"]
#[doc = " ]"]
#[doc = " ```"]
#[inline(always)]
pub fn item_bounds(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.item_bounds,
&self.tcx.query_system.caches.item_bounds, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.item_self_bounds,
&self.tcx.query_system.caches.item_self_bounds, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating item assumptions for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn item_non_self_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.item_non_self_bounds,
&self.tcx.query_system.caches.item_non_self_bounds, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn impl_super_outlives(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::Clauses<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.impl_super_outlives,
&self.tcx.query_system.caches.impl_super_outlives, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Look up all native libraries this crate depends on."]
#[doc = " These are assembled from the following places:"]
#[doc = " - `extern` blocks (depending on their `link` attributes)"]
#[doc = " - the `libs` (`-l`) option"]
#[inline(always)]
pub fn native_libraries(self, key: CrateNum) -> &'tcx Vec<NativeLib> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<NativeLib>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.native_libraries,
&self.tcx.query_system.caches.native_libraries, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up lint levels for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn shallow_lint_levels_on(self, key: hir::OwnerId)
-> &'tcx rustc_middle::lint::ShallowLintLevelMap {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_middle::lint::ShallowLintLevelMap>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.shallow_lint_levels_on,
&self.tcx.query_system.caches.shallow_lint_levels_on,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing `#[expect]`ed lints in this crate"]
#[inline(always)]
pub fn lint_expectations(self, key: ())
-> &'tcx Vec<(LintExpectationId, LintExpectation)> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<(LintExpectationId,
LintExpectation)>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lint_expectations,
&self.tcx.query_system.caches.lint_expectations, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] Computing all lints that are explicitly enabled or with a default level greater than Allow"]
#[inline(always)]
pub fn lints_that_dont_need_to_run(self, key: ())
-> &'tcx UnordSet<LintId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx UnordSet<LintId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lints_that_dont_need_to_run,
&self.tcx.query_system.caches.lints_that_dont_need_to_run,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting the expansion that defined `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn expn_that_defined(self,
key: impl crate::query::IntoQueryParam<DefId>) -> rustc_span::ExpnId {
use crate::query::{erase, inner};
erase::restore_val::<rustc_span::ExpnId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.expn_that_defined,
&self.tcx.query_system.caches.expn_that_defined, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_panic_runtime"]
#[inline(always)]
pub fn is_panic_runtime(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_panic_runtime,
&self.tcx.query_system.caches.is_panic_runtime, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Checks whether a type is representable or infinitely sized"]
#[inline(always)]
pub fn representability(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> rustc_middle::ty::Representability {
use crate::query::{erase, inner};
erase::restore_val::<rustc_middle::ty::Representability>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.representability,
&self.tcx.query_system.caches.representability, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " An implementation detail for the `representability` query"]
#[inline(always)]
pub fn representability_adt_ty(self, key: Ty<'tcx>)
-> rustc_middle::ty::Representability {
use crate::query::{erase, inner};
erase::restore_val::<rustc_middle::ty::Representability>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.representability_adt_ty,
&self.tcx.query_system.caches.representability_adt_ty,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Set of param indexes for type params that are in the type\'s representation"]
#[inline(always)]
pub fn params_in_repr(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<u32> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_index::bit_set::DenseBitSet<u32>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.params_in_repr,
&self.tcx.query_system.caches.params_in_repr, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
#[doc = " `-Zno-steal-thir` is on."]
#[inline(always)]
pub fn thir_body(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
->
Result<(&'tcx Steal<thir::Thir<'tcx>>, thir::ExprId),
ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(&'tcx Steal<thir::Thir<'tcx>>,
thir::ExprId),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.thir_body,
&self.tcx.query_system.caches.thir_body, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Set of all the `DefId`s in this crate that have MIR associated with"]
#[doc =
" them. This includes all the body owners, but also things like struct"]
#[doc = " constructors."]
#[inline(always)]
pub fn mir_keys(self, key: ())
-> &'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_keys,
&self.tcx.query_system.caches.mir_keys, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Maps DefId\'s that have an associated `mir::Body` to the result"]
#[doc = " of the MIR const-checking pass. This is the set of qualifs in"]
#[doc = " the final value of a `const`."]
#[inline(always)]
pub fn mir_const_qualif(self,
key: impl crate::query::IntoQueryParam<DefId>) -> mir::ConstQualifs {
use crate::query::{erase, inner};
erase::restore_val::<mir::ConstQualifs>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_const_qualif,
&self.tcx.query_system.caches.mir_const_qualif, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Build the MIR for a given `DefId` and prepare it for const qualification."]
#[doc = ""]
#[doc = " See the [rustc dev guide] for more info."]
#[doc = ""]
#[doc =
" [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html"]
#[inline(always)]
pub fn mir_built(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Steal<mir::Body<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Steal<mir::Body<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_built,
&self.tcx.query_system.caches.mir_built, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Try to build an abstract representation of the given constant."]
#[inline(always)]
pub fn thir_abstract_const(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
Result<Option<ty::EarlyBinder<'tcx, ty::Const<'tcx>>>,
ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<Option<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.thir_abstract_const,
&self.tcx.query_system.caches.thir_abstract_const, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] elaborating drops for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_drops_elaborated_and_const_checked(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Steal<mir::Body<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Steal<mir::Body<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_drops_elaborated_and_const_checked,
&self.tcx.query_system.caches.mir_drops_elaborated_and_const_checked,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] caching mir of `tcx.def_path_str(key)` for CTFE"]
#[inline(always)]
pub fn mir_for_ctfe(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx mir::Body<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx mir::Body<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_for_ctfe,
&self.tcx.query_system.caches.mir_for_ctfe, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] promoting constants in MIR for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_promoted(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
->
(&'tcx Steal<mir::Body<'tcx>>,
&'tcx Steal<IndexVec<mir::Promoted, mir::Body<'tcx>>>) {
use crate::query::{erase, inner};
erase::restore_val::<(&'tcx Steal<mir::Body<'tcx>>,
&'tcx Steal<IndexVec<mir::Promoted,
mir::Body<'tcx>>>)>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_promoted,
&self.tcx.query_system.caches.mir_promoted, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] finding symbols for captures of closure `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn closure_typeinfo(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::ClosureTypeInfo<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::ClosureTypeInfo<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.closure_typeinfo,
&self.tcx.query_system.caches.closure_typeinfo, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns names of captured upvars for closures and coroutines."]
#[doc = ""]
#[doc = " Here are some examples:"]
#[doc = " - `name__field1__field2` when the upvar is captured by value."]
#[doc =
" - `_ref__name__field` when the upvar is captured by reference."]
#[doc = ""]
#[doc =
" For coroutines this only contains upvars that are shared by all states."]
#[inline(always)]
pub fn closure_saved_names_of_captured_variables(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx IndexVec<abi::FieldIdx, Symbol> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx IndexVec<abi::FieldIdx,
Symbol>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.closure_saved_names_of_captured_variables,
&self.tcx.query_system.caches.closure_saved_names_of_captured_variables,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] coroutine witness types for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn mir_coroutine_witnesses(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx mir::CoroutineLayout<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx mir::CoroutineLayout<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_coroutine_witnesses,
&self.tcx.query_system.caches.mir_coroutine_witnesses,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_coroutine_obligations(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_coroutine_obligations,
&self.tcx.query_system.caches.check_coroutine_obligations,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Used in case `mir_borrowck` fails to prove an obligation. We generally assume that"]
#[doc =
" all goals we prove in MIR type check hold as we\'ve already checked them in HIR typeck."]
#[doc = ""]
#[doc =
" However, we replace each free region in the MIR body with a unique region inference"]
#[doc =
" variable. As we may rely on structural identity when proving goals this may cause a"]
#[doc =
" goal to no longer hold. We store obligations for which this may happen during HIR"]
#[doc =
" typeck in the `TypeckResults`. We then uniquify and reprove them in case MIR typeck"]
#[doc =
" encounters an unexpected error. We expect this to result in an error when used and"]
#[doc = " delay a bug if it does not."]
#[inline(always)]
pub fn check_potentially_region_dependent_goals(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_potentially_region_dependent_goals,
&self.tcx.query_system.caches.check_potentially_region_dependent_goals,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" MIR after our optimization passes have run. This is MIR that is ready"]
#[doc =
" for codegen. This is also the only query that can fetch non-local MIR, at present."]
#[inline(always)]
pub fn optimized_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx mir::Body<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx mir::Body<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.optimized_mir,
&self.tcx.query_system.caches.optimized_mir, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Checks for the nearest `#[coverage(off)]` or `#[coverage(on)]` on"]
#[doc = " this def and any enclosing defs, up to the crate root."]
#[doc = ""]
#[doc = " Returns `false` if `#[coverage(off)]` was found, or `true` if"]
#[doc = " either `#[coverage(on)]` or no coverage attribute was found."]
#[inline(always)]
pub fn coverage_attr_on(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coverage_attr_on,
&self.tcx.query_system.caches.coverage_attr_on, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Scans through a function\'s MIR after MIR optimizations, to prepare the"]
#[doc =
" information needed by codegen when `-Cinstrument-coverage` is active."]
#[doc = ""]
#[doc =
" This includes the details of where to insert `llvm.instrprof.increment`"]
#[doc =
" intrinsics, and the expression tables to be embedded in the function\'s"]
#[doc = " coverage metadata."]
#[doc = ""]
#[doc =
" FIXME(Zalathar): This query\'s purpose has drifted a bit and should"]
#[doc =
" probably be renamed, but that can wait until after the potential"]
#[doc = " follow-ups to #136053 have settled down."]
#[doc = ""]
#[doc = " Returns `None` for functions that were not instrumented."]
#[inline(always)]
pub fn coverage_ids_info(self, key: ty::InstanceKind<'tcx>)
-> Option<&'tcx mir::coverage::CoverageIdsInfo> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx mir::coverage::CoverageIdsInfo>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coverage_ids_info,
&self.tcx.query_system.caches.coverage_ids_info, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The `DefId` is the `DefId` of the containing MIR body. Promoteds do not have their own"]
#[doc =
" `DefId`. This function returns all promoteds in the specified body. The body references"]
#[doc =
" promoteds by the `DefId` and the `mir::Promoted` index. This is necessary, because"]
#[doc =
" after inlining a body may refer to promoteds from other bodies. In that case you still"]
#[doc = " need to use the `DefId` of the original body."]
#[inline(always)]
pub fn promoted_mir(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx IndexVec<mir::Promoted, mir::Body<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx IndexVec<mir::Promoted,
mir::Body<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.promoted_mir,
&self.tcx.query_system.caches.promoted_mir, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Erases regions from `ty` to yield a new type."]
#[doc =
" Normally you would just use `tcx.erase_and_anonymize_regions(value)`,"]
#[doc = " however, which uses this query as a kind of cache."]
#[inline(always)]
pub fn erase_and_anonymize_regions_ty(self, key: Ty<'tcx>) -> Ty<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<Ty<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.erase_and_anonymize_regions_ty,
&self.tcx.query_system.caches.erase_and_anonymize_regions_ty,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting wasm import module map"]
#[inline(always)]
pub fn wasm_import_module_map(self, key: CrateNum)
-> &'tcx DefIdMap<String> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<String>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.wasm_import_module_map,
&self.tcx.query_system.caches.wasm_import_module_map,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the explicitly user-written *predicates and bounds* of the trait given by `DefId`."]
#[doc = ""]
#[doc = " Traits are unusual, because predicates on associated types are"]
#[doc =
" converted into bounds on that type for backwards compatibility:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X where Self::U: Copy { type U; }"]
#[doc = " ```"]
#[doc = ""]
#[doc = " becomes"]
#[doc = ""]
#[doc = " ```"]
#[doc = " trait X { type U: Copy; }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" [`Self::explicit_predicates_of`] and [`Self::explicit_item_bounds`] will"]
#[doc = " then take the appropriate subsets of the predicates here."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc = " This query will panic if the given definition is not a trait."]
#[inline(always)]
pub fn trait_explicit_predicates_and_bounds(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> ty::GenericPredicates<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::GenericPredicates<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trait_explicit_predicates_and_bounds,
&self.tcx.query_system.caches.trait_explicit_predicates_and_bounds,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the explicitly user-written *predicates* of the definition given by `DefId`"]
#[doc =
" that must be proven true at usage sites (and which can be assumed at definition site)."]
#[doc = ""]
#[doc =
" You should probably use [`Self::predicates_of`] unless you\'re looking for"]
#[doc = " predicates with explicit spans for diagnostics purposes."]
#[inline(always)]
pub fn explicit_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::GenericPredicates<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::GenericPredicates<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_predicates_of,
&self.tcx.query_system.caches.explicit_predicates_of,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the *inferred outlives-predicates* of the item given by `DefId`."]
#[doc = ""]
#[doc =
" E.g., for `struct Foo<\'a, T> { x: &\'a T }`, this would return `[T: \'a]`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_outlives]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn inferred_outlives_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [(ty::Clause<'tcx>, Span)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(ty::Clause<'tcx>,
Span)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_of,
&self.tcx.query_system.caches.inferred_outlives_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the explicitly user-written *super-predicates* of the trait given by `DefId`."]
#[doc = ""]
#[doc =
" These predicates are unelaborated and consequently don\'t contain transitive super-predicates."]
#[doc = ""]
#[doc =
" This is a subset of the full list of predicates. We store these in a separate map"]
#[doc =
" because we must evaluate them even during type conversion, often before the full"]
#[doc =
" predicates are available (note that super-predicates must not be cyclic)."]
#[inline(always)]
pub fn explicit_super_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_super_predicates_of,
&self.tcx.query_system.caches.explicit_super_predicates_of,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The predicates of the trait that are implied during elaboration."]
#[doc = ""]
#[doc =
" This is a superset of the super-predicates of the trait, but a subset of the predicates"]
#[doc =
" of the trait. For regular traits, this includes all super-predicates and their"]
#[doc =
" associated type bounds. For trait aliases, currently, this includes all of the"]
#[doc = " predicates of the trait alias."]
#[inline(always)]
pub fn explicit_implied_predicates_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_predicates_of,
&self.tcx.query_system.caches.explicit_implied_predicates_of,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The Ident is the name of an associated type.The query returns only the subset"]
#[doc =
" of supertraits that define the given associated type. This is used to avoid"]
#[doc =
" cycles in resolving type-dependent associated item paths like `T::Item`."]
#[inline(always)]
pub fn explicit_supertraits_containing_assoc_item(self,
key: (DefId, rustc_span::Ident))
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_supertraits_containing_assoc_item,
&self.tcx.query_system.caches.explicit_supertraits_containing_assoc_item,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Compute the conditions that need to hold for a conditionally-const item to be const."]
#[doc =
" That is, compute the set of `[const]` where clauses for a given item."]
#[doc = ""]
#[doc =
" This can be thought of as the `[const]` equivalent of `predicates_of`. These are the"]
#[doc =
" predicates that need to be proven at usage sites, and can be assumed at definition."]
#[doc = ""]
#[doc =
" This query also computes the `[const]` where clauses for associated types, which are"]
#[doc =
" not \"const\", but which have item bounds which may be `[const]`. These must hold for"]
#[doc = " the `[const]` item bound to hold."]
#[inline(always)]
pub fn const_conditions(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ConstConditions<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::ConstConditions<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.const_conditions,
&self.tcx.query_system.caches.const_conditions, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Compute the const bounds that are implied for a conditionally-const item."]
#[doc = ""]
#[doc =
" This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These"]
#[doc =
" are the predicates that need to proven at definition sites, and can be assumed at"]
#[doc = " usage sites."]
#[inline(always)]
pub fn explicit_implied_const_bounds(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, &'tcx [(ty::PolyTraitRef<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::PolyTraitRef<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.explicit_implied_const_bounds,
&self.tcx.query_system.caches.explicit_implied_const_bounds,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" To avoid cycles within the predicates of a single item we compute"]
#[doc = " per-type-parameter predicates for resolving `T::AssocTy`."]
#[inline(always)]
pub fn type_param_predicates(self,
key: (LocalDefId, LocalDefId, rustc_span::Ident))
-> ty::EarlyBinder<'tcx, &'tcx [(ty::Clause<'tcx>, Span)]> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>,
Span)]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_param_predicates,
&self.tcx.query_system.caches.type_param_predicates,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing trait definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn trait_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::TraitDef {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::TraitDef>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trait_def,
&self.tcx.query_system.caches.trait_def, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing ADT definition for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::AdtDef<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::AdtDef<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_def,
&self.tcx.query_system.caches.adt_def, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing `Drop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_destructor(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<ty::Destructor> {
use crate::query::{erase, inner};
erase::restore_val::<Option<ty::Destructor>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_destructor,
&self.tcx.query_system.caches.adt_destructor, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing `AsyncDrop` impl for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_async_destructor(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<ty::AsyncDestructor> {
use crate::query::{erase, inner};
erase::restore_val::<Option<ty::AsyncDestructor>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_async_destructor,
&self.tcx.query_system.caches.adt_async_destructor, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing the sizedness constraint for `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn adt_sizedness_constraint(self, key: (DefId, SizedTraitKind))
-> Option<ty::EarlyBinder<'tcx, Ty<'tcx>>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<ty::EarlyBinder<'tcx,
Ty<'tcx>>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_sizedness_constraint,
&self.tcx.query_system.caches.adt_sizedness_constraint,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing drop-check constraints for `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn adt_dtorck_constraint(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DropckConstraint<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DropckConstraint<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_dtorck_constraint,
&self.tcx.query_system.caches.adt_dtorck_constraint,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the constness of the function-like[^1] definition given by `DefId`."]
#[doc = ""]
#[doc =
" Tuple struct/variant constructors are *always* const, foreign functions are"]
#[doc =
" *never* const. The rest is const iff marked with keyword `const` (or rather"]
#[doc = " its parent in the case of associated functions)."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly. It is only meant to cache the base data for the"]
#[doc =
" higher-level functions. Consider using `is_const_fn` or `is_const_trait_impl` instead."]
#[doc = ""]
#[doc =
" Also note that neither of them takes into account feature gates, stability and"]
#[doc = " const predicates/conditions!"]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not function-like[^1]."]
#[doc = ""]
#[doc =
" [^1]: Tuple struct/variant constructors, closures and free, associated and foreign functions."]
#[inline(always)]
pub fn constness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> hir::Constness {
use crate::query::{erase, inner};
erase::restore_val::<hir::Constness>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.constness,
&self.tcx.query_system.caches.constness, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the function is async: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn asyncness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::Asyncness {
use crate::query::{erase, inner};
erase::restore_val::<ty::Asyncness>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.asyncness,
&self.tcx.query_system.caches.asyncness, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns `true` if calls to the function may be promoted."]
#[doc = ""]
#[doc =
" This is either because the function is e.g., a tuple-struct or tuple-variant"]
#[doc =
" constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should"]
#[doc =
" be removed in the future in favour of some form of check which figures out whether the"]
#[doc =
" function does not inspect the bits of any of its arguments (so is essentially just a"]
#[doc = " constructor function)."]
#[inline(always)]
pub fn is_promotable_const_fn(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_promotable_const_fn,
&self.tcx.query_system.caches.is_promotable_const_fn,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The body of the coroutine, modified to take its upvars by move rather than by ref."]
#[doc = ""]
#[doc =
" This is used by coroutine-closures, which must return a different flavor of coroutine"]
#[doc =
" when called using `AsyncFnOnce::call_once`. It is produced by the `ByMoveBody` pass which"]
#[doc =
" is run right after building the initial MIR, and will only be populated for coroutines"]
#[doc = " which come out of the async closure desugaring."]
#[inline(always)]
pub fn coroutine_by_move_body_def_id(self,
key: impl crate::query::IntoQueryParam<DefId>) -> DefId {
use crate::query::{erase, inner};
erase::restore_val::<DefId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coroutine_by_move_body_def_id,
&self.tcx.query_system.caches.coroutine_by_move_body_def_id,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
#[inline(always)]
pub fn coroutine_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::CoroutineKind> {
use crate::query::{erase, inner};
erase::restore_val::<Option<hir::CoroutineKind>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coroutine_kind,
&self.tcx.query_system.caches.coroutine_kind, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] Given a coroutine-closure def id, return the def id of the coroutine returned by it"]
#[inline(always)]
pub fn coroutine_for_closure(self,
key: impl crate::query::IntoQueryParam<DefId>) -> DefId {
use crate::query::{erase, inner};
erase::restore_val::<DefId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coroutine_for_closure,
&self.tcx.query_system.caches.coroutine_for_closure,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
#[inline(always)]
pub fn coroutine_hidden_types(self,
key: impl crate::query::IntoQueryParam<DefId>)
->
ty::EarlyBinder<'tcx,
ty::Binder<'tcx, ty::CoroutineWitnessTypes<TyCtxt<'tcx>>>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::Binder<'tcx,
ty::CoroutineWitnessTypes<TyCtxt<'tcx>>>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coroutine_hidden_types,
&self.tcx.query_system.caches.coroutine_hidden_types,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets a map with the variances of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::variances_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_variances(self, key: ())
-> &'tcx ty::CrateVariancesMap<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::CrateVariancesMap<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_variances,
&self.tcx.query_system.caches.crate_variances, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the (inferred) variances of the item given by `DefId`."]
#[doc = ""]
#[doc =
" The list of variances corresponds to the list of (early-bound) generic"]
#[doc = " parameters of the item (including its parents)."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_variance]` on an item to basically print the"]
#[doc =
" result of this query for use in UI tests or for debugging purposes."]
#[inline(always)]
pub fn variances_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [ty::Variance] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [ty::Variance]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.variances_of,
&self.tcx.query_system.caches.variances_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets a map with the inferred outlives-predicates of every item in the local crate."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::inferred_outlives_of`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn inferred_outlives_crate(self, key: ())
-> &'tcx ty::CratePredicatesMap<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::CratePredicatesMap<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inferred_outlives_crate,
&self.tcx.query_system.caches.inferred_outlives_crate,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Maps from an impl/trait or struct/variant `DefId`"]
#[doc = " to a list of the `DefId`s of its associated items or fields."]
#[inline(always)]
pub fn associated_item_def_ids(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.associated_item_def_ids,
&self.tcx.query_system.caches.associated_item_def_ids,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
#[inline(always)]
pub fn associated_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> ty::AssocItem {
use crate::query::{erase, inner};
erase::restore_val::<ty::AssocItem>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.associated_item,
&self.tcx.query_system.caches.associated_item, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Collects the associated items defined on a trait or impl."]
#[inline(always)]
pub fn associated_items(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::AssocItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::AssocItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.associated_items,
&self.tcx.query_system.caches.associated_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Maps from associated items on a trait to the corresponding associated"]
#[doc = " item on the impl specified by `impl_id`."]
#[doc = ""]
#[doc = " For example, with the following code"]
#[doc = ""]
#[doc = " ```"]
#[doc = " struct Type {}"]
#[doc = " // DefId"]
#[doc = " trait Trait { // trait_id"]
#[doc = " fn f(); // trait_f"]
#[doc = " fn g() {} // trait_g"]
#[doc = " }"]
#[doc = ""]
#[doc = " impl Trait for Type { // impl_id"]
#[doc = " fn f() {} // impl_f"]
#[doc = " fn g() {} // impl_g"]
#[doc = " }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be"]
#[doc = "`{ trait_f: impl_f, trait_g: impl_g }`"]
#[inline(always)]
pub fn impl_item_implementor_ids(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DefIdMap<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.impl_item_implementor_ids,
&self.tcx.query_system.caches.impl_item_implementor_ids,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Given the `item_def_id` of a trait or impl, return a mapping from associated fn def id"]
#[doc =
" to its associated type items that correspond to the RPITITs in its signature."]
#[inline(always)]
pub fn associated_types_for_impl_traits_in_trait_or_impl(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DefIdMap<Vec<DefId>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<Vec<DefId>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.associated_types_for_impl_traits_in_trait_or_impl,
&self.tcx.query_system.caches.associated_types_for_impl_traits_in_trait_or_impl,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Given an `impl_id`, return the trait it implements along with some header information."]
#[inline(always)]
pub fn impl_trait_header(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ImplTraitHeader<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::ImplTraitHeader<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.impl_trait_header,
&self.tcx.query_system.caches.impl_trait_header, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Given an `impl_def_id`, return true if the self type is guaranteed to be unsized due"]
#[doc =
" to either being one of the built-in unsized types (str/slice/dyn) or to be a struct"]
#[doc = " whose tail is one of those types."]
#[inline(always)]
pub fn impl_self_is_guaranteed_unsized(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.impl_self_is_guaranteed_unsized,
&self.tcx.query_system.caches.impl_self_is_guaranteed_unsized,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Maps a `DefId` of a type to a list of its inherent impls."]
#[doc =
" Contains implementations of methods that are inherent to a type."]
#[doc = " Methods in these implementations don\'t need to be exported."]
#[inline(always)]
pub fn inherent_impls(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inherent_impls,
&self.tcx.query_system.caches.inherent_impls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] collecting all inherent impls for `{:?}`"]
#[inline(always)]
pub fn incoherent_impls(self, key: SimplifiedType) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.incoherent_impls,
&self.tcx.query_system.caches.incoherent_impls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_transmutes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_transmutes,
&self.tcx.query_system.caches.check_transmutes, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Unsafety-check this `LocalDefId`."]
#[inline(always)]
pub fn check_unsafety(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_unsafety,
&self.tcx.query_system.caches.check_unsafety, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Checks well-formedness of tail calls (`become f()`)."]
#[inline(always)]
pub fn check_tail_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), rustc_errors::ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
rustc_errors::ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_tail_calls,
&self.tcx.query_system.caches.check_tail_calls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the types assumed to be well formed while \"inside\" of the given item."]
#[doc = ""]
#[doc =
" Note that we\'ve liberated the late bound regions of function signatures, so"]
#[doc =
" this can not be used to check whether these types are well formed."]
#[inline(always)]
pub fn assumed_wf_types(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [(Ty<'tcx>, Span)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(Ty<'tcx>,
Span)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types,
&self.tcx.query_system.caches.assumed_wf_types, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" We need to store the assumed_wf_types for an RPITIT so that impls of foreign"]
#[doc =
" traits with return-position impl trait in traits can inherit the right wf types."]
#[inline(always)]
pub fn assumed_wf_types_for_rpitit(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [(Ty<'tcx>, Span)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(Ty<'tcx>,
Span)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.assumed_wf_types_for_rpitit,
&self.tcx.query_system.caches.assumed_wf_types_for_rpitit,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Computes the signature of the function."]
#[inline(always)]
pub fn fn_sig(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::EarlyBinder<'tcx, ty::PolyFnSig<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<ty::EarlyBinder<'tcx,
ty::PolyFnSig<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.fn_sig,
&self.tcx.query_system.caches.fn_sig, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Performs lint checking for the module."]
#[inline(always)]
pub fn lint_mod(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lint_mod,
&self.tcx.query_system.caches.lint_mod, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
#[inline(always)]
pub fn check_unused_traits(self, key: ()) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_unused_traits,
&self.tcx.query_system.caches.check_unused_traits, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Checks the attributes in the module."]
#[inline(always)]
pub fn check_mod_attrs(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_mod_attrs,
&self.tcx.query_system.caches.check_mod_attrs, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Checks for uses of unstable APIs in the module."]
#[inline(always)]
pub fn check_mod_unstable_api_usage(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_mod_unstable_api_usage,
&self.tcx.query_system.caches.check_mod_unstable_api_usage,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking privacy in `describe_as_module(key.to_local_def_id(), tcx)` "]
#[inline(always)]
pub fn check_mod_privacy(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_mod_privacy,
&self.tcx.query_system.caches.check_mod_privacy, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking liveness of variables in `tcx.def_path_str(key.to_def_id())` "]
#[inline(always)]
pub fn check_liveness(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_liveness,
&self.tcx.query_system.caches.check_liveness, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Return the live symbols in the crate for dead code check."]
#[doc = ""]
#[doc =
" The second return value maps from ADTs to ignored derived traits (e.g. Debug and Clone)."]
#[inline(always)]
pub fn live_symbols_and_ignored_derived_traits(self, key: ())
->
&'tcx Result<(LocalDefIdSet, LocalDefIdMap<FxIndexSet<DefId>>),
ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Result<(LocalDefIdSet,
LocalDefIdMap<FxIndexSet<DefId>>),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.live_symbols_and_ignored_derived_traits,
&self.tcx.query_system.caches.live_symbols_and_ignored_derived_traits,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking deathness of variables in `describe_as_module(key, tcx)` "]
#[inline(always)]
pub fn check_mod_deathness(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_mod_deathness,
&self.tcx.query_system.caches.check_mod_deathness, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking that types are well-formed"]
#[inline(always)]
pub fn check_type_wf(self, key: ()) -> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_type_wf,
&self.tcx.query_system.caches.check_type_wf, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
#[inline(always)]
pub fn coerce_unsized_info(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<ty::adjustment::CoerceUnsizedInfo, ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<ty::adjustment::CoerceUnsizedInfo,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coerce_unsized_info,
&self.tcx.query_system.caches.coerce_unsized_info, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] type-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn typeck(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx ty::TypeckResults<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::TypeckResults<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.typeck,
&self.tcx.query_system.caches.typeck, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] finding used_trait_imports `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn used_trait_imports(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx UnordSet<LocalDefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx UnordSet<LocalDefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.used_trait_imports,
&self.tcx.query_system.caches.used_trait_imports, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] coherence checking all impls of trait `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn coherent_trait(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.coherent_trait,
&self.tcx.query_system.caches.coherent_trait, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Borrow-checks the given typeck root, e.g. functions, const/static items,"]
#[doc = " and its children, e.g. closures, inline consts."]
#[inline(always)]
pub fn mir_borrowck(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
->
Result<&'tcx FxIndexMap<LocalDefId,
ty::DefinitionSiteHiddenType<'tcx>>, ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx FxIndexMap<LocalDefId,
ty::DefinitionSiteHiddenType<'tcx>>,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_borrowck,
&self.tcx.query_system.caches.mir_borrowck, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets a complete map from all types to their inherent impls."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls(self, key: ())
-> (&'tcx CrateInherentImpls, Result<(), ErrorGuaranteed>) {
use crate::query::{erase, inner};
erase::restore_val::<(&'tcx CrateInherentImpls,
Result<(),
ErrorGuaranteed>)>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls,
&self.tcx.query_system.caches.crate_inherent_impls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_validity_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_validity_check,
&self.tcx.query_system.caches.crate_inherent_impls_validity_check,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Checks all types in the crate for overlap in their inherent impls. Reports errors."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " **Not meant to be used** directly outside of coherence."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn crate_inherent_impls_overlap_check(self, key: ())
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_inherent_impls_overlap_check,
&self.tcx.query_system.caches.crate_inherent_impls_overlap_check,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Checks whether all impls in the crate pass the overlap check, returning"]
#[doc =
" which impls fail it. If all impls are correct, the returned slice is empty."]
#[inline(always)]
pub fn orphan_check_impl(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.orphan_check_impl,
&self.tcx.query_system.caches.orphan_check_impl, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Return the set of (transitive) callees that may result in a recursive call to `key`,"]
#[doc = " if we were able to walk all callees."]
#[inline(always)]
pub fn mir_callgraph_cyclic(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx Option<UnordSet<LocalDefId>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Option<UnordSet<LocalDefId>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_callgraph_cyclic,
&self.tcx.query_system.caches.mir_callgraph_cyclic, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Obtain all the calls into other local functions"]
#[inline(always)]
pub fn mir_inliner_callees(self, key: ty::InstanceKind<'tcx>)
-> &'tcx [(DefId, GenericArgsRef<'tcx>)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(DefId,
GenericArgsRef<'tcx>)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_inliner_callees,
&self.tcx.query_system.caches.mir_inliner_callees, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Computes the tag (if any) for a given type and variant."]
#[doc = ""]
#[doc =
" `None` means that the variant doesn\'t need a tag (because it is niched)."]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic for uninhabited variants and if the passed type is not an enum."]
#[inline(always)]
pub fn tag_for_variant(self,
key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>)
-> Option<ty::ScalarInt> {
use crate::query::{erase, inner};
erase::restore_val::<Option<ty::ScalarInt>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.tag_for_variant,
&self.tcx.query_system.caches.tag_for_variant, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Evaluates a constant and returns the computed allocation."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this query** directly, use [`Self::eval_to_const_value_raw`] or"]
#[doc = " [`Self::eval_to_valtree`] instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn eval_to_allocation_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToAllocationRawResult<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<EvalToAllocationRawResult<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.eval_to_allocation_raw,
&self.tcx.query_system.caches.eval_to_allocation_raw,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
#[inline(always)]
pub fn eval_static_initializer(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> EvalStaticInitializerRawResult<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<EvalStaticInitializerRawResult<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.eval_static_initializer,
&self.tcx.query_system.caches.eval_static_initializer,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Evaluates const items or anonymous constants[^1] into a representation"]
#[doc = " suitable for the type system and const generics."]
#[doc = ""]
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc =
" **Do not call this** directly, use one of the following wrappers:"]
#[doc = " [`TyCtxt::const_eval_poly`], [`TyCtxt::const_eval_resolve`],"]
#[doc =
" [`TyCtxt::const_eval_instance`], or [`TyCtxt::const_eval_global_id`]."]
#[doc = ""]
#[doc = " </div>"]
#[doc = ""]
#[doc =
" [^1]: Such as enum variant explicit discriminants or array lengths."]
#[inline(always)]
pub fn eval_to_const_value_raw(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToConstValueResult<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<EvalToConstValueResult<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.eval_to_const_value_raw,
&self.tcx.query_system.caches.eval_to_const_value_raw,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Evaluate a constant and convert it to a type level constant or"]
#[doc = " return `None` if that is not possible."]
#[inline(always)]
pub fn eval_to_valtree(self,
key: ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>)
-> EvalToValTreeResult<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<EvalToValTreeResult<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.eval_to_valtree,
&self.tcx.query_system.caches.eval_to_valtree, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Converts a type-level constant value into a MIR constant value."]
#[inline(always)]
pub fn valtree_to_const_val(self, key: ty::Value<'tcx>)
-> mir::ConstValue {
use crate::query::{erase, inner};
erase::restore_val::<mir::ConstValue>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.valtree_to_const_val,
&self.tcx.query_system.caches.valtree_to_const_val, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] converting literal to const"]
#[inline(always)]
pub fn lit_to_const(self, key: LitToConstInput<'tcx>) -> ty::Const<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::Const<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lit_to_const,
&self.tcx.query_system.caches.lit_to_const, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] match-checking `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn check_match(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), rustc_errors::ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
rustc_errors::ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_match,
&self.tcx.query_system.caches.check_match, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Performs part of the privacy check and computes effective visibilities."]
#[inline(always)]
pub fn effective_visibilities(self, key: ())
-> &'tcx EffectiveVisibilities {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx EffectiveVisibilities>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.effective_visibilities,
&self.tcx.query_system.caches.effective_visibilities,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking for private elements in public interfaces for `describe_as_module(module_def_id, tcx)` "]
#[inline(always)]
pub fn check_private_in_public(self, key: LocalModDefId) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_private_in_public,
&self.tcx.query_system.caches.check_private_in_public,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] reachability"]
#[inline(always)]
pub fn reachable_set(self, key: ()) -> &'tcx LocalDefIdSet {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx LocalDefIdSet>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.reachable_set,
&self.tcx.query_system.caches.reachable_set, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;"]
#[doc =
" in the case of closures, this will be redirected to the enclosing function."]
#[inline(always)]
pub fn region_scope_tree(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx crate::middle::region::ScopeTree {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx crate::middle::region::ScopeTree>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.region_scope_tree,
&self.tcx.query_system.caches.region_scope_tree, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Generates a MIR body for the shim."]
#[inline(always)]
pub fn mir_shims(self, key: ty::InstanceKind<'tcx>)
-> &'tcx mir::Body<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx mir::Body<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.mir_shims,
&self.tcx.query_system.caches.mir_shims, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " The `symbol_name` query provides the symbol name for calling a"]
#[doc =
" given instance from the local crate. In particular, it will also"]
#[doc =
" look up the correct symbol name of instances from upstream crates."]
#[inline(always)]
pub fn symbol_name(self, key: ty::Instance<'tcx>)
-> ty::SymbolName<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::SymbolName<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.symbol_name,
&self.tcx.query_system.caches.symbol_name, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up definition kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn def_kind(self, key: impl crate::query::IntoQueryParam<DefId>)
-> DefKind {
use crate::query::{erase, inner};
erase::restore_val::<DefKind>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.def_kind,
&self.tcx.query_system.caches.def_kind, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the span for the definition."]
#[inline(always)]
pub fn def_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Span {
use crate::query::{erase, inner};
erase::restore_val::<Span>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.def_span,
&self.tcx.query_system.caches.def_span, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the span for the identifier of the definition."]
#[inline(always)]
pub fn def_ident_span(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<Span> {
use crate::query::{erase, inner};
erase::restore_val::<Option<Span>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.def_ident_span,
&self.tcx.query_system.caches.def_ident_span, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the span for the type of the definition."]
#[doc = " Panics if it is not a definition that has a single type."]
#[inline(always)]
pub fn ty_span(self, key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Span {
use crate::query::{erase, inner};
erase::restore_val::<Span>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.ty_span,
&self.tcx.query_system.caches.ty_span, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::Stability> {
use crate::query::{erase, inner};
erase::restore_val::<Option<hir::Stability>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lookup_stability,
&self.tcx.query_system.caches.lookup_stability, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up const stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_const_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::ConstStability> {
use crate::query::{erase, inner};
erase::restore_val::<Option<hir::ConstStability>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lookup_const_stability,
&self.tcx.query_system.caches.lookup_const_stability,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up default body stability of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn lookup_default_body_stability(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<hir::DefaultBodyStability> {
use crate::query::{erase, inner};
erase::restore_val::<Option<hir::DefaultBodyStability>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lookup_default_body_stability,
&self.tcx.query_system.caches.lookup_default_body_stability,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing should_inherit_track_caller of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn should_inherit_track_caller(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.should_inherit_track_caller,
&self.tcx.query_system.caches.should_inherit_track_caller,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing inherited_align of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn inherited_align(self,
key: impl crate::query::IntoQueryParam<DefId>) -> Option<Align> {
use crate::query::{erase, inner};
erase::restore_val::<Option<Align>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inherited_align,
&self.tcx.query_system.caches.inherited_align, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is deprecated"]
#[inline(always)]
pub fn lookup_deprecation_entry(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DeprecationEntry> {
use crate::query::{erase, inner};
erase::restore_val::<Option<DeprecationEntry>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lookup_deprecation_entry,
&self.tcx.query_system.caches.lookup_deprecation_entry,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Determines whether an item is annotated with `#[doc(hidden)]`."]
#[inline(always)]
pub fn is_doc_hidden(self, key: impl crate::query::IntoQueryParam<DefId>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_doc_hidden,
&self.tcx.query_system.caches.is_doc_hidden, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Determines whether an item is annotated with `#[doc(notable_trait)]`."]
#[inline(always)]
pub fn is_doc_notable_trait(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_doc_notable_trait,
&self.tcx.query_system.caches.is_doc_notable_trait, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the attributes on the item at `def_id`."]
#[doc = ""]
#[doc = " Do not use this directly, use `tcx.get_attrs` instead."]
#[inline(always)]
pub fn attrs_for_def(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [hir::Attribute] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [hir::Attribute]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.attrs_for_def,
&self.tcx.query_system.caches.attrs_for_def, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the `CodegenFnAttrs` for the item at `def_id`."]
#[doc = ""]
#[doc =
" If possible, use `tcx.codegen_instance_attrs` instead. That function takes the"]
#[doc = " instance kind into account."]
#[doc = ""]
#[doc =
" For example, the `#[naked]` attribute should be applied for `InstanceKind::Item`,"]
#[doc =
" but should not be applied if the instance kind is `InstanceKind::ReifyShim`."]
#[doc =
" Using this query would include the attribute regardless of the actual instance"]
#[doc = " kind at the call site."]
#[inline(always)]
pub fn codegen_fn_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx CodegenFnAttrs {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx CodegenFnAttrs>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.codegen_fn_attrs,
&self.tcx.query_system.caches.codegen_fn_attrs, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing target features for inline asm of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn asm_target_features(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx FxIndexSet<Symbol> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx FxIndexSet<Symbol>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.asm_target_features,
&self.tcx.query_system.caches.asm_target_features, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up function parameter identifiers for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn fn_arg_idents(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [Option<rustc_span::Ident>] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [Option<rustc_span::Ident>]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.fn_arg_idents,
&self.tcx.query_system.caches.fn_arg_idents, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets the rendered value of the specified constant or associated constant."]
#[doc = " Used by rustdoc."]
#[inline(always)]
pub fn rendered_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx String {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx String>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.rendered_const,
&self.tcx.query_system.caches.rendered_const, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets the rendered precise capturing args for an opaque for use in rustdoc."]
#[inline(always)]
pub fn rendered_precise_capturing_args(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx [PreciseCapturingArgKind<Symbol, Symbol>]> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx [PreciseCapturingArgKind<Symbol,
Symbol>]>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.rendered_precise_capturing_args,
&self.tcx.query_system.caches.rendered_precise_capturing_args,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing specialization parent impl of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn impl_parent(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<Option<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.impl_parent,
&self.tcx.query_system.caches.impl_parent, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if item has MIR available: `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn is_mir_available(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_mir_available,
&self.tcx.query_system.caches.is_mir_available, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] finding all existential vtable entries for trait `tcx.def_path_str(key)` "]
#[inline(always)]
pub fn own_existential_vtable_entries(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.own_existential_vtable_entries,
&self.tcx.query_system.caches.own_existential_vtable_entries,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] finding all vtable entries for trait `tcx.def_path_str(key.def_id)` "]
#[inline(always)]
pub fn vtable_entries(self, key: ty::TraitRef<'tcx>)
-> &'tcx [ty::VtblEntry<'tcx>] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [ty::VtblEntry<'tcx>]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.vtable_entries,
&self.tcx.query_system.caches.vtable_entries, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[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()` "]
#[inline(always)]
pub fn first_method_vtable_slot(self, key: ty::TraitRef<'tcx>) -> usize {
use crate::query::{erase, inner};
erase::restore_val::<usize>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.first_method_vtable_slot,
&self.tcx.query_system.caches.first_method_vtable_slot,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[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"]
#[inline(always)]
pub fn supertrait_vtable_slot(self, key: (Ty<'tcx>, Ty<'tcx>))
-> Option<usize> {
use crate::query::{erase, inner};
erase::restore_val::<Option<usize>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.supertrait_vtable_slot,
&self.tcx.query_system.caches.supertrait_vtable_slot,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] vtable const allocation for < `key.0` as `key.1.map(| trait_ref | format!\n(\"{trait_ref}\")).unwrap_or_else(| | \"_\".to_owned())` >"]
#[inline(always)]
pub fn vtable_allocation(self,
key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>))
-> mir::interpret::AllocId {
use crate::query::{erase, inner};
erase::restore_val::<mir::interpret::AllocId>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.vtable_allocation,
&self.tcx.query_system.caches.vtable_allocation, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing candidate for `key.value` "]
#[inline(always)]
pub fn codegen_select_candidate(self,
key: PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>)
-> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx ImplSource<'tcx, ()>,
CodegenObligationError>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.codegen_select_candidate,
&self.tcx.query_system.caches.codegen_select_candidate,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Return all `impl` blocks in the current crate."]
#[inline(always)]
pub fn all_local_trait_impls(self, key: ())
->
&'tcx rustc_data_structures::fx::FxIndexMap<DefId,
Vec<LocalDefId>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_data_structures::fx::FxIndexMap<DefId,
Vec<LocalDefId>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.all_local_trait_impls,
&self.tcx.query_system.caches.all_local_trait_impls,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Return all `impl` blocks of the given trait in the current crate."]
#[inline(always)]
pub fn local_trait_impls(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [LocalDefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [LocalDefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.local_trait_impls,
&self.tcx.query_system.caches.local_trait_impls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
#[inline(always)]
pub fn trait_impls_of(self, key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx ty::trait_def::TraitImpls {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::trait_def::TraitImpls>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_of,
&self.tcx.query_system.caches.trait_impls_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] building specialization graph of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn specialization_graph_of(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx specialization_graph::Graph, ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx specialization_graph::Graph,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.specialization_graph_of,
&self.tcx.query_system.caches.specialization_graph_of,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] determining dyn-compatibility of trait `tcx.def_path_str(trait_id)` "]
#[inline(always)]
pub fn dyn_compatibility_violations(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DynCompatibilityViolation] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DynCompatibilityViolation]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.dyn_compatibility_violations,
&self.tcx.query_system.caches.dyn_compatibility_violations,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if trait `tcx.def_path_str(trait_id)` is dyn-compatible"]
#[inline(always)]
pub fn is_dyn_compatible(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_dyn_compatible,
&self.tcx.query_system.caches.is_dyn_compatible, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets the ParameterEnvironment for a given item; this environment"]
#[doc =
" will be in \"user-facing\" mode, meaning that it is suitable for"]
#[doc = " type-checking etc, and it does not normalize specializable"]
#[doc = " associated types."]
#[doc = ""]
#[doc =
" You should almost certainly not use this. If you already have an InferCtxt, then"]
#[doc =
" you should also probably have a `ParamEnv` from when it was built. If you don\'t,"]
#[doc =
" then you should take a `TypingEnv` to ensure that you handle opaque types correctly."]
#[inline(always)]
pub fn param_env(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::ParamEnv<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::ParamEnv<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.param_env,
&self.tcx.query_system.caches.param_env, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Like `param_env`, but returns the `ParamEnv` after all opaque types have been"]
#[doc =
" replaced with their hidden type. This is used in the old trait solver"]
#[doc = " when in `PostAnalysis` mode and should not be called directly."]
#[inline(always)]
pub fn typing_env_normalized_for_post_analysis(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::TypingEnv<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::TypingEnv<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.typing_env_normalized_for_post_analysis,
&self.tcx.query_system.caches.typing_env_normalized_for_post_analysis,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_copy_modulo_regions()`,"]
#[doc =
" `ty.is_copy()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_copy_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_copy_raw,
&self.tcx.query_system.caches.is_copy_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Trait selection queries. These are best used by invoking `ty.is_use_cloned_modulo_regions()`,"]
#[doc =
" `ty.is_use_cloned()`, etc, since that will prune the environment where possible."]
#[inline(always)]
pub fn is_use_cloned_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_use_cloned_raw,
&self.tcx.query_system.caches.is_use_cloned_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::is_sized`."]
#[inline(always)]
pub fn is_sized_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_sized_raw,
&self.tcx.query_system.caches.is_sized_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::is_freeze`."]
#[inline(always)]
pub fn is_freeze_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_freeze_raw,
&self.tcx.query_system.caches.is_freeze_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::is_unpin`."]
#[inline(always)]
pub fn is_unpin_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_unpin_raw,
&self.tcx.query_system.caches.is_unpin_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::is_async_drop`."]
#[inline(always)]
pub fn is_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_async_drop_raw,
&self.tcx.query_system.caches.is_async_drop_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::needs_drop`."]
#[inline(always)]
pub fn needs_drop_raw(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.needs_drop_raw,
&self.tcx.query_system.caches.needs_drop_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::needs_async_drop`."]
#[inline(always)]
pub fn needs_async_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.needs_async_drop_raw,
&self.tcx.query_system.caches.needs_async_drop_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::has_significant_drop_raw`."]
#[inline(always)]
pub fn has_significant_drop_raw(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_significant_drop_raw,
&self.tcx.query_system.caches.has_significant_drop_raw,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Query backing `Ty::is_structural_eq_shallow`."]
#[doc = ""]
#[doc =
" This is only correct for ADTs. Call `is_structural_eq_shallow` to handle all types"]
#[doc = " correctly."]
#[inline(always)]
pub fn has_structural_eq_impl(self, key: Ty<'tcx>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_structural_eq_impl,
&self.tcx.query_system.caches.has_structural_eq_impl,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" A list of types where the ADT requires drop if and only if any of"]
#[doc =
" those types require drop. If the ADT is known to always need drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_drop_tys(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_drop_tys,
&self.tcx.query_system.caches.adt_drop_tys, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" A list of types where the ADT requires async drop if and only if any of"]
#[doc =
" those types require async drop. If the ADT is known to always need async drop"]
#[doc = " then `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_async_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_async_drop_tys,
&self.tcx.query_system.caches.adt_async_drop_tys, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" A list of types where the ADT requires drop if and only if any of those types"]
#[doc =
" has significant drop. A type marked with the attribute `rustc_insignificant_dtor`"]
#[doc =
" is considered to not be significant. A drop is significant if it is implemented"]
#[doc =
" by the user or does anything that will have any observable behavior (other than"]
#[doc =
" freeing up memory). If the ADT is known to have a significant destructor then"]
#[doc = " `Err(AlwaysRequiresDrop)` is returned."]
#[inline(always)]
pub fn adt_significant_drop_tys(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.adt_significant_drop_tys,
&self.tcx.query_system.caches.adt_significant_drop_tys,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns a list of types which (a) have a potentially significant destructor"]
#[doc =
" and (b) may be dropped as a result of dropping a value of some type `ty`"]
#[doc = " (in the given environment)."]
#[doc = ""]
#[doc =
" The idea of \"significant\" drop is somewhat informal and is used only for"]
#[doc =
" diagnostics and edition migrations. The idea is that a significant drop may have"]
#[doc =
" some visible side-effect on execution; freeing memory is NOT considered a side-effect."]
#[doc = " The rules are as follows:"]
#[doc =
" * Type with no explicit drop impl do not have significant drop."]
#[doc =
" * Types with a drop impl are assumed to have significant drop unless they have a `#[rustc_insignificant_dtor]` annotation."]
#[doc = ""]
#[doc =
" Note that insignificant drop is a \"shallow\" property. A type like `Vec<LockGuard>` does not"]
#[doc =
" have significant drop but the type `LockGuard` does, and so if `ty = Vec<LockGuard>`"]
#[doc = " then the return value would be `&[LockGuard]`."]
#[doc =
" *IMPORTANT*: *DO NOT* run this query before promoted MIR body is constructed,"]
#[doc = " because this query partially depends on that query."]
#[doc = " Otherwise, there is a risk of query cycles."]
#[inline(always)]
pub fn list_significant_drop_tys(self,
key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
-> &'tcx ty::List<Ty<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ty::List<Ty<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.list_significant_drop_tys,
&self.tcx.query_system.caches.list_significant_drop_tys,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Computes the layout of a type. Note that this implicitly"]
#[doc =
" executes in `TypingMode::PostAnalysis`, and will normalize the input type."]
#[inline(always)]
pub fn layout_of(self, key: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)
->
Result<ty::layout::TyAndLayout<'tcx>,
&'tcx ty::layout::LayoutError<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Result<ty::layout::TyAndLayout<'tcx>,
&'tcx ty::layout::LayoutError<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.layout_of,
&self.tcx.query_system.caches.layout_of, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers."]
#[doc = ""]
#[doc =
" NB: this doesn\'t handle virtual calls - those should use `fn_abi_of_instance`"]
#[doc = " instead, where the instance is an `InstanceKind::Virtual`."]
#[inline(always)]
pub fn fn_abi_of_fn_ptr(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>)
->
Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx rustc_target::callconv::FnAbi<'tcx,
Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_fn_ptr,
&self.tcx.query_system.caches.fn_abi_of_fn_ptr, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for"]
#[doc = " direct calls to an `fn`."]
#[doc = ""]
#[doc =
" NB: that includes virtual calls, which are represented by \"direct calls\""]
#[doc =
" to an `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
#[inline(always)]
pub fn fn_abi_of_instance(self,
key:
ty::PseudoCanonicalInput<'tcx,
(ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>)
->
Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx rustc_target::callconv::FnAbi<'tcx,
Ty<'tcx>>,
&'tcx ty::layout::FnAbiError<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.fn_abi_of_instance,
&self.tcx.query_system.caches.fn_abi_of_instance, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
#[inline(always)]
pub fn dylib_dependency_formats(self, key: CrateNum)
-> &'tcx [(CrateNum, LinkagePreference)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(CrateNum,
LinkagePreference)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.dylib_dependency_formats,
&self.tcx.query_system.caches.dylib_dependency_formats,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
#[inline(always)]
pub fn dependency_formats(self, key: ())
-> &'tcx Arc<crate::middle::dependency_format::Dependencies> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Arc<crate::middle::dependency_format::Dependencies>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.dependency_formats,
&self.tcx.query_system.caches.dependency_formats, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate is_compiler_builtins"]
#[inline(always)]
pub fn is_compiler_builtins(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_compiler_builtins,
&self.tcx.query_system.caches.is_compiler_builtins, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_global_allocator"]
#[inline(always)]
pub fn has_global_allocator(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_global_allocator,
&self.tcx.query_system.caches.has_global_allocator, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_alloc_error_handler"]
#[inline(always)]
pub fn has_alloc_error_handler(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_alloc_error_handler,
&self.tcx.query_system.caches.has_alloc_error_handler,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if the crate has_panic_handler"]
#[inline(always)]
pub fn has_panic_handler(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_panic_handler,
&self.tcx.query_system.caches.has_panic_handler, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if a crate is `#![profiler_runtime]`"]
#[inline(always)]
pub fn is_profiler_runtime(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_profiler_runtime,
&self.tcx.query_system.caches.is_profiler_runtime, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(key)` contains FFI-unwind calls"]
#[inline(always)]
pub fn has_ffi_unwind_calls(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.has_ffi_unwind_calls,
&self.tcx.query_system.caches.has_ffi_unwind_calls, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
#[inline(always)]
pub fn required_panic_strategy(self, key: CrateNum)
-> Option<PanicStrategy> {
use crate::query::{erase, inner};
erase::restore_val::<Option<PanicStrategy>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.required_panic_strategy,
&self.tcx.query_system.caches.required_panic_strategy,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
#[inline(always)]
pub fn panic_in_drop_strategy(self, key: CrateNum) -> PanicStrategy {
use crate::query::{erase, inner};
erase::restore_val::<PanicStrategy>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.panic_in_drop_strategy,
&self.tcx.query_system.caches.panic_in_drop_strategy,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting whether a crate has `#![no_builtins]`"]
#[inline(always)]
pub fn is_no_builtins(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_no_builtins,
&self.tcx.query_system.caches.is_no_builtins, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
#[inline(always)]
pub fn symbol_mangling_version(self, key: CrateNum)
-> SymbolManglingVersion {
use crate::query::{erase, inner};
erase::restore_val::<SymbolManglingVersion>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.symbol_mangling_version,
&self.tcx.query_system.caches.symbol_mangling_version,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
#[inline(always)]
pub fn extern_crate(self, key: CrateNum) -> Option<&'tcx ExternCrate> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx ExternCrate>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.extern_crate,
&self.tcx.query_system.caches.extern_crate, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether the crate enabled `specialization`/`min_specialization`"]
#[inline(always)]
pub fn specialization_enabled_in(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.specialization_enabled_in,
&self.tcx.query_system.caches.specialization_enabled_in,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
#[inline(always)]
pub fn specializes(self, key: (DefId, DefId)) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.specializes,
&self.tcx.query_system.caches.specializes, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting traits in scope at a block"]
#[inline(always)]
pub fn in_scope_traits_map(self, key: hir::OwnerId)
-> Option<&'tcx ItemLocalMap<Box<[TraitCandidate]>>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx ItemLocalMap<Box<[TraitCandidate]>>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.in_scope_traits_map,
&self.tcx.query_system.caches.in_scope_traits_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns whether the impl or associated function has the `default` keyword."]
#[doc =
" Note: This will ICE on inherent impl items. Consider using `AssocItem::defaultness`."]
#[inline(always)]
pub fn defaultness(self, key: impl crate::query::IntoQueryParam<DefId>)
-> hir::Defaultness {
use crate::query::{erase, inner};
erase::restore_val::<hir::Defaultness>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.defaultness,
&self.tcx.query_system.caches.defaultness, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns whether the field corresponding to the `DefId` has a default field value."]
#[inline(always)]
pub fn default_field(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<Option<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.default_field,
&self.tcx.query_system.caches.default_field, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` is well-formed"]
#[inline(always)]
pub fn check_well_formed(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_well_formed,
&self.tcx.query_system.caches.check_well_formed, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking that `tcx.def_path_str(key)` 's generics are constrained by the impl header"]
#[inline(always)]
pub fn enforce_impl_non_lifetime_params_are_constrained(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.enforce_impl_non_lifetime_params_are_constrained,
&self.tcx.query_system.caches.enforce_impl_non_lifetime_params_are_constrained,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
#[inline(always)]
pub fn reachable_non_generics(self, key: CrateNum)
-> &'tcx DefIdMap<SymbolExportInfo> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<SymbolExportInfo>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.reachable_non_generics,
&self.tcx.query_system.caches.reachable_non_generics,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is an exported symbol"]
#[inline(always)]
pub fn is_reachable_non_generic(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_reachable_non_generic,
&self.tcx.query_system.caches.is_reachable_non_generic,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking whether `tcx.def_path_str(def_id)` is reachable from outside the crate"]
#[inline(always)]
pub fn is_unreachable_local_definition(self,
key: impl crate::query::IntoQueryParam<LocalDefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_unreachable_local_definition,
&self.tcx.query_system.caches.is_unreachable_local_definition,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " The entire set of monomorphizations the local crate can safely"]
#[doc = " link to because they are exported from upstream crates. Do"]
#[doc = " not depend on this directly, as its value changes anytime"]
#[doc = " a monomorphization gets added or removed in any upstream"]
#[doc =
" crate. Instead use the narrower `upstream_monomorphizations_for`,"]
#[doc = " `upstream_drop_glue_for`, `upstream_async_drop_glue_for`, or,"]
#[doc = " even better, `Instance::upstream_monomorphization()`."]
#[inline(always)]
pub fn upstream_monomorphizations(self, key: ())
-> &'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>, CrateNum>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>,
CrateNum>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations,
&self.tcx.query_system.caches.upstream_monomorphizations,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the set of upstream monomorphizations available for the"]
#[doc =
" generic function identified by the given `def_id`. The query makes"]
#[doc =
" sure to make a stable selection if the same monomorphization is"]
#[doc = " available in multiple upstream crates."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[inline(always)]
pub fn upstream_monomorphizations_for(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx UnordMap<GenericArgsRef<'tcx>, CrateNum>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx UnordMap<GenericArgsRef<'tcx>,
CrateNum>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.upstream_monomorphizations_for,
&self.tcx.query_system.caches.upstream_monomorphizations_for,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the upstream crate that exports drop-glue for the given"]
#[doc =
" type (`args` is expected to be a single-item list containing the"]
#[doc = " type one wants drop-glue for)."]
#[doc = ""]
#[doc =
" This is a subset of `upstream_monomorphizations_for` in order to"]
#[doc =
" increase dep-tracking granularity. Otherwise adding or removing any"]
#[doc = " type with drop-glue in any upstream crate would invalidate all"]
#[doc = " functions calling drop-glue of an upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_drop_glue_for(self, key: GenericArgsRef<'tcx>)
-> Option<CrateNum> {
use crate::query::{erase, inner};
erase::restore_val::<Option<CrateNum>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.upstream_drop_glue_for,
&self.tcx.query_system.caches.upstream_drop_glue_for,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the upstream crate that exports async-drop-glue for"]
#[doc = " the given type (`args` is expected to be a single-item list"]
#[doc = " containing the type one wants async-drop-glue for)."]
#[doc = ""]
#[doc = " This is a subset of `upstream_monomorphizations_for` in order"]
#[doc = " to increase dep-tracking granularity. Otherwise adding or"]
#[doc = " removing any type with async-drop-glue in any upstream crate"]
#[doc = " would invalidate all functions calling async-drop-glue of an"]
#[doc = " upstream type."]
#[doc = ""]
#[doc =
" You likely want to call `Instance::upstream_monomorphization()`"]
#[doc = " instead of invoking this query directly."]
#[doc = ""]
#[doc =
" NOTE: This query could easily be extended to also support other"]
#[doc =
" common functions that have are large set of monomorphizations"]
#[doc = " (like `Clone::clone` for example)."]
#[inline(always)]
pub fn upstream_async_drop_glue_for(self, key: GenericArgsRef<'tcx>)
-> Option<CrateNum> {
use crate::query::{erase, inner};
erase::restore_val::<Option<CrateNum>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.upstream_async_drop_glue_for,
&self.tcx.query_system.caches.upstream_async_drop_glue_for,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns a list of all `extern` blocks of a crate."]
#[inline(always)]
pub fn foreign_modules(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, ForeignModule> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx FxIndexMap<DefId,
ForeignModule>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.foreign_modules,
&self.tcx.query_system.caches.foreign_modules, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Lint against `extern fn` declarations having incompatible types."]
#[inline(always)]
pub fn clashing_extern_declarations(self, key: ()) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.clashing_extern_declarations,
&self.tcx.query_system.caches.clashing_extern_declarations,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Identifies the entry-point (e.g., the `main` function) for a given"]
#[doc =
" crate, returning `None` if there is no entry point (such as for library crates)."]
#[inline(always)]
pub fn entry_fn(self, key: ()) -> Option<(DefId, EntryFnType)> {
use crate::query::{erase, inner};
erase::restore_val::<Option<(DefId,
EntryFnType)>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.entry_fn,
&self.tcx.query_system.caches.entry_fn, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
#[inline(always)]
pub fn proc_macro_decls_static(self, key: ()) -> Option<LocalDefId> {
use crate::query::{erase, inner};
erase::restore_val::<Option<LocalDefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.proc_macro_decls_static,
&self.tcx.query_system.caches.proc_macro_decls_static,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up the hash a crate"]
#[inline(always)]
pub fn crate_hash(self, key: CrateNum) -> Svh {
use crate::query::{erase, inner};
erase::restore_val::<Svh>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_hash,
&self.tcx.query_system.caches.crate_hash, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
#[inline(always)]
pub fn crate_host_hash(self, key: CrateNum) -> Option<Svh> {
use crate::query::{erase, inner};
erase::restore_val::<Option<Svh>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_host_hash,
&self.tcx.query_system.caches.crate_host_hash, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Gets the extra data to put in each output filename for a crate."]
#[doc =
" For example, compiling the `foo` crate with `extra-filename=-a` creates a `libfoo-b.rlib` file."]
#[inline(always)]
pub fn extra_filename(self, key: CrateNum) -> &'tcx String {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx String>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.extra_filename,
&self.tcx.query_system.caches.extra_filename, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the paths where the crate came from in the file system."]
#[inline(always)]
pub fn crate_extern_paths(self, key: CrateNum) -> &'tcx Vec<PathBuf> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<PathBuf>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_extern_paths,
&self.tcx.query_system.caches.crate_extern_paths, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Given a crate and a trait, look up all impls of that trait in the crate."]
#[doc = " Return `(impl_id, self_ty)`."]
#[inline(always)]
pub fn implementations_of_trait(self, key: (CrateNum, DefId))
-> &'tcx [(DefId, Option<SimplifiedType>)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(DefId,
Option<SimplifiedType>)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.implementations_of_trait,
&self.tcx.query_system.caches.implementations_of_trait,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Collects all incoherent impls for the given crate and type."]
#[doc = ""]
#[doc =
" Do not call this directly, but instead use the `incoherent_impls` query."]
#[doc =
" This query is only used to get the data necessary for that query."]
#[inline(always)]
pub fn crate_incoherent_impls(self, key: (CrateNum, SimplifiedType))
-> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_incoherent_impls,
&self.tcx.query_system.caches.crate_incoherent_impls,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Get the corresponding native library from the `native_libraries` query"]
#[inline(always)]
pub fn native_library(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx NativeLib> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx NativeLib>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.native_library,
&self.tcx.query_system.caches.native_library, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] inheriting delegation signature"]
#[inline(always)]
pub fn inherit_sig_for_delegation_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [Ty<'tcx>] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [Ty<'tcx>]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inherit_sig_for_delegation_item,
&self.tcx.query_system.caches.inherit_sig_for_delegation_item,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Does lifetime resolution on items. Importantly, we can\'t resolve"]
#[doc =
" lifetimes directly on things like trait methods, because of trait params."]
#[doc = " See `rustc_resolve::late::lifetimes` for details."]
#[inline(always)]
pub fn resolve_bound_vars(self, key: hir::OwnerId)
-> &'tcx ResolveBoundVars<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx ResolveBoundVars<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.resolve_bound_vars,
&self.tcx.query_system.caches.resolve_bound_vars, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up a named region inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn named_variable_map(self, key: hir::OwnerId)
-> &'tcx SortedMap<ItemLocalId, ResolvedArg> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx SortedMap<ItemLocalId,
ResolvedArg>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.named_variable_map,
&self.tcx.query_system.caches.named_variable_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] testing if a region is late bound inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn is_late_bound_map(self, key: hir::OwnerId)
-> Option<&'tcx FxIndexSet<ItemLocalId>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx FxIndexSet<ItemLocalId>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_late_bound_map,
&self.tcx.query_system.caches.is_late_bound_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the *default lifetime* to be used if a trait object type were to be passed for"]
#[doc = " the type parameter given by `DefId`."]
#[doc = ""]
#[doc =
" **Tip**: You can use `#[rustc_object_lifetime_default]` on an item to basically"]
#[doc =
" print the result of this query for use in UI tests or for debugging purposes."]
#[doc = ""]
#[doc = " # Examples"]
#[doc = ""]
#[doc =
" - For `T` in `struct Foo<\'a, T: \'a>(&\'a T);`, this would be `Param(\'a)`"]
#[doc =
" - For `T` in `struct Bar<\'a, T>(&\'a T);`, this would be `Empty`"]
#[doc = ""]
#[doc = " # Panics"]
#[doc = ""]
#[doc =
" This query will panic if the given definition is not a type parameter."]
#[inline(always)]
pub fn object_lifetime_default(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ObjectLifetimeDefault {
use crate::query::{erase, inner};
erase::restore_val::<ObjectLifetimeDefault>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.object_lifetime_default,
&self.tcx.query_system.caches.object_lifetime_default,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up late bound vars inside `tcx.def_path_str(owner_id)` "]
#[inline(always)]
pub fn late_bound_vars_map(self, key: hir::OwnerId)
-> &'tcx SortedMap<ItemLocalId, Vec<ty::BoundVariableKind<'tcx>>> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx SortedMap<ItemLocalId,
Vec<ty::BoundVariableKind<'tcx>>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.late_bound_vars_map,
&self.tcx.query_system.caches.late_bound_vars_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" For an opaque type, return the list of (captured lifetime, inner generic param)."]
#[doc = " ```ignore (illustrative)"]
#[doc =
" fn foo<\'a: \'a, \'b, T>(&\'b u8) -> impl Into<Self> + \'b { ... }"]
#[doc = " ```"]
#[doc = ""]
#[doc =
" We would return `[(\'a, \'_a), (\'b, \'_b)]`, with `\'a` early-bound and `\'b` late-bound."]
#[doc = ""]
#[doc = " After hir_ty_lowering, we get:"]
#[doc = " ```ignore (pseudo-code)"]
#[doc = " opaque foo::<\'a>::opaque<\'_a, \'_b>: Into<Foo<\'_a>> + \'_b;"]
#[doc = " ^^^^^^^^ inner generic params"]
#[doc =
" fn foo<\'a>: for<\'b> fn(&\'b u8) -> foo::<\'a>::opaque::<\'a, \'b>"]
#[doc =
" ^^^^^^ captured lifetimes"]
#[doc = " ```"]
#[inline(always)]
pub fn opaque_captured_lifetimes(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> &'tcx [(ResolvedArg, LocalDefId)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(ResolvedArg,
LocalDefId)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.opaque_captured_lifetimes,
&self.tcx.query_system.caches.opaque_captured_lifetimes,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Computes the visibility of the provided `def_id`."]
#[doc = ""]
#[doc =
" If the item from the `def_id` doesn\'t have a visibility, it will panic. For example"]
#[doc =
" a generic type parameter will panic if you call this method on it:"]
#[doc = ""]
#[doc = " ```"]
#[doc = " use std::fmt::Debug;"]
#[doc = ""]
#[doc = " pub trait Foo<T: Debug> {}"]
#[doc = " ```"]
#[doc = ""]
#[doc = " In here, if you call `visibility` on `T`, it\'ll panic."]
#[inline(always)]
pub fn visibility(self, key: impl crate::query::IntoQueryParam<DefId>)
-> ty::Visibility<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<ty::Visibility<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.visibility,
&self.tcx.query_system.caches.visibility, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing the uninhabited predicate of `{:?}`"]
#[inline(always)]
pub fn inhabited_predicate_adt(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> ty::inhabitedness::InhabitedPredicate<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::inhabitedness::InhabitedPredicate<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_adt,
&self.tcx.query_system.caches.inhabited_predicate_adt,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
#[inline(always)]
pub fn inhabited_predicate_type(self, key: Ty<'tcx>)
-> ty::inhabitedness::InhabitedPredicate<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::inhabitedness::InhabitedPredicate<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.inhabited_predicate_type,
&self.tcx.query_system.caches.inhabited_predicate_type,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
#[inline(always)]
pub fn dep_kind(self, key: CrateNum) -> CrateDepKind {
use crate::query::{erase, inner};
erase::restore_val::<CrateDepKind>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.dep_kind,
&self.tcx.query_system.caches.dep_kind, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the name of the crate."]
#[inline(always)]
pub fn crate_name(self, key: CrateNum) -> Symbol {
use crate::query::{erase, inner};
erase::restore_val::<Symbol>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_name,
&self.tcx.query_system.caches.crate_name, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] collecting child items of module `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn module_children(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [ModChild] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [ModChild]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.module_children,
&self.tcx.query_system.caches.module_children, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Gets the number of definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This allows external tools to iterate over all definitions in a foreign crate."]
#[doc = ""]
#[doc =
" This should never be used for the local crate, instead use `iter_local_def_id`."]
#[inline(always)]
pub fn num_extern_def_ids(self, key: CrateNum) -> usize {
use crate::query::{erase, inner};
erase::restore_val::<usize>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.num_extern_def_ids,
&self.tcx.query_system.caches.num_extern_def_ids, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
#[inline(always)]
pub fn lib_features(self, key: CrateNum) -> &'tcx LibFeatures {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx LibFeatures>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.lib_features,
&self.tcx.query_system.caches.lib_features, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`"]
#[doc =
" attributes. If a `#[unstable(feature = \"implier\", implied_by = \"impliee\")]` attribute"]
#[doc = " exists, then this map will have a `impliee -> implier` entry."]
#[doc = ""]
#[doc =
" This mapping is necessary unless both the `#[stable]` and `#[unstable]` attributes should"]
#[doc =
" specify their implications (both `implies` and `implied_by`). If only one of the two"]
#[doc =
" attributes do (as in the current implementation, `implied_by` in `#[unstable]`), then this"]
#[doc =
" mapping is necessary for diagnostics. When a \"unnecessary feature attribute\" error is"]
#[doc =
" reported, only the `#[stable]` attribute information is available, so the map is necessary"]
#[doc =
" to know that the feature implies another feature. If it were reversed, and the `#[stable]`"]
#[doc =
" attribute had an `implies` meta item, then a map would be necessary when avoiding a \"use of"]
#[doc = " unstable feature\" error for a feature that was implied."]
#[inline(always)]
pub fn stability_implications(self, key: CrateNum)
-> &'tcx UnordMap<Symbol, Symbol> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx UnordMap<Symbol,
Symbol>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.stability_implications,
&self.tcx.query_system.caches.stability_implications,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Whether the function is an intrinsic"]
#[inline(always)]
pub fn intrinsic_raw(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<rustc_middle::ty::IntrinsicDef> {
use crate::query::{erase, inner};
erase::restore_val::<Option<rustc_middle::ty::IntrinsicDef>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.intrinsic_raw,
&self.tcx.query_system.caches.intrinsic_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn get_lang_items(self, key: ()) -> &'tcx LanguageItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx LanguageItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.get_lang_items,
&self.tcx.query_system.caches.get_lang_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns all diagnostic items defined in all crates."]
#[inline(always)]
pub fn all_diagnostic_items(self, key: ())
-> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_hir::diagnostic_items::DiagnosticItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.all_diagnostic_items,
&self.tcx.query_system.caches.all_diagnostic_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the lang items defined in another crate by loading it from metadata."]
#[inline(always)]
pub fn defined_lang_items(self, key: CrateNum)
-> &'tcx [(DefId, LangItem)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(DefId,
LangItem)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.defined_lang_items,
&self.tcx.query_system.caches.defined_lang_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the diagnostic items defined in a crate."]
#[inline(always)]
pub fn diagnostic_items(self, key: CrateNum)
-> &'tcx rustc_hir::diagnostic_items::DiagnosticItems {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_hir::diagnostic_items::DiagnosticItems>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_items,
&self.tcx.query_system.caches.diagnostic_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
#[inline(always)]
pub fn missing_lang_items(self, key: CrateNum) -> &'tcx [LangItem] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [LangItem]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.missing_lang_items,
&self.tcx.query_system.caches.missing_lang_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The visible parent map is a map from every item to a visible parent."]
#[doc = " It prefers the shortest visible path to an item."]
#[doc = " Used for diagnostics, for example path trimming."]
#[doc = " The parents are modules, enums or traits."]
#[inline(always)]
pub fn visible_parent_map(self, key: ()) -> &'tcx DefIdMap<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.visible_parent_map,
&self.tcx.query_system.caches.visible_parent_map, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Collects the \"trimmed\", shortest accessible paths to all items for diagnostics."]
#[doc =
" See the [provider docs](`rustc_middle::ty::print::trimmed_def_paths`) for more info."]
#[inline(always)]
pub fn trimmed_def_paths(self, key: ()) -> &'tcx DefIdMap<Symbol> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DefIdMap<Symbol>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trimmed_def_paths,
&self.tcx.query_system.caches.trimmed_def_paths, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
#[inline(always)]
pub fn missing_extern_crate_item(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.missing_extern_crate_item,
&self.tcx.query_system.caches.missing_extern_crate_item,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking at the source for a crate"]
#[inline(always)]
pub fn used_crate_source(self, key: CrateNum) -> &'tcx Arc<CrateSource> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Arc<CrateSource>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.used_crate_source,
&self.tcx.query_system.caches.used_crate_source, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns the debugger visualizers defined for this crate."]
#[doc =
" NOTE: This query has to be marked `eval_always` because it reads data"]
#[doc =
" directly from disk that is not tracked anywhere else. I.e. it"]
#[doc = " represents a genuine input to the query system."]
#[inline(always)]
pub fn debugger_visualizers(self, key: CrateNum)
-> &'tcx Vec<DebuggerVisualizerFile> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<DebuggerVisualizerFile>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.debugger_visualizers,
&self.tcx.query_system.caches.debugger_visualizers, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
#[inline(always)]
pub fn postorder_cnums(self, key: ()) -> &'tcx [CrateNum] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [CrateNum]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.postorder_cnums,
&self.tcx.query_system.caches.postorder_cnums, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
#[doc = " is marked as a private dependency"]
#[inline(always)]
pub fn is_private_dep(self, key: CrateNum) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_private_dep,
&self.tcx.query_system.caches.is_private_dep, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
#[inline(always)]
pub fn allocator_kind(self, key: ()) -> Option<AllocatorKind> {
use crate::query::{erase, inner};
erase::restore_val::<Option<AllocatorKind>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.allocator_kind,
&self.tcx.query_system.caches.allocator_kind, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
#[inline(always)]
pub fn alloc_error_handler_kind(self, key: ()) -> Option<AllocatorKind> {
use crate::query::{erase, inner};
erase::restore_val::<Option<AllocatorKind>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.alloc_error_handler_kind,
&self.tcx.query_system.caches.alloc_error_handler_kind,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] collecting upvars mentioned in `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn upvars_mentioned(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx FxIndexMap<hir::HirId,
hir::Upvar>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.upvars_mentioned,
&self.tcx.query_system.caches.upvars_mentioned, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" All available crates in the graph, including those that should not be user-facing"]
#[doc = " (such as private crates)."]
#[inline(always)]
pub fn crates(self, key: ()) -> &'tcx [CrateNum] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [CrateNum]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crates,
&self.tcx.query_system.caches.crates, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
#[inline(always)]
pub fn used_crates(self, key: ()) -> &'tcx [CrateNum] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [CrateNum]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.used_crates,
&self.tcx.query_system.caches.used_crates, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " All crates that share the same name as crate `c`."]
#[doc = ""]
#[doc =
" This normally occurs when multiple versions of the same dependency are present in the"]
#[doc = " dependency tree."]
#[inline(always)]
pub fn duplicate_crate_names(self, key: CrateNum) -> &'tcx [CrateNum] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [CrateNum]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.duplicate_crate_names,
&self.tcx.query_system.caches.duplicate_crate_names,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" A list of all traits in a crate, used by rustdoc and error reporting."]
#[inline(always)]
pub fn traits(self, key: CrateNum) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.traits,
&self.tcx.query_system.caches.traits, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
#[inline(always)]
pub fn trait_impls_in_crate(self, key: CrateNum) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trait_impls_in_crate,
&self.tcx.query_system.caches.trait_impls_in_crate, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] fetching the stable impl's order"]
#[inline(always)]
pub fn stable_order_of_exportable_impls(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, usize> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx FxIndexMap<DefId,
usize>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.stable_order_of_exportable_impls,
&self.tcx.query_system.caches.stable_order_of_exportable_impls,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
#[inline(always)]
pub fn exportable_items(self, key: CrateNum) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.exportable_items,
&self.tcx.query_system.caches.exportable_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " The list of non-generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " This is separate from exported_generic_symbols to avoid having"]
#[doc = " to deserialize all non-generic symbols too for upstream crates"]
#[doc = " in the upstream_monomorphizations query."]
#[doc = ""]
#[doc =
" - All names contained in `exported_non_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_non_generic_symbols(self, key: CrateNum)
-> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(ExportedSymbol<'tcx>,
SymbolExportInfo)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.exported_non_generic_symbols,
&self.tcx.query_system.caches.exported_non_generic_symbols,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " The list of generic symbols exported from the given crate."]
#[doc = ""]
#[doc = " - All names contained in `exported_generic_symbols(cnum)` are"]
#[doc =
" guaranteed to correspond to a publicly visible symbol in `cnum`"]
#[doc = " machine code."]
#[doc =
" - The `exported_non_generic_symbols` and `exported_generic_symbols`"]
#[doc = " sets of different crates do not intersect."]
#[inline(always)]
pub fn exported_generic_symbols(self, key: CrateNum)
-> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [(ExportedSymbol<'tcx>,
SymbolExportInfo)]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.exported_generic_symbols,
&self.tcx.query_system.caches.exported_generic_symbols,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
#[inline(always)]
pub fn collect_and_partition_mono_items(self, key: ())
-> MonoItemPartitions<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<MonoItemPartitions<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.collect_and_partition_mono_items,
&self.tcx.query_system.caches.collect_and_partition_mono_items,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] determining whether `tcx.def_path_str(def_id)` needs codegen"]
#[inline(always)]
pub fn is_codegened_item(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_codegened_item,
&self.tcx.query_system.caches.is_codegened_item, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
#[inline(always)]
pub fn codegen_unit(self, key: Symbol) -> &'tcx CodegenUnit<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx CodegenUnit<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.codegen_unit,
&self.tcx.query_system.caches.codegen_unit, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] optimization level used by backend"]
#[inline(always)]
pub fn backend_optimization_level(self, key: ()) -> OptLevel {
use crate::query::{erase, inner};
erase::restore_val::<OptLevel>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.backend_optimization_level,
&self.tcx.query_system.caches.backend_optimization_level,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Return the filenames where output artefacts shall be stored."]
#[doc = ""]
#[doc =
" This query returns an `&Arc` because codegen backends need the value even after the `TyCtxt`"]
#[doc = " has been destroyed."]
#[inline(always)]
pub fn output_filenames(self, key: ()) -> &'tcx Arc<OutputFilenames> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Arc<OutputFilenames>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.output_filenames,
&self.tcx.query_system.caches.output_filenames, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_projection(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_projection,
&self.tcx.query_system.caches.normalize_canonicalized_projection,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_free_alias(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_free_alias,
&self.tcx.query_system.caches.normalize_canonicalized_free_alias,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " <div class=\"warning\">"]
#[doc = ""]
#[doc = " Do not call this query directly: Invoke `normalize` instead."]
#[doc = ""]
#[doc = " </div>"]
#[inline(always)]
pub fn normalize_canonicalized_inherent_projection(self,
key: CanonicalAliasGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.normalize_canonicalized_inherent_projection,
&self.tcx.query_system.caches.normalize_canonicalized_inherent_projection,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
#[inline(always)]
pub fn try_normalize_generic_arg_after_erasing_regions(self,
key: PseudoCanonicalInput<'tcx, GenericArg<'tcx>>)
-> Result<GenericArg<'tcx>, NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<GenericArg<'tcx>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.try_normalize_generic_arg_after_erasing_regions,
&self.tcx.query_system.caches.try_normalize_generic_arg_after_erasing_regions,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing implied outlives bounds for `key.0.canonical.value.value.ty` (hack disabled = {:?})"]
#[inline(always)]
pub fn implied_outlives_bounds(self,
key: (CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool))
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.implied_outlives_bounds,
&self.tcx.query_system.caches.implied_outlives_bounds,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Do not call this query directly:"]
#[doc =
" invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
#[inline(always)]
pub fn dropck_outlives(self, key: CanonicalDropckOutlivesGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.dropck_outlives,
&self.tcx.query_system.caches.dropck_outlives, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
#[doc = " `infcx.predicate_must_hold()` instead."]
#[inline(always)]
pub fn evaluate_obligation(self, key: CanonicalPredicateGoal<'tcx>)
-> Result<EvaluationResult, OverflowError> {
use crate::query::{erase, inner};
erase::restore_val::<Result<EvaluationResult,
OverflowError>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.evaluate_obligation,
&self.tcx.query_system.caches.evaluate_obligation, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Do not call this query directly: part of the `Eq` type-op"]
#[inline(always)]
pub fn type_op_ascribe_user_type(self,
key: CanonicalTypeOpAscribeUserTypeGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ()>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_ascribe_user_type,
&self.tcx.query_system.caches.type_op_ascribe_user_type,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: part of the `ProvePredicate` type-op"]
#[inline(always)]
pub fn type_op_prove_predicate(self,
key: CanonicalTypeOpProvePredicateGoal<'tcx>)
->
Result<&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ()>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_prove_predicate,
&self.tcx.query_system.caches.type_op_prove_predicate,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_ty(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Ty<'tcx>>>, NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Ty<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_ty,
&self.tcx.query_system.caches.type_op_normalize_ty, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_clause(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::Clause<'tcx>>>, NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::Clause<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_clause,
&self.tcx.query_system.caches.type_op_normalize_clause,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_poly_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_poly_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_poly_fn_sig,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Do not call this query directly: part of the `Normalize` type-op"]
#[inline(always)]
pub fn type_op_normalize_fn_sig(self,
key: CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>)
->
Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>, NoSolution> {
use crate::query::{erase, inner};
erase::restore_val::<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>,
NoSolution>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.type_op_normalize_fn_sig,
&self.tcx.query_system.caches.type_op_normalize_fn_sig,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking impossible instantiated predicates: `tcx.def_path_str(key.0)` "]
#[inline(always)]
pub fn instantiate_and_check_impossible_predicates(self,
key: (DefId, GenericArgsRef<'tcx>)) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.instantiate_and_check_impossible_predicates,
&self.tcx.query_system.caches.instantiate_and_check_impossible_predicates,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[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)` "]
#[inline(always)]
pub fn is_impossible_associated_item(self, key: (DefId, DefId)) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.is_impossible_associated_item,
&self.tcx.query_system.caches.is_impossible_associated_item,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] computing autoderef types for `goal.canonical.value.value.self_ty` "]
#[inline(always)]
pub fn method_autoderef_steps(self,
key: CanonicalMethodAutoderefStepsGoal<'tcx>)
-> MethodAutoderefStepsResult<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<MethodAutoderefStepsResult<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.method_autoderef_steps,
&self.tcx.query_system.caches.method_autoderef_steps,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Used by `-Znext-solver` to compute proof trees."]
#[inline(always)]
pub fn evaluate_root_goal_for_proof_tree_raw(self,
key: solve::CanonicalInput<'tcx>)
->
(solve::QueryResult<'tcx>,
&'tcx solve::inspect::Probe<TyCtxt<'tcx>>) {
use crate::query::{erase, inner};
erase::restore_val::<(solve::QueryResult<'tcx>,
&'tcx solve::inspect::Probe<TyCtxt<'tcx>>)>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.evaluate_root_goal_for_proof_tree_raw,
&self.tcx.query_system.caches.evaluate_root_goal_for_proof_tree_raw,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Returns the Rust target features for the current target. These are not always the same as LLVM target features!"]
#[inline(always)]
pub fn rust_target_features(self, key: CrateNum)
-> &'tcx UnordMap<String, rustc_target::target_features::Stability> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx UnordMap<String,
rustc_target::target_features::Stability>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.rust_target_features,
&self.tcx.query_system.caches.rust_target_features, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up implied target features"]
#[inline(always)]
pub fn implied_target_features(self, key: Symbol) -> &'tcx Vec<Symbol> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<Symbol>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.implied_target_features,
&self.tcx.query_system.caches.implied_target_features,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up enabled feature gates"]
#[inline(always)]
pub fn features_query(self, key: ()) -> &'tcx rustc_feature::Features {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx rustc_feature::Features>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.features_query,
&self.tcx.query_system.caches.features_query, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
#[inline(always)]
pub fn crate_for_resolver(self, key: ())
-> &'tcx Steal<(rustc_ast::Crate, rustc_ast::AttrVec)> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Steal<(rustc_ast::Crate,
rustc_ast::AttrVec)>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.crate_for_resolver,
&self.tcx.query_system.caches.crate_for_resolver, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Attempt to resolve the given `DefId` to an `Instance`, for the"]
#[doc = " given generics args (`GenericArgsRef`), returning one of:"]
#[doc = " * `Ok(Some(instance))` on success"]
#[doc = " * `Ok(None)` when the `GenericArgsRef` are still too generic,"]
#[doc = " and therefore don\'t allow finding the final `Instance`"]
#[doc =
" * `Err(ErrorGuaranteed)` when the `Instance` resolution process"]
#[doc =
" couldn\'t complete due to errors elsewhere - this is distinct"]
#[doc =
" from `Ok(None)` to avoid misleading diagnostics when an error"]
#[doc = " has already been/will be emitted, for the original cause."]
#[inline(always)]
pub fn resolve_instance_raw(self,
key: ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>)
-> Result<Option<ty::Instance<'tcx>>, ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<Option<ty::Instance<'tcx>>,
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.resolve_instance_raw,
&self.tcx.query_system.caches.resolve_instance_raw, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] revealing opaque types in `{:?}`"]
#[inline(always)]
pub fn reveal_opaque_types_in_bounds(self, key: ty::Clauses<'tcx>)
-> ty::Clauses<'tcx> {
use crate::query::{erase, inner};
erase::restore_val::<ty::Clauses<'tcx>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.reveal_opaque_types_in_bounds,
&self.tcx.query_system.caches.reveal_opaque_types_in_bounds,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up limits"]
#[inline(always)]
pub fn limits(self, key: ()) -> Limits {
use crate::query::{erase, inner};
erase::restore_val::<Limits>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.limits,
&self.tcx.query_system.caches.limits, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Performs an HIR-based well-formed check on the item with the given `HirId`. If"]
#[doc =
" we get an `Unimplemented` error that matches the provided `Predicate`, return"]
#[doc = " the cause of the newly created obligation."]
#[doc = ""]
#[doc =
" This is only used by error-reporting code to get a better cause (in particular, a better"]
#[doc =
" span) for an *existing* error. Therefore, it is best-effort, and may never handle"]
#[doc =
" all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,"]
#[doc = " because the `ty::Ty`-based wfcheck is always run."]
#[inline(always)]
pub fn diagnostic_hir_wf_check(self,
key: (ty::Predicate<'tcx>, WellFormedLoc))
-> Option<&'tcx ObligationCause<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Option<&'tcx ObligationCause<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.diagnostic_hir_wf_check,
&self.tcx.query_system.caches.diagnostic_hir_wf_check,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
#[doc = " `--target` and similar)."]
#[inline(always)]
pub fn global_backend_features(self, key: ()) -> &'tcx Vec<String> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx Vec<String>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.global_backend_features,
&self.tcx.query_system.caches.global_backend_features,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking validity requirement for `key.1.value` : `key.0` "]
#[inline(always)]
pub fn check_validity_requirement(self,
key: (ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>))
-> Result<bool, &'tcx ty::layout::LayoutError<'tcx>> {
use crate::query::{erase, inner};
erase::restore_val::<Result<bool,
&'tcx ty::layout::LayoutError<'tcx>>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_validity_requirement,
&self.tcx.query_system.caches.check_validity_requirement,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" This takes the def-id of an associated item from a impl of a trait,"]
#[doc =
" and checks its validity against the trait item it corresponds to."]
#[doc = ""]
#[doc = " Any other def id will ICE."]
#[inline(always)]
pub fn compare_impl_item(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> Result<(), ErrorGuaranteed> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(),
ErrorGuaranteed>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.compare_impl_item,
&self.tcx.query_system.caches.compare_impl_item, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] deducing parameter attributes for `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn deduced_param_attrs(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx [DeducedParamAttrs] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DeducedParamAttrs]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.deduced_param_attrs,
&self.tcx.query_system.caches.deduced_param_attrs, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
#[inline(always)]
pub fn doc_link_resolutions(self,
key: impl crate::query::IntoQueryParam<DefId>)
-> &'tcx DocLinkResMap {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx DocLinkResMap>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.doc_link_resolutions,
&self.tcx.query_system.caches.doc_link_resolutions, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
#[inline(always)]
pub fn doc_link_traits_in_scope(self,
key: impl crate::query::IntoQueryParam<DefId>) -> &'tcx [DefId] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [DefId]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.doc_link_traits_in_scope,
&self.tcx.query_system.caches.doc_link_traits_in_scope,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Get all item paths that were stripped by a `#[cfg]` in a particular crate."]
#[doc =
" Should not be called for the local crate before the resolver outputs are created, as it"]
#[doc = " is only fed there."]
#[inline(always)]
pub fn stripped_cfg_items(self, key: CrateNum)
-> &'tcx [StrippedCfgItem] {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx [StrippedCfgItem]>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.stripped_cfg_items,
&self.tcx.query_system.caches.stripped_cfg_items, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] check whether the item has a `where Self: Sized` bound"]
#[inline(always)]
pub fn generics_require_sized_self(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.generics_require_sized_self,
&self.tcx.query_system.caches.generics_require_sized_self,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
#[inline(always)]
pub fn cross_crate_inlinable(self,
key: impl crate::query::IntoQueryParam<DefId>) -> bool {
use crate::query::{erase, inner};
erase::restore_val::<bool>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.cross_crate_inlinable,
&self.tcx.query_system.caches.cross_crate_inlinable,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Perform monomorphization-time checking on this item."]
#[doc =
" This is used for lints/errors that can only be checked once the instance is fully"]
#[doc = " monomorphized."]
#[inline(always)]
pub fn check_mono_item(self, key: ty::Instance<'tcx>) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_mono_item,
&self.tcx.query_system.caches.check_mono_item, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
" Builds the set of functions that should be skipped for the move-size check."]
#[inline(always)]
pub fn skip_move_check_fns(self, key: ()) -> &'tcx FxIndexSet<DefId> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx FxIndexSet<DefId>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.skip_move_check_fns,
&self.tcx.query_system.caches.skip_move_check_fns, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] collecting items used by `key.0` "]
#[inline(always)]
pub fn items_of_instance(self, key: (ty::Instance<'tcx>, CollectionMode))
->
Result<(&'tcx [Spanned<MonoItem<'tcx>>],
&'tcx [Spanned<MonoItem<'tcx>>]), NormalizationErrorInMono> {
use crate::query::{erase, inner};
erase::restore_val::<Result<(&'tcx [Spanned<MonoItem<'tcx>>],
&'tcx [Spanned<MonoItem<'tcx>>]),
NormalizationErrorInMono>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.items_of_instance,
&self.tcx.query_system.caches.items_of_instance, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] estimating codegen size of `key` "]
#[inline(always)]
pub fn size_estimate(self, key: ty::Instance<'tcx>) -> usize {
use crate::query::{erase, inner};
erase::restore_val::<usize>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.size_estimate,
&self.tcx.query_system.caches.size_estimate, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] looking up anon const kind of `tcx.def_path_str(def_id)` "]
#[inline(always)]
pub fn anon_const_kind(self,
key: impl crate::query::IntoQueryParam<DefId>) -> ty::AnonConstKind {
use crate::query::{erase, inner};
erase::restore_val::<ty::AnonConstKind>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.anon_const_kind,
&self.tcx.query_system.caches.anon_const_kind, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] checking if `tcx.def_path_str(def_id)` is a trivial const"]
#[inline(always)]
pub fn trivial_const(self, key: impl crate::query::IntoQueryParam<DefId>)
-> Option<(mir::ConstValue, Ty<'tcx>)> {
use crate::query::{erase, inner};
erase::restore_val::<Option<(mir::ConstValue,
Ty<'tcx>)>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.trivial_const,
&self.tcx.query_system.caches.trivial_const, self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Checks for the nearest `#[sanitize(xyz = \"off\")]` or"]
#[doc =
" `#[sanitize(xyz = \"on\")]` on this def and any enclosing defs, up to the"]
#[doc = " crate root."]
#[doc = ""]
#[doc = " Returns the sanitizer settings for this def."]
#[inline(always)]
pub fn sanitizer_settings_for(self,
key: impl crate::query::IntoQueryParam<LocalDefId>)
-> SanitizerFnAttrs {
use crate::query::{erase, inner};
erase::restore_val::<SanitizerFnAttrs>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.sanitizer_settings_for,
&self.tcx.query_system.caches.sanitizer_settings_for,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc =
"[query description - consider adding a doc-comment!] check externally implementable items"]
#[inline(always)]
pub fn check_externally_implementable_items(self, key: ()) -> () {
use crate::query::{erase, inner};
erase::restore_val::<()>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.check_externally_implementable_items,
&self.tcx.query_system.caches.check_externally_implementable_items,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
#[doc = " Returns a list of all `externally implementable items` crate."]
#[inline(always)]
pub fn externally_implementable_items(self, key: CrateNum)
-> &'tcx FxIndexMap<DefId, (EiiDecl, FxIndexMap<DefId, EiiImpl>)> {
use crate::query::{erase, inner};
erase::restore_val::<&'tcx FxIndexMap<DefId,
(EiiDecl,
FxIndexMap<DefId,
EiiImpl>)>>(inner::query_get_at(self.tcx,
self.tcx.query_system.fns.engine.externally_implementable_items,
&self.tcx.query_system.caches.externally_implementable_items,
self.span,
crate::query::IntoQueryParam::into_query_param(key)))
}
}
/// Holds a `QueryVTable` for each query.
///
/// ("Per" just makes this pluralized name more visually distinct.)
pub struct PerQueryVTables<'tcx> {
pub derive_macro_expansion: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
derive_macro_expansion::Storage<'tcx>>,
pub trigger_delayed_bug: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trigger_delayed_bug::Storage<'tcx>>,
pub registered_tools: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
registered_tools::Storage<'tcx>>,
pub early_lint_checks: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
early_lint_checks::Storage<'tcx>>,
pub env_var_os: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
env_var_os::Storage<'tcx>>,
pub resolutions: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
resolutions::Storage<'tcx>>,
pub resolver_for_lowering_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
resolver_for_lowering_raw::Storage<'tcx>>,
pub source_span: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
source_span::Storage<'tcx>>,
pub hir_crate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
hir_crate::Storage<'tcx>>,
pub hir_crate_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
hir_crate_items::Storage<'tcx>>,
pub hir_module_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
hir_module_items::Storage<'tcx>>,
pub local_def_id_to_hir_id: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
local_def_id_to_hir_id::Storage<'tcx>>,
pub hir_owner_parent_q: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
hir_owner_parent_q::Storage<'tcx>>,
pub opt_hir_owner_nodes: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
opt_hir_owner_nodes::Storage<'tcx>>,
pub hir_attr_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
hir_attr_map::Storage<'tcx>>,
pub opt_ast_lowering_delayed_lints: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
opt_ast_lowering_delayed_lints::Storage<'tcx>>,
pub const_param_default: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
const_param_default::Storage<'tcx>>,
pub const_of_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
const_of_item::Storage<'tcx>>,
pub type_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_of::Storage<'tcx>>,
pub type_of_opaque: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_of_opaque::Storage<'tcx>>,
pub type_of_opaque_hir_typeck: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_of_opaque_hir_typeck::Storage<'tcx>>,
pub type_alias_is_lazy: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_alias_is_lazy::Storage<'tcx>>,
pub collect_return_position_impl_trait_in_trait_tys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
collect_return_position_impl_trait_in_trait_tys::Storage<'tcx>>,
pub opaque_ty_origin: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
opaque_ty_origin::Storage<'tcx>>,
pub unsizing_params_for_adt: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
unsizing_params_for_adt::Storage<'tcx>>,
pub analysis: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
analysis::Storage<'tcx>>,
pub check_expectations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_expectations::Storage<'tcx>>,
pub generics_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
generics_of::Storage<'tcx>>,
pub predicates_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
predicates_of::Storage<'tcx>>,
pub opaque_types_defined_by: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
opaque_types_defined_by::Storage<'tcx>>,
pub nested_bodies_within: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
nested_bodies_within::Storage<'tcx>>,
pub explicit_item_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_item_bounds::Storage<'tcx>>,
pub explicit_item_self_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_item_self_bounds::Storage<'tcx>>,
pub item_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
item_bounds::Storage<'tcx>>,
pub item_self_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
item_self_bounds::Storage<'tcx>>,
pub item_non_self_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
item_non_self_bounds::Storage<'tcx>>,
pub impl_super_outlives: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
impl_super_outlives::Storage<'tcx>>,
pub native_libraries: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
native_libraries::Storage<'tcx>>,
pub shallow_lint_levels_on: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
shallow_lint_levels_on::Storage<'tcx>>,
pub lint_expectations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lint_expectations::Storage<'tcx>>,
pub lints_that_dont_need_to_run: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lints_that_dont_need_to_run::Storage<'tcx>>,
pub expn_that_defined: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
expn_that_defined::Storage<'tcx>>,
pub is_panic_runtime: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_panic_runtime::Storage<'tcx>>,
pub representability: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
representability::Storage<'tcx>>,
pub representability_adt_ty: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
representability_adt_ty::Storage<'tcx>>,
pub params_in_repr: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
params_in_repr::Storage<'tcx>>,
pub thir_body: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
thir_body::Storage<'tcx>>,
pub mir_keys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_keys::Storage<'tcx>>,
pub mir_const_qualif: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_const_qualif::Storage<'tcx>>,
pub mir_built: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_built::Storage<'tcx>>,
pub thir_abstract_const: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
thir_abstract_const::Storage<'tcx>>,
pub mir_drops_elaborated_and_const_checked: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_drops_elaborated_and_const_checked::Storage<'tcx>>,
pub mir_for_ctfe: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_for_ctfe::Storage<'tcx>>,
pub mir_promoted: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_promoted::Storage<'tcx>>,
pub closure_typeinfo: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
closure_typeinfo::Storage<'tcx>>,
pub closure_saved_names_of_captured_variables: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
closure_saved_names_of_captured_variables::Storage<'tcx>>,
pub mir_coroutine_witnesses: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_coroutine_witnesses::Storage<'tcx>>,
pub check_coroutine_obligations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_coroutine_obligations::Storage<'tcx>>,
pub check_potentially_region_dependent_goals: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_potentially_region_dependent_goals::Storage<'tcx>>,
pub optimized_mir: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
optimized_mir::Storage<'tcx>>,
pub coverage_attr_on: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coverage_attr_on::Storage<'tcx>>,
pub coverage_ids_info: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coverage_ids_info::Storage<'tcx>>,
pub promoted_mir: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
promoted_mir::Storage<'tcx>>,
pub erase_and_anonymize_regions_ty: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
erase_and_anonymize_regions_ty::Storage<'tcx>>,
pub wasm_import_module_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
wasm_import_module_map::Storage<'tcx>>,
pub trait_explicit_predicates_and_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trait_explicit_predicates_and_bounds::Storage<'tcx>>,
pub explicit_predicates_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_predicates_of::Storage<'tcx>>,
pub inferred_outlives_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inferred_outlives_of::Storage<'tcx>>,
pub explicit_super_predicates_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_super_predicates_of::Storage<'tcx>>,
pub explicit_implied_predicates_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_implied_predicates_of::Storage<'tcx>>,
pub explicit_supertraits_containing_assoc_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_supertraits_containing_assoc_item::Storage<'tcx>>,
pub const_conditions: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
const_conditions::Storage<'tcx>>,
pub explicit_implied_const_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
explicit_implied_const_bounds::Storage<'tcx>>,
pub type_param_predicates: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_param_predicates::Storage<'tcx>>,
pub trait_def: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trait_def::Storage<'tcx>>,
pub adt_def: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_def::Storage<'tcx>>,
pub adt_destructor: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_destructor::Storage<'tcx>>,
pub adt_async_destructor: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_async_destructor::Storage<'tcx>>,
pub adt_sizedness_constraint: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_sizedness_constraint::Storage<'tcx>>,
pub adt_dtorck_constraint: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_dtorck_constraint::Storage<'tcx>>,
pub constness: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
constness::Storage<'tcx>>,
pub asyncness: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
asyncness::Storage<'tcx>>,
pub is_promotable_const_fn: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_promotable_const_fn::Storage<'tcx>>,
pub coroutine_by_move_body_def_id: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coroutine_by_move_body_def_id::Storage<'tcx>>,
pub coroutine_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coroutine_kind::Storage<'tcx>>,
pub coroutine_for_closure: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coroutine_for_closure::Storage<'tcx>>,
pub coroutine_hidden_types: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coroutine_hidden_types::Storage<'tcx>>,
pub crate_variances: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_variances::Storage<'tcx>>,
pub variances_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
variances_of::Storage<'tcx>>,
pub inferred_outlives_crate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inferred_outlives_crate::Storage<'tcx>>,
pub associated_item_def_ids: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
associated_item_def_ids::Storage<'tcx>>,
pub associated_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
associated_item::Storage<'tcx>>,
pub associated_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
associated_items::Storage<'tcx>>,
pub impl_item_implementor_ids: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
impl_item_implementor_ids::Storage<'tcx>>,
pub associated_types_for_impl_traits_in_trait_or_impl: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
associated_types_for_impl_traits_in_trait_or_impl::Storage<'tcx>>,
pub impl_trait_header: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
impl_trait_header::Storage<'tcx>>,
pub impl_self_is_guaranteed_unsized: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
impl_self_is_guaranteed_unsized::Storage<'tcx>>,
pub inherent_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inherent_impls::Storage<'tcx>>,
pub incoherent_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
incoherent_impls::Storage<'tcx>>,
pub check_transmutes: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_transmutes::Storage<'tcx>>,
pub check_unsafety: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_unsafety::Storage<'tcx>>,
pub check_tail_calls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_tail_calls::Storage<'tcx>>,
pub assumed_wf_types: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
assumed_wf_types::Storage<'tcx>>,
pub assumed_wf_types_for_rpitit: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
assumed_wf_types_for_rpitit::Storage<'tcx>>,
pub fn_sig: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
fn_sig::Storage<'tcx>>,
pub lint_mod: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lint_mod::Storage<'tcx>>,
pub check_unused_traits: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_unused_traits::Storage<'tcx>>,
pub check_mod_attrs: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_mod_attrs::Storage<'tcx>>,
pub check_mod_unstable_api_usage: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_mod_unstable_api_usage::Storage<'tcx>>,
pub check_mod_privacy: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_mod_privacy::Storage<'tcx>>,
pub check_liveness: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_liveness::Storage<'tcx>>,
pub live_symbols_and_ignored_derived_traits: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
live_symbols_and_ignored_derived_traits::Storage<'tcx>>,
pub check_mod_deathness: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_mod_deathness::Storage<'tcx>>,
pub check_type_wf: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_type_wf::Storage<'tcx>>,
pub coerce_unsized_info: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coerce_unsized_info::Storage<'tcx>>,
pub typeck: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
typeck::Storage<'tcx>>,
pub used_trait_imports: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
used_trait_imports::Storage<'tcx>>,
pub coherent_trait: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
coherent_trait::Storage<'tcx>>,
pub mir_borrowck: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_borrowck::Storage<'tcx>>,
pub crate_inherent_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_inherent_impls::Storage<'tcx>>,
pub crate_inherent_impls_validity_check: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_inherent_impls_validity_check::Storage<'tcx>>,
pub crate_inherent_impls_overlap_check: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_inherent_impls_overlap_check::Storage<'tcx>>,
pub orphan_check_impl: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
orphan_check_impl::Storage<'tcx>>,
pub mir_callgraph_cyclic: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_callgraph_cyclic::Storage<'tcx>>,
pub mir_inliner_callees: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_inliner_callees::Storage<'tcx>>,
pub tag_for_variant: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
tag_for_variant::Storage<'tcx>>,
pub eval_to_allocation_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
eval_to_allocation_raw::Storage<'tcx>>,
pub eval_static_initializer: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
eval_static_initializer::Storage<'tcx>>,
pub eval_to_const_value_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
eval_to_const_value_raw::Storage<'tcx>>,
pub eval_to_valtree: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
eval_to_valtree::Storage<'tcx>>,
pub valtree_to_const_val: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
valtree_to_const_val::Storage<'tcx>>,
pub lit_to_const: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lit_to_const::Storage<'tcx>>,
pub check_match: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_match::Storage<'tcx>>,
pub effective_visibilities: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
effective_visibilities::Storage<'tcx>>,
pub check_private_in_public: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_private_in_public::Storage<'tcx>>,
pub reachable_set: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
reachable_set::Storage<'tcx>>,
pub region_scope_tree: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
region_scope_tree::Storage<'tcx>>,
pub mir_shims: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
mir_shims::Storage<'tcx>>,
pub symbol_name: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
symbol_name::Storage<'tcx>>,
pub def_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
def_kind::Storage<'tcx>>,
pub def_span: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
def_span::Storage<'tcx>>,
pub def_ident_span: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
def_ident_span::Storage<'tcx>>,
pub ty_span: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
ty_span::Storage<'tcx>>,
pub lookup_stability: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lookup_stability::Storage<'tcx>>,
pub lookup_const_stability: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lookup_const_stability::Storage<'tcx>>,
pub lookup_default_body_stability: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lookup_default_body_stability::Storage<'tcx>>,
pub should_inherit_track_caller: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
should_inherit_track_caller::Storage<'tcx>>,
pub inherited_align: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inherited_align::Storage<'tcx>>,
pub lookup_deprecation_entry: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lookup_deprecation_entry::Storage<'tcx>>,
pub is_doc_hidden: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_doc_hidden::Storage<'tcx>>,
pub is_doc_notable_trait: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_doc_notable_trait::Storage<'tcx>>,
pub attrs_for_def: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
attrs_for_def::Storage<'tcx>>,
pub codegen_fn_attrs: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
codegen_fn_attrs::Storage<'tcx>>,
pub asm_target_features: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
asm_target_features::Storage<'tcx>>,
pub fn_arg_idents: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
fn_arg_idents::Storage<'tcx>>,
pub rendered_const: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
rendered_const::Storage<'tcx>>,
pub rendered_precise_capturing_args: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
rendered_precise_capturing_args::Storage<'tcx>>,
pub impl_parent: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
impl_parent::Storage<'tcx>>,
pub is_mir_available: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_mir_available::Storage<'tcx>>,
pub own_existential_vtable_entries: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
own_existential_vtable_entries::Storage<'tcx>>,
pub vtable_entries: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
vtable_entries::Storage<'tcx>>,
pub first_method_vtable_slot: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
first_method_vtable_slot::Storage<'tcx>>,
pub supertrait_vtable_slot: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
supertrait_vtable_slot::Storage<'tcx>>,
pub vtable_allocation: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
vtable_allocation::Storage<'tcx>>,
pub codegen_select_candidate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
codegen_select_candidate::Storage<'tcx>>,
pub all_local_trait_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
all_local_trait_impls::Storage<'tcx>>,
pub local_trait_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
local_trait_impls::Storage<'tcx>>,
pub trait_impls_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trait_impls_of::Storage<'tcx>>,
pub specialization_graph_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
specialization_graph_of::Storage<'tcx>>,
pub dyn_compatibility_violations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
dyn_compatibility_violations::Storage<'tcx>>,
pub is_dyn_compatible: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_dyn_compatible::Storage<'tcx>>,
pub param_env: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
param_env::Storage<'tcx>>,
pub typing_env_normalized_for_post_analysis: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
typing_env_normalized_for_post_analysis::Storage<'tcx>>,
pub is_copy_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_copy_raw::Storage<'tcx>>,
pub is_use_cloned_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_use_cloned_raw::Storage<'tcx>>,
pub is_sized_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_sized_raw::Storage<'tcx>>,
pub is_freeze_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_freeze_raw::Storage<'tcx>>,
pub is_unpin_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_unpin_raw::Storage<'tcx>>,
pub is_async_drop_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_async_drop_raw::Storage<'tcx>>,
pub needs_drop_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
needs_drop_raw::Storage<'tcx>>,
pub needs_async_drop_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
needs_async_drop_raw::Storage<'tcx>>,
pub has_significant_drop_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_significant_drop_raw::Storage<'tcx>>,
pub has_structural_eq_impl: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_structural_eq_impl::Storage<'tcx>>,
pub adt_drop_tys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_drop_tys::Storage<'tcx>>,
pub adt_async_drop_tys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_async_drop_tys::Storage<'tcx>>,
pub adt_significant_drop_tys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
adt_significant_drop_tys::Storage<'tcx>>,
pub list_significant_drop_tys: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
list_significant_drop_tys::Storage<'tcx>>,
pub layout_of: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
layout_of::Storage<'tcx>>,
pub fn_abi_of_fn_ptr: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
fn_abi_of_fn_ptr::Storage<'tcx>>,
pub fn_abi_of_instance: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
fn_abi_of_instance::Storage<'tcx>>,
pub dylib_dependency_formats: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
dylib_dependency_formats::Storage<'tcx>>,
pub dependency_formats: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
dependency_formats::Storage<'tcx>>,
pub is_compiler_builtins: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_compiler_builtins::Storage<'tcx>>,
pub has_global_allocator: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_global_allocator::Storage<'tcx>>,
pub has_alloc_error_handler: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_alloc_error_handler::Storage<'tcx>>,
pub has_panic_handler: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_panic_handler::Storage<'tcx>>,
pub is_profiler_runtime: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_profiler_runtime::Storage<'tcx>>,
pub has_ffi_unwind_calls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
has_ffi_unwind_calls::Storage<'tcx>>,
pub required_panic_strategy: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
required_panic_strategy::Storage<'tcx>>,
pub panic_in_drop_strategy: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
panic_in_drop_strategy::Storage<'tcx>>,
pub is_no_builtins: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_no_builtins::Storage<'tcx>>,
pub symbol_mangling_version: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
symbol_mangling_version::Storage<'tcx>>,
pub extern_crate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
extern_crate::Storage<'tcx>>,
pub specialization_enabled_in: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
specialization_enabled_in::Storage<'tcx>>,
pub specializes: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
specializes::Storage<'tcx>>,
pub in_scope_traits_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
in_scope_traits_map::Storage<'tcx>>,
pub defaultness: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
defaultness::Storage<'tcx>>,
pub default_field: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
default_field::Storage<'tcx>>,
pub check_well_formed: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_well_formed::Storage<'tcx>>,
pub enforce_impl_non_lifetime_params_are_constrained: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
enforce_impl_non_lifetime_params_are_constrained::Storage<'tcx>>,
pub reachable_non_generics: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
reachable_non_generics::Storage<'tcx>>,
pub is_reachable_non_generic: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_reachable_non_generic::Storage<'tcx>>,
pub is_unreachable_local_definition: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_unreachable_local_definition::Storage<'tcx>>,
pub upstream_monomorphizations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
upstream_monomorphizations::Storage<'tcx>>,
pub upstream_monomorphizations_for: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
upstream_monomorphizations_for::Storage<'tcx>>,
pub upstream_drop_glue_for: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
upstream_drop_glue_for::Storage<'tcx>>,
pub upstream_async_drop_glue_for: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
upstream_async_drop_glue_for::Storage<'tcx>>,
pub foreign_modules: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
foreign_modules::Storage<'tcx>>,
pub clashing_extern_declarations: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
clashing_extern_declarations::Storage<'tcx>>,
pub entry_fn: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
entry_fn::Storage<'tcx>>,
pub proc_macro_decls_static: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
proc_macro_decls_static::Storage<'tcx>>,
pub crate_hash: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_hash::Storage<'tcx>>,
pub crate_host_hash: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_host_hash::Storage<'tcx>>,
pub extra_filename: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
extra_filename::Storage<'tcx>>,
pub crate_extern_paths: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_extern_paths::Storage<'tcx>>,
pub implementations_of_trait: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
implementations_of_trait::Storage<'tcx>>,
pub crate_incoherent_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_incoherent_impls::Storage<'tcx>>,
pub native_library: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
native_library::Storage<'tcx>>,
pub inherit_sig_for_delegation_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inherit_sig_for_delegation_item::Storage<'tcx>>,
pub resolve_bound_vars: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
resolve_bound_vars::Storage<'tcx>>,
pub named_variable_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
named_variable_map::Storage<'tcx>>,
pub is_late_bound_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_late_bound_map::Storage<'tcx>>,
pub object_lifetime_default: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
object_lifetime_default::Storage<'tcx>>,
pub late_bound_vars_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
late_bound_vars_map::Storage<'tcx>>,
pub opaque_captured_lifetimes: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
opaque_captured_lifetimes::Storage<'tcx>>,
pub visibility: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
visibility::Storage<'tcx>>,
pub inhabited_predicate_adt: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inhabited_predicate_adt::Storage<'tcx>>,
pub inhabited_predicate_type: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
inhabited_predicate_type::Storage<'tcx>>,
pub dep_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
dep_kind::Storage<'tcx>>,
pub crate_name: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_name::Storage<'tcx>>,
pub module_children: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
module_children::Storage<'tcx>>,
pub num_extern_def_ids: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
num_extern_def_ids::Storage<'tcx>>,
pub lib_features: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
lib_features::Storage<'tcx>>,
pub stability_implications: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
stability_implications::Storage<'tcx>>,
pub intrinsic_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
intrinsic_raw::Storage<'tcx>>,
pub get_lang_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
get_lang_items::Storage<'tcx>>,
pub all_diagnostic_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
all_diagnostic_items::Storage<'tcx>>,
pub defined_lang_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
defined_lang_items::Storage<'tcx>>,
pub diagnostic_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
diagnostic_items::Storage<'tcx>>,
pub missing_lang_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
missing_lang_items::Storage<'tcx>>,
pub visible_parent_map: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
visible_parent_map::Storage<'tcx>>,
pub trimmed_def_paths: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trimmed_def_paths::Storage<'tcx>>,
pub missing_extern_crate_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
missing_extern_crate_item::Storage<'tcx>>,
pub used_crate_source: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
used_crate_source::Storage<'tcx>>,
pub debugger_visualizers: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
debugger_visualizers::Storage<'tcx>>,
pub postorder_cnums: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
postorder_cnums::Storage<'tcx>>,
pub is_private_dep: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_private_dep::Storage<'tcx>>,
pub allocator_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
allocator_kind::Storage<'tcx>>,
pub alloc_error_handler_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
alloc_error_handler_kind::Storage<'tcx>>,
pub upvars_mentioned: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
upvars_mentioned::Storage<'tcx>>,
pub crates: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crates::Storage<'tcx>>,
pub used_crates: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
used_crates::Storage<'tcx>>,
pub duplicate_crate_names: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
duplicate_crate_names::Storage<'tcx>>,
pub traits: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
traits::Storage<'tcx>>,
pub trait_impls_in_crate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trait_impls_in_crate::Storage<'tcx>>,
pub stable_order_of_exportable_impls: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
stable_order_of_exportable_impls::Storage<'tcx>>,
pub exportable_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
exportable_items::Storage<'tcx>>,
pub exported_non_generic_symbols: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
exported_non_generic_symbols::Storage<'tcx>>,
pub exported_generic_symbols: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
exported_generic_symbols::Storage<'tcx>>,
pub collect_and_partition_mono_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
collect_and_partition_mono_items::Storage<'tcx>>,
pub is_codegened_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_codegened_item::Storage<'tcx>>,
pub codegen_unit: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
codegen_unit::Storage<'tcx>>,
pub backend_optimization_level: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
backend_optimization_level::Storage<'tcx>>,
pub output_filenames: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
output_filenames::Storage<'tcx>>,
pub normalize_canonicalized_projection: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
normalize_canonicalized_projection::Storage<'tcx>>,
pub normalize_canonicalized_free_alias: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
normalize_canonicalized_free_alias::Storage<'tcx>>,
pub normalize_canonicalized_inherent_projection: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
normalize_canonicalized_inherent_projection::Storage<'tcx>>,
pub try_normalize_generic_arg_after_erasing_regions: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
try_normalize_generic_arg_after_erasing_regions::Storage<'tcx>>,
pub implied_outlives_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
implied_outlives_bounds::Storage<'tcx>>,
pub dropck_outlives: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
dropck_outlives::Storage<'tcx>>,
pub evaluate_obligation: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
evaluate_obligation::Storage<'tcx>>,
pub type_op_ascribe_user_type: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_ascribe_user_type::Storage<'tcx>>,
pub type_op_prove_predicate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_prove_predicate::Storage<'tcx>>,
pub type_op_normalize_ty: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_normalize_ty::Storage<'tcx>>,
pub type_op_normalize_clause: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_normalize_clause::Storage<'tcx>>,
pub type_op_normalize_poly_fn_sig: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_normalize_poly_fn_sig::Storage<'tcx>>,
pub type_op_normalize_fn_sig: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
type_op_normalize_fn_sig::Storage<'tcx>>,
pub instantiate_and_check_impossible_predicates: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
instantiate_and_check_impossible_predicates::Storage<'tcx>>,
pub is_impossible_associated_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
is_impossible_associated_item::Storage<'tcx>>,
pub method_autoderef_steps: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
method_autoderef_steps::Storage<'tcx>>,
pub evaluate_root_goal_for_proof_tree_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
evaluate_root_goal_for_proof_tree_raw::Storage<'tcx>>,
pub rust_target_features: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
rust_target_features::Storage<'tcx>>,
pub implied_target_features: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
implied_target_features::Storage<'tcx>>,
pub features_query: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
features_query::Storage<'tcx>>,
pub crate_for_resolver: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
crate_for_resolver::Storage<'tcx>>,
pub resolve_instance_raw: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
resolve_instance_raw::Storage<'tcx>>,
pub reveal_opaque_types_in_bounds: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
reveal_opaque_types_in_bounds::Storage<'tcx>>,
pub limits: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
limits::Storage<'tcx>>,
pub diagnostic_hir_wf_check: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
diagnostic_hir_wf_check::Storage<'tcx>>,
pub global_backend_features: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
global_backend_features::Storage<'tcx>>,
pub check_validity_requirement: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_validity_requirement::Storage<'tcx>>,
pub compare_impl_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
compare_impl_item::Storage<'tcx>>,
pub deduced_param_attrs: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
deduced_param_attrs::Storage<'tcx>>,
pub doc_link_resolutions: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
doc_link_resolutions::Storage<'tcx>>,
pub doc_link_traits_in_scope: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
doc_link_traits_in_scope::Storage<'tcx>>,
pub stripped_cfg_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
stripped_cfg_items::Storage<'tcx>>,
pub generics_require_sized_self: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
generics_require_sized_self::Storage<'tcx>>,
pub cross_crate_inlinable: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
cross_crate_inlinable::Storage<'tcx>>,
pub check_mono_item: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_mono_item::Storage<'tcx>>,
pub skip_move_check_fns: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
skip_move_check_fns::Storage<'tcx>>,
pub items_of_instance: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
items_of_instance::Storage<'tcx>>,
pub size_estimate: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
size_estimate::Storage<'tcx>>,
pub anon_const_kind: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
anon_const_kind::Storage<'tcx>>,
pub trivial_const: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
trivial_const::Storage<'tcx>>,
pub sanitizer_settings_for: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
sanitizer_settings_for::Storage<'tcx>>,
pub check_externally_implementable_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
check_externally_implementable_items::Storage<'tcx>>,
pub externally_implementable_items: ::rustc_middle::query::plumbing::QueryVTable<'tcx,
externally_implementable_items::Storage<'tcx>>,
}
pub struct QueryStates<'tcx> {
pub derive_macro_expansion: crate::query::QueryState<'tcx,
(LocalExpnId, &'tcx TokenStream)>,
pub trigger_delayed_bug: crate::query::QueryState<'tcx, DefId>,
pub registered_tools: crate::query::QueryState<'tcx, ()>,
pub early_lint_checks: crate::query::QueryState<'tcx, ()>,
pub env_var_os: crate::query::QueryState<'tcx, &'tcx OsStr>,
pub resolutions: crate::query::QueryState<'tcx, ()>,
pub resolver_for_lowering_raw: crate::query::QueryState<'tcx, ()>,
pub source_span: crate::query::QueryState<'tcx, LocalDefId>,
pub hir_crate: crate::query::QueryState<'tcx, ()>,
pub hir_crate_items: crate::query::QueryState<'tcx, ()>,
pub hir_module_items: crate::query::QueryState<'tcx, LocalModDefId>,
pub local_def_id_to_hir_id: crate::query::QueryState<'tcx, LocalDefId>,
pub hir_owner_parent_q: crate::query::QueryState<'tcx, hir::OwnerId>,
pub opt_hir_owner_nodes: crate::query::QueryState<'tcx, LocalDefId>,
pub hir_attr_map: crate::query::QueryState<'tcx, hir::OwnerId>,
pub opt_ast_lowering_delayed_lints: crate::query::QueryState<'tcx,
hir::OwnerId>,
pub const_param_default: crate::query::QueryState<'tcx, DefId>,
pub const_of_item: crate::query::QueryState<'tcx, DefId>,
pub type_of: crate::query::QueryState<'tcx, DefId>,
pub type_of_opaque: crate::query::QueryState<'tcx, DefId>,
pub type_of_opaque_hir_typeck: crate::query::QueryState<'tcx, LocalDefId>,
pub type_alias_is_lazy: crate::query::QueryState<'tcx, DefId>,
pub collect_return_position_impl_trait_in_trait_tys: crate::query::QueryState<'tcx,
DefId>,
pub opaque_ty_origin: crate::query::QueryState<'tcx, DefId>,
pub unsizing_params_for_adt: crate::query::QueryState<'tcx, DefId>,
pub analysis: crate::query::QueryState<'tcx, ()>,
pub check_expectations: crate::query::QueryState<'tcx, Option<Symbol>>,
pub generics_of: crate::query::QueryState<'tcx, DefId>,
pub predicates_of: crate::query::QueryState<'tcx, DefId>,
pub opaque_types_defined_by: crate::query::QueryState<'tcx, LocalDefId>,
pub nested_bodies_within: crate::query::QueryState<'tcx, LocalDefId>,
pub explicit_item_bounds: crate::query::QueryState<'tcx, DefId>,
pub explicit_item_self_bounds: crate::query::QueryState<'tcx, DefId>,
pub item_bounds: crate::query::QueryState<'tcx, DefId>,
pub item_self_bounds: crate::query::QueryState<'tcx, DefId>,
pub item_non_self_bounds: crate::query::QueryState<'tcx, DefId>,
pub impl_super_outlives: crate::query::QueryState<'tcx, DefId>,
pub native_libraries: crate::query::QueryState<'tcx, CrateNum>,
pub shallow_lint_levels_on: crate::query::QueryState<'tcx, hir::OwnerId>,
pub lint_expectations: crate::query::QueryState<'tcx, ()>,
pub lints_that_dont_need_to_run: crate::query::QueryState<'tcx, ()>,
pub expn_that_defined: crate::query::QueryState<'tcx, DefId>,
pub is_panic_runtime: crate::query::QueryState<'tcx, CrateNum>,
pub representability: crate::query::QueryState<'tcx, LocalDefId>,
pub representability_adt_ty: crate::query::QueryState<'tcx, Ty<'tcx>>,
pub params_in_repr: crate::query::QueryState<'tcx, DefId>,
pub thir_body: crate::query::QueryState<'tcx, LocalDefId>,
pub mir_keys: crate::query::QueryState<'tcx, ()>,
pub mir_const_qualif: crate::query::QueryState<'tcx, DefId>,
pub mir_built: crate::query::QueryState<'tcx, LocalDefId>,
pub thir_abstract_const: crate::query::QueryState<'tcx, DefId>,
pub mir_drops_elaborated_and_const_checked: crate::query::QueryState<'tcx,
LocalDefId>,
pub mir_for_ctfe: crate::query::QueryState<'tcx, DefId>,
pub mir_promoted: crate::query::QueryState<'tcx, LocalDefId>,
pub closure_typeinfo: crate::query::QueryState<'tcx, LocalDefId>,
pub closure_saved_names_of_captured_variables: crate::query::QueryState<'tcx,
DefId>,
pub mir_coroutine_witnesses: crate::query::QueryState<'tcx, DefId>,
pub check_coroutine_obligations: crate::query::QueryState<'tcx,
LocalDefId>,
pub check_potentially_region_dependent_goals: crate::query::QueryState<'tcx,
LocalDefId>,
pub optimized_mir: crate::query::QueryState<'tcx, DefId>,
pub coverage_attr_on: crate::query::QueryState<'tcx, LocalDefId>,
pub coverage_ids_info: crate::query::QueryState<'tcx,
ty::InstanceKind<'tcx>>,
pub promoted_mir: crate::query::QueryState<'tcx, DefId>,
pub erase_and_anonymize_regions_ty: crate::query::QueryState<'tcx,
Ty<'tcx>>,
pub wasm_import_module_map: crate::query::QueryState<'tcx, CrateNum>,
pub trait_explicit_predicates_and_bounds: crate::query::QueryState<'tcx,
LocalDefId>,
pub explicit_predicates_of: crate::query::QueryState<'tcx, DefId>,
pub inferred_outlives_of: crate::query::QueryState<'tcx, DefId>,
pub explicit_super_predicates_of: crate::query::QueryState<'tcx, DefId>,
pub explicit_implied_predicates_of: crate::query::QueryState<'tcx, DefId>,
pub explicit_supertraits_containing_assoc_item: crate::query::QueryState<'tcx,
(DefId, rustc_span::Ident)>,
pub const_conditions: crate::query::QueryState<'tcx, DefId>,
pub explicit_implied_const_bounds: crate::query::QueryState<'tcx, DefId>,
pub type_param_predicates: crate::query::QueryState<'tcx,
(LocalDefId, LocalDefId, rustc_span::Ident)>,
pub trait_def: crate::query::QueryState<'tcx, DefId>,
pub adt_def: crate::query::QueryState<'tcx, DefId>,
pub adt_destructor: crate::query::QueryState<'tcx, DefId>,
pub adt_async_destructor: crate::query::QueryState<'tcx, DefId>,
pub adt_sizedness_constraint: crate::query::QueryState<'tcx,
(DefId, SizedTraitKind)>,
pub adt_dtorck_constraint: crate::query::QueryState<'tcx, DefId>,
pub constness: crate::query::QueryState<'tcx, DefId>,
pub asyncness: crate::query::QueryState<'tcx, DefId>,
pub is_promotable_const_fn: crate::query::QueryState<'tcx, DefId>,
pub coroutine_by_move_body_def_id: crate::query::QueryState<'tcx, DefId>,
pub coroutine_kind: crate::query::QueryState<'tcx, DefId>,
pub coroutine_for_closure: crate::query::QueryState<'tcx, DefId>,
pub coroutine_hidden_types: crate::query::QueryState<'tcx, DefId>,
pub crate_variances: crate::query::QueryState<'tcx, ()>,
pub variances_of: crate::query::QueryState<'tcx, DefId>,
pub inferred_outlives_crate: crate::query::QueryState<'tcx, ()>,
pub associated_item_def_ids: crate::query::QueryState<'tcx, DefId>,
pub associated_item: crate::query::QueryState<'tcx, DefId>,
pub associated_items: crate::query::QueryState<'tcx, DefId>,
pub impl_item_implementor_ids: crate::query::QueryState<'tcx, DefId>,
pub associated_types_for_impl_traits_in_trait_or_impl: crate::query::QueryState<'tcx,
DefId>,
pub impl_trait_header: crate::query::QueryState<'tcx, DefId>,
pub impl_self_is_guaranteed_unsized: crate::query::QueryState<'tcx,
DefId>,
pub inherent_impls: crate::query::QueryState<'tcx, DefId>,
pub incoherent_impls: crate::query::QueryState<'tcx, SimplifiedType>,
pub check_transmutes: crate::query::QueryState<'tcx, LocalDefId>,
pub check_unsafety: crate::query::QueryState<'tcx, LocalDefId>,
pub check_tail_calls: crate::query::QueryState<'tcx, LocalDefId>,
pub assumed_wf_types: crate::query::QueryState<'tcx, LocalDefId>,
pub assumed_wf_types_for_rpitit: crate::query::QueryState<'tcx, DefId>,
pub fn_sig: crate::query::QueryState<'tcx, DefId>,
pub lint_mod: crate::query::QueryState<'tcx, LocalModDefId>,
pub check_unused_traits: crate::query::QueryState<'tcx, ()>,
pub check_mod_attrs: crate::query::QueryState<'tcx, LocalModDefId>,
pub check_mod_unstable_api_usage: crate::query::QueryState<'tcx,
LocalModDefId>,
pub check_mod_privacy: crate::query::QueryState<'tcx, LocalModDefId>,
pub check_liveness: crate::query::QueryState<'tcx, LocalDefId>,
pub live_symbols_and_ignored_derived_traits: crate::query::QueryState<'tcx,
()>,
pub check_mod_deathness: crate::query::QueryState<'tcx, LocalModDefId>,
pub check_type_wf: crate::query::QueryState<'tcx, ()>,
pub coerce_unsized_info: crate::query::QueryState<'tcx, DefId>,
pub typeck: crate::query::QueryState<'tcx, LocalDefId>,
pub used_trait_imports: crate::query::QueryState<'tcx, LocalDefId>,
pub coherent_trait: crate::query::QueryState<'tcx, DefId>,
pub mir_borrowck: crate::query::QueryState<'tcx, LocalDefId>,
pub crate_inherent_impls: crate::query::QueryState<'tcx, ()>,
pub crate_inherent_impls_validity_check: crate::query::QueryState<'tcx,
()>,
pub crate_inherent_impls_overlap_check: crate::query::QueryState<'tcx,
()>,
pub orphan_check_impl: crate::query::QueryState<'tcx, LocalDefId>,
pub mir_callgraph_cyclic: crate::query::QueryState<'tcx, LocalDefId>,
pub mir_inliner_callees: crate::query::QueryState<'tcx,
ty::InstanceKind<'tcx>>,
pub tag_for_variant: crate::query::QueryState<'tcx,
PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>>,
pub eval_to_allocation_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>>,
pub eval_static_initializer: crate::query::QueryState<'tcx, DefId>,
pub eval_to_const_value_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>>,
pub eval_to_valtree: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, GlobalId<'tcx>>>,
pub valtree_to_const_val: crate::query::QueryState<'tcx, ty::Value<'tcx>>,
pub lit_to_const: crate::query::QueryState<'tcx, LitToConstInput<'tcx>>,
pub check_match: crate::query::QueryState<'tcx, LocalDefId>,
pub effective_visibilities: crate::query::QueryState<'tcx, ()>,
pub check_private_in_public: crate::query::QueryState<'tcx,
LocalModDefId>,
pub reachable_set: crate::query::QueryState<'tcx, ()>,
pub region_scope_tree: crate::query::QueryState<'tcx, DefId>,
pub mir_shims: crate::query::QueryState<'tcx, ty::InstanceKind<'tcx>>,
pub symbol_name: crate::query::QueryState<'tcx, ty::Instance<'tcx>>,
pub def_kind: crate::query::QueryState<'tcx, DefId>,
pub def_span: crate::query::QueryState<'tcx, DefId>,
pub def_ident_span: crate::query::QueryState<'tcx, DefId>,
pub ty_span: crate::query::QueryState<'tcx, LocalDefId>,
pub lookup_stability: crate::query::QueryState<'tcx, DefId>,
pub lookup_const_stability: crate::query::QueryState<'tcx, DefId>,
pub lookup_default_body_stability: crate::query::QueryState<'tcx, DefId>,
pub should_inherit_track_caller: crate::query::QueryState<'tcx, DefId>,
pub inherited_align: crate::query::QueryState<'tcx, DefId>,
pub lookup_deprecation_entry: crate::query::QueryState<'tcx, DefId>,
pub is_doc_hidden: crate::query::QueryState<'tcx, DefId>,
pub is_doc_notable_trait: crate::query::QueryState<'tcx, DefId>,
pub attrs_for_def: crate::query::QueryState<'tcx, DefId>,
pub codegen_fn_attrs: crate::query::QueryState<'tcx, DefId>,
pub asm_target_features: crate::query::QueryState<'tcx, DefId>,
pub fn_arg_idents: crate::query::QueryState<'tcx, DefId>,
pub rendered_const: crate::query::QueryState<'tcx, DefId>,
pub rendered_precise_capturing_args: crate::query::QueryState<'tcx,
DefId>,
pub impl_parent: crate::query::QueryState<'tcx, DefId>,
pub is_mir_available: crate::query::QueryState<'tcx, DefId>,
pub own_existential_vtable_entries: crate::query::QueryState<'tcx, DefId>,
pub vtable_entries: crate::query::QueryState<'tcx, ty::TraitRef<'tcx>>,
pub first_method_vtable_slot: crate::query::QueryState<'tcx,
ty::TraitRef<'tcx>>,
pub supertrait_vtable_slot: crate::query::QueryState<'tcx,
(Ty<'tcx>, Ty<'tcx>)>,
pub vtable_allocation: crate::query::QueryState<'tcx,
(Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>)>,
pub codegen_select_candidate: crate::query::QueryState<'tcx,
PseudoCanonicalInput<'tcx, ty::TraitRef<'tcx>>>,
pub all_local_trait_impls: crate::query::QueryState<'tcx, ()>,
pub local_trait_impls: crate::query::QueryState<'tcx, DefId>,
pub trait_impls_of: crate::query::QueryState<'tcx, DefId>,
pub specialization_graph_of: crate::query::QueryState<'tcx, DefId>,
pub dyn_compatibility_violations: crate::query::QueryState<'tcx, DefId>,
pub is_dyn_compatible: crate::query::QueryState<'tcx, DefId>,
pub param_env: crate::query::QueryState<'tcx, DefId>,
pub typing_env_normalized_for_post_analysis: crate::query::QueryState<'tcx,
DefId>,
pub is_copy_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub is_use_cloned_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub is_sized_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub is_freeze_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub is_unpin_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub is_async_drop_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub needs_drop_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub needs_async_drop_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub has_significant_drop_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub has_structural_eq_impl: crate::query::QueryState<'tcx, Ty<'tcx>>,
pub adt_drop_tys: crate::query::QueryState<'tcx, DefId>,
pub adt_async_drop_tys: crate::query::QueryState<'tcx, DefId>,
pub adt_significant_drop_tys: crate::query::QueryState<'tcx, DefId>,
pub list_significant_drop_tys: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub layout_of: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>>,
pub fn_abi_of_fn_ptr: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx,
(ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>>,
pub fn_abi_of_instance: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx,
(ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>>,
pub dylib_dependency_formats: crate::query::QueryState<'tcx, CrateNum>,
pub dependency_formats: crate::query::QueryState<'tcx, ()>,
pub is_compiler_builtins: crate::query::QueryState<'tcx, CrateNum>,
pub has_global_allocator: crate::query::QueryState<'tcx, CrateNum>,
pub has_alloc_error_handler: crate::query::QueryState<'tcx, CrateNum>,
pub has_panic_handler: crate::query::QueryState<'tcx, CrateNum>,
pub is_profiler_runtime: crate::query::QueryState<'tcx, CrateNum>,
pub has_ffi_unwind_calls: crate::query::QueryState<'tcx, LocalDefId>,
pub required_panic_strategy: crate::query::QueryState<'tcx, CrateNum>,
pub panic_in_drop_strategy: crate::query::QueryState<'tcx, CrateNum>,
pub is_no_builtins: crate::query::QueryState<'tcx, CrateNum>,
pub symbol_mangling_version: crate::query::QueryState<'tcx, CrateNum>,
pub extern_crate: crate::query::QueryState<'tcx, CrateNum>,
pub specialization_enabled_in: crate::query::QueryState<'tcx, CrateNum>,
pub specializes: crate::query::QueryState<'tcx, (DefId, DefId)>,
pub in_scope_traits_map: crate::query::QueryState<'tcx, hir::OwnerId>,
pub defaultness: crate::query::QueryState<'tcx, DefId>,
pub default_field: crate::query::QueryState<'tcx, DefId>,
pub check_well_formed: crate::query::QueryState<'tcx, LocalDefId>,
pub enforce_impl_non_lifetime_params_are_constrained: crate::query::QueryState<'tcx,
LocalDefId>,
pub reachable_non_generics: crate::query::QueryState<'tcx, CrateNum>,
pub is_reachable_non_generic: crate::query::QueryState<'tcx, DefId>,
pub is_unreachable_local_definition: crate::query::QueryState<'tcx,
LocalDefId>,
pub upstream_monomorphizations: crate::query::QueryState<'tcx, ()>,
pub upstream_monomorphizations_for: crate::query::QueryState<'tcx, DefId>,
pub upstream_drop_glue_for: crate::query::QueryState<'tcx,
GenericArgsRef<'tcx>>,
pub upstream_async_drop_glue_for: crate::query::QueryState<'tcx,
GenericArgsRef<'tcx>>,
pub foreign_modules: crate::query::QueryState<'tcx, CrateNum>,
pub clashing_extern_declarations: crate::query::QueryState<'tcx, ()>,
pub entry_fn: crate::query::QueryState<'tcx, ()>,
pub proc_macro_decls_static: crate::query::QueryState<'tcx, ()>,
pub crate_hash: crate::query::QueryState<'tcx, CrateNum>,
pub crate_host_hash: crate::query::QueryState<'tcx, CrateNum>,
pub extra_filename: crate::query::QueryState<'tcx, CrateNum>,
pub crate_extern_paths: crate::query::QueryState<'tcx, CrateNum>,
pub implementations_of_trait: crate::query::QueryState<'tcx,
(CrateNum, DefId)>,
pub crate_incoherent_impls: crate::query::QueryState<'tcx,
(CrateNum, SimplifiedType)>,
pub native_library: crate::query::QueryState<'tcx, DefId>,
pub inherit_sig_for_delegation_item: crate::query::QueryState<'tcx,
LocalDefId>,
pub resolve_bound_vars: crate::query::QueryState<'tcx, hir::OwnerId>,
pub named_variable_map: crate::query::QueryState<'tcx, hir::OwnerId>,
pub is_late_bound_map: crate::query::QueryState<'tcx, hir::OwnerId>,
pub object_lifetime_default: crate::query::QueryState<'tcx, DefId>,
pub late_bound_vars_map: crate::query::QueryState<'tcx, hir::OwnerId>,
pub opaque_captured_lifetimes: crate::query::QueryState<'tcx, LocalDefId>,
pub visibility: crate::query::QueryState<'tcx, DefId>,
pub inhabited_predicate_adt: crate::query::QueryState<'tcx, DefId>,
pub inhabited_predicate_type: crate::query::QueryState<'tcx, Ty<'tcx>>,
pub dep_kind: crate::query::QueryState<'tcx, CrateNum>,
pub crate_name: crate::query::QueryState<'tcx, CrateNum>,
pub module_children: crate::query::QueryState<'tcx, DefId>,
pub num_extern_def_ids: crate::query::QueryState<'tcx, CrateNum>,
pub lib_features: crate::query::QueryState<'tcx, CrateNum>,
pub stability_implications: crate::query::QueryState<'tcx, CrateNum>,
pub intrinsic_raw: crate::query::QueryState<'tcx, DefId>,
pub get_lang_items: crate::query::QueryState<'tcx, ()>,
pub all_diagnostic_items: crate::query::QueryState<'tcx, ()>,
pub defined_lang_items: crate::query::QueryState<'tcx, CrateNum>,
pub diagnostic_items: crate::query::QueryState<'tcx, CrateNum>,
pub missing_lang_items: crate::query::QueryState<'tcx, CrateNum>,
pub visible_parent_map: crate::query::QueryState<'tcx, ()>,
pub trimmed_def_paths: crate::query::QueryState<'tcx, ()>,
pub missing_extern_crate_item: crate::query::QueryState<'tcx, CrateNum>,
pub used_crate_source: crate::query::QueryState<'tcx, CrateNum>,
pub debugger_visualizers: crate::query::QueryState<'tcx, CrateNum>,
pub postorder_cnums: crate::query::QueryState<'tcx, ()>,
pub is_private_dep: crate::query::QueryState<'tcx, CrateNum>,
pub allocator_kind: crate::query::QueryState<'tcx, ()>,
pub alloc_error_handler_kind: crate::query::QueryState<'tcx, ()>,
pub upvars_mentioned: crate::query::QueryState<'tcx, DefId>,
pub crates: crate::query::QueryState<'tcx, ()>,
pub used_crates: crate::query::QueryState<'tcx, ()>,
pub duplicate_crate_names: crate::query::QueryState<'tcx, CrateNum>,
pub traits: crate::query::QueryState<'tcx, CrateNum>,
pub trait_impls_in_crate: crate::query::QueryState<'tcx, CrateNum>,
pub stable_order_of_exportable_impls: crate::query::QueryState<'tcx,
CrateNum>,
pub exportable_items: crate::query::QueryState<'tcx, CrateNum>,
pub exported_non_generic_symbols: crate::query::QueryState<'tcx,
CrateNum>,
pub exported_generic_symbols: crate::query::QueryState<'tcx, CrateNum>,
pub collect_and_partition_mono_items: crate::query::QueryState<'tcx, ()>,
pub is_codegened_item: crate::query::QueryState<'tcx, DefId>,
pub codegen_unit: crate::query::QueryState<'tcx, Symbol>,
pub backend_optimization_level: crate::query::QueryState<'tcx, ()>,
pub output_filenames: crate::query::QueryState<'tcx, ()>,
pub normalize_canonicalized_projection: crate::query::QueryState<'tcx,
CanonicalAliasGoal<'tcx>>,
pub normalize_canonicalized_free_alias: crate::query::QueryState<'tcx,
CanonicalAliasGoal<'tcx>>,
pub normalize_canonicalized_inherent_projection: crate::query::QueryState<'tcx,
CanonicalAliasGoal<'tcx>>,
pub try_normalize_generic_arg_after_erasing_regions: crate::query::QueryState<'tcx,
PseudoCanonicalInput<'tcx, GenericArg<'tcx>>>,
pub implied_outlives_bounds: crate::query::QueryState<'tcx,
(CanonicalImpliedOutlivesBoundsGoal<'tcx>, bool)>,
pub dropck_outlives: crate::query::QueryState<'tcx,
CanonicalDropckOutlivesGoal<'tcx>>,
pub evaluate_obligation: crate::query::QueryState<'tcx,
CanonicalPredicateGoal<'tcx>>,
pub type_op_ascribe_user_type: crate::query::QueryState<'tcx,
CanonicalTypeOpAscribeUserTypeGoal<'tcx>>,
pub type_op_prove_predicate: crate::query::QueryState<'tcx,
CanonicalTypeOpProvePredicateGoal<'tcx>>,
pub type_op_normalize_ty: crate::query::QueryState<'tcx,
CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>>,
pub type_op_normalize_clause: crate::query::QueryState<'tcx,
CanonicalTypeOpNormalizeGoal<'tcx, ty::Clause<'tcx>>>,
pub type_op_normalize_poly_fn_sig: crate::query::QueryState<'tcx,
CanonicalTypeOpNormalizeGoal<'tcx, ty::PolyFnSig<'tcx>>>,
pub type_op_normalize_fn_sig: crate::query::QueryState<'tcx,
CanonicalTypeOpNormalizeGoal<'tcx, ty::FnSig<'tcx>>>,
pub instantiate_and_check_impossible_predicates: crate::query::QueryState<'tcx,
(DefId, GenericArgsRef<'tcx>)>,
pub is_impossible_associated_item: crate::query::QueryState<'tcx,
(DefId, DefId)>,
pub method_autoderef_steps: crate::query::QueryState<'tcx,
CanonicalMethodAutoderefStepsGoal<'tcx>>,
pub evaluate_root_goal_for_proof_tree_raw: crate::query::QueryState<'tcx,
solve::CanonicalInput<'tcx>>,
pub rust_target_features: crate::query::QueryState<'tcx, CrateNum>,
pub implied_target_features: crate::query::QueryState<'tcx, Symbol>,
pub features_query: crate::query::QueryState<'tcx, ()>,
pub crate_for_resolver: crate::query::QueryState<'tcx, ()>,
pub resolve_instance_raw: crate::query::QueryState<'tcx,
ty::PseudoCanonicalInput<'tcx, (DefId, GenericArgsRef<'tcx>)>>,
pub reveal_opaque_types_in_bounds: crate::query::QueryState<'tcx,
ty::Clauses<'tcx>>,
pub limits: crate::query::QueryState<'tcx, ()>,
pub diagnostic_hir_wf_check: crate::query::QueryState<'tcx,
(ty::Predicate<'tcx>, WellFormedLoc)>,
pub global_backend_features: crate::query::QueryState<'tcx, ()>,
pub check_validity_requirement: crate::query::QueryState<'tcx,
(ValidityRequirement, ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>)>,
pub compare_impl_item: crate::query::QueryState<'tcx, LocalDefId>,
pub deduced_param_attrs: crate::query::QueryState<'tcx, DefId>,
pub doc_link_resolutions: crate::query::QueryState<'tcx, DefId>,
pub doc_link_traits_in_scope: crate::query::QueryState<'tcx, DefId>,
pub stripped_cfg_items: crate::query::QueryState<'tcx, CrateNum>,
pub generics_require_sized_self: crate::query::QueryState<'tcx, DefId>,
pub cross_crate_inlinable: crate::query::QueryState<'tcx, DefId>,
pub check_mono_item: crate::query::QueryState<'tcx, ty::Instance<'tcx>>,
pub skip_move_check_fns: crate::query::QueryState<'tcx, ()>,
pub items_of_instance: crate::query::QueryState<'tcx,
(ty::Instance<'tcx>, CollectionMode)>,
pub size_estimate: crate::query::QueryState<'tcx, ty::Instance<'tcx>>,
pub anon_const_kind: crate::query::QueryState<'tcx, DefId>,
pub trivial_const: crate::query::QueryState<'tcx, DefId>,
pub sanitizer_settings_for: crate::query::QueryState<'tcx, LocalDefId>,
pub check_externally_implementable_items: crate::query::QueryState<'tcx,
()>,
pub externally_implementable_items: crate::query::QueryState<'tcx,
CrateNum>,
}
#[automatically_derived]
impl<'tcx> ::core::default::Default for QueryStates<'tcx> {
#[inline]
fn default() -> QueryStates<'tcx> {
QueryStates {
derive_macro_expansion: ::core::default::Default::default(),
trigger_delayed_bug: ::core::default::Default::default(),
registered_tools: ::core::default::Default::default(),
early_lint_checks: ::core::default::Default::default(),
env_var_os: ::core::default::Default::default(),
resolutions: ::core::default::Default::default(),
resolver_for_lowering_raw: ::core::default::Default::default(),
source_span: ::core::default::Default::default(),
hir_crate: ::core::default::Default::default(),
hir_crate_items: ::core::default::Default::default(),
hir_module_items: ::core::default::Default::default(),
local_def_id_to_hir_id: ::core::default::Default::default(),
hir_owner_parent_q: ::core::default::Default::default(),
opt_hir_owner_nodes: ::core::default::Default::default(),
hir_attr_map: ::core::default::Default::default(),
opt_ast_lowering_delayed_lints: ::core::default::Default::default(),
const_param_default: ::core::default::Default::default(),
const_of_item: ::core::default::Default::default(),
type_of: ::core::default::Default::default(),
type_of_opaque: ::core::default::Default::default(),
type_of_opaque_hir_typeck: ::core::default::Default::default(),
type_alias_is_lazy: ::core::default::Default::default(),
collect_return_position_impl_trait_in_trait_tys: ::core::default::Default::default(),
opaque_ty_origin: ::core::default::Default::default(),
unsizing_params_for_adt: ::core::default::Default::default(),
analysis: ::core::default::Default::default(),
check_expectations: ::core::default::Default::default(),
generics_of: ::core::default::Default::default(),
predicates_of: ::core::default::Default::default(),
opaque_types_defined_by: ::core::default::Default::default(),
nested_bodies_within: ::core::default::Default::default(),
explicit_item_bounds: ::core::default::Default::default(),
explicit_item_self_bounds: ::core::default::Default::default(),
item_bounds: ::core::default::Default::default(),
item_self_bounds: ::core::default::Default::default(),
item_non_self_bounds: ::core::default::Default::default(),
impl_super_outlives: ::core::default::Default::default(),
native_libraries: ::core::default::Default::default(),
shallow_lint_levels_on: ::core::default::Default::default(),
lint_expectations: ::core::default::Default::default(),
lints_that_dont_need_to_run: ::core::default::Default::default(),
expn_that_defined: ::core::default::Default::default(),
is_panic_runtime: ::core::default::Default::default(),
representability: ::core::default::Default::default(),
representability_adt_ty: ::core::default::Default::default(),
params_in_repr: ::core::default::Default::default(),
thir_body: ::core::default::Default::default(),
mir_keys: ::core::default::Default::default(),
mir_const_qualif: ::core::default::Default::default(),
mir_built: ::core::default::Default::default(),
thir_abstract_const: ::core::default::Default::default(),
mir_drops_elaborated_and_const_checked: ::core::default::Default::default(),
mir_for_ctfe: ::core::default::Default::default(),
mir_promoted: ::core::default::Default::default(),
closure_typeinfo: ::core::default::Default::default(),
closure_saved_names_of_captured_variables: ::core::default::Default::default(),
mir_coroutine_witnesses: ::core::default::Default::default(),
check_coroutine_obligations: ::core::default::Default::default(),
check_potentially_region_dependent_goals: ::core::default::Default::default(),
optimized_mir: ::core::default::Default::default(),
coverage_attr_on: ::core::default::Default::default(),
coverage_ids_info: ::core::default::Default::default(),
promoted_mir: ::core::default::Default::default(),
erase_and_anonymize_regions_ty: ::core::default::Default::default(),
wasm_import_module_map: ::core::default::Default::default(),
trait_explicit_predicates_and_bounds: ::core::default::Default::default(),
explicit_predicates_of: ::core::default::Default::default(),
inferred_outlives_of: ::core::default::Default::default(),
explicit_super_predicates_of: ::core::default::Default::default(),
explicit_implied_predicates_of: ::core::default::Default::default(),
explicit_supertraits_containing_assoc_item: ::core::default::Default::default(),
const_conditions: ::core::default::Default::default(),
explicit_implied_const_bounds: ::core::default::Default::default(),
type_param_predicates: ::core::default::Default::default(),
trait_def: ::core::default::Default::default(),
adt_def: ::core::default::Default::default(),
adt_destructor: ::core::default::Default::default(),
adt_async_destructor: ::core::default::Default::default(),
adt_sizedness_constraint: ::core::default::Default::default(),
adt_dtorck_constraint: ::core::default::Default::default(),
constness: ::core::default::Default::default(),
asyncness: ::core::default::Default::default(),
is_promotable_const_fn: ::core::default::Default::default(),
coroutine_by_move_body_def_id: ::core::default::Default::default(),
coroutine_kind: ::core::default::Default::default(),
coroutine_for_closure: ::core::default::Default::default(),
coroutine_hidden_types: ::core::default::Default::default(),
crate_variances: ::core::default::Default::default(),
variances_of: ::core::default::Default::default(),
inferred_outlives_crate: ::core::default::Default::default(),
associated_item_def_ids: ::core::default::Default::default(),
associated_item: ::core::default::Default::default(),
associated_items: ::core::default::Default::default(),
impl_item_implementor_ids: ::core::default::Default::default(),
associated_types_for_impl_traits_in_trait_or_impl: ::core::default::Default::default(),
impl_trait_header: ::core::default::Default::default(),
impl_self_is_guaranteed_unsized: ::core::default::Default::default(),
inherent_impls: ::core::default::Default::default(),
incoherent_impls: ::core::default::Default::default(),
check_transmutes: ::core::default::Default::default(),
check_unsafety: ::core::default::Default::default(),
check_tail_calls: ::core::default::Default::default(),
assumed_wf_types: ::core::default::Default::default(),
assumed_wf_types_for_rpitit: ::core::default::Default::default(),
fn_sig: ::core::default::Default::default(),
lint_mod: ::core::default::Default::default(),
check_unused_traits: ::core::default::Default::default(),
check_mod_attrs: ::core::default::Default::default(),
check_mod_unstable_api_usage: ::core::default::Default::default(),
check_mod_privacy: ::core::default::Default::default(),
check_liveness: ::core::default::Default::default(),
live_symbols_and_ignored_derived_traits: ::core::default::Default::default(),
check_mod_deathness: ::core::default::Default::default(),
check_type_wf: ::core::default::Default::default(),
coerce_unsized_info: ::core::default::Default::default(),
typeck: ::core::default::Default::default(),
used_trait_imports: ::core::default::Default::default(),
coherent_trait: ::core::default::Default::default(),
mir_borrowck: ::core::default::Default::default(),
crate_inherent_impls: ::core::default::Default::default(),
crate_inherent_impls_validity_check: ::core::default::Default::default(),
crate_inherent_impls_overlap_check: ::core::default::Default::default(),
orphan_check_impl: ::core::default::Default::default(),
mir_callgraph_cyclic: ::core::default::Default::default(),
mir_inliner_callees: ::core::default::Default::default(),
tag_for_variant: ::core::default::Default::default(),
eval_to_allocation_raw: ::core::default::Default::default(),
eval_static_initializer: ::core::default::Default::default(),
eval_to_const_value_raw: ::core::default::Default::default(),
eval_to_valtree: ::core::default::Default::default(),
valtree_to_const_val: ::core::default::Default::default(),
lit_to_const: ::core::default::Default::default(),
check_match: ::core::default::Default::default(),
effective_visibilities: ::core::default::Default::default(),
check_private_in_public: ::core::default::Default::default(),
reachable_set: ::core::default::Default::default(),
region_scope_tree: ::core::default::Default::default(),
mir_shims: ::core::default::Default::default(),
symbol_name: ::core::default::Default::default(),
def_kind: ::core::default::Default::default(),
def_span: ::core::default::Default::default(),
def_ident_span: ::core::default::Default::default(),
ty_span: ::core::default::Default::default(),
lookup_stability: ::core::default::Default::default(),
lookup_const_stability: ::core::default::Default::default(),
lookup_default_body_stability: ::core::default::Default::default(),
should_inherit_track_caller: ::core::default::Default::default(),
inherited_align: ::core::default::Default::default(),
lookup_deprecation_entry: ::core::default::Default::default(),
is_doc_hidden: ::core::default::Default::default(),
is_doc_notable_trait: ::core::default::Default::default(),
attrs_for_def: ::core::default::Default::default(),
codegen_fn_attrs: ::core::default::Default::default(),
asm_target_features: ::core::default::Default::default(),
fn_arg_idents: ::core::default::Default::default(),
rendered_const: ::core::default::Default::default(),
rendered_precise_capturing_args: ::core::default::Default::default(),
impl_parent: ::core::default::Default::default(),
is_mir_available: ::core::default::Default::default(),
own_existential_vtable_entries: ::core::default::Default::default(),
vtable_entries: ::core::default::Default::default(),
first_method_vtable_slot: ::core::default::Default::default(),
supertrait_vtable_slot: ::core::default::Default::default(),
vtable_allocation: ::core::default::Default::default(),
codegen_select_candidate: ::core::default::Default::default(),
all_local_trait_impls: ::core::default::Default::default(),
local_trait_impls: ::core::default::Default::default(),
trait_impls_of: ::core::default::Default::default(),
specialization_graph_of: ::core::default::Default::default(),
dyn_compatibility_violations: ::core::default::Default::default(),
is_dyn_compatible: ::core::default::Default::default(),
param_env: ::core::default::Default::default(),
typing_env_normalized_for_post_analysis: ::core::default::Default::default(),
is_copy_raw: ::core::default::Default::default(),
is_use_cloned_raw: ::core::default::Default::default(),
is_sized_raw: ::core::default::Default::default(),
is_freeze_raw: ::core::default::Default::default(),
is_unpin_raw: ::core::default::Default::default(),
is_async_drop_raw: ::core::default::Default::default(),
needs_drop_raw: ::core::default::Default::default(),
needs_async_drop_raw: ::core::default::Default::default(),
has_significant_drop_raw: ::core::default::Default::default(),
has_structural_eq_impl: ::core::default::Default::default(),
adt_drop_tys: ::core::default::Default::default(),
adt_async_drop_tys: ::core::default::Default::default(),
adt_significant_drop_tys: ::core::default::Default::default(),
list_significant_drop_tys: ::core::default::Default::default(),
layout_of: ::core::default::Default::default(),
fn_abi_of_fn_ptr: ::core::default::Default::default(),
fn_abi_of_instance: ::core::default::Default::default(),
dylib_dependency_formats: ::core::default::Default::default(),
dependency_formats: ::core::default::Default::default(),
is_compiler_builtins: ::core::default::Default::default(),
has_global_allocator: ::core::default::Default::default(),
has_alloc_error_handler: ::core::default::Default::default(),
has_panic_handler: ::core::default::Default::default(),
is_profiler_runtime: ::core::default::Default::default(),
has_ffi_unwind_calls: ::core::default::Default::default(),
required_panic_strategy: ::core::default::Default::default(),
panic_in_drop_strategy: ::core::default::Default::default(),
is_no_builtins: ::core::default::Default::default(),
symbol_mangling_version: ::core::default::Default::default(),
extern_crate: ::core::default::Default::default(),
specialization_enabled_in: ::core::default::Default::default(),
specializes: ::core::default::Default::default(),
in_scope_traits_map: ::core::default::Default::default(),
defaultness: ::core::default::Default::default(),
default_field: ::core::default::Default::default(),
check_well_formed: ::core::default::Default::default(),
enforce_impl_non_lifetime_params_are_constrained: ::core::default::Default::default(),
reachable_non_generics: ::core::default::Default::default(),
is_reachable_non_generic: ::core::default::Default::default(),
is_unreachable_local_definition: ::core::default::Default::default(),
upstream_monomorphizations: ::core::default::Default::default(),
upstream_monomorphizations_for: ::core::default::Default::default(),
upstream_drop_glue_for: ::core::default::Default::default(),
upstream_async_drop_glue_for: ::core::default::Default::default(),
foreign_modules: ::core::default::Default::default(),
clashing_extern_declarations: ::core::default::Default::default(),
entry_fn: ::core::default::Default::default(),
proc_macro_decls_static: ::core::default::Default::default(),
crate_hash: ::core::default::Default::default(),
crate_host_hash: ::core::default::Default::default(),
extra_filename: ::core::default::Default::default(),
crate_extern_paths: ::core::default::Default::default(),
implementations_of_trait: ::core::default::Default::default(),
crate_incoherent_impls: ::core::default::Default::default(),
native_library: ::core::default::Default::default(),
inherit_sig_for_delegation_item: ::core::default::Default::default(),
resolve_bound_vars: ::core::default::Default::default(),
named_variable_map: ::core::default::Default::default(),
is_late_bound_map: ::core::default::Default::default(),
object_lifetime_default: ::core::default::Default::default(),
late_bound_vars_map: ::core::default::Default::default(),
opaque_captured_lifetimes: ::core::default::Default::default(),
visibility: ::core::default::Default::default(),
inhabited_predicate_adt: ::core::default::Default::default(),
inhabited_predicate_type: ::core::default::Default::default(),
dep_kind: ::core::default::Default::default(),
crate_name: ::core::default::Default::default(),
module_children: ::core::default::Default::default(),
num_extern_def_ids: ::core::default::Default::default(),
lib_features: ::core::default::Default::default(),
stability_implications: ::core::default::Default::default(),
intrinsic_raw: ::core::default::Default::default(),
get_lang_items: ::core::default::Default::default(),
all_diagnostic_items: ::core::default::Default::default(),
defined_lang_items: ::core::default::Default::default(),
diagnostic_items: ::core::default::Default::default(),
missing_lang_items: ::core::default::Default::default(),
visible_parent_map: ::core::default::Default::default(),
trimmed_def_paths: ::core::default::Default::default(),
missing_extern_crate_item: ::core::default::Default::default(),
used_crate_source: ::core::default::Default::default(),
debugger_visualizers: ::core::default::Default::default(),
postorder_cnums: ::core::default::Default::default(),
is_private_dep: ::core::default::Default::default(),
allocator_kind: ::core::default::Default::default(),
alloc_error_handler_kind: ::core::default::Default::default(),
upvars_mentioned: ::core::default::Default::default(),
crates: ::core::default::Default::default(),
used_crates: ::core::default::Default::default(),
duplicate_crate_names: ::core::default::Default::default(),
traits: ::core::default::Default::default(),
trait_impls_in_crate: ::core::default::Default::default(),
stable_order_of_exportable_impls: ::core::default::Default::default(),
exportable_items: ::core::default::Default::default(),
exported_non_generic_symbols: ::core::default::Default::default(),
exported_generic_symbols: ::core::default::Default::default(),
collect_and_partition_mono_items: ::core::default::Default::default(),
is_codegened_item: ::core::default::Default::default(),
codegen_unit: ::core::default::Default::default(),
backend_optimization_level: ::core::default::Default::default(),
output_filenames: ::core::default::Default::default(),
normalize_canonicalized_projection: ::core::default::Default::default(),
normalize_canonicalized_free_alias: ::core::default::Default::default(),
normalize_canonicalized_inherent_projection: ::core::default::Default::default(),
try_normalize_generic_arg_after_erasing_regions: ::core::default::Default::default(),
implied_outlives_bounds: ::core::default::Default::default(),
dropck_outlives: ::core::default::Default::default(),
evaluate_obligation: ::core::default::Default::default(),
type_op_ascribe_user_type: ::core::default::Default::default(),
type_op_prove_predicate: ::core::default::Default::default(),
type_op_normalize_ty: ::core::default::Default::default(),
type_op_normalize_clause: ::core::default::Default::default(),
type_op_normalize_poly_fn_sig: ::core::default::Default::default(),
type_op_normalize_fn_sig: ::core::default::Default::default(),
instantiate_and_check_impossible_predicates: ::core::default::Default::default(),
is_impossible_associated_item: ::core::default::Default::default(),
method_autoderef_steps: ::core::default::Default::default(),
evaluate_root_goal_for_proof_tree_raw: ::core::default::Default::default(),
rust_target_features: ::core::default::Default::default(),
implied_target_features: ::core::default::Default::default(),
features_query: ::core::default::Default::default(),
crate_for_resolver: ::core::default::Default::default(),
resolve_instance_raw: ::core::default::Default::default(),
reveal_opaque_types_in_bounds: ::core::default::Default::default(),
limits: ::core::default::Default::default(),
diagnostic_hir_wf_check: ::core::default::Default::default(),
global_backend_features: ::core::default::Default::default(),
check_validity_requirement: ::core::default::Default::default(),
compare_impl_item: ::core::default::Default::default(),
deduced_param_attrs: ::core::default::Default::default(),
doc_link_resolutions: ::core::default::Default::default(),
doc_link_traits_in_scope: ::core::default::Default::default(),
stripped_cfg_items: ::core::default::Default::default(),
generics_require_sized_self: ::core::default::Default::default(),
cross_crate_inlinable: ::core::default::Default::default(),
check_mono_item: ::core::default::Default::default(),
skip_move_check_fns: ::core::default::Default::default(),
items_of_instance: ::core::default::Default::default(),
size_estimate: ::core::default::Default::default(),
anon_const_kind: ::core::default::Default::default(),
trivial_const: ::core::default::Default::default(),
sanitizer_settings_for: ::core::default::Default::default(),
check_externally_implementable_items: ::core::default::Default::default(),
externally_implementable_items: ::core::default::Default::default(),
}
}
}
pub struct Providers {
pub derive_macro_expansion: for<'tcx> fn(TyCtxt<'tcx>,
derive_macro_expansion::LocalKey<'tcx>)
-> derive_macro_expansion::ProvidedValue<'tcx>,
pub trigger_delayed_bug: for<'tcx> fn(TyCtxt<'tcx>,
trigger_delayed_bug::LocalKey<'tcx>)
-> trigger_delayed_bug::ProvidedValue<'tcx>,
pub registered_tools: for<'tcx> fn(TyCtxt<'tcx>,
registered_tools::LocalKey<'tcx>)
-> registered_tools::ProvidedValue<'tcx>,
pub early_lint_checks: for<'tcx> fn(TyCtxt<'tcx>,
early_lint_checks::LocalKey<'tcx>)
-> early_lint_checks::ProvidedValue<'tcx>,
pub env_var_os: for<'tcx> fn(TyCtxt<'tcx>, env_var_os::LocalKey<'tcx>)
-> env_var_os::ProvidedValue<'tcx>,
pub resolutions: for<'tcx> fn(TyCtxt<'tcx>, resolutions::LocalKey<'tcx>)
-> resolutions::ProvidedValue<'tcx>,
pub resolver_for_lowering_raw: for<'tcx> fn(TyCtxt<'tcx>,
resolver_for_lowering_raw::LocalKey<'tcx>)
-> resolver_for_lowering_raw::ProvidedValue<'tcx>,
pub source_span: for<'tcx> fn(TyCtxt<'tcx>, source_span::LocalKey<'tcx>)
-> source_span::ProvidedValue<'tcx>,
pub hir_crate: for<'tcx> fn(TyCtxt<'tcx>, hir_crate::LocalKey<'tcx>)
-> hir_crate::ProvidedValue<'tcx>,
pub hir_crate_items: for<'tcx> fn(TyCtxt<'tcx>,
hir_crate_items::LocalKey<'tcx>)
-> hir_crate_items::ProvidedValue<'tcx>,
pub hir_module_items: for<'tcx> fn(TyCtxt<'tcx>,
hir_module_items::LocalKey<'tcx>)
-> hir_module_items::ProvidedValue<'tcx>,
pub local_def_id_to_hir_id: for<'tcx> fn(TyCtxt<'tcx>,
local_def_id_to_hir_id::LocalKey<'tcx>)
-> local_def_id_to_hir_id::ProvidedValue<'tcx>,
pub hir_owner_parent_q: for<'tcx> fn(TyCtxt<'tcx>,
hir_owner_parent_q::LocalKey<'tcx>)
-> hir_owner_parent_q::ProvidedValue<'tcx>,
pub opt_hir_owner_nodes: for<'tcx> fn(TyCtxt<'tcx>,
opt_hir_owner_nodes::LocalKey<'tcx>)
-> opt_hir_owner_nodes::ProvidedValue<'tcx>,
pub hir_attr_map: for<'tcx> fn(TyCtxt<'tcx>, hir_attr_map::LocalKey<'tcx>)
-> hir_attr_map::ProvidedValue<'tcx>,
pub opt_ast_lowering_delayed_lints: for<'tcx> fn(TyCtxt<'tcx>,
opt_ast_lowering_delayed_lints::LocalKey<'tcx>)
-> opt_ast_lowering_delayed_lints::ProvidedValue<'tcx>,
pub const_param_default: for<'tcx> fn(TyCtxt<'tcx>,
const_param_default::LocalKey<'tcx>)
-> const_param_default::ProvidedValue<'tcx>,
pub const_of_item: for<'tcx> fn(TyCtxt<'tcx>,
const_of_item::LocalKey<'tcx>) -> const_of_item::ProvidedValue<'tcx>,
pub type_of: for<'tcx> fn(TyCtxt<'tcx>, type_of::LocalKey<'tcx>)
-> type_of::ProvidedValue<'tcx>,
pub type_of_opaque: for<'tcx> fn(TyCtxt<'tcx>,
type_of_opaque::LocalKey<'tcx>)
-> type_of_opaque::ProvidedValue<'tcx>,
pub type_of_opaque_hir_typeck: for<'tcx> fn(TyCtxt<'tcx>,
type_of_opaque_hir_typeck::LocalKey<'tcx>)
-> type_of_opaque_hir_typeck::ProvidedValue<'tcx>,
pub type_alias_is_lazy: for<'tcx> fn(TyCtxt<'tcx>,
type_alias_is_lazy::LocalKey<'tcx>)
-> type_alias_is_lazy::ProvidedValue<'tcx>,
pub collect_return_position_impl_trait_in_trait_tys: for<'tcx> fn(TyCtxt<'tcx>,
collect_return_position_impl_trait_in_trait_tys::LocalKey<'tcx>)
->
collect_return_position_impl_trait_in_trait_tys::ProvidedValue<'tcx>,
pub opaque_ty_origin: for<'tcx> fn(TyCtxt<'tcx>,
opaque_ty_origin::LocalKey<'tcx>)
-> opaque_ty_origin::ProvidedValue<'tcx>,
pub unsizing_params_for_adt: for<'tcx> fn(TyCtxt<'tcx>,
unsizing_params_for_adt::LocalKey<'tcx>)
-> unsizing_params_for_adt::ProvidedValue<'tcx>,
pub analysis: for<'tcx> fn(TyCtxt<'tcx>, analysis::LocalKey<'tcx>)
-> analysis::ProvidedValue<'tcx>,
pub check_expectations: for<'tcx> fn(TyCtxt<'tcx>,
check_expectations::LocalKey<'tcx>)
-> check_expectations::ProvidedValue<'tcx>,
pub generics_of: for<'tcx> fn(TyCtxt<'tcx>, generics_of::LocalKey<'tcx>)
-> generics_of::ProvidedValue<'tcx>,
pub predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
predicates_of::LocalKey<'tcx>) -> predicates_of::ProvidedValue<'tcx>,
pub opaque_types_defined_by: for<'tcx> fn(TyCtxt<'tcx>,
opaque_types_defined_by::LocalKey<'tcx>)
-> opaque_types_defined_by::ProvidedValue<'tcx>,
pub nested_bodies_within: for<'tcx> fn(TyCtxt<'tcx>,
nested_bodies_within::LocalKey<'tcx>)
-> nested_bodies_within::ProvidedValue<'tcx>,
pub explicit_item_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_item_bounds::LocalKey<'tcx>)
-> explicit_item_bounds::ProvidedValue<'tcx>,
pub explicit_item_self_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_item_self_bounds::LocalKey<'tcx>)
-> explicit_item_self_bounds::ProvidedValue<'tcx>,
pub item_bounds: for<'tcx> fn(TyCtxt<'tcx>, item_bounds::LocalKey<'tcx>)
-> item_bounds::ProvidedValue<'tcx>,
pub item_self_bounds: for<'tcx> fn(TyCtxt<'tcx>,
item_self_bounds::LocalKey<'tcx>)
-> item_self_bounds::ProvidedValue<'tcx>,
pub item_non_self_bounds: for<'tcx> fn(TyCtxt<'tcx>,
item_non_self_bounds::LocalKey<'tcx>)
-> item_non_self_bounds::ProvidedValue<'tcx>,
pub impl_super_outlives: for<'tcx> fn(TyCtxt<'tcx>,
impl_super_outlives::LocalKey<'tcx>)
-> impl_super_outlives::ProvidedValue<'tcx>,
pub native_libraries: for<'tcx> fn(TyCtxt<'tcx>,
native_libraries::LocalKey<'tcx>)
-> native_libraries::ProvidedValue<'tcx>,
pub shallow_lint_levels_on: for<'tcx> fn(TyCtxt<'tcx>,
shallow_lint_levels_on::LocalKey<'tcx>)
-> shallow_lint_levels_on::ProvidedValue<'tcx>,
pub lint_expectations: for<'tcx> fn(TyCtxt<'tcx>,
lint_expectations::LocalKey<'tcx>)
-> lint_expectations::ProvidedValue<'tcx>,
pub lints_that_dont_need_to_run: for<'tcx> fn(TyCtxt<'tcx>,
lints_that_dont_need_to_run::LocalKey<'tcx>)
-> lints_that_dont_need_to_run::ProvidedValue<'tcx>,
pub expn_that_defined: for<'tcx> fn(TyCtxt<'tcx>,
expn_that_defined::LocalKey<'tcx>)
-> expn_that_defined::ProvidedValue<'tcx>,
pub is_panic_runtime: for<'tcx> fn(TyCtxt<'tcx>,
is_panic_runtime::LocalKey<'tcx>)
-> is_panic_runtime::ProvidedValue<'tcx>,
pub representability: for<'tcx> fn(TyCtxt<'tcx>,
representability::LocalKey<'tcx>)
-> representability::ProvidedValue<'tcx>,
pub representability_adt_ty: for<'tcx> fn(TyCtxt<'tcx>,
representability_adt_ty::LocalKey<'tcx>)
-> representability_adt_ty::ProvidedValue<'tcx>,
pub params_in_repr: for<'tcx> fn(TyCtxt<'tcx>,
params_in_repr::LocalKey<'tcx>)
-> params_in_repr::ProvidedValue<'tcx>,
pub thir_body: for<'tcx> fn(TyCtxt<'tcx>, thir_body::LocalKey<'tcx>)
-> thir_body::ProvidedValue<'tcx>,
pub mir_keys: for<'tcx> fn(TyCtxt<'tcx>, mir_keys::LocalKey<'tcx>)
-> mir_keys::ProvidedValue<'tcx>,
pub mir_const_qualif: for<'tcx> fn(TyCtxt<'tcx>,
mir_const_qualif::LocalKey<'tcx>)
-> mir_const_qualif::ProvidedValue<'tcx>,
pub mir_built: for<'tcx> fn(TyCtxt<'tcx>, mir_built::LocalKey<'tcx>)
-> mir_built::ProvidedValue<'tcx>,
pub thir_abstract_const: for<'tcx> fn(TyCtxt<'tcx>,
thir_abstract_const::LocalKey<'tcx>)
-> thir_abstract_const::ProvidedValue<'tcx>,
pub mir_drops_elaborated_and_const_checked: for<'tcx> fn(TyCtxt<'tcx>,
mir_drops_elaborated_and_const_checked::LocalKey<'tcx>)
-> mir_drops_elaborated_and_const_checked::ProvidedValue<'tcx>,
pub mir_for_ctfe: for<'tcx> fn(TyCtxt<'tcx>, mir_for_ctfe::LocalKey<'tcx>)
-> mir_for_ctfe::ProvidedValue<'tcx>,
pub mir_promoted: for<'tcx> fn(TyCtxt<'tcx>, mir_promoted::LocalKey<'tcx>)
-> mir_promoted::ProvidedValue<'tcx>,
pub closure_typeinfo: for<'tcx> fn(TyCtxt<'tcx>,
closure_typeinfo::LocalKey<'tcx>)
-> closure_typeinfo::ProvidedValue<'tcx>,
pub closure_saved_names_of_captured_variables: for<'tcx> fn(TyCtxt<'tcx>,
closure_saved_names_of_captured_variables::LocalKey<'tcx>)
-> closure_saved_names_of_captured_variables::ProvidedValue<'tcx>,
pub mir_coroutine_witnesses: for<'tcx> fn(TyCtxt<'tcx>,
mir_coroutine_witnesses::LocalKey<'tcx>)
-> mir_coroutine_witnesses::ProvidedValue<'tcx>,
pub check_coroutine_obligations: for<'tcx> fn(TyCtxt<'tcx>,
check_coroutine_obligations::LocalKey<'tcx>)
-> check_coroutine_obligations::ProvidedValue<'tcx>,
pub check_potentially_region_dependent_goals: for<'tcx> fn(TyCtxt<'tcx>,
check_potentially_region_dependent_goals::LocalKey<'tcx>)
-> check_potentially_region_dependent_goals::ProvidedValue<'tcx>,
pub optimized_mir: for<'tcx> fn(TyCtxt<'tcx>,
optimized_mir::LocalKey<'tcx>) -> optimized_mir::ProvidedValue<'tcx>,
pub coverage_attr_on: for<'tcx> fn(TyCtxt<'tcx>,
coverage_attr_on::LocalKey<'tcx>)
-> coverage_attr_on::ProvidedValue<'tcx>,
pub coverage_ids_info: for<'tcx> fn(TyCtxt<'tcx>,
coverage_ids_info::LocalKey<'tcx>)
-> coverage_ids_info::ProvidedValue<'tcx>,
pub promoted_mir: for<'tcx> fn(TyCtxt<'tcx>, promoted_mir::LocalKey<'tcx>)
-> promoted_mir::ProvidedValue<'tcx>,
pub erase_and_anonymize_regions_ty: for<'tcx> fn(TyCtxt<'tcx>,
erase_and_anonymize_regions_ty::LocalKey<'tcx>)
-> erase_and_anonymize_regions_ty::ProvidedValue<'tcx>,
pub wasm_import_module_map: for<'tcx> fn(TyCtxt<'tcx>,
wasm_import_module_map::LocalKey<'tcx>)
-> wasm_import_module_map::ProvidedValue<'tcx>,
pub trait_explicit_predicates_and_bounds: for<'tcx> fn(TyCtxt<'tcx>,
trait_explicit_predicates_and_bounds::LocalKey<'tcx>)
-> trait_explicit_predicates_and_bounds::ProvidedValue<'tcx>,
pub explicit_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_predicates_of::LocalKey<'tcx>)
-> explicit_predicates_of::ProvidedValue<'tcx>,
pub inferred_outlives_of: for<'tcx> fn(TyCtxt<'tcx>,
inferred_outlives_of::LocalKey<'tcx>)
-> inferred_outlives_of::ProvidedValue<'tcx>,
pub explicit_super_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_super_predicates_of::LocalKey<'tcx>)
-> explicit_super_predicates_of::ProvidedValue<'tcx>,
pub explicit_implied_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_implied_predicates_of::LocalKey<'tcx>)
-> explicit_implied_predicates_of::ProvidedValue<'tcx>,
pub explicit_supertraits_containing_assoc_item: for<'tcx> fn(TyCtxt<'tcx>,
explicit_supertraits_containing_assoc_item::LocalKey<'tcx>)
-> explicit_supertraits_containing_assoc_item::ProvidedValue<'tcx>,
pub const_conditions: for<'tcx> fn(TyCtxt<'tcx>,
const_conditions::LocalKey<'tcx>)
-> const_conditions::ProvidedValue<'tcx>,
pub explicit_implied_const_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_implied_const_bounds::LocalKey<'tcx>)
-> explicit_implied_const_bounds::ProvidedValue<'tcx>,
pub type_param_predicates: for<'tcx> fn(TyCtxt<'tcx>,
type_param_predicates::LocalKey<'tcx>)
-> type_param_predicates::ProvidedValue<'tcx>,
pub trait_def: for<'tcx> fn(TyCtxt<'tcx>, trait_def::LocalKey<'tcx>)
-> trait_def::ProvidedValue<'tcx>,
pub adt_def: for<'tcx> fn(TyCtxt<'tcx>, adt_def::LocalKey<'tcx>)
-> adt_def::ProvidedValue<'tcx>,
pub adt_destructor: for<'tcx> fn(TyCtxt<'tcx>,
adt_destructor::LocalKey<'tcx>)
-> adt_destructor::ProvidedValue<'tcx>,
pub adt_async_destructor: for<'tcx> fn(TyCtxt<'tcx>,
adt_async_destructor::LocalKey<'tcx>)
-> adt_async_destructor::ProvidedValue<'tcx>,
pub adt_sizedness_constraint: for<'tcx> fn(TyCtxt<'tcx>,
adt_sizedness_constraint::LocalKey<'tcx>)
-> adt_sizedness_constraint::ProvidedValue<'tcx>,
pub adt_dtorck_constraint: for<'tcx> fn(TyCtxt<'tcx>,
adt_dtorck_constraint::LocalKey<'tcx>)
-> adt_dtorck_constraint::ProvidedValue<'tcx>,
pub constness: for<'tcx> fn(TyCtxt<'tcx>, constness::LocalKey<'tcx>)
-> constness::ProvidedValue<'tcx>,
pub asyncness: for<'tcx> fn(TyCtxt<'tcx>, asyncness::LocalKey<'tcx>)
-> asyncness::ProvidedValue<'tcx>,
pub is_promotable_const_fn: for<'tcx> fn(TyCtxt<'tcx>,
is_promotable_const_fn::LocalKey<'tcx>)
-> is_promotable_const_fn::ProvidedValue<'tcx>,
pub coroutine_by_move_body_def_id: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_by_move_body_def_id::LocalKey<'tcx>)
-> coroutine_by_move_body_def_id::ProvidedValue<'tcx>,
pub coroutine_kind: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_kind::LocalKey<'tcx>)
-> coroutine_kind::ProvidedValue<'tcx>,
pub coroutine_for_closure: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_for_closure::LocalKey<'tcx>)
-> coroutine_for_closure::ProvidedValue<'tcx>,
pub coroutine_hidden_types: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_hidden_types::LocalKey<'tcx>)
-> coroutine_hidden_types::ProvidedValue<'tcx>,
pub crate_variances: for<'tcx> fn(TyCtxt<'tcx>,
crate_variances::LocalKey<'tcx>)
-> crate_variances::ProvidedValue<'tcx>,
pub variances_of: for<'tcx> fn(TyCtxt<'tcx>, variances_of::LocalKey<'tcx>)
-> variances_of::ProvidedValue<'tcx>,
pub inferred_outlives_crate: for<'tcx> fn(TyCtxt<'tcx>,
inferred_outlives_crate::LocalKey<'tcx>)
-> inferred_outlives_crate::ProvidedValue<'tcx>,
pub associated_item_def_ids: for<'tcx> fn(TyCtxt<'tcx>,
associated_item_def_ids::LocalKey<'tcx>)
-> associated_item_def_ids::ProvidedValue<'tcx>,
pub associated_item: for<'tcx> fn(TyCtxt<'tcx>,
associated_item::LocalKey<'tcx>)
-> associated_item::ProvidedValue<'tcx>,
pub associated_items: for<'tcx> fn(TyCtxt<'tcx>,
associated_items::LocalKey<'tcx>)
-> associated_items::ProvidedValue<'tcx>,
pub impl_item_implementor_ids: for<'tcx> fn(TyCtxt<'tcx>,
impl_item_implementor_ids::LocalKey<'tcx>)
-> impl_item_implementor_ids::ProvidedValue<'tcx>,
pub associated_types_for_impl_traits_in_trait_or_impl: for<'tcx> fn(TyCtxt<'tcx>,
associated_types_for_impl_traits_in_trait_or_impl::LocalKey<'tcx>)
->
associated_types_for_impl_traits_in_trait_or_impl::ProvidedValue<'tcx>,
pub impl_trait_header: for<'tcx> fn(TyCtxt<'tcx>,
impl_trait_header::LocalKey<'tcx>)
-> impl_trait_header::ProvidedValue<'tcx>,
pub impl_self_is_guaranteed_unsized: for<'tcx> fn(TyCtxt<'tcx>,
impl_self_is_guaranteed_unsized::LocalKey<'tcx>)
-> impl_self_is_guaranteed_unsized::ProvidedValue<'tcx>,
pub inherent_impls: for<'tcx> fn(TyCtxt<'tcx>,
inherent_impls::LocalKey<'tcx>)
-> inherent_impls::ProvidedValue<'tcx>,
pub incoherent_impls: for<'tcx> fn(TyCtxt<'tcx>,
incoherent_impls::LocalKey<'tcx>)
-> incoherent_impls::ProvidedValue<'tcx>,
pub check_transmutes: for<'tcx> fn(TyCtxt<'tcx>,
check_transmutes::LocalKey<'tcx>)
-> check_transmutes::ProvidedValue<'tcx>,
pub check_unsafety: for<'tcx> fn(TyCtxt<'tcx>,
check_unsafety::LocalKey<'tcx>)
-> check_unsafety::ProvidedValue<'tcx>,
pub check_tail_calls: for<'tcx> fn(TyCtxt<'tcx>,
check_tail_calls::LocalKey<'tcx>)
-> check_tail_calls::ProvidedValue<'tcx>,
pub assumed_wf_types: for<'tcx> fn(TyCtxt<'tcx>,
assumed_wf_types::LocalKey<'tcx>)
-> assumed_wf_types::ProvidedValue<'tcx>,
pub assumed_wf_types_for_rpitit: for<'tcx> fn(TyCtxt<'tcx>,
assumed_wf_types_for_rpitit::LocalKey<'tcx>)
-> assumed_wf_types_for_rpitit::ProvidedValue<'tcx>,
pub fn_sig: for<'tcx> fn(TyCtxt<'tcx>, fn_sig::LocalKey<'tcx>)
-> fn_sig::ProvidedValue<'tcx>,
pub lint_mod: for<'tcx> fn(TyCtxt<'tcx>, lint_mod::LocalKey<'tcx>)
-> lint_mod::ProvidedValue<'tcx>,
pub check_unused_traits: for<'tcx> fn(TyCtxt<'tcx>,
check_unused_traits::LocalKey<'tcx>)
-> check_unused_traits::ProvidedValue<'tcx>,
pub check_mod_attrs: for<'tcx> fn(TyCtxt<'tcx>,
check_mod_attrs::LocalKey<'tcx>)
-> check_mod_attrs::ProvidedValue<'tcx>,
pub check_mod_unstable_api_usage: for<'tcx> fn(TyCtxt<'tcx>,
check_mod_unstable_api_usage::LocalKey<'tcx>)
-> check_mod_unstable_api_usage::ProvidedValue<'tcx>,
pub check_mod_privacy: for<'tcx> fn(TyCtxt<'tcx>,
check_mod_privacy::LocalKey<'tcx>)
-> check_mod_privacy::ProvidedValue<'tcx>,
pub check_liveness: for<'tcx> fn(TyCtxt<'tcx>,
check_liveness::LocalKey<'tcx>)
-> check_liveness::ProvidedValue<'tcx>,
pub live_symbols_and_ignored_derived_traits: for<'tcx> fn(TyCtxt<'tcx>,
live_symbols_and_ignored_derived_traits::LocalKey<'tcx>)
-> live_symbols_and_ignored_derived_traits::ProvidedValue<'tcx>,
pub check_mod_deathness: for<'tcx> fn(TyCtxt<'tcx>,
check_mod_deathness::LocalKey<'tcx>)
-> check_mod_deathness::ProvidedValue<'tcx>,
pub check_type_wf: for<'tcx> fn(TyCtxt<'tcx>,
check_type_wf::LocalKey<'tcx>) -> check_type_wf::ProvidedValue<'tcx>,
pub coerce_unsized_info: for<'tcx> fn(TyCtxt<'tcx>,
coerce_unsized_info::LocalKey<'tcx>)
-> coerce_unsized_info::ProvidedValue<'tcx>,
pub typeck: for<'tcx> fn(TyCtxt<'tcx>, typeck::LocalKey<'tcx>)
-> typeck::ProvidedValue<'tcx>,
pub used_trait_imports: for<'tcx> fn(TyCtxt<'tcx>,
used_trait_imports::LocalKey<'tcx>)
-> used_trait_imports::ProvidedValue<'tcx>,
pub coherent_trait: for<'tcx> fn(TyCtxt<'tcx>,
coherent_trait::LocalKey<'tcx>)
-> coherent_trait::ProvidedValue<'tcx>,
pub mir_borrowck: for<'tcx> fn(TyCtxt<'tcx>, mir_borrowck::LocalKey<'tcx>)
-> mir_borrowck::ProvidedValue<'tcx>,
pub crate_inherent_impls: for<'tcx> fn(TyCtxt<'tcx>,
crate_inherent_impls::LocalKey<'tcx>)
-> crate_inherent_impls::ProvidedValue<'tcx>,
pub crate_inherent_impls_validity_check: for<'tcx> fn(TyCtxt<'tcx>,
crate_inherent_impls_validity_check::LocalKey<'tcx>)
-> crate_inherent_impls_validity_check::ProvidedValue<'tcx>,
pub crate_inherent_impls_overlap_check: for<'tcx> fn(TyCtxt<'tcx>,
crate_inherent_impls_overlap_check::LocalKey<'tcx>)
-> crate_inherent_impls_overlap_check::ProvidedValue<'tcx>,
pub orphan_check_impl: for<'tcx> fn(TyCtxt<'tcx>,
orphan_check_impl::LocalKey<'tcx>)
-> orphan_check_impl::ProvidedValue<'tcx>,
pub mir_callgraph_cyclic: for<'tcx> fn(TyCtxt<'tcx>,
mir_callgraph_cyclic::LocalKey<'tcx>)
-> mir_callgraph_cyclic::ProvidedValue<'tcx>,
pub mir_inliner_callees: for<'tcx> fn(TyCtxt<'tcx>,
mir_inliner_callees::LocalKey<'tcx>)
-> mir_inliner_callees::ProvidedValue<'tcx>,
pub tag_for_variant: for<'tcx> fn(TyCtxt<'tcx>,
tag_for_variant::LocalKey<'tcx>)
-> tag_for_variant::ProvidedValue<'tcx>,
pub eval_to_allocation_raw: for<'tcx> fn(TyCtxt<'tcx>,
eval_to_allocation_raw::LocalKey<'tcx>)
-> eval_to_allocation_raw::ProvidedValue<'tcx>,
pub eval_static_initializer: for<'tcx> fn(TyCtxt<'tcx>,
eval_static_initializer::LocalKey<'tcx>)
-> eval_static_initializer::ProvidedValue<'tcx>,
pub eval_to_const_value_raw: for<'tcx> fn(TyCtxt<'tcx>,
eval_to_const_value_raw::LocalKey<'tcx>)
-> eval_to_const_value_raw::ProvidedValue<'tcx>,
pub eval_to_valtree: for<'tcx> fn(TyCtxt<'tcx>,
eval_to_valtree::LocalKey<'tcx>)
-> eval_to_valtree::ProvidedValue<'tcx>,
pub valtree_to_const_val: for<'tcx> fn(TyCtxt<'tcx>,
valtree_to_const_val::LocalKey<'tcx>)
-> valtree_to_const_val::ProvidedValue<'tcx>,
pub lit_to_const: for<'tcx> fn(TyCtxt<'tcx>, lit_to_const::LocalKey<'tcx>)
-> lit_to_const::ProvidedValue<'tcx>,
pub check_match: for<'tcx> fn(TyCtxt<'tcx>, check_match::LocalKey<'tcx>)
-> check_match::ProvidedValue<'tcx>,
pub effective_visibilities: for<'tcx> fn(TyCtxt<'tcx>,
effective_visibilities::LocalKey<'tcx>)
-> effective_visibilities::ProvidedValue<'tcx>,
pub check_private_in_public: for<'tcx> fn(TyCtxt<'tcx>,
check_private_in_public::LocalKey<'tcx>)
-> check_private_in_public::ProvidedValue<'tcx>,
pub reachable_set: for<'tcx> fn(TyCtxt<'tcx>,
reachable_set::LocalKey<'tcx>) -> reachable_set::ProvidedValue<'tcx>,
pub region_scope_tree: for<'tcx> fn(TyCtxt<'tcx>,
region_scope_tree::LocalKey<'tcx>)
-> region_scope_tree::ProvidedValue<'tcx>,
pub mir_shims: for<'tcx> fn(TyCtxt<'tcx>, mir_shims::LocalKey<'tcx>)
-> mir_shims::ProvidedValue<'tcx>,
pub symbol_name: for<'tcx> fn(TyCtxt<'tcx>, symbol_name::LocalKey<'tcx>)
-> symbol_name::ProvidedValue<'tcx>,
pub def_kind: for<'tcx> fn(TyCtxt<'tcx>, def_kind::LocalKey<'tcx>)
-> def_kind::ProvidedValue<'tcx>,
pub def_span: for<'tcx> fn(TyCtxt<'tcx>, def_span::LocalKey<'tcx>)
-> def_span::ProvidedValue<'tcx>,
pub def_ident_span: for<'tcx> fn(TyCtxt<'tcx>,
def_ident_span::LocalKey<'tcx>)
-> def_ident_span::ProvidedValue<'tcx>,
pub ty_span: for<'tcx> fn(TyCtxt<'tcx>, ty_span::LocalKey<'tcx>)
-> ty_span::ProvidedValue<'tcx>,
pub lookup_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_stability::LocalKey<'tcx>)
-> lookup_stability::ProvidedValue<'tcx>,
pub lookup_const_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_const_stability::LocalKey<'tcx>)
-> lookup_const_stability::ProvidedValue<'tcx>,
pub lookup_default_body_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_default_body_stability::LocalKey<'tcx>)
-> lookup_default_body_stability::ProvidedValue<'tcx>,
pub should_inherit_track_caller: for<'tcx> fn(TyCtxt<'tcx>,
should_inherit_track_caller::LocalKey<'tcx>)
-> should_inherit_track_caller::ProvidedValue<'tcx>,
pub inherited_align: for<'tcx> fn(TyCtxt<'tcx>,
inherited_align::LocalKey<'tcx>)
-> inherited_align::ProvidedValue<'tcx>,
pub lookup_deprecation_entry: for<'tcx> fn(TyCtxt<'tcx>,
lookup_deprecation_entry::LocalKey<'tcx>)
-> lookup_deprecation_entry::ProvidedValue<'tcx>,
pub is_doc_hidden: for<'tcx> fn(TyCtxt<'tcx>,
is_doc_hidden::LocalKey<'tcx>) -> is_doc_hidden::ProvidedValue<'tcx>,
pub is_doc_notable_trait: for<'tcx> fn(TyCtxt<'tcx>,
is_doc_notable_trait::LocalKey<'tcx>)
-> is_doc_notable_trait::ProvidedValue<'tcx>,
pub attrs_for_def: for<'tcx> fn(TyCtxt<'tcx>,
attrs_for_def::LocalKey<'tcx>) -> attrs_for_def::ProvidedValue<'tcx>,
pub codegen_fn_attrs: for<'tcx> fn(TyCtxt<'tcx>,
codegen_fn_attrs::LocalKey<'tcx>)
-> codegen_fn_attrs::ProvidedValue<'tcx>,
pub asm_target_features: for<'tcx> fn(TyCtxt<'tcx>,
asm_target_features::LocalKey<'tcx>)
-> asm_target_features::ProvidedValue<'tcx>,
pub fn_arg_idents: for<'tcx> fn(TyCtxt<'tcx>,
fn_arg_idents::LocalKey<'tcx>) -> fn_arg_idents::ProvidedValue<'tcx>,
pub rendered_const: for<'tcx> fn(TyCtxt<'tcx>,
rendered_const::LocalKey<'tcx>)
-> rendered_const::ProvidedValue<'tcx>,
pub rendered_precise_capturing_args: for<'tcx> fn(TyCtxt<'tcx>,
rendered_precise_capturing_args::LocalKey<'tcx>)
-> rendered_precise_capturing_args::ProvidedValue<'tcx>,
pub impl_parent: for<'tcx> fn(TyCtxt<'tcx>, impl_parent::LocalKey<'tcx>)
-> impl_parent::ProvidedValue<'tcx>,
pub is_mir_available: for<'tcx> fn(TyCtxt<'tcx>,
is_mir_available::LocalKey<'tcx>)
-> is_mir_available::ProvidedValue<'tcx>,
pub own_existential_vtable_entries: for<'tcx> fn(TyCtxt<'tcx>,
own_existential_vtable_entries::LocalKey<'tcx>)
-> own_existential_vtable_entries::ProvidedValue<'tcx>,
pub vtable_entries: for<'tcx> fn(TyCtxt<'tcx>,
vtable_entries::LocalKey<'tcx>)
-> vtable_entries::ProvidedValue<'tcx>,
pub first_method_vtable_slot: for<'tcx> fn(TyCtxt<'tcx>,
first_method_vtable_slot::LocalKey<'tcx>)
-> first_method_vtable_slot::ProvidedValue<'tcx>,
pub supertrait_vtable_slot: for<'tcx> fn(TyCtxt<'tcx>,
supertrait_vtable_slot::LocalKey<'tcx>)
-> supertrait_vtable_slot::ProvidedValue<'tcx>,
pub vtable_allocation: for<'tcx> fn(TyCtxt<'tcx>,
vtable_allocation::LocalKey<'tcx>)
-> vtable_allocation::ProvidedValue<'tcx>,
pub codegen_select_candidate: for<'tcx> fn(TyCtxt<'tcx>,
codegen_select_candidate::LocalKey<'tcx>)
-> codegen_select_candidate::ProvidedValue<'tcx>,
pub all_local_trait_impls: for<'tcx> fn(TyCtxt<'tcx>,
all_local_trait_impls::LocalKey<'tcx>)
-> all_local_trait_impls::ProvidedValue<'tcx>,
pub local_trait_impls: for<'tcx> fn(TyCtxt<'tcx>,
local_trait_impls::LocalKey<'tcx>)
-> local_trait_impls::ProvidedValue<'tcx>,
pub trait_impls_of: for<'tcx> fn(TyCtxt<'tcx>,
trait_impls_of::LocalKey<'tcx>)
-> trait_impls_of::ProvidedValue<'tcx>,
pub specialization_graph_of: for<'tcx> fn(TyCtxt<'tcx>,
specialization_graph_of::LocalKey<'tcx>)
-> specialization_graph_of::ProvidedValue<'tcx>,
pub dyn_compatibility_violations: for<'tcx> fn(TyCtxt<'tcx>,
dyn_compatibility_violations::LocalKey<'tcx>)
-> dyn_compatibility_violations::ProvidedValue<'tcx>,
pub is_dyn_compatible: for<'tcx> fn(TyCtxt<'tcx>,
is_dyn_compatible::LocalKey<'tcx>)
-> is_dyn_compatible::ProvidedValue<'tcx>,
pub param_env: for<'tcx> fn(TyCtxt<'tcx>, param_env::LocalKey<'tcx>)
-> param_env::ProvidedValue<'tcx>,
pub typing_env_normalized_for_post_analysis: for<'tcx> fn(TyCtxt<'tcx>,
typing_env_normalized_for_post_analysis::LocalKey<'tcx>)
-> typing_env_normalized_for_post_analysis::ProvidedValue<'tcx>,
pub is_copy_raw: for<'tcx> fn(TyCtxt<'tcx>, is_copy_raw::LocalKey<'tcx>)
-> is_copy_raw::ProvidedValue<'tcx>,
pub is_use_cloned_raw: for<'tcx> fn(TyCtxt<'tcx>,
is_use_cloned_raw::LocalKey<'tcx>)
-> is_use_cloned_raw::ProvidedValue<'tcx>,
pub is_sized_raw: for<'tcx> fn(TyCtxt<'tcx>, is_sized_raw::LocalKey<'tcx>)
-> is_sized_raw::ProvidedValue<'tcx>,
pub is_freeze_raw: for<'tcx> fn(TyCtxt<'tcx>,
is_freeze_raw::LocalKey<'tcx>) -> is_freeze_raw::ProvidedValue<'tcx>,
pub is_unpin_raw: for<'tcx> fn(TyCtxt<'tcx>, is_unpin_raw::LocalKey<'tcx>)
-> is_unpin_raw::ProvidedValue<'tcx>,
pub is_async_drop_raw: for<'tcx> fn(TyCtxt<'tcx>,
is_async_drop_raw::LocalKey<'tcx>)
-> is_async_drop_raw::ProvidedValue<'tcx>,
pub needs_drop_raw: for<'tcx> fn(TyCtxt<'tcx>,
needs_drop_raw::LocalKey<'tcx>)
-> needs_drop_raw::ProvidedValue<'tcx>,
pub needs_async_drop_raw: for<'tcx> fn(TyCtxt<'tcx>,
needs_async_drop_raw::LocalKey<'tcx>)
-> needs_async_drop_raw::ProvidedValue<'tcx>,
pub has_significant_drop_raw: for<'tcx> fn(TyCtxt<'tcx>,
has_significant_drop_raw::LocalKey<'tcx>)
-> has_significant_drop_raw::ProvidedValue<'tcx>,
pub has_structural_eq_impl: for<'tcx> fn(TyCtxt<'tcx>,
has_structural_eq_impl::LocalKey<'tcx>)
-> has_structural_eq_impl::ProvidedValue<'tcx>,
pub adt_drop_tys: for<'tcx> fn(TyCtxt<'tcx>, adt_drop_tys::LocalKey<'tcx>)
-> adt_drop_tys::ProvidedValue<'tcx>,
pub adt_async_drop_tys: for<'tcx> fn(TyCtxt<'tcx>,
adt_async_drop_tys::LocalKey<'tcx>)
-> adt_async_drop_tys::ProvidedValue<'tcx>,
pub adt_significant_drop_tys: for<'tcx> fn(TyCtxt<'tcx>,
adt_significant_drop_tys::LocalKey<'tcx>)
-> adt_significant_drop_tys::ProvidedValue<'tcx>,
pub list_significant_drop_tys: for<'tcx> fn(TyCtxt<'tcx>,
list_significant_drop_tys::LocalKey<'tcx>)
-> list_significant_drop_tys::ProvidedValue<'tcx>,
pub layout_of: for<'tcx> fn(TyCtxt<'tcx>, layout_of::LocalKey<'tcx>)
-> layout_of::ProvidedValue<'tcx>,
pub fn_abi_of_fn_ptr: for<'tcx> fn(TyCtxt<'tcx>,
fn_abi_of_fn_ptr::LocalKey<'tcx>)
-> fn_abi_of_fn_ptr::ProvidedValue<'tcx>,
pub fn_abi_of_instance: for<'tcx> fn(TyCtxt<'tcx>,
fn_abi_of_instance::LocalKey<'tcx>)
-> fn_abi_of_instance::ProvidedValue<'tcx>,
pub dylib_dependency_formats: for<'tcx> fn(TyCtxt<'tcx>,
dylib_dependency_formats::LocalKey<'tcx>)
-> dylib_dependency_formats::ProvidedValue<'tcx>,
pub dependency_formats: for<'tcx> fn(TyCtxt<'tcx>,
dependency_formats::LocalKey<'tcx>)
-> dependency_formats::ProvidedValue<'tcx>,
pub is_compiler_builtins: for<'tcx> fn(TyCtxt<'tcx>,
is_compiler_builtins::LocalKey<'tcx>)
-> is_compiler_builtins::ProvidedValue<'tcx>,
pub has_global_allocator: for<'tcx> fn(TyCtxt<'tcx>,
has_global_allocator::LocalKey<'tcx>)
-> has_global_allocator::ProvidedValue<'tcx>,
pub has_alloc_error_handler: for<'tcx> fn(TyCtxt<'tcx>,
has_alloc_error_handler::LocalKey<'tcx>)
-> has_alloc_error_handler::ProvidedValue<'tcx>,
pub has_panic_handler: for<'tcx> fn(TyCtxt<'tcx>,
has_panic_handler::LocalKey<'tcx>)
-> has_panic_handler::ProvidedValue<'tcx>,
pub is_profiler_runtime: for<'tcx> fn(TyCtxt<'tcx>,
is_profiler_runtime::LocalKey<'tcx>)
-> is_profiler_runtime::ProvidedValue<'tcx>,
pub has_ffi_unwind_calls: for<'tcx> fn(TyCtxt<'tcx>,
has_ffi_unwind_calls::LocalKey<'tcx>)
-> has_ffi_unwind_calls::ProvidedValue<'tcx>,
pub required_panic_strategy: for<'tcx> fn(TyCtxt<'tcx>,
required_panic_strategy::LocalKey<'tcx>)
-> required_panic_strategy::ProvidedValue<'tcx>,
pub panic_in_drop_strategy: for<'tcx> fn(TyCtxt<'tcx>,
panic_in_drop_strategy::LocalKey<'tcx>)
-> panic_in_drop_strategy::ProvidedValue<'tcx>,
pub is_no_builtins: for<'tcx> fn(TyCtxt<'tcx>,
is_no_builtins::LocalKey<'tcx>)
-> is_no_builtins::ProvidedValue<'tcx>,
pub symbol_mangling_version: for<'tcx> fn(TyCtxt<'tcx>,
symbol_mangling_version::LocalKey<'tcx>)
-> symbol_mangling_version::ProvidedValue<'tcx>,
pub extern_crate: for<'tcx> fn(TyCtxt<'tcx>, extern_crate::LocalKey<'tcx>)
-> extern_crate::ProvidedValue<'tcx>,
pub specialization_enabled_in: for<'tcx> fn(TyCtxt<'tcx>,
specialization_enabled_in::LocalKey<'tcx>)
-> specialization_enabled_in::ProvidedValue<'tcx>,
pub specializes: for<'tcx> fn(TyCtxt<'tcx>, specializes::LocalKey<'tcx>)
-> specializes::ProvidedValue<'tcx>,
pub in_scope_traits_map: for<'tcx> fn(TyCtxt<'tcx>,
in_scope_traits_map::LocalKey<'tcx>)
-> in_scope_traits_map::ProvidedValue<'tcx>,
pub defaultness: for<'tcx> fn(TyCtxt<'tcx>, defaultness::LocalKey<'tcx>)
-> defaultness::ProvidedValue<'tcx>,
pub default_field: for<'tcx> fn(TyCtxt<'tcx>,
default_field::LocalKey<'tcx>) -> default_field::ProvidedValue<'tcx>,
pub check_well_formed: for<'tcx> fn(TyCtxt<'tcx>,
check_well_formed::LocalKey<'tcx>)
-> check_well_formed::ProvidedValue<'tcx>,
pub enforce_impl_non_lifetime_params_are_constrained: for<'tcx> fn(TyCtxt<'tcx>,
enforce_impl_non_lifetime_params_are_constrained::LocalKey<'tcx>)
->
enforce_impl_non_lifetime_params_are_constrained::ProvidedValue<'tcx>,
pub reachable_non_generics: for<'tcx> fn(TyCtxt<'tcx>,
reachable_non_generics::LocalKey<'tcx>)
-> reachable_non_generics::ProvidedValue<'tcx>,
pub is_reachable_non_generic: for<'tcx> fn(TyCtxt<'tcx>,
is_reachable_non_generic::LocalKey<'tcx>)
-> is_reachable_non_generic::ProvidedValue<'tcx>,
pub is_unreachable_local_definition: for<'tcx> fn(TyCtxt<'tcx>,
is_unreachable_local_definition::LocalKey<'tcx>)
-> is_unreachable_local_definition::ProvidedValue<'tcx>,
pub upstream_monomorphizations: for<'tcx> fn(TyCtxt<'tcx>,
upstream_monomorphizations::LocalKey<'tcx>)
-> upstream_monomorphizations::ProvidedValue<'tcx>,
pub upstream_monomorphizations_for: for<'tcx> fn(TyCtxt<'tcx>,
upstream_monomorphizations_for::LocalKey<'tcx>)
-> upstream_monomorphizations_for::ProvidedValue<'tcx>,
pub upstream_drop_glue_for: for<'tcx> fn(TyCtxt<'tcx>,
upstream_drop_glue_for::LocalKey<'tcx>)
-> upstream_drop_glue_for::ProvidedValue<'tcx>,
pub upstream_async_drop_glue_for: for<'tcx> fn(TyCtxt<'tcx>,
upstream_async_drop_glue_for::LocalKey<'tcx>)
-> upstream_async_drop_glue_for::ProvidedValue<'tcx>,
pub foreign_modules: for<'tcx> fn(TyCtxt<'tcx>,
foreign_modules::LocalKey<'tcx>)
-> foreign_modules::ProvidedValue<'tcx>,
pub clashing_extern_declarations: for<'tcx> fn(TyCtxt<'tcx>,
clashing_extern_declarations::LocalKey<'tcx>)
-> clashing_extern_declarations::ProvidedValue<'tcx>,
pub entry_fn: for<'tcx> fn(TyCtxt<'tcx>, entry_fn::LocalKey<'tcx>)
-> entry_fn::ProvidedValue<'tcx>,
pub proc_macro_decls_static: for<'tcx> fn(TyCtxt<'tcx>,
proc_macro_decls_static::LocalKey<'tcx>)
-> proc_macro_decls_static::ProvidedValue<'tcx>,
pub crate_hash: for<'tcx> fn(TyCtxt<'tcx>, crate_hash::LocalKey<'tcx>)
-> crate_hash::ProvidedValue<'tcx>,
pub crate_host_hash: for<'tcx> fn(TyCtxt<'tcx>,
crate_host_hash::LocalKey<'tcx>)
-> crate_host_hash::ProvidedValue<'tcx>,
pub extra_filename: for<'tcx> fn(TyCtxt<'tcx>,
extra_filename::LocalKey<'tcx>)
-> extra_filename::ProvidedValue<'tcx>,
pub crate_extern_paths: for<'tcx> fn(TyCtxt<'tcx>,
crate_extern_paths::LocalKey<'tcx>)
-> crate_extern_paths::ProvidedValue<'tcx>,
pub implementations_of_trait: for<'tcx> fn(TyCtxt<'tcx>,
implementations_of_trait::LocalKey<'tcx>)
-> implementations_of_trait::ProvidedValue<'tcx>,
pub crate_incoherent_impls: for<'tcx> fn(TyCtxt<'tcx>,
crate_incoherent_impls::LocalKey<'tcx>)
-> crate_incoherent_impls::ProvidedValue<'tcx>,
pub native_library: for<'tcx> fn(TyCtxt<'tcx>,
native_library::LocalKey<'tcx>)
-> native_library::ProvidedValue<'tcx>,
pub inherit_sig_for_delegation_item: for<'tcx> fn(TyCtxt<'tcx>,
inherit_sig_for_delegation_item::LocalKey<'tcx>)
-> inherit_sig_for_delegation_item::ProvidedValue<'tcx>,
pub resolve_bound_vars: for<'tcx> fn(TyCtxt<'tcx>,
resolve_bound_vars::LocalKey<'tcx>)
-> resolve_bound_vars::ProvidedValue<'tcx>,
pub named_variable_map: for<'tcx> fn(TyCtxt<'tcx>,
named_variable_map::LocalKey<'tcx>)
-> named_variable_map::ProvidedValue<'tcx>,
pub is_late_bound_map: for<'tcx> fn(TyCtxt<'tcx>,
is_late_bound_map::LocalKey<'tcx>)
-> is_late_bound_map::ProvidedValue<'tcx>,
pub object_lifetime_default: for<'tcx> fn(TyCtxt<'tcx>,
object_lifetime_default::LocalKey<'tcx>)
-> object_lifetime_default::ProvidedValue<'tcx>,
pub late_bound_vars_map: for<'tcx> fn(TyCtxt<'tcx>,
late_bound_vars_map::LocalKey<'tcx>)
-> late_bound_vars_map::ProvidedValue<'tcx>,
pub opaque_captured_lifetimes: for<'tcx> fn(TyCtxt<'tcx>,
opaque_captured_lifetimes::LocalKey<'tcx>)
-> opaque_captured_lifetimes::ProvidedValue<'tcx>,
pub visibility: for<'tcx> fn(TyCtxt<'tcx>, visibility::LocalKey<'tcx>)
-> visibility::ProvidedValue<'tcx>,
pub inhabited_predicate_adt: for<'tcx> fn(TyCtxt<'tcx>,
inhabited_predicate_adt::LocalKey<'tcx>)
-> inhabited_predicate_adt::ProvidedValue<'tcx>,
pub inhabited_predicate_type: for<'tcx> fn(TyCtxt<'tcx>,
inhabited_predicate_type::LocalKey<'tcx>)
-> inhabited_predicate_type::ProvidedValue<'tcx>,
pub dep_kind: for<'tcx> fn(TyCtxt<'tcx>, dep_kind::LocalKey<'tcx>)
-> dep_kind::ProvidedValue<'tcx>,
pub crate_name: for<'tcx> fn(TyCtxt<'tcx>, crate_name::LocalKey<'tcx>)
-> crate_name::ProvidedValue<'tcx>,
pub module_children: for<'tcx> fn(TyCtxt<'tcx>,
module_children::LocalKey<'tcx>)
-> module_children::ProvidedValue<'tcx>,
pub num_extern_def_ids: for<'tcx> fn(TyCtxt<'tcx>,
num_extern_def_ids::LocalKey<'tcx>)
-> num_extern_def_ids::ProvidedValue<'tcx>,
pub lib_features: for<'tcx> fn(TyCtxt<'tcx>, lib_features::LocalKey<'tcx>)
-> lib_features::ProvidedValue<'tcx>,
pub stability_implications: for<'tcx> fn(TyCtxt<'tcx>,
stability_implications::LocalKey<'tcx>)
-> stability_implications::ProvidedValue<'tcx>,
pub intrinsic_raw: for<'tcx> fn(TyCtxt<'tcx>,
intrinsic_raw::LocalKey<'tcx>) -> intrinsic_raw::ProvidedValue<'tcx>,
pub get_lang_items: for<'tcx> fn(TyCtxt<'tcx>,
get_lang_items::LocalKey<'tcx>)
-> get_lang_items::ProvidedValue<'tcx>,
pub all_diagnostic_items: for<'tcx> fn(TyCtxt<'tcx>,
all_diagnostic_items::LocalKey<'tcx>)
-> all_diagnostic_items::ProvidedValue<'tcx>,
pub defined_lang_items: for<'tcx> fn(TyCtxt<'tcx>,
defined_lang_items::LocalKey<'tcx>)
-> defined_lang_items::ProvidedValue<'tcx>,
pub diagnostic_items: for<'tcx> fn(TyCtxt<'tcx>,
diagnostic_items::LocalKey<'tcx>)
-> diagnostic_items::ProvidedValue<'tcx>,
pub missing_lang_items: for<'tcx> fn(TyCtxt<'tcx>,
missing_lang_items::LocalKey<'tcx>)
-> missing_lang_items::ProvidedValue<'tcx>,
pub visible_parent_map: for<'tcx> fn(TyCtxt<'tcx>,
visible_parent_map::LocalKey<'tcx>)
-> visible_parent_map::ProvidedValue<'tcx>,
pub trimmed_def_paths: for<'tcx> fn(TyCtxt<'tcx>,
trimmed_def_paths::LocalKey<'tcx>)
-> trimmed_def_paths::ProvidedValue<'tcx>,
pub missing_extern_crate_item: for<'tcx> fn(TyCtxt<'tcx>,
missing_extern_crate_item::LocalKey<'tcx>)
-> missing_extern_crate_item::ProvidedValue<'tcx>,
pub used_crate_source: for<'tcx> fn(TyCtxt<'tcx>,
used_crate_source::LocalKey<'tcx>)
-> used_crate_source::ProvidedValue<'tcx>,
pub debugger_visualizers: for<'tcx> fn(TyCtxt<'tcx>,
debugger_visualizers::LocalKey<'tcx>)
-> debugger_visualizers::ProvidedValue<'tcx>,
pub postorder_cnums: for<'tcx> fn(TyCtxt<'tcx>,
postorder_cnums::LocalKey<'tcx>)
-> postorder_cnums::ProvidedValue<'tcx>,
pub is_private_dep: for<'tcx> fn(TyCtxt<'tcx>,
is_private_dep::LocalKey<'tcx>)
-> is_private_dep::ProvidedValue<'tcx>,
pub allocator_kind: for<'tcx> fn(TyCtxt<'tcx>,
allocator_kind::LocalKey<'tcx>)
-> allocator_kind::ProvidedValue<'tcx>,
pub alloc_error_handler_kind: for<'tcx> fn(TyCtxt<'tcx>,
alloc_error_handler_kind::LocalKey<'tcx>)
-> alloc_error_handler_kind::ProvidedValue<'tcx>,
pub upvars_mentioned: for<'tcx> fn(TyCtxt<'tcx>,
upvars_mentioned::LocalKey<'tcx>)
-> upvars_mentioned::ProvidedValue<'tcx>,
pub crates: for<'tcx> fn(TyCtxt<'tcx>, crates::LocalKey<'tcx>)
-> crates::ProvidedValue<'tcx>,
pub used_crates: for<'tcx> fn(TyCtxt<'tcx>, used_crates::LocalKey<'tcx>)
-> used_crates::ProvidedValue<'tcx>,
pub duplicate_crate_names: for<'tcx> fn(TyCtxt<'tcx>,
duplicate_crate_names::LocalKey<'tcx>)
-> duplicate_crate_names::ProvidedValue<'tcx>,
pub traits: for<'tcx> fn(TyCtxt<'tcx>, traits::LocalKey<'tcx>)
-> traits::ProvidedValue<'tcx>,
pub trait_impls_in_crate: for<'tcx> fn(TyCtxt<'tcx>,
trait_impls_in_crate::LocalKey<'tcx>)
-> trait_impls_in_crate::ProvidedValue<'tcx>,
pub stable_order_of_exportable_impls: for<'tcx> fn(TyCtxt<'tcx>,
stable_order_of_exportable_impls::LocalKey<'tcx>)
-> stable_order_of_exportable_impls::ProvidedValue<'tcx>,
pub exportable_items: for<'tcx> fn(TyCtxt<'tcx>,
exportable_items::LocalKey<'tcx>)
-> exportable_items::ProvidedValue<'tcx>,
pub exported_non_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>,
exported_non_generic_symbols::LocalKey<'tcx>)
-> exported_non_generic_symbols::ProvidedValue<'tcx>,
pub exported_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>,
exported_generic_symbols::LocalKey<'tcx>)
-> exported_generic_symbols::ProvidedValue<'tcx>,
pub collect_and_partition_mono_items: for<'tcx> fn(TyCtxt<'tcx>,
collect_and_partition_mono_items::LocalKey<'tcx>)
-> collect_and_partition_mono_items::ProvidedValue<'tcx>,
pub is_codegened_item: for<'tcx> fn(TyCtxt<'tcx>,
is_codegened_item::LocalKey<'tcx>)
-> is_codegened_item::ProvidedValue<'tcx>,
pub codegen_unit: for<'tcx> fn(TyCtxt<'tcx>, codegen_unit::LocalKey<'tcx>)
-> codegen_unit::ProvidedValue<'tcx>,
pub backend_optimization_level: for<'tcx> fn(TyCtxt<'tcx>,
backend_optimization_level::LocalKey<'tcx>)
-> backend_optimization_level::ProvidedValue<'tcx>,
pub output_filenames: for<'tcx> fn(TyCtxt<'tcx>,
output_filenames::LocalKey<'tcx>)
-> output_filenames::ProvidedValue<'tcx>,
pub normalize_canonicalized_projection: for<'tcx> fn(TyCtxt<'tcx>,
normalize_canonicalized_projection::LocalKey<'tcx>)
-> normalize_canonicalized_projection::ProvidedValue<'tcx>,
pub normalize_canonicalized_free_alias: for<'tcx> fn(TyCtxt<'tcx>,
normalize_canonicalized_free_alias::LocalKey<'tcx>)
-> normalize_canonicalized_free_alias::ProvidedValue<'tcx>,
pub normalize_canonicalized_inherent_projection: for<'tcx> fn(TyCtxt<'tcx>,
normalize_canonicalized_inherent_projection::LocalKey<'tcx>)
-> normalize_canonicalized_inherent_projection::ProvidedValue<'tcx>,
pub try_normalize_generic_arg_after_erasing_regions: for<'tcx> fn(TyCtxt<'tcx>,
try_normalize_generic_arg_after_erasing_regions::LocalKey<'tcx>)
->
try_normalize_generic_arg_after_erasing_regions::ProvidedValue<'tcx>,
pub implied_outlives_bounds: for<'tcx> fn(TyCtxt<'tcx>,
implied_outlives_bounds::LocalKey<'tcx>)
-> implied_outlives_bounds::ProvidedValue<'tcx>,
pub dropck_outlives: for<'tcx> fn(TyCtxt<'tcx>,
dropck_outlives::LocalKey<'tcx>)
-> dropck_outlives::ProvidedValue<'tcx>,
pub evaluate_obligation: for<'tcx> fn(TyCtxt<'tcx>,
evaluate_obligation::LocalKey<'tcx>)
-> evaluate_obligation::ProvidedValue<'tcx>,
pub type_op_ascribe_user_type: for<'tcx> fn(TyCtxt<'tcx>,
type_op_ascribe_user_type::LocalKey<'tcx>)
-> type_op_ascribe_user_type::ProvidedValue<'tcx>,
pub type_op_prove_predicate: for<'tcx> fn(TyCtxt<'tcx>,
type_op_prove_predicate::LocalKey<'tcx>)
-> type_op_prove_predicate::ProvidedValue<'tcx>,
pub type_op_normalize_ty: for<'tcx> fn(TyCtxt<'tcx>,
type_op_normalize_ty::LocalKey<'tcx>)
-> type_op_normalize_ty::ProvidedValue<'tcx>,
pub type_op_normalize_clause: for<'tcx> fn(TyCtxt<'tcx>,
type_op_normalize_clause::LocalKey<'tcx>)
-> type_op_normalize_clause::ProvidedValue<'tcx>,
pub type_op_normalize_poly_fn_sig: for<'tcx> fn(TyCtxt<'tcx>,
type_op_normalize_poly_fn_sig::LocalKey<'tcx>)
-> type_op_normalize_poly_fn_sig::ProvidedValue<'tcx>,
pub type_op_normalize_fn_sig: for<'tcx> fn(TyCtxt<'tcx>,
type_op_normalize_fn_sig::LocalKey<'tcx>)
-> type_op_normalize_fn_sig::ProvidedValue<'tcx>,
pub instantiate_and_check_impossible_predicates: for<'tcx> fn(TyCtxt<'tcx>,
instantiate_and_check_impossible_predicates::LocalKey<'tcx>)
-> instantiate_and_check_impossible_predicates::ProvidedValue<'tcx>,
pub is_impossible_associated_item: for<'tcx> fn(TyCtxt<'tcx>,
is_impossible_associated_item::LocalKey<'tcx>)
-> is_impossible_associated_item::ProvidedValue<'tcx>,
pub method_autoderef_steps: for<'tcx> fn(TyCtxt<'tcx>,
method_autoderef_steps::LocalKey<'tcx>)
-> method_autoderef_steps::ProvidedValue<'tcx>,
pub evaluate_root_goal_for_proof_tree_raw: for<'tcx> fn(TyCtxt<'tcx>,
evaluate_root_goal_for_proof_tree_raw::LocalKey<'tcx>)
-> evaluate_root_goal_for_proof_tree_raw::ProvidedValue<'tcx>,
pub rust_target_features: for<'tcx> fn(TyCtxt<'tcx>,
rust_target_features::LocalKey<'tcx>)
-> rust_target_features::ProvidedValue<'tcx>,
pub implied_target_features: for<'tcx> fn(TyCtxt<'tcx>,
implied_target_features::LocalKey<'tcx>)
-> implied_target_features::ProvidedValue<'tcx>,
pub features_query: for<'tcx> fn(TyCtxt<'tcx>,
features_query::LocalKey<'tcx>)
-> features_query::ProvidedValue<'tcx>,
pub crate_for_resolver: for<'tcx> fn(TyCtxt<'tcx>,
crate_for_resolver::LocalKey<'tcx>)
-> crate_for_resolver::ProvidedValue<'tcx>,
pub resolve_instance_raw: for<'tcx> fn(TyCtxt<'tcx>,
resolve_instance_raw::LocalKey<'tcx>)
-> resolve_instance_raw::ProvidedValue<'tcx>,
pub reveal_opaque_types_in_bounds: for<'tcx> fn(TyCtxt<'tcx>,
reveal_opaque_types_in_bounds::LocalKey<'tcx>)
-> reveal_opaque_types_in_bounds::ProvidedValue<'tcx>,
pub limits: for<'tcx> fn(TyCtxt<'tcx>, limits::LocalKey<'tcx>)
-> limits::ProvidedValue<'tcx>,
pub diagnostic_hir_wf_check: for<'tcx> fn(TyCtxt<'tcx>,
diagnostic_hir_wf_check::LocalKey<'tcx>)
-> diagnostic_hir_wf_check::ProvidedValue<'tcx>,
pub global_backend_features: for<'tcx> fn(TyCtxt<'tcx>,
global_backend_features::LocalKey<'tcx>)
-> global_backend_features::ProvidedValue<'tcx>,
pub check_validity_requirement: for<'tcx> fn(TyCtxt<'tcx>,
check_validity_requirement::LocalKey<'tcx>)
-> check_validity_requirement::ProvidedValue<'tcx>,
pub compare_impl_item: for<'tcx> fn(TyCtxt<'tcx>,
compare_impl_item::LocalKey<'tcx>)
-> compare_impl_item::ProvidedValue<'tcx>,
pub deduced_param_attrs: for<'tcx> fn(TyCtxt<'tcx>,
deduced_param_attrs::LocalKey<'tcx>)
-> deduced_param_attrs::ProvidedValue<'tcx>,
pub doc_link_resolutions: for<'tcx> fn(TyCtxt<'tcx>,
doc_link_resolutions::LocalKey<'tcx>)
-> doc_link_resolutions::ProvidedValue<'tcx>,
pub doc_link_traits_in_scope: for<'tcx> fn(TyCtxt<'tcx>,
doc_link_traits_in_scope::LocalKey<'tcx>)
-> doc_link_traits_in_scope::ProvidedValue<'tcx>,
pub stripped_cfg_items: for<'tcx> fn(TyCtxt<'tcx>,
stripped_cfg_items::LocalKey<'tcx>)
-> stripped_cfg_items::ProvidedValue<'tcx>,
pub generics_require_sized_self: for<'tcx> fn(TyCtxt<'tcx>,
generics_require_sized_self::LocalKey<'tcx>)
-> generics_require_sized_self::ProvidedValue<'tcx>,
pub cross_crate_inlinable: for<'tcx> fn(TyCtxt<'tcx>,
cross_crate_inlinable::LocalKey<'tcx>)
-> cross_crate_inlinable::ProvidedValue<'tcx>,
pub check_mono_item: for<'tcx> fn(TyCtxt<'tcx>,
check_mono_item::LocalKey<'tcx>)
-> check_mono_item::ProvidedValue<'tcx>,
pub skip_move_check_fns: for<'tcx> fn(TyCtxt<'tcx>,
skip_move_check_fns::LocalKey<'tcx>)
-> skip_move_check_fns::ProvidedValue<'tcx>,
pub items_of_instance: for<'tcx> fn(TyCtxt<'tcx>,
items_of_instance::LocalKey<'tcx>)
-> items_of_instance::ProvidedValue<'tcx>,
pub size_estimate: for<'tcx> fn(TyCtxt<'tcx>,
size_estimate::LocalKey<'tcx>) -> size_estimate::ProvidedValue<'tcx>,
pub anon_const_kind: for<'tcx> fn(TyCtxt<'tcx>,
anon_const_kind::LocalKey<'tcx>)
-> anon_const_kind::ProvidedValue<'tcx>,
pub trivial_const: for<'tcx> fn(TyCtxt<'tcx>,
trivial_const::LocalKey<'tcx>) -> trivial_const::ProvidedValue<'tcx>,
pub sanitizer_settings_for: for<'tcx> fn(TyCtxt<'tcx>,
sanitizer_settings_for::LocalKey<'tcx>)
-> sanitizer_settings_for::ProvidedValue<'tcx>,
pub check_externally_implementable_items: for<'tcx> fn(TyCtxt<'tcx>,
check_externally_implementable_items::LocalKey<'tcx>)
-> check_externally_implementable_items::ProvidedValue<'tcx>,
pub externally_implementable_items: for<'tcx> fn(TyCtxt<'tcx>,
externally_implementable_items::LocalKey<'tcx>)
-> externally_implementable_items::ProvidedValue<'tcx>,
}
pub struct ExternProviders {
pub derive_macro_expansion: (),
pub trigger_delayed_bug: (),
pub registered_tools: (),
pub early_lint_checks: (),
pub env_var_os: (),
pub resolutions: (),
pub resolver_for_lowering_raw: (),
pub source_span: (),
pub hir_crate: (),
pub hir_crate_items: (),
pub hir_module_items: (),
pub local_def_id_to_hir_id: (),
pub hir_owner_parent_q: (),
pub opt_hir_owner_nodes: (),
pub hir_attr_map: (),
pub opt_ast_lowering_delayed_lints: (),
pub const_param_default: for<'tcx> fn(TyCtxt<'tcx>,
const_param_default::Key<'tcx>)
-> const_param_default::ProvidedValue<'tcx>,
pub const_of_item: for<'tcx> fn(TyCtxt<'tcx>, const_of_item::Key<'tcx>)
-> const_of_item::ProvidedValue<'tcx>,
pub type_of: for<'tcx> fn(TyCtxt<'tcx>, type_of::Key<'tcx>)
-> type_of::ProvidedValue<'tcx>,
pub type_of_opaque: (),
pub type_of_opaque_hir_typeck: (),
pub type_alias_is_lazy: for<'tcx> fn(TyCtxt<'tcx>,
type_alias_is_lazy::Key<'tcx>)
-> type_alias_is_lazy::ProvidedValue<'tcx>,
pub collect_return_position_impl_trait_in_trait_tys: for<'tcx> fn(TyCtxt<'tcx>,
collect_return_position_impl_trait_in_trait_tys::Key<'tcx>)
->
collect_return_position_impl_trait_in_trait_tys::ProvidedValue<'tcx>,
pub opaque_ty_origin: for<'tcx> fn(TyCtxt<'tcx>,
opaque_ty_origin::Key<'tcx>) -> opaque_ty_origin::ProvidedValue<'tcx>,
pub unsizing_params_for_adt: (),
pub analysis: (),
pub check_expectations: (),
pub generics_of: for<'tcx> fn(TyCtxt<'tcx>, generics_of::Key<'tcx>)
-> generics_of::ProvidedValue<'tcx>,
pub predicates_of: (),
pub opaque_types_defined_by: (),
pub nested_bodies_within: (),
pub explicit_item_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_item_bounds::Key<'tcx>)
-> explicit_item_bounds::ProvidedValue<'tcx>,
pub explicit_item_self_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_item_self_bounds::Key<'tcx>)
-> explicit_item_self_bounds::ProvidedValue<'tcx>,
pub item_bounds: (),
pub item_self_bounds: (),
pub item_non_self_bounds: (),
pub impl_super_outlives: (),
pub native_libraries: for<'tcx> fn(TyCtxt<'tcx>,
native_libraries::Key<'tcx>) -> native_libraries::ProvidedValue<'tcx>,
pub shallow_lint_levels_on: (),
pub lint_expectations: (),
pub lints_that_dont_need_to_run: (),
pub expn_that_defined: for<'tcx> fn(TyCtxt<'tcx>,
expn_that_defined::Key<'tcx>)
-> expn_that_defined::ProvidedValue<'tcx>,
pub is_panic_runtime: for<'tcx> fn(TyCtxt<'tcx>,
is_panic_runtime::Key<'tcx>) -> is_panic_runtime::ProvidedValue<'tcx>,
pub representability: (),
pub representability_adt_ty: (),
pub params_in_repr: for<'tcx> fn(TyCtxt<'tcx>, params_in_repr::Key<'tcx>)
-> params_in_repr::ProvidedValue<'tcx>,
pub thir_body: (),
pub mir_keys: (),
pub mir_const_qualif: for<'tcx> fn(TyCtxt<'tcx>,
mir_const_qualif::Key<'tcx>) -> mir_const_qualif::ProvidedValue<'tcx>,
pub mir_built: (),
pub thir_abstract_const: for<'tcx> fn(TyCtxt<'tcx>,
thir_abstract_const::Key<'tcx>)
-> thir_abstract_const::ProvidedValue<'tcx>,
pub mir_drops_elaborated_and_const_checked: (),
pub mir_for_ctfe: for<'tcx> fn(TyCtxt<'tcx>, mir_for_ctfe::Key<'tcx>)
-> mir_for_ctfe::ProvidedValue<'tcx>,
pub mir_promoted: (),
pub closure_typeinfo: (),
pub closure_saved_names_of_captured_variables: for<'tcx> fn(TyCtxt<'tcx>,
closure_saved_names_of_captured_variables::Key<'tcx>)
-> closure_saved_names_of_captured_variables::ProvidedValue<'tcx>,
pub mir_coroutine_witnesses: for<'tcx> fn(TyCtxt<'tcx>,
mir_coroutine_witnesses::Key<'tcx>)
-> mir_coroutine_witnesses::ProvidedValue<'tcx>,
pub check_coroutine_obligations: (),
pub check_potentially_region_dependent_goals: (),
pub optimized_mir: for<'tcx> fn(TyCtxt<'tcx>, optimized_mir::Key<'tcx>)
-> optimized_mir::ProvidedValue<'tcx>,
pub coverage_attr_on: (),
pub coverage_ids_info: (),
pub promoted_mir: for<'tcx> fn(TyCtxt<'tcx>, promoted_mir::Key<'tcx>)
-> promoted_mir::ProvidedValue<'tcx>,
pub erase_and_anonymize_regions_ty: (),
pub wasm_import_module_map: (),
pub trait_explicit_predicates_and_bounds: (),
pub explicit_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_predicates_of::Key<'tcx>)
-> explicit_predicates_of::ProvidedValue<'tcx>,
pub inferred_outlives_of: for<'tcx> fn(TyCtxt<'tcx>,
inferred_outlives_of::Key<'tcx>)
-> inferred_outlives_of::ProvidedValue<'tcx>,
pub explicit_super_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_super_predicates_of::Key<'tcx>)
-> explicit_super_predicates_of::ProvidedValue<'tcx>,
pub explicit_implied_predicates_of: for<'tcx> fn(TyCtxt<'tcx>,
explicit_implied_predicates_of::Key<'tcx>)
-> explicit_implied_predicates_of::ProvidedValue<'tcx>,
pub explicit_supertraits_containing_assoc_item: (),
pub const_conditions: for<'tcx> fn(TyCtxt<'tcx>,
const_conditions::Key<'tcx>) -> const_conditions::ProvidedValue<'tcx>,
pub explicit_implied_const_bounds: for<'tcx> fn(TyCtxt<'tcx>,
explicit_implied_const_bounds::Key<'tcx>)
-> explicit_implied_const_bounds::ProvidedValue<'tcx>,
pub type_param_predicates: (),
pub trait_def: for<'tcx> fn(TyCtxt<'tcx>, trait_def::Key<'tcx>)
-> trait_def::ProvidedValue<'tcx>,
pub adt_def: for<'tcx> fn(TyCtxt<'tcx>, adt_def::Key<'tcx>)
-> adt_def::ProvidedValue<'tcx>,
pub adt_destructor: for<'tcx> fn(TyCtxt<'tcx>, adt_destructor::Key<'tcx>)
-> adt_destructor::ProvidedValue<'tcx>,
pub adt_async_destructor: for<'tcx> fn(TyCtxt<'tcx>,
adt_async_destructor::Key<'tcx>)
-> adt_async_destructor::ProvidedValue<'tcx>,
pub adt_sizedness_constraint: (),
pub adt_dtorck_constraint: (),
pub constness: for<'tcx> fn(TyCtxt<'tcx>, constness::Key<'tcx>)
-> constness::ProvidedValue<'tcx>,
pub asyncness: for<'tcx> fn(TyCtxt<'tcx>, asyncness::Key<'tcx>)
-> asyncness::ProvidedValue<'tcx>,
pub is_promotable_const_fn: (),
pub coroutine_by_move_body_def_id: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_by_move_body_def_id::Key<'tcx>)
-> coroutine_by_move_body_def_id::ProvidedValue<'tcx>,
pub coroutine_kind: for<'tcx> fn(TyCtxt<'tcx>, coroutine_kind::Key<'tcx>)
-> coroutine_kind::ProvidedValue<'tcx>,
pub coroutine_for_closure: for<'tcx> fn(TyCtxt<'tcx>,
coroutine_for_closure::Key<'tcx>)
-> coroutine_for_closure::ProvidedValue<'tcx>,
pub coroutine_hidden_types: (),
pub crate_variances: (),
pub variances_of: for<'tcx> fn(TyCtxt<'tcx>, variances_of::Key<'tcx>)
-> variances_of::ProvidedValue<'tcx>,
pub inferred_outlives_crate: (),
pub associated_item_def_ids: for<'tcx> fn(TyCtxt<'tcx>,
associated_item_def_ids::Key<'tcx>)
-> associated_item_def_ids::ProvidedValue<'tcx>,
pub associated_item: for<'tcx> fn(TyCtxt<'tcx>,
associated_item::Key<'tcx>) -> associated_item::ProvidedValue<'tcx>,
pub associated_items: (),
pub impl_item_implementor_ids: (),
pub associated_types_for_impl_traits_in_trait_or_impl: for<'tcx> fn(TyCtxt<'tcx>,
associated_types_for_impl_traits_in_trait_or_impl::Key<'tcx>)
->
associated_types_for_impl_traits_in_trait_or_impl::ProvidedValue<'tcx>,
pub impl_trait_header: for<'tcx> fn(TyCtxt<'tcx>,
impl_trait_header::Key<'tcx>)
-> impl_trait_header::ProvidedValue<'tcx>,
pub impl_self_is_guaranteed_unsized: (),
pub inherent_impls: for<'tcx> fn(TyCtxt<'tcx>, inherent_impls::Key<'tcx>)
-> inherent_impls::ProvidedValue<'tcx>,
pub incoherent_impls: (),
pub check_transmutes: (),
pub check_unsafety: (),
pub check_tail_calls: (),
pub assumed_wf_types: (),
pub assumed_wf_types_for_rpitit: for<'tcx> fn(TyCtxt<'tcx>,
assumed_wf_types_for_rpitit::Key<'tcx>)
-> assumed_wf_types_for_rpitit::ProvidedValue<'tcx>,
pub fn_sig: for<'tcx> fn(TyCtxt<'tcx>, fn_sig::Key<'tcx>)
-> fn_sig::ProvidedValue<'tcx>,
pub lint_mod: (),
pub check_unused_traits: (),
pub check_mod_attrs: (),
pub check_mod_unstable_api_usage: (),
pub check_mod_privacy: (),
pub check_liveness: (),
pub live_symbols_and_ignored_derived_traits: (),
pub check_mod_deathness: (),
pub check_type_wf: (),
pub coerce_unsized_info: for<'tcx> fn(TyCtxt<'tcx>,
coerce_unsized_info::Key<'tcx>)
-> coerce_unsized_info::ProvidedValue<'tcx>,
pub typeck: (),
pub used_trait_imports: (),
pub coherent_trait: (),
pub mir_borrowck: (),
pub crate_inherent_impls: (),
pub crate_inherent_impls_validity_check: (),
pub crate_inherent_impls_overlap_check: (),
pub orphan_check_impl: (),
pub mir_callgraph_cyclic: (),
pub mir_inliner_callees: (),
pub tag_for_variant: (),
pub eval_to_allocation_raw: (),
pub eval_static_initializer: for<'tcx> fn(TyCtxt<'tcx>,
eval_static_initializer::Key<'tcx>)
-> eval_static_initializer::ProvidedValue<'tcx>,
pub eval_to_const_value_raw: (),
pub eval_to_valtree: (),
pub valtree_to_const_val: (),
pub lit_to_const: (),
pub check_match: (),
pub effective_visibilities: (),
pub check_private_in_public: (),
pub reachable_set: (),
pub region_scope_tree: (),
pub mir_shims: (),
pub symbol_name: (),
pub def_kind: for<'tcx> fn(TyCtxt<'tcx>, def_kind::Key<'tcx>)
-> def_kind::ProvidedValue<'tcx>,
pub def_span: for<'tcx> fn(TyCtxt<'tcx>, def_span::Key<'tcx>)
-> def_span::ProvidedValue<'tcx>,
pub def_ident_span: for<'tcx> fn(TyCtxt<'tcx>, def_ident_span::Key<'tcx>)
-> def_ident_span::ProvidedValue<'tcx>,
pub ty_span: (),
pub lookup_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_stability::Key<'tcx>) -> lookup_stability::ProvidedValue<'tcx>,
pub lookup_const_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_const_stability::Key<'tcx>)
-> lookup_const_stability::ProvidedValue<'tcx>,
pub lookup_default_body_stability: for<'tcx> fn(TyCtxt<'tcx>,
lookup_default_body_stability::Key<'tcx>)
-> lookup_default_body_stability::ProvidedValue<'tcx>,
pub should_inherit_track_caller: (),
pub inherited_align: (),
pub lookup_deprecation_entry: for<'tcx> fn(TyCtxt<'tcx>,
lookup_deprecation_entry::Key<'tcx>)
-> lookup_deprecation_entry::ProvidedValue<'tcx>,
pub is_doc_hidden: for<'tcx> fn(TyCtxt<'tcx>, is_doc_hidden::Key<'tcx>)
-> is_doc_hidden::ProvidedValue<'tcx>,
pub is_doc_notable_trait: (),
pub attrs_for_def: for<'tcx> fn(TyCtxt<'tcx>, attrs_for_def::Key<'tcx>)
-> attrs_for_def::ProvidedValue<'tcx>,
pub codegen_fn_attrs: for<'tcx> fn(TyCtxt<'tcx>,
codegen_fn_attrs::Key<'tcx>) -> codegen_fn_attrs::ProvidedValue<'tcx>,
pub asm_target_features: (),
pub fn_arg_idents: for<'tcx> fn(TyCtxt<'tcx>, fn_arg_idents::Key<'tcx>)
-> fn_arg_idents::ProvidedValue<'tcx>,
pub rendered_const: for<'tcx> fn(TyCtxt<'tcx>, rendered_const::Key<'tcx>)
-> rendered_const::ProvidedValue<'tcx>,
pub rendered_precise_capturing_args: for<'tcx> fn(TyCtxt<'tcx>,
rendered_precise_capturing_args::Key<'tcx>)
-> rendered_precise_capturing_args::ProvidedValue<'tcx>,
pub impl_parent: for<'tcx> fn(TyCtxt<'tcx>, impl_parent::Key<'tcx>)
-> impl_parent::ProvidedValue<'tcx>,
pub is_mir_available: for<'tcx> fn(TyCtxt<'tcx>,
is_mir_available::Key<'tcx>) -> is_mir_available::ProvidedValue<'tcx>,
pub own_existential_vtable_entries: (),
pub vtable_entries: (),
pub first_method_vtable_slot: (),
pub supertrait_vtable_slot: (),
pub vtable_allocation: (),
pub codegen_select_candidate: (),
pub all_local_trait_impls: (),
pub local_trait_impls: (),
pub trait_impls_of: (),
pub specialization_graph_of: (),
pub dyn_compatibility_violations: (),
pub is_dyn_compatible: (),
pub param_env: (),
pub typing_env_normalized_for_post_analysis: (),
pub is_copy_raw: (),
pub is_use_cloned_raw: (),
pub is_sized_raw: (),
pub is_freeze_raw: (),
pub is_unpin_raw: (),
pub is_async_drop_raw: (),
pub needs_drop_raw: (),
pub needs_async_drop_raw: (),
pub has_significant_drop_raw: (),
pub has_structural_eq_impl: (),
pub adt_drop_tys: (),
pub adt_async_drop_tys: (),
pub adt_significant_drop_tys: (),
pub list_significant_drop_tys: (),
pub layout_of: (),
pub fn_abi_of_fn_ptr: (),
pub fn_abi_of_instance: (),
pub dylib_dependency_formats: for<'tcx> fn(TyCtxt<'tcx>,
dylib_dependency_formats::Key<'tcx>)
-> dylib_dependency_formats::ProvidedValue<'tcx>,
pub dependency_formats: (),
pub is_compiler_builtins: for<'tcx> fn(TyCtxt<'tcx>,
is_compiler_builtins::Key<'tcx>)
-> is_compiler_builtins::ProvidedValue<'tcx>,
pub has_global_allocator: for<'tcx> fn(TyCtxt<'tcx>,
has_global_allocator::Key<'tcx>)
-> has_global_allocator::ProvidedValue<'tcx>,
pub has_alloc_error_handler: for<'tcx> fn(TyCtxt<'tcx>,
has_alloc_error_handler::Key<'tcx>)
-> has_alloc_error_handler::ProvidedValue<'tcx>,
pub has_panic_handler: for<'tcx> fn(TyCtxt<'tcx>,
has_panic_handler::Key<'tcx>)
-> has_panic_handler::ProvidedValue<'tcx>,
pub is_profiler_runtime: for<'tcx> fn(TyCtxt<'tcx>,
is_profiler_runtime::Key<'tcx>)
-> is_profiler_runtime::ProvidedValue<'tcx>,
pub has_ffi_unwind_calls: (),
pub required_panic_strategy: for<'tcx> fn(TyCtxt<'tcx>,
required_panic_strategy::Key<'tcx>)
-> required_panic_strategy::ProvidedValue<'tcx>,
pub panic_in_drop_strategy: for<'tcx> fn(TyCtxt<'tcx>,
panic_in_drop_strategy::Key<'tcx>)
-> panic_in_drop_strategy::ProvidedValue<'tcx>,
pub is_no_builtins: for<'tcx> fn(TyCtxt<'tcx>, is_no_builtins::Key<'tcx>)
-> is_no_builtins::ProvidedValue<'tcx>,
pub symbol_mangling_version: for<'tcx> fn(TyCtxt<'tcx>,
symbol_mangling_version::Key<'tcx>)
-> symbol_mangling_version::ProvidedValue<'tcx>,
pub extern_crate: for<'tcx> fn(TyCtxt<'tcx>, extern_crate::Key<'tcx>)
-> extern_crate::ProvidedValue<'tcx>,
pub specialization_enabled_in: for<'tcx> fn(TyCtxt<'tcx>,
specialization_enabled_in::Key<'tcx>)
-> specialization_enabled_in::ProvidedValue<'tcx>,
pub specializes: (),
pub in_scope_traits_map: (),
pub defaultness: for<'tcx> fn(TyCtxt<'tcx>, defaultness::Key<'tcx>)
-> defaultness::ProvidedValue<'tcx>,
pub default_field: for<'tcx> fn(TyCtxt<'tcx>, default_field::Key<'tcx>)
-> default_field::ProvidedValue<'tcx>,
pub check_well_formed: (),
pub enforce_impl_non_lifetime_params_are_constrained: (),
pub reachable_non_generics: for<'tcx> fn(TyCtxt<'tcx>,
reachable_non_generics::Key<'tcx>)
-> reachable_non_generics::ProvidedValue<'tcx>,
pub is_reachable_non_generic: for<'tcx> fn(TyCtxt<'tcx>,
is_reachable_non_generic::Key<'tcx>)
-> is_reachable_non_generic::ProvidedValue<'tcx>,
pub is_unreachable_local_definition: (),
pub upstream_monomorphizations: (),
pub upstream_monomorphizations_for: for<'tcx> fn(TyCtxt<'tcx>,
upstream_monomorphizations_for::Key<'tcx>)
-> upstream_monomorphizations_for::ProvidedValue<'tcx>,
pub upstream_drop_glue_for: (),
pub upstream_async_drop_glue_for: (),
pub foreign_modules: for<'tcx> fn(TyCtxt<'tcx>,
foreign_modules::Key<'tcx>) -> foreign_modules::ProvidedValue<'tcx>,
pub clashing_extern_declarations: (),
pub entry_fn: (),
pub proc_macro_decls_static: (),
pub crate_hash: for<'tcx> fn(TyCtxt<'tcx>, crate_hash::Key<'tcx>)
-> crate_hash::ProvidedValue<'tcx>,
pub crate_host_hash: for<'tcx> fn(TyCtxt<'tcx>,
crate_host_hash::Key<'tcx>) -> crate_host_hash::ProvidedValue<'tcx>,
pub extra_filename: for<'tcx> fn(TyCtxt<'tcx>, extra_filename::Key<'tcx>)
-> extra_filename::ProvidedValue<'tcx>,
pub crate_extern_paths: for<'tcx> fn(TyCtxt<'tcx>,
crate_extern_paths::Key<'tcx>)
-> crate_extern_paths::ProvidedValue<'tcx>,
pub implementations_of_trait: for<'tcx> fn(TyCtxt<'tcx>,
implementations_of_trait::Key<'tcx>)
-> implementations_of_trait::ProvidedValue<'tcx>,
pub crate_incoherent_impls: for<'tcx> fn(TyCtxt<'tcx>,
crate_incoherent_impls::Key<'tcx>)
-> crate_incoherent_impls::ProvidedValue<'tcx>,
pub native_library: (),
pub inherit_sig_for_delegation_item: (),
pub resolve_bound_vars: (),
pub named_variable_map: (),
pub is_late_bound_map: (),
pub object_lifetime_default: for<'tcx> fn(TyCtxt<'tcx>,
object_lifetime_default::Key<'tcx>)
-> object_lifetime_default::ProvidedValue<'tcx>,
pub late_bound_vars_map: (),
pub opaque_captured_lifetimes: (),
pub visibility: for<'tcx> fn(TyCtxt<'tcx>, visibility::Key<'tcx>)
-> visibility::ProvidedValue<'tcx>,
pub inhabited_predicate_adt: (),
pub inhabited_predicate_type: (),
pub dep_kind: for<'tcx> fn(TyCtxt<'tcx>, dep_kind::Key<'tcx>)
-> dep_kind::ProvidedValue<'tcx>,
pub crate_name: for<'tcx> fn(TyCtxt<'tcx>, crate_name::Key<'tcx>)
-> crate_name::ProvidedValue<'tcx>,
pub module_children: for<'tcx> fn(TyCtxt<'tcx>,
module_children::Key<'tcx>) -> module_children::ProvidedValue<'tcx>,
pub num_extern_def_ids: for<'tcx> fn(TyCtxt<'tcx>,
num_extern_def_ids::Key<'tcx>)
-> num_extern_def_ids::ProvidedValue<'tcx>,
pub lib_features: for<'tcx> fn(TyCtxt<'tcx>, lib_features::Key<'tcx>)
-> lib_features::ProvidedValue<'tcx>,
pub stability_implications: for<'tcx> fn(TyCtxt<'tcx>,
stability_implications::Key<'tcx>)
-> stability_implications::ProvidedValue<'tcx>,
pub intrinsic_raw: for<'tcx> fn(TyCtxt<'tcx>, intrinsic_raw::Key<'tcx>)
-> intrinsic_raw::ProvidedValue<'tcx>,
pub get_lang_items: (),
pub all_diagnostic_items: (),
pub defined_lang_items: for<'tcx> fn(TyCtxt<'tcx>,
defined_lang_items::Key<'tcx>)
-> defined_lang_items::ProvidedValue<'tcx>,
pub diagnostic_items: for<'tcx> fn(TyCtxt<'tcx>,
diagnostic_items::Key<'tcx>) -> diagnostic_items::ProvidedValue<'tcx>,
pub missing_lang_items: for<'tcx> fn(TyCtxt<'tcx>,
missing_lang_items::Key<'tcx>)
-> missing_lang_items::ProvidedValue<'tcx>,
pub visible_parent_map: (),
pub trimmed_def_paths: (),
pub missing_extern_crate_item: for<'tcx> fn(TyCtxt<'tcx>,
missing_extern_crate_item::Key<'tcx>)
-> missing_extern_crate_item::ProvidedValue<'tcx>,
pub used_crate_source: for<'tcx> fn(TyCtxt<'tcx>,
used_crate_source::Key<'tcx>)
-> used_crate_source::ProvidedValue<'tcx>,
pub debugger_visualizers: for<'tcx> fn(TyCtxt<'tcx>,
debugger_visualizers::Key<'tcx>)
-> debugger_visualizers::ProvidedValue<'tcx>,
pub postorder_cnums: (),
pub is_private_dep: for<'tcx> fn(TyCtxt<'tcx>, is_private_dep::Key<'tcx>)
-> is_private_dep::ProvidedValue<'tcx>,
pub allocator_kind: (),
pub alloc_error_handler_kind: (),
pub upvars_mentioned: (),
pub crates: (),
pub used_crates: (),
pub duplicate_crate_names: (),
pub traits: for<'tcx> fn(TyCtxt<'tcx>, traits::Key<'tcx>)
-> traits::ProvidedValue<'tcx>,
pub trait_impls_in_crate: for<'tcx> fn(TyCtxt<'tcx>,
trait_impls_in_crate::Key<'tcx>)
-> trait_impls_in_crate::ProvidedValue<'tcx>,
pub stable_order_of_exportable_impls: for<'tcx> fn(TyCtxt<'tcx>,
stable_order_of_exportable_impls::Key<'tcx>)
-> stable_order_of_exportable_impls::ProvidedValue<'tcx>,
pub exportable_items: for<'tcx> fn(TyCtxt<'tcx>,
exportable_items::Key<'tcx>) -> exportable_items::ProvidedValue<'tcx>,
pub exported_non_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>,
exported_non_generic_symbols::Key<'tcx>)
-> exported_non_generic_symbols::ProvidedValue<'tcx>,
pub exported_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>,
exported_generic_symbols::Key<'tcx>)
-> exported_generic_symbols::ProvidedValue<'tcx>,
pub collect_and_partition_mono_items: (),
pub is_codegened_item: (),
pub codegen_unit: (),
pub backend_optimization_level: (),
pub output_filenames: (),
pub normalize_canonicalized_projection: (),
pub normalize_canonicalized_free_alias: (),
pub normalize_canonicalized_inherent_projection: (),
pub try_normalize_generic_arg_after_erasing_regions: (),
pub implied_outlives_bounds: (),
pub dropck_outlives: (),
pub evaluate_obligation: (),
pub type_op_ascribe_user_type: (),
pub type_op_prove_predicate: (),
pub type_op_normalize_ty: (),
pub type_op_normalize_clause: (),
pub type_op_normalize_poly_fn_sig: (),
pub type_op_normalize_fn_sig: (),
pub instantiate_and_check_impossible_predicates: (),
pub is_impossible_associated_item: (),
pub method_autoderef_steps: (),
pub evaluate_root_goal_for_proof_tree_raw: (),
pub rust_target_features: (),
pub implied_target_features: (),
pub features_query: (),
pub crate_for_resolver: (),
pub resolve_instance_raw: (),
pub reveal_opaque_types_in_bounds: (),
pub limits: (),
pub diagnostic_hir_wf_check: (),
pub global_backend_features: (),
pub check_validity_requirement: (),
pub compare_impl_item: (),
pub deduced_param_attrs: for<'tcx> fn(TyCtxt<'tcx>,
deduced_param_attrs::Key<'tcx>)
-> deduced_param_attrs::ProvidedValue<'tcx>,
pub doc_link_resolutions: for<'tcx> fn(TyCtxt<'tcx>,
doc_link_resolutions::Key<'tcx>)
-> doc_link_resolutions::ProvidedValue<'tcx>,
pub doc_link_traits_in_scope: for<'tcx> fn(TyCtxt<'tcx>,
doc_link_traits_in_scope::Key<'tcx>)
-> doc_link_traits_in_scope::ProvidedValue<'tcx>,
pub stripped_cfg_items: for<'tcx> fn(TyCtxt<'tcx>,
stripped_cfg_items::Key<'tcx>)
-> stripped_cfg_items::ProvidedValue<'tcx>,
pub generics_require_sized_self: (),
pub cross_crate_inlinable: for<'tcx> fn(TyCtxt<'tcx>,
cross_crate_inlinable::Key<'tcx>)
-> cross_crate_inlinable::ProvidedValue<'tcx>,
pub check_mono_item: (),
pub skip_move_check_fns: (),
pub items_of_instance: (),
pub size_estimate: (),
pub anon_const_kind: for<'tcx> fn(TyCtxt<'tcx>,
anon_const_kind::Key<'tcx>) -> anon_const_kind::ProvidedValue<'tcx>,
pub trivial_const: for<'tcx> fn(TyCtxt<'tcx>, trivial_const::Key<'tcx>)
-> trivial_const::ProvidedValue<'tcx>,
pub sanitizer_settings_for: (),
pub check_externally_implementable_items: (),
pub externally_implementable_items: for<'tcx> fn(TyCtxt<'tcx>,
externally_implementable_items::Key<'tcx>)
-> externally_implementable_items::ProvidedValue<'tcx>,
}
impl Default for Providers {
fn default() -> Self {
Providers {
derive_macro_expansion: |_, key|
crate::query::plumbing::default_query("derive_macro_expansion",
&key),
trigger_delayed_bug: |_, key|
crate::query::plumbing::default_query("trigger_delayed_bug",
&key),
registered_tools: |_, key|
crate::query::plumbing::default_query("registered_tools",
&key),
early_lint_checks: |_, key|
crate::query::plumbing::default_query("early_lint_checks",
&key),
env_var_os: |_, key|
crate::query::plumbing::default_query("env_var_os", &key),
resolutions: |_, key|
crate::query::plumbing::default_query("resolutions", &key),
resolver_for_lowering_raw: |_, key|
crate::query::plumbing::default_query("resolver_for_lowering_raw",
&key),
source_span: |_, key|
crate::query::plumbing::default_query("source_span", &key),
hir_crate: |_, key|
crate::query::plumbing::default_query("hir_crate", &key),
hir_crate_items: |_, key|
crate::query::plumbing::default_query("hir_crate_items",
&key),
hir_module_items: |_, key|
crate::query::plumbing::default_query("hir_module_items",
&key),
local_def_id_to_hir_id: |_, key|
crate::query::plumbing::default_query("local_def_id_to_hir_id",
&key),
hir_owner_parent_q: |_, key|
crate::query::plumbing::default_query("hir_owner_parent_q",
&key),
opt_hir_owner_nodes: |_, key|
crate::query::plumbing::default_query("opt_hir_owner_nodes",
&key),
hir_attr_map: |_, key|
crate::query::plumbing::default_query("hir_attr_map", &key),
opt_ast_lowering_delayed_lints: |_, key|
crate::query::plumbing::default_query("opt_ast_lowering_delayed_lints",
&key),
const_param_default: |_, key|
crate::query::plumbing::default_query("const_param_default",
&key),
const_of_item: |_, key|
crate::query::plumbing::default_query("const_of_item", &key),
type_of: |_, key|
crate::query::plumbing::default_query("type_of", &key),
type_of_opaque: |_, key|
crate::query::plumbing::default_query("type_of_opaque", &key),
type_of_opaque_hir_typeck: |_, key|
crate::query::plumbing::default_query("type_of_opaque_hir_typeck",
&key),
type_alias_is_lazy: |_, key|
crate::query::plumbing::default_query("type_alias_is_lazy",
&key),
collect_return_position_impl_trait_in_trait_tys: |_, key|
crate::query::plumbing::default_query("collect_return_position_impl_trait_in_trait_tys",
&key),
opaque_ty_origin: |_, key|
crate::query::plumbing::default_query("opaque_ty_origin",
&key),
unsizing_params_for_adt: |_, key|
crate::query::plumbing::default_query("unsizing_params_for_adt",
&key),
analysis: |_, key|
crate::query::plumbing::default_query("analysis", &key),
check_expectations: |_, key|
crate::query::plumbing::default_query("check_expectations",
&key),
generics_of: |_, key|
crate::query::plumbing::default_query("generics_of", &key),
predicates_of: |_, key|
crate::query::plumbing::default_query("predicates_of", &key),
opaque_types_defined_by: |_, key|
crate::query::plumbing::default_query("opaque_types_defined_by",
&key),
nested_bodies_within: |_, key|
crate::query::plumbing::default_query("nested_bodies_within",
&key),
explicit_item_bounds: |_, key|
crate::query::plumbing::default_query("explicit_item_bounds",
&key),
explicit_item_self_bounds: |_, key|
crate::query::plumbing::default_query("explicit_item_self_bounds",
&key),
item_bounds: |_, key|
crate::query::plumbing::default_query("item_bounds", &key),
item_self_bounds: |_, key|
crate::query::plumbing::default_query("item_self_bounds",
&key),
item_non_self_bounds: |_, key|
crate::query::plumbing::default_query("item_non_self_bounds",
&key),
impl_super_outlives: |_, key|
crate::query::plumbing::default_query("impl_super_outlives",
&key),
native_libraries: |_, key|
crate::query::plumbing::default_query("native_libraries",
&key),
shallow_lint_levels_on: |_, key|
crate::query::plumbing::default_query("shallow_lint_levels_on",
&key),
lint_expectations: |_, key|
crate::query::plumbing::default_query("lint_expectations",
&key),
lints_that_dont_need_to_run: |_, key|
crate::query::plumbing::default_query("lints_that_dont_need_to_run",
&key),
expn_that_defined: |_, key|
crate::query::plumbing::default_query("expn_that_defined",
&key),
is_panic_runtime: |_, key|
crate::query::plumbing::default_query("is_panic_runtime",
&key),
representability: |_, key|
crate::query::plumbing::default_query("representability",
&key),
representability_adt_ty: |_, key|
crate::query::plumbing::default_query("representability_adt_ty",
&key),
params_in_repr: |_, key|
crate::query::plumbing::default_query("params_in_repr", &key),
thir_body: |_, key|
crate::query::plumbing::default_query("thir_body", &key),
mir_keys: |_, key|
crate::query::plumbing::default_query("mir_keys", &key),
mir_const_qualif: |_, key|
crate::query::plumbing::default_query("mir_const_qualif",
&key),
mir_built: |_, key|
crate::query::plumbing::default_query("mir_built", &key),
thir_abstract_const: |_, key|
crate::query::plumbing::default_query("thir_abstract_const",
&key),
mir_drops_elaborated_and_const_checked: |_, key|
crate::query::plumbing::default_query("mir_drops_elaborated_and_const_checked",
&key),
mir_for_ctfe: |_, key|
crate::query::plumbing::default_query("mir_for_ctfe", &key),
mir_promoted: |_, key|
crate::query::plumbing::default_query("mir_promoted", &key),
closure_typeinfo: |_, key|
crate::query::plumbing::default_query("closure_typeinfo",
&key),
closure_saved_names_of_captured_variables: |_, key|
crate::query::plumbing::default_query("closure_saved_names_of_captured_variables",
&key),
mir_coroutine_witnesses: |_, key|
crate::query::plumbing::default_query("mir_coroutine_witnesses",
&key),
check_coroutine_obligations: |_, key|
crate::query::plumbing::default_query("check_coroutine_obligations",
&key),
check_potentially_region_dependent_goals: |_, key|
crate::query::plumbing::default_query("check_potentially_region_dependent_goals",
&key),
optimized_mir: |_, key|
crate::query::plumbing::default_query("optimized_mir", &key),
coverage_attr_on: |_, key|
crate::query::plumbing::default_query("coverage_attr_on",
&key),
coverage_ids_info: |_, key|
crate::query::plumbing::default_query("coverage_ids_info",
&key),
promoted_mir: |_, key|
crate::query::plumbing::default_query("promoted_mir", &key),
erase_and_anonymize_regions_ty: |_, key|
crate::query::plumbing::default_query("erase_and_anonymize_regions_ty",
&key),
wasm_import_module_map: |_, key|
crate::query::plumbing::default_query("wasm_import_module_map",
&key),
trait_explicit_predicates_and_bounds: |_, key|
crate::query::plumbing::default_query("trait_explicit_predicates_and_bounds",
&key),
explicit_predicates_of: |_, key|
crate::query::plumbing::default_query("explicit_predicates_of",
&key),
inferred_outlives_of: |_, key|
crate::query::plumbing::default_query("inferred_outlives_of",
&key),
explicit_super_predicates_of: |_, key|
crate::query::plumbing::default_query("explicit_super_predicates_of",
&key),
explicit_implied_predicates_of: |_, key|
crate::query::plumbing::default_query("explicit_implied_predicates_of",
&key),
explicit_supertraits_containing_assoc_item: |_, key|
crate::query::plumbing::default_query("explicit_supertraits_containing_assoc_item",
&key),
const_conditions: |_, key|
crate::query::plumbing::default_query("const_conditions",
&key),
explicit_implied_const_bounds: |_, key|
crate::query::plumbing::default_query("explicit_implied_const_bounds",
&key),
type_param_predicates: |_, key|
crate::query::plumbing::default_query("type_param_predicates",
&key),
trait_def: |_, key|
crate::query::plumbing::default_query("trait_def", &key),
adt_def: |_, key|
crate::query::plumbing::default_query("adt_def", &key),
adt_destructor: |_, key|
crate::query::plumbing::default_query("adt_destructor", &key),
adt_async_destructor: |_, key|
crate::query::plumbing::default_query("adt_async_destructor",
&key),
adt_sizedness_constraint: |_, key|
crate::query::plumbing::default_query("adt_sizedness_constraint",
&key),
adt_dtorck_constraint: |_, key|
crate::query::plumbing::default_query("adt_dtorck_constraint",
&key),
constness: |_, key|
crate::query::plumbing::default_query("constness", &key),
asyncness: |_, key|
crate::query::plumbing::default_query("asyncness", &key),
is_promotable_const_fn: |_, key|
crate::query::plumbing::default_query("is_promotable_const_fn",
&key),
coroutine_by_move_body_def_id: |_, key|
crate::query::plumbing::default_query("coroutine_by_move_body_def_id",
&key),
coroutine_kind: |_, key|
crate::query::plumbing::default_query("coroutine_kind", &key),
coroutine_for_closure: |_, key|
crate::query::plumbing::default_query("coroutine_for_closure",
&key),
coroutine_hidden_types: |_, key|
crate::query::plumbing::default_query("coroutine_hidden_types",
&key),
crate_variances: |_, key|
crate::query::plumbing::default_query("crate_variances",
&key),
variances_of: |_, key|
crate::query::plumbing::default_query("variances_of", &key),
inferred_outlives_crate: |_, key|
crate::query::plumbing::default_query("inferred_outlives_crate",
&key),
associated_item_def_ids: |_, key|
crate::query::plumbing::default_query("associated_item_def_ids",
&key),
associated_item: |_, key|
crate::query::plumbing::default_query("associated_item",
&key),
associated_items: |_, key|
crate::query::plumbing::default_query("associated_items",
&key),
impl_item_implementor_ids: |_, key|
crate::query::plumbing::default_query("impl_item_implementor_ids",
&key),
associated_types_for_impl_traits_in_trait_or_impl: |_, key|
crate::query::plumbing::default_query("associated_types_for_impl_traits_in_trait_or_impl",
&key),
impl_trait_header: |_, key|
crate::query::plumbing::default_query("impl_trait_header",
&key),
impl_self_is_guaranteed_unsized: |_, key|
crate::query::plumbing::default_query("impl_self_is_guaranteed_unsized",
&key),
inherent_impls: |_, key|
crate::query::plumbing::default_query("inherent_impls", &key),
incoherent_impls: |_, key|
crate::query::plumbing::default_query("incoherent_impls",
&key),
check_transmutes: |_, key|
crate::query::plumbing::default_query("check_transmutes",
&key),
check_unsafety: |_, key|
crate::query::plumbing::default_query("check_unsafety", &key),
check_tail_calls: |_, key|
crate::query::plumbing::default_query("check_tail_calls",
&key),
assumed_wf_types: |_, key|
crate::query::plumbing::default_query("assumed_wf_types",
&key),
assumed_wf_types_for_rpitit: |_, key|
crate::query::plumbing::default_query("assumed_wf_types_for_rpitit",
&key),
fn_sig: |_, key|
crate::query::plumbing::default_query("fn_sig", &key),
lint_mod: |_, key|
crate::query::plumbing::default_query("lint_mod", &key),
check_unused_traits: |_, key|
crate::query::plumbing::default_query("check_unused_traits",
&key),
check_mod_attrs: |_, key|
crate::query::plumbing::default_query("check_mod_attrs",
&key),
check_mod_unstable_api_usage: |_, key|
crate::query::plumbing::default_query("check_mod_unstable_api_usage",
&key),
check_mod_privacy: |_, key|
crate::query::plumbing::default_query("check_mod_privacy",
&key),
check_liveness: |_, key|
crate::query::plumbing::default_query("check_liveness", &key),
live_symbols_and_ignored_derived_traits: |_, key|
crate::query::plumbing::default_query("live_symbols_and_ignored_derived_traits",
&key),
check_mod_deathness: |_, key|
crate::query::plumbing::default_query("check_mod_deathness",
&key),
check_type_wf: |_, key|
crate::query::plumbing::default_query("check_type_wf", &key),
coerce_unsized_info: |_, key|
crate::query::plumbing::default_query("coerce_unsized_info",
&key),
typeck: |_, key|
crate::query::plumbing::default_query("typeck", &key),
used_trait_imports: |_, key|
crate::query::plumbing::default_query("used_trait_imports",
&key),
coherent_trait: |_, key|
crate::query::plumbing::default_query("coherent_trait", &key),
mir_borrowck: |_, key|
crate::query::plumbing::default_query("mir_borrowck", &key),
crate_inherent_impls: |_, key|
crate::query::plumbing::default_query("crate_inherent_impls",
&key),
crate_inherent_impls_validity_check: |_, key|
crate::query::plumbing::default_query("crate_inherent_impls_validity_check",
&key),
crate_inherent_impls_overlap_check: |_, key|
crate::query::plumbing::default_query("crate_inherent_impls_overlap_check",
&key),
orphan_check_impl: |_, key|
crate::query::plumbing::default_query("orphan_check_impl",
&key),
mir_callgraph_cyclic: |_, key|
crate::query::plumbing::default_query("mir_callgraph_cyclic",
&key),
mir_inliner_callees: |_, key|
crate::query::plumbing::default_query("mir_inliner_callees",
&key),
tag_for_variant: |_, key|
crate::query::plumbing::default_query("tag_for_variant",
&key),
eval_to_allocation_raw: |_, key|
crate::query::plumbing::default_query("eval_to_allocation_raw",
&key),
eval_static_initializer: |_, key|
crate::query::plumbing::default_query("eval_static_initializer",
&key),
eval_to_const_value_raw: |_, key|
crate::query::plumbing::default_query("eval_to_const_value_raw",
&key),
eval_to_valtree: |_, key|
crate::query::plumbing::default_query("eval_to_valtree",
&key),
valtree_to_const_val: |_, key|
crate::query::plumbing::default_query("valtree_to_const_val",
&key),
lit_to_const: |_, key|
crate::query::plumbing::default_query("lit_to_const", &key),
check_match: |_, key|
crate::query::plumbing::default_query("check_match", &key),
effective_visibilities: |_, key|
crate::query::plumbing::default_query("effective_visibilities",
&key),
check_private_in_public: |_, key|
crate::query::plumbing::default_query("check_private_in_public",
&key),
reachable_set: |_, key|
crate::query::plumbing::default_query("reachable_set", &key),
region_scope_tree: |_, key|
crate::query::plumbing::default_query("region_scope_tree",
&key),
mir_shims: |_, key|
crate::query::plumbing::default_query("mir_shims", &key),
symbol_name: |_, key|
crate::query::plumbing::default_query("symbol_name", &key),
def_kind: |_, key|
crate::query::plumbing::default_query("def_kind", &key),
def_span: |_, key|
crate::query::plumbing::default_query("def_span", &key),
def_ident_span: |_, key|
crate::query::plumbing::default_query("def_ident_span", &key),
ty_span: |_, key|
crate::query::plumbing::default_query("ty_span", &key),
lookup_stability: |_, key|
crate::query::plumbing::default_query("lookup_stability",
&key),
lookup_const_stability: |_, key|
crate::query::plumbing::default_query("lookup_const_stability",
&key),
lookup_default_body_stability: |_, key|
crate::query::plumbing::default_query("lookup_default_body_stability",
&key),
should_inherit_track_caller: |_, key|
crate::query::plumbing::default_query("should_inherit_track_caller",
&key),
inherited_align: |_, key|
crate::query::plumbing::default_query("inherited_align",
&key),
lookup_deprecation_entry: |_, key|
crate::query::plumbing::default_query("lookup_deprecation_entry",
&key),
is_doc_hidden: |_, key|
crate::query::plumbing::default_query("is_doc_hidden", &key),
is_doc_notable_trait: |_, key|
crate::query::plumbing::default_query("is_doc_notable_trait",
&key),
attrs_for_def: |_, key|
crate::query::plumbing::default_query("attrs_for_def", &key),
codegen_fn_attrs: |_, key|
crate::query::plumbing::default_query("codegen_fn_attrs",
&key),
asm_target_features: |_, key|
crate::query::plumbing::default_query("asm_target_features",
&key),
fn_arg_idents: |_, key|
crate::query::plumbing::default_query("fn_arg_idents", &key),
rendered_const: |_, key|
crate::query::plumbing::default_query("rendered_const", &key),
rendered_precise_capturing_args: |_, key|
crate::query::plumbing::default_query("rendered_precise_capturing_args",
&key),
impl_parent: |_, key|
crate::query::plumbing::default_query("impl_parent", &key),
is_mir_available: |_, key|
crate::query::plumbing::default_query("is_mir_available",
&key),
own_existential_vtable_entries: |_, key|
crate::query::plumbing::default_query("own_existential_vtable_entries",
&key),
vtable_entries: |_, key|
crate::query::plumbing::default_query("vtable_entries", &key),
first_method_vtable_slot: |_, key|
crate::query::plumbing::default_query("first_method_vtable_slot",
&key),
supertrait_vtable_slot: |_, key|
crate::query::plumbing::default_query("supertrait_vtable_slot",
&key),
vtable_allocation: |_, key|
crate::query::plumbing::default_query("vtable_allocation",
&key),
codegen_select_candidate: |_, key|
crate::query::plumbing::default_query("codegen_select_candidate",
&key),
all_local_trait_impls: |_, key|
crate::query::plumbing::default_query("all_local_trait_impls",
&key),
local_trait_impls: |_, key|
crate::query::plumbing::default_query("local_trait_impls",
&key),
trait_impls_of: |_, key|
crate::query::plumbing::default_query("trait_impls_of", &key),
specialization_graph_of: |_, key|
crate::query::plumbing::default_query("specialization_graph_of",
&key),
dyn_compatibility_violations: |_, key|
crate::query::plumbing::default_query("dyn_compatibility_violations",
&key),
is_dyn_compatible: |_, key|
crate::query::plumbing::default_query("is_dyn_compatible",
&key),
param_env: |_, key|
crate::query::plumbing::default_query("param_env", &key),
typing_env_normalized_for_post_analysis: |_, key|
crate::query::plumbing::default_query("typing_env_normalized_for_post_analysis",
&key),
is_copy_raw: |_, key|
crate::query::plumbing::default_query("is_copy_raw", &key),
is_use_cloned_raw: |_, key|
crate::query::plumbing::default_query("is_use_cloned_raw",
&key),
is_sized_raw: |_, key|
crate::query::plumbing::default_query("is_sized_raw", &key),
is_freeze_raw: |_, key|
crate::query::plumbing::default_query("is_freeze_raw", &key),
is_unpin_raw: |_, key|
crate::query::plumbing::default_query("is_unpin_raw", &key),
is_async_drop_raw: |_, key|
crate::query::plumbing::default_query("is_async_drop_raw",
&key),
needs_drop_raw: |_, key|
crate::query::plumbing::default_query("needs_drop_raw", &key),
needs_async_drop_raw: |_, key|
crate::query::plumbing::default_query("needs_async_drop_raw",
&key),
has_significant_drop_raw: |_, key|
crate::query::plumbing::default_query("has_significant_drop_raw",
&key),
has_structural_eq_impl: |_, key|
crate::query::plumbing::default_query("has_structural_eq_impl",
&key),
adt_drop_tys: |_, key|
crate::query::plumbing::default_query("adt_drop_tys", &key),
adt_async_drop_tys: |_, key|
crate::query::plumbing::default_query("adt_async_drop_tys",
&key),
adt_significant_drop_tys: |_, key|
crate::query::plumbing::default_query("adt_significant_drop_tys",
&key),
list_significant_drop_tys: |_, key|
crate::query::plumbing::default_query("list_significant_drop_tys",
&key),
layout_of: |_, key|
crate::query::plumbing::default_query("layout_of", &key),
fn_abi_of_fn_ptr: |_, key|
crate::query::plumbing::default_query("fn_abi_of_fn_ptr",
&key),
fn_abi_of_instance: |_, key|
crate::query::plumbing::default_query("fn_abi_of_instance",
&key),
dylib_dependency_formats: |_, key|
crate::query::plumbing::default_query("dylib_dependency_formats",
&key),
dependency_formats: |_, key|
crate::query::plumbing::default_query("dependency_formats",
&key),
is_compiler_builtins: |_, key|
crate::query::plumbing::default_query("is_compiler_builtins",
&key),
has_global_allocator: |_, key|
crate::query::plumbing::default_query("has_global_allocator",
&key),
has_alloc_error_handler: |_, key|
crate::query::plumbing::default_query("has_alloc_error_handler",
&key),
has_panic_handler: |_, key|
crate::query::plumbing::default_query("has_panic_handler",
&key),
is_profiler_runtime: |_, key|
crate::query::plumbing::default_query("is_profiler_runtime",
&key),
has_ffi_unwind_calls: |_, key|
crate::query::plumbing::default_query("has_ffi_unwind_calls",
&key),
required_panic_strategy: |_, key|
crate::query::plumbing::default_query("required_panic_strategy",
&key),
panic_in_drop_strategy: |_, key|
crate::query::plumbing::default_query("panic_in_drop_strategy",
&key),
is_no_builtins: |_, key|
crate::query::plumbing::default_query("is_no_builtins", &key),
symbol_mangling_version: |_, key|
crate::query::plumbing::default_query("symbol_mangling_version",
&key),
extern_crate: |_, key|
crate::query::plumbing::default_query("extern_crate", &key),
specialization_enabled_in: |_, key|
crate::query::plumbing::default_query("specialization_enabled_in",
&key),
specializes: |_, key|
crate::query::plumbing::default_query("specializes", &key),
in_scope_traits_map: |_, key|
crate::query::plumbing::default_query("in_scope_traits_map",
&key),
defaultness: |_, key|
crate::query::plumbing::default_query("defaultness", &key),
default_field: |_, key|
crate::query::plumbing::default_query("default_field", &key),
check_well_formed: |_, key|
crate::query::plumbing::default_query("check_well_formed",
&key),
enforce_impl_non_lifetime_params_are_constrained: |_, key|
crate::query::plumbing::default_query("enforce_impl_non_lifetime_params_are_constrained",
&key),
reachable_non_generics: |_, key|
crate::query::plumbing::default_query("reachable_non_generics",
&key),
is_reachable_non_generic: |_, key|
crate::query::plumbing::default_query("is_reachable_non_generic",
&key),
is_unreachable_local_definition: |_, key|
crate::query::plumbing::default_query("is_unreachable_local_definition",
&key),
upstream_monomorphizations: |_, key|
crate::query::plumbing::default_query("upstream_monomorphizations",
&key),
upstream_monomorphizations_for: |_, key|
crate::query::plumbing::default_query("upstream_monomorphizations_for",
&key),
upstream_drop_glue_for: |_, key|
crate::query::plumbing::default_query("upstream_drop_glue_for",
&key),
upstream_async_drop_glue_for: |_, key|
crate::query::plumbing::default_query("upstream_async_drop_glue_for",
&key),
foreign_modules: |_, key|
crate::query::plumbing::default_query("foreign_modules",
&key),
clashing_extern_declarations: |_, key|
crate::query::plumbing::default_query("clashing_extern_declarations",
&key),
entry_fn: |_, key|
crate::query::plumbing::default_query("entry_fn", &key),
proc_macro_decls_static: |_, key|
crate::query::plumbing::default_query("proc_macro_decls_static",
&key),
crate_hash: |_, key|
crate::query::plumbing::default_query("crate_hash", &key),
crate_host_hash: |_, key|
crate::query::plumbing::default_query("crate_host_hash",
&key),
extra_filename: |_, key|
crate::query::plumbing::default_query("extra_filename", &key),
crate_extern_paths: |_, key|
crate::query::plumbing::default_query("crate_extern_paths",
&key),
implementations_of_trait: |_, key|
crate::query::plumbing::default_query("implementations_of_trait",
&key),
crate_incoherent_impls: |_, key|
crate::query::plumbing::default_query("crate_incoherent_impls",
&key),
native_library: |_, key|
crate::query::plumbing::default_query("native_library", &key),
inherit_sig_for_delegation_item: |_, key|
crate::query::plumbing::default_query("inherit_sig_for_delegation_item",
&key),
resolve_bound_vars: |_, key|
crate::query::plumbing::default_query("resolve_bound_vars",
&key),
named_variable_map: |_, key|
crate::query::plumbing::default_query("named_variable_map",
&key),
is_late_bound_map: |_, key|
crate::query::plumbing::default_query("is_late_bound_map",
&key),
object_lifetime_default: |_, key|
crate::query::plumbing::default_query("object_lifetime_default",
&key),
late_bound_vars_map: |_, key|
crate::query::plumbing::default_query("late_bound_vars_map",
&key),
opaque_captured_lifetimes: |_, key|
crate::query::plumbing::default_query("opaque_captured_lifetimes",
&key),
visibility: |_, key|
crate::query::plumbing::default_query("visibility", &key),
inhabited_predicate_adt: |_, key|
crate::query::plumbing::default_query("inhabited_predicate_adt",
&key),
inhabited_predicate_type: |_, key|
crate::query::plumbing::default_query("inhabited_predicate_type",
&key),
dep_kind: |_, key|
crate::query::plumbing::default_query("dep_kind", &key),
crate_name: |_, key|
crate::query::plumbing::default_query("crate_name", &key),
module_children: |_, key|
crate::query::plumbing::default_query("module_children",
&key),
num_extern_def_ids: |_, key|
crate::query::plumbing::default_query("num_extern_def_ids",
&key),
lib_features: |_, key|
crate::query::plumbing::default_query("lib_features", &key),
stability_implications: |_, key|
crate::query::plumbing::default_query("stability_implications",
&key),
intrinsic_raw: |_, key|
crate::query::plumbing::default_query("intrinsic_raw", &key),
get_lang_items: |_, key|
crate::query::plumbing::default_query("get_lang_items", &key),
all_diagnostic_items: |_, key|
crate::query::plumbing::default_query("all_diagnostic_items",
&key),
defined_lang_items: |_, key|
crate::query::plumbing::default_query("defined_lang_items",
&key),
diagnostic_items: |_, key|
crate::query::plumbing::default_query("diagnostic_items",
&key),
missing_lang_items: |_, key|
crate::query::plumbing::default_query("missing_lang_items",
&key),
visible_parent_map: |_, key|
crate::query::plumbing::default_query("visible_parent_map",
&key),
trimmed_def_paths: |_, key|
crate::query::plumbing::default_query("trimmed_def_paths",
&key),
missing_extern_crate_item: |_, key|
crate::query::plumbing::default_query("missing_extern_crate_item",
&key),
used_crate_source: |_, key|
crate::query::plumbing::default_query("used_crate_source",
&key),
debugger_visualizers: |_, key|
crate::query::plumbing::default_query("debugger_visualizers",
&key),
postorder_cnums: |_, key|
crate::query::plumbing::default_query("postorder_cnums",
&key),
is_private_dep: |_, key|
crate::query::plumbing::default_query("is_private_dep", &key),
allocator_kind: |_, key|
crate::query::plumbing::default_query("allocator_kind", &key),
alloc_error_handler_kind: |_, key|
crate::query::plumbing::default_query("alloc_error_handler_kind",
&key),
upvars_mentioned: |_, key|
crate::query::plumbing::default_query("upvars_mentioned",
&key),
crates: |_, key|
crate::query::plumbing::default_query("crates", &key),
used_crates: |_, key|
crate::query::plumbing::default_query("used_crates", &key),
duplicate_crate_names: |_, key|
crate::query::plumbing::default_query("duplicate_crate_names",
&key),
traits: |_, key|
crate::query::plumbing::default_query("traits", &key),
trait_impls_in_crate: |_, key|
crate::query::plumbing::default_query("trait_impls_in_crate",
&key),
stable_order_of_exportable_impls: |_, key|
crate::query::plumbing::default_query("stable_order_of_exportable_impls",
&key),
exportable_items: |_, key|
crate::query::plumbing::default_query("exportable_items",
&key),
exported_non_generic_symbols: |_, key|
crate::query::plumbing::default_query("exported_non_generic_symbols",
&key),
exported_generic_symbols: |_, key|
crate::query::plumbing::default_query("exported_generic_symbols",
&key),
collect_and_partition_mono_items: |_, key|
crate::query::plumbing::default_query("collect_and_partition_mono_items",
&key),
is_codegened_item: |_, key|
crate::query::plumbing::default_query("is_codegened_item",
&key),
codegen_unit: |_, key|
crate::query::plumbing::default_query("codegen_unit", &key),
backend_optimization_level: |_, key|
crate::query::plumbing::default_query("backend_optimization_level",
&key),
output_filenames: |_, key|
crate::query::plumbing::default_query("output_filenames",
&key),
normalize_canonicalized_projection: |_, key|
crate::query::plumbing::default_query("normalize_canonicalized_projection",
&key),
normalize_canonicalized_free_alias: |_, key|
crate::query::plumbing::default_query("normalize_canonicalized_free_alias",
&key),
normalize_canonicalized_inherent_projection: |_, key|
crate::query::plumbing::default_query("normalize_canonicalized_inherent_projection",
&key),
try_normalize_generic_arg_after_erasing_regions: |_, key|
crate::query::plumbing::default_query("try_normalize_generic_arg_after_erasing_regions",
&key),
implied_outlives_bounds: |_, key|
crate::query::plumbing::default_query("implied_outlives_bounds",
&key),
dropck_outlives: |_, key|
crate::query::plumbing::default_query("dropck_outlives",
&key),
evaluate_obligation: |_, key|
crate::query::plumbing::default_query("evaluate_obligation",
&key),
type_op_ascribe_user_type: |_, key|
crate::query::plumbing::default_query("type_op_ascribe_user_type",
&key),
type_op_prove_predicate: |_, key|
crate::query::plumbing::default_query("type_op_prove_predicate",
&key),
type_op_normalize_ty: |_, key|
crate::query::plumbing::default_query("type_op_normalize_ty",
&key),
type_op_normalize_clause: |_, key|
crate::query::plumbing::default_query("type_op_normalize_clause",
&key),
type_op_normalize_poly_fn_sig: |_, key|
crate::query::plumbing::default_query("type_op_normalize_poly_fn_sig",
&key),
type_op_normalize_fn_sig: |_, key|
crate::query::plumbing::default_query("type_op_normalize_fn_sig",
&key),
instantiate_and_check_impossible_predicates: |_, key|
crate::query::plumbing::default_query("instantiate_and_check_impossible_predicates",
&key),
is_impossible_associated_item: |_, key|
crate::query::plumbing::default_query("is_impossible_associated_item",
&key),
method_autoderef_steps: |_, key|
crate::query::plumbing::default_query("method_autoderef_steps",
&key),
evaluate_root_goal_for_proof_tree_raw: |_, key|
crate::query::plumbing::default_query("evaluate_root_goal_for_proof_tree_raw",
&key),
rust_target_features: |_, key|
crate::query::plumbing::default_query("rust_target_features",
&key),
implied_target_features: |_, key|
crate::query::plumbing::default_query("implied_target_features",
&key),
features_query: |_, key|
crate::query::plumbing::default_query("features_query", &key),
crate_for_resolver: |_, key|
crate::query::plumbing::default_query("crate_for_resolver",
&key),
resolve_instance_raw: |_, key|
crate::query::plumbing::default_query("resolve_instance_raw",
&key),
reveal_opaque_types_in_bounds: |_, key|
crate::query::plumbing::default_query("reveal_opaque_types_in_bounds",
&key),
limits: |_, key|
crate::query::plumbing::default_query("limits", &key),
diagnostic_hir_wf_check: |_, key|
crate::query::plumbing::default_query("diagnostic_hir_wf_check",
&key),
global_backend_features: |_, key|
crate::query::plumbing::default_query("global_backend_features",
&key),
check_validity_requirement: |_, key|
crate::query::plumbing::default_query("check_validity_requirement",
&key),
compare_impl_item: |_, key|
crate::query::plumbing::default_query("compare_impl_item",
&key),
deduced_param_attrs: |_, key|
crate::query::plumbing::default_query("deduced_param_attrs",
&key),
doc_link_resolutions: |_, key|
crate::query::plumbing::default_query("doc_link_resolutions",
&key),
doc_link_traits_in_scope: |_, key|
crate::query::plumbing::default_query("doc_link_traits_in_scope",
&key),
stripped_cfg_items: |_, key|
crate::query::plumbing::default_query("stripped_cfg_items",
&key),
generics_require_sized_self: |_, key|
crate::query::plumbing::default_query("generics_require_sized_self",
&key),
cross_crate_inlinable: |_, key|
crate::query::plumbing::default_query("cross_crate_inlinable",
&key),
check_mono_item: |_, key|
crate::query::plumbing::default_query("check_mono_item",
&key),
skip_move_check_fns: |_, key|
crate::query::plumbing::default_query("skip_move_check_fns",
&key),
items_of_instance: |_, key|
crate::query::plumbing::default_query("items_of_instance",
&key),
size_estimate: |_, key|
crate::query::plumbing::default_query("size_estimate", &key),
anon_const_kind: |_, key|
crate::query::plumbing::default_query("anon_const_kind",
&key),
trivial_const: |_, key|
crate::query::plumbing::default_query("trivial_const", &key),
sanitizer_settings_for: |_, key|
crate::query::plumbing::default_query("sanitizer_settings_for",
&key),
check_externally_implementable_items: |_, key|
crate::query::plumbing::default_query("check_externally_implementable_items",
&key),
externally_implementable_items: |_, key|
crate::query::plumbing::default_query("externally_implementable_items",
&key),
}
}
}
impl Default for ExternProviders {
fn default() -> Self {
ExternProviders {
derive_macro_expansion: (),
trigger_delayed_bug: (),
registered_tools: (),
early_lint_checks: (),
env_var_os: (),
resolutions: (),
resolver_for_lowering_raw: (),
source_span: (),
hir_crate: (),
hir_crate_items: (),
hir_module_items: (),
local_def_id_to_hir_id: (),
hir_owner_parent_q: (),
opt_hir_owner_nodes: (),
hir_attr_map: (),
opt_ast_lowering_delayed_lints: (),
const_param_default: |_, key|
crate::query::plumbing::default_extern_query("const_param_default",
&key),
const_of_item: |_, key|
crate::query::plumbing::default_extern_query("const_of_item",
&key),
type_of: |_, key|
crate::query::plumbing::default_extern_query("type_of", &key),
type_of_opaque: (),
type_of_opaque_hir_typeck: (),
type_alias_is_lazy: |_, key|
crate::query::plumbing::default_extern_query("type_alias_is_lazy",
&key),
collect_return_position_impl_trait_in_trait_tys: |_, key|
crate::query::plumbing::default_extern_query("collect_return_position_impl_trait_in_trait_tys",
&key),
opaque_ty_origin: |_, key|
crate::query::plumbing::default_extern_query("opaque_ty_origin",
&key),
unsizing_params_for_adt: (),
analysis: (),
check_expectations: (),
generics_of: |_, key|
crate::query::plumbing::default_extern_query("generics_of",
&key),
predicates_of: (),
opaque_types_defined_by: (),
nested_bodies_within: (),
explicit_item_bounds: |_, key|
crate::query::plumbing::default_extern_query("explicit_item_bounds",
&key),
explicit_item_self_bounds: |_, key|
crate::query::plumbing::default_extern_query("explicit_item_self_bounds",
&key),
item_bounds: (),
item_self_bounds: (),
item_non_self_bounds: (),
impl_super_outlives: (),
native_libraries: |_, key|
crate::query::plumbing::default_extern_query("native_libraries",
&key),
shallow_lint_levels_on: (),
lint_expectations: (),
lints_that_dont_need_to_run: (),
expn_that_defined: |_, key|
crate::query::plumbing::default_extern_query("expn_that_defined",
&key),
is_panic_runtime: |_, key|
crate::query::plumbing::default_extern_query("is_panic_runtime",
&key),
representability: (),
representability_adt_ty: (),
params_in_repr: |_, key|
crate::query::plumbing::default_extern_query("params_in_repr",
&key),
thir_body: (),
mir_keys: (),
mir_const_qualif: |_, key|
crate::query::plumbing::default_extern_query("mir_const_qualif",
&key),
mir_built: (),
thir_abstract_const: |_, key|
crate::query::plumbing::default_extern_query("thir_abstract_const",
&key),
mir_drops_elaborated_and_const_checked: (),
mir_for_ctfe: |_, key|
crate::query::plumbing::default_extern_query("mir_for_ctfe",
&key),
mir_promoted: (),
closure_typeinfo: (),
closure_saved_names_of_captured_variables: |_, key|
crate::query::plumbing::default_extern_query("closure_saved_names_of_captured_variables",
&key),
mir_coroutine_witnesses: |_, key|
crate::query::plumbing::default_extern_query("mir_coroutine_witnesses",
&key),
check_coroutine_obligations: (),
check_potentially_region_dependent_goals: (),
optimized_mir: |_, key|
crate::query::plumbing::default_extern_query("optimized_mir",
&key),
coverage_attr_on: (),
coverage_ids_info: (),
promoted_mir: |_, key|
crate::query::plumbing::default_extern_query("promoted_mir",
&key),
erase_and_anonymize_regions_ty: (),
wasm_import_module_map: (),
trait_explicit_predicates_and_bounds: (),
explicit_predicates_of: |_, key|
crate::query::plumbing::default_extern_query("explicit_predicates_of",
&key),
inferred_outlives_of: |_, key|
crate::query::plumbing::default_extern_query("inferred_outlives_of",
&key),
explicit_super_predicates_of: |_, key|
crate::query::plumbing::default_extern_query("explicit_super_predicates_of",
&key),
explicit_implied_predicates_of: |_, key|
crate::query::plumbing::default_extern_query("explicit_implied_predicates_of",
&key),
explicit_supertraits_containing_assoc_item: (),
const_conditions: |_, key|
crate::query::plumbing::default_extern_query("const_conditions",
&key),
explicit_implied_const_bounds: |_, key|
crate::query::plumbing::default_extern_query("explicit_implied_const_bounds",
&key),
type_param_predicates: (),
trait_def: |_, key|
crate::query::plumbing::default_extern_query("trait_def",
&key),
adt_def: |_, key|
crate::query::plumbing::default_extern_query("adt_def", &key),
adt_destructor: |_, key|
crate::query::plumbing::default_extern_query("adt_destructor",
&key),
adt_async_destructor: |_, key|
crate::query::plumbing::default_extern_query("adt_async_destructor",
&key),
adt_sizedness_constraint: (),
adt_dtorck_constraint: (),
constness: |_, key|
crate::query::plumbing::default_extern_query("constness",
&key),
asyncness: |_, key|
crate::query::plumbing::default_extern_query("asyncness",
&key),
is_promotable_const_fn: (),
coroutine_by_move_body_def_id: |_, key|
crate::query::plumbing::default_extern_query("coroutine_by_move_body_def_id",
&key),
coroutine_kind: |_, key|
crate::query::plumbing::default_extern_query("coroutine_kind",
&key),
coroutine_for_closure: |_, key|
crate::query::plumbing::default_extern_query("coroutine_for_closure",
&key),
coroutine_hidden_types: (),
crate_variances: (),
variances_of: |_, key|
crate::query::plumbing::default_extern_query("variances_of",
&key),
inferred_outlives_crate: (),
associated_item_def_ids: |_, key|
crate::query::plumbing::default_extern_query("associated_item_def_ids",
&key),
associated_item: |_, key|
crate::query::plumbing::default_extern_query("associated_item",
&key),
associated_items: (),
impl_item_implementor_ids: (),
associated_types_for_impl_traits_in_trait_or_impl: |_, key|
crate::query::plumbing::default_extern_query("associated_types_for_impl_traits_in_trait_or_impl",
&key),
impl_trait_header: |_, key|
crate::query::plumbing::default_extern_query("impl_trait_header",
&key),
impl_self_is_guaranteed_unsized: (),
inherent_impls: |_, key|
crate::query::plumbing::default_extern_query("inherent_impls",
&key),
incoherent_impls: (),
check_transmutes: (),
check_unsafety: (),
check_tail_calls: (),
assumed_wf_types: (),
assumed_wf_types_for_rpitit: |_, key|
crate::query::plumbing::default_extern_query("assumed_wf_types_for_rpitit",
&key),
fn_sig: |_, key|
crate::query::plumbing::default_extern_query("fn_sig", &key),
lint_mod: (),
check_unused_traits: (),
check_mod_attrs: (),
check_mod_unstable_api_usage: (),
check_mod_privacy: (),
check_liveness: (),
live_symbols_and_ignored_derived_traits: (),
check_mod_deathness: (),
check_type_wf: (),
coerce_unsized_info: |_, key|
crate::query::plumbing::default_extern_query("coerce_unsized_info",
&key),
typeck: (),
used_trait_imports: (),
coherent_trait: (),
mir_borrowck: (),
crate_inherent_impls: (),
crate_inherent_impls_validity_check: (),
crate_inherent_impls_overlap_check: (),
orphan_check_impl: (),
mir_callgraph_cyclic: (),
mir_inliner_callees: (),
tag_for_variant: (),
eval_to_allocation_raw: (),
eval_static_initializer: |_, key|
crate::query::plumbing::default_extern_query("eval_static_initializer",
&key),
eval_to_const_value_raw: (),
eval_to_valtree: (),
valtree_to_const_val: (),
lit_to_const: (),
check_match: (),
effective_visibilities: (),
check_private_in_public: (),
reachable_set: (),
region_scope_tree: (),
mir_shims: (),
symbol_name: (),
def_kind: |_, key|
crate::query::plumbing::default_extern_query("def_kind",
&key),
def_span: |_, key|
crate::query::plumbing::default_extern_query("def_span",
&key),
def_ident_span: |_, key|
crate::query::plumbing::default_extern_query("def_ident_span",
&key),
ty_span: (),
lookup_stability: |_, key|
crate::query::plumbing::default_extern_query("lookup_stability",
&key),
lookup_const_stability: |_, key|
crate::query::plumbing::default_extern_query("lookup_const_stability",
&key),
lookup_default_body_stability: |_, key|
crate::query::plumbing::default_extern_query("lookup_default_body_stability",
&key),
should_inherit_track_caller: (),
inherited_align: (),
lookup_deprecation_entry: |_, key|
crate::query::plumbing::default_extern_query("lookup_deprecation_entry",
&key),
is_doc_hidden: |_, key|
crate::query::plumbing::default_extern_query("is_doc_hidden",
&key),
is_doc_notable_trait: (),
attrs_for_def: |_, key|
crate::query::plumbing::default_extern_query("attrs_for_def",
&key),
codegen_fn_attrs: |_, key|
crate::query::plumbing::default_extern_query("codegen_fn_attrs",
&key),
asm_target_features: (),
fn_arg_idents: |_, key|
crate::query::plumbing::default_extern_query("fn_arg_idents",
&key),
rendered_const: |_, key|
crate::query::plumbing::default_extern_query("rendered_const",
&key),
rendered_precise_capturing_args: |_, key|
crate::query::plumbing::default_extern_query("rendered_precise_capturing_args",
&key),
impl_parent: |_, key|
crate::query::plumbing::default_extern_query("impl_parent",
&key),
is_mir_available: |_, key|
crate::query::plumbing::default_extern_query("is_mir_available",
&key),
own_existential_vtable_entries: (),
vtable_entries: (),
first_method_vtable_slot: (),
supertrait_vtable_slot: (),
vtable_allocation: (),
codegen_select_candidate: (),
all_local_trait_impls: (),
local_trait_impls: (),
trait_impls_of: (),
specialization_graph_of: (),
dyn_compatibility_violations: (),
is_dyn_compatible: (),
param_env: (),
typing_env_normalized_for_post_analysis: (),
is_copy_raw: (),
is_use_cloned_raw: (),
is_sized_raw: (),
is_freeze_raw: (),
is_unpin_raw: (),
is_async_drop_raw: (),
needs_drop_raw: (),
needs_async_drop_raw: (),
has_significant_drop_raw: (),
has_structural_eq_impl: (),
adt_drop_tys: (),
adt_async_drop_tys: (),
adt_significant_drop_tys: (),
list_significant_drop_tys: (),
layout_of: (),
fn_abi_of_fn_ptr: (),
fn_abi_of_instance: (),
dylib_dependency_formats: |_, key|
crate::query::plumbing::default_extern_query("dylib_dependency_formats",
&key),
dependency_formats: (),
is_compiler_builtins: |_, key|
crate::query::plumbing::default_extern_query("is_compiler_builtins",
&key),
has_global_allocator: |_, key|
crate::query::plumbing::default_extern_query("has_global_allocator",
&key),
has_alloc_error_handler: |_, key|
crate::query::plumbing::default_extern_query("has_alloc_error_handler",
&key),
has_panic_handler: |_, key|
crate::query::plumbing::default_extern_query("has_panic_handler",
&key),
is_profiler_runtime: |_, key|
crate::query::plumbing::default_extern_query("is_profiler_runtime",
&key),
has_ffi_unwind_calls: (),
required_panic_strategy: |_, key|
crate::query::plumbing::default_extern_query("required_panic_strategy",
&key),
panic_in_drop_strategy: |_, key|
crate::query::plumbing::default_extern_query("panic_in_drop_strategy",
&key),
is_no_builtins: |_, key|
crate::query::plumbing::default_extern_query("is_no_builtins",
&key),
symbol_mangling_version: |_, key|
crate::query::plumbing::default_extern_query("symbol_mangling_version",
&key),
extern_crate: |_, key|
crate::query::plumbing::default_extern_query("extern_crate",
&key),
specialization_enabled_in: |_, key|
crate::query::plumbing::default_extern_query("specialization_enabled_in",
&key),
specializes: (),
in_scope_traits_map: (),
defaultness: |_, key|
crate::query::plumbing::default_extern_query("defaultness",
&key),
default_field: |_, key|
crate::query::plumbing::default_extern_query("default_field",
&key),
check_well_formed: (),
enforce_impl_non_lifetime_params_are_constrained: (),
reachable_non_generics: |_, key|
crate::query::plumbing::default_extern_query("reachable_non_generics",
&key),
is_reachable_non_generic: |_, key|
crate::query::plumbing::default_extern_query("is_reachable_non_generic",
&key),
is_unreachable_local_definition: (),
upstream_monomorphizations: (),
upstream_monomorphizations_for: |_, key|
crate::query::plumbing::default_extern_query("upstream_monomorphizations_for",
&key),
upstream_drop_glue_for: (),
upstream_async_drop_glue_for: (),
foreign_modules: |_, key|
crate::query::plumbing::default_extern_query("foreign_modules",
&key),
clashing_extern_declarations: (),
entry_fn: (),
proc_macro_decls_static: (),
crate_hash: |_, key|
crate::query::plumbing::default_extern_query("crate_hash",
&key),
crate_host_hash: |_, key|
crate::query::plumbing::default_extern_query("crate_host_hash",
&key),
extra_filename: |_, key|
crate::query::plumbing::default_extern_query("extra_filename",
&key),
crate_extern_paths: |_, key|
crate::query::plumbing::default_extern_query("crate_extern_paths",
&key),
implementations_of_trait: |_, key|
crate::query::plumbing::default_extern_query("implementations_of_trait",
&key),
crate_incoherent_impls: |_, key|
crate::query::plumbing::default_extern_query("crate_incoherent_impls",
&key),
native_library: (),
inherit_sig_for_delegation_item: (),
resolve_bound_vars: (),
named_variable_map: (),
is_late_bound_map: (),
object_lifetime_default: |_, key|
crate::query::plumbing::default_extern_query("object_lifetime_default",
&key),
late_bound_vars_map: (),
opaque_captured_lifetimes: (),
visibility: |_, key|
crate::query::plumbing::default_extern_query("visibility",
&key),
inhabited_predicate_adt: (),
inhabited_predicate_type: (),
dep_kind: |_, key|
crate::query::plumbing::default_extern_query("dep_kind",
&key),
crate_name: |_, key|
crate::query::plumbing::default_extern_query("crate_name",
&key),
module_children: |_, key|
crate::query::plumbing::default_extern_query("module_children",
&key),
num_extern_def_ids: |_, key|
crate::query::plumbing::default_extern_query("num_extern_def_ids",
&key),
lib_features: |_, key|
crate::query::plumbing::default_extern_query("lib_features",
&key),
stability_implications: |_, key|
crate::query::plumbing::default_extern_query("stability_implications",
&key),
intrinsic_raw: |_, key|
crate::query::plumbing::default_extern_query("intrinsic_raw",
&key),
get_lang_items: (),
all_diagnostic_items: (),
defined_lang_items: |_, key|
crate::query::plumbing::default_extern_query("defined_lang_items",
&key),
diagnostic_items: |_, key|
crate::query::plumbing::default_extern_query("diagnostic_items",
&key),
missing_lang_items: |_, key|
crate::query::plumbing::default_extern_query("missing_lang_items",
&key),
visible_parent_map: (),
trimmed_def_paths: (),
missing_extern_crate_item: |_, key|
crate::query::plumbing::default_extern_query("missing_extern_crate_item",
&key),
used_crate_source: |_, key|
crate::query::plumbing::default_extern_query("used_crate_source",
&key),
debugger_visualizers: |_, key|
crate::query::plumbing::default_extern_query("debugger_visualizers",
&key),
postorder_cnums: (),
is_private_dep: |_, key|
crate::query::plumbing::default_extern_query("is_private_dep",
&key),
allocator_kind: (),
alloc_error_handler_kind: (),
upvars_mentioned: (),
crates: (),
used_crates: (),
duplicate_crate_names: (),
traits: |_, key|
crate::query::plumbing::default_extern_query("traits", &key),
trait_impls_in_crate: |_, key|
crate::query::plumbing::default_extern_query("trait_impls_in_crate",
&key),
stable_order_of_exportable_impls: |_, key|
crate::query::plumbing::default_extern_query("stable_order_of_exportable_impls",
&key),
exportable_items: |_, key|
crate::query::plumbing::default_extern_query("exportable_items",
&key),
exported_non_generic_symbols: |_, key|
crate::query::plumbing::default_extern_query("exported_non_generic_symbols",
&key),
exported_generic_symbols: |_, key|
crate::query::plumbing::default_extern_query("exported_generic_symbols",
&key),
collect_and_partition_mono_items: (),
is_codegened_item: (),
codegen_unit: (),
backend_optimization_level: (),
output_filenames: (),
normalize_canonicalized_projection: (),
normalize_canonicalized_free_alias: (),
normalize_canonicalized_inherent_projection: (),
try_normalize_generic_arg_after_erasing_regions: (),
implied_outlives_bounds: (),
dropck_outlives: (),
evaluate_obligation: (),
type_op_ascribe_user_type: (),
type_op_prove_predicate: (),
type_op_normalize_ty: (),
type_op_normalize_clause: (),
type_op_normalize_poly_fn_sig: (),
type_op_normalize_fn_sig: (),
instantiate_and_check_impossible_predicates: (),
is_impossible_associated_item: (),
method_autoderef_steps: (),
evaluate_root_goal_for_proof_tree_raw: (),
rust_target_features: (),
implied_target_features: (),
features_query: (),
crate_for_resolver: (),
resolve_instance_raw: (),
reveal_opaque_types_in_bounds: (),
limits: (),
diagnostic_hir_wf_check: (),
global_backend_features: (),
check_validity_requirement: (),
compare_impl_item: (),
deduced_param_attrs: |_, key|
crate::query::plumbing::default_extern_query("deduced_param_attrs",
&key),
doc_link_resolutions: |_, key|
crate::query::plumbing::default_extern_query("doc_link_resolutions",
&key),
doc_link_traits_in_scope: |_, key|
crate::query::plumbing::default_extern_query("doc_link_traits_in_scope",
&key),
stripped_cfg_items: |_, key|
crate::query::plumbing::default_extern_query("stripped_cfg_items",
&key),
generics_require_sized_self: (),
cross_crate_inlinable: |_, key|
crate::query::plumbing::default_extern_query("cross_crate_inlinable",
&key),
check_mono_item: (),
skip_move_check_fns: (),
items_of_instance: (),
size_estimate: (),
anon_const_kind: |_, key|
crate::query::plumbing::default_extern_query("anon_const_kind",
&key),
trivial_const: |_, key|
crate::query::plumbing::default_extern_query("trivial_const",
&key),
sanitizer_settings_for: (),
check_externally_implementable_items: (),
externally_implementable_items: |_, key|
crate::query::plumbing::default_extern_query("externally_implementable_items",
&key),
}
}
}
impl Copy for Providers {}
impl Clone for Providers {
fn clone(&self) -> Self { *self }
}
impl Copy for ExternProviders {}
impl Clone for ExternProviders {
fn clone(&self) -> Self { *self }
}
pub struct QueryEngine {
pub derive_macro_expansion: for<'tcx> fn(TyCtxt<'tcx>, Span,
derive_macro_expansion::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<&'tcx TokenStream, ()>>>,
pub trigger_delayed_bug: for<'tcx> fn(TyCtxt<'tcx>, Span,
trigger_delayed_bug::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub registered_tools: for<'tcx> fn(TyCtxt<'tcx>, Span,
registered_tools::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::RegisteredTools>>,
pub early_lint_checks: for<'tcx> fn(TyCtxt<'tcx>, Span,
early_lint_checks::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub env_var_os: for<'tcx> fn(TyCtxt<'tcx>, Span, env_var_os::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<&'tcx OsStr>>>,
pub resolutions: for<'tcx> fn(TyCtxt<'tcx>, Span, resolutions::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::ResolverGlobalCtxt>>,
pub resolver_for_lowering_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
resolver_for_lowering_raw::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<(&'tcx Steal<(ty::ResolverAstLowering,
Arc<ast::Crate>)>, &'tcx ty::ResolverGlobalCtxt)>>,
pub source_span: for<'tcx> fn(TyCtxt<'tcx>, Span, source_span::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<Span>>,
pub hir_crate: for<'tcx> fn(TyCtxt<'tcx>, Span, hir_crate::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Crate<'tcx>>>,
pub hir_crate_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
hir_crate_items::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_middle::hir::ModuleItems>>,
pub hir_module_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
hir_module_items::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_middle::hir::ModuleItems>>,
pub local_def_id_to_hir_id: for<'tcx> fn(TyCtxt<'tcx>, Span,
local_def_id_to_hir_id::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<hir::HirId>>,
pub hir_owner_parent_q: for<'tcx> fn(TyCtxt<'tcx>, Span,
hir_owner_parent_q::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<hir::HirId>>,
pub opt_hir_owner_nodes: for<'tcx> fn(TyCtxt<'tcx>, Span,
opt_hir_owner_nodes::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx hir::OwnerNodes<'tcx>>>>,
pub hir_attr_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
hir_attr_map::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx hir::AttributeMap<'tcx>>>,
pub opt_ast_lowering_delayed_lints: for<'tcx> fn(TyCtxt<'tcx>, Span,
opt_ast_lowering_delayed_lints::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx hir::lints::DelayedLints>>>,
pub const_param_default: for<'tcx> fn(TyCtxt<'tcx>, Span,
const_param_default::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>>,
pub const_of_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
const_of_item::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>>,
pub type_of: for<'tcx> fn(TyCtxt<'tcx>, Span, type_of::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
Ty<'tcx>>>>,
pub type_of_opaque: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_of_opaque::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<ty::EarlyBinder<'tcx,
Ty<'tcx>>, CyclePlaceholder>>>,
pub type_of_opaque_hir_typeck: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_of_opaque_hir_typeck::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
Ty<'tcx>>>>,
pub type_alias_is_lazy: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_alias_is_lazy::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub collect_return_position_impl_trait_in_trait_tys: for<'tcx> fn(TyCtxt<'tcx>,
Span, collect_return_position_impl_trait_in_trait_tys::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx,
Ty<'tcx>>>, ErrorGuaranteed>>>,
pub opaque_ty_origin: for<'tcx> fn(TyCtxt<'tcx>, Span,
opaque_ty_origin::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<hir::OpaqueTyOrigin<DefId>>>,
pub unsizing_params_for_adt: for<'tcx> fn(TyCtxt<'tcx>, Span,
unsizing_params_for_adt::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_index::bit_set::DenseBitSet<u32>>>,
pub analysis: for<'tcx> fn(TyCtxt<'tcx>, Span, analysis::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<()>>,
pub check_expectations: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_expectations::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub generics_of: for<'tcx> fn(TyCtxt<'tcx>, Span, generics_of::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::Generics>>,
pub predicates_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
predicates_of::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::GenericPredicates<'tcx>>>,
pub opaque_types_defined_by: for<'tcx> fn(TyCtxt<'tcx>, Span,
opaque_types_defined_by::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::List<LocalDefId>>>,
pub nested_bodies_within: for<'tcx> fn(TyCtxt<'tcx>, Span,
nested_bodies_within::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::List<LocalDefId>>>,
pub explicit_item_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_item_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub explicit_item_self_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_item_self_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub item_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span, item_bounds::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>>,
pub item_self_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
item_self_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>>,
pub item_non_self_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
item_non_self_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>>,
pub impl_super_outlives: for<'tcx> fn(TyCtxt<'tcx>, Span,
impl_super_outlives::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Clauses<'tcx>>>>,
pub native_libraries: for<'tcx> fn(TyCtxt<'tcx>, Span,
native_libraries::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Vec<NativeLib>>>,
pub shallow_lint_levels_on: for<'tcx> fn(TyCtxt<'tcx>, Span,
shallow_lint_levels_on::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_middle::lint::ShallowLintLevelMap>>,
pub lint_expectations: for<'tcx> fn(TyCtxt<'tcx>, Span,
lint_expectations::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Vec<(LintExpectationId,
LintExpectation)>>>,
pub lints_that_dont_need_to_run: for<'tcx> fn(TyCtxt<'tcx>, Span,
lints_that_dont_need_to_run::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx UnordSet<LintId>>>,
pub expn_that_defined: for<'tcx> fn(TyCtxt<'tcx>, Span,
expn_that_defined::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<rustc_span::ExpnId>>,
pub is_panic_runtime: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_panic_runtime::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub representability: for<'tcx> fn(TyCtxt<'tcx>, Span,
representability::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<rustc_middle::ty::Representability>>,
pub representability_adt_ty: for<'tcx> fn(TyCtxt<'tcx>, Span,
representability_adt_ty::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<rustc_middle::ty::Representability>>,
pub params_in_repr: for<'tcx> fn(TyCtxt<'tcx>, Span,
params_in_repr::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_index::bit_set::DenseBitSet<u32>>>,
pub thir_body: for<'tcx> fn(TyCtxt<'tcx>, Span, thir_body::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<(&'tcx Steal<thir::Thir<'tcx>>,
thir::ExprId), ErrorGuaranteed>>>,
pub mir_keys: for<'tcx> fn(TyCtxt<'tcx>, Span, mir_keys::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_data_structures::fx::FxIndexSet<LocalDefId>>>,
pub mir_const_qualif: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_const_qualif::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<mir::ConstQualifs>>,
pub mir_built: for<'tcx> fn(TyCtxt<'tcx>, Span, mir_built::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Steal<mir::Body<'tcx>>>>,
pub thir_abstract_const: for<'tcx> fn(TyCtxt<'tcx>, Span,
thir_abstract_const::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<Option<ty::EarlyBinder<'tcx,
ty::Const<'tcx>>>, ErrorGuaranteed>>>,
pub mir_drops_elaborated_and_const_checked: for<'tcx> fn(TyCtxt<'tcx>,
Span, mir_drops_elaborated_and_const_checked::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Steal<mir::Body<'tcx>>>>,
pub mir_for_ctfe: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_for_ctfe::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx mir::Body<'tcx>>>,
pub mir_promoted: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_promoted::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<(&'tcx Steal<mir::Body<'tcx>>,
&'tcx Steal<IndexVec<mir::Promoted, mir::Body<'tcx>>>)>>,
pub closure_typeinfo: for<'tcx> fn(TyCtxt<'tcx>, Span,
closure_typeinfo::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::ClosureTypeInfo<'tcx>>>,
pub closure_saved_names_of_captured_variables: for<'tcx> fn(TyCtxt<'tcx>,
Span, closure_saved_names_of_captured_variables::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx IndexVec<abi::FieldIdx,
Symbol>>>,
pub mir_coroutine_witnesses: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_coroutine_witnesses::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx mir::CoroutineLayout<'tcx>>>>,
pub check_coroutine_obligations: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_coroutine_obligations::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub check_potentially_region_dependent_goals: for<'tcx> fn(TyCtxt<'tcx>,
Span, check_potentially_region_dependent_goals::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub optimized_mir: for<'tcx> fn(TyCtxt<'tcx>, Span,
optimized_mir::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx mir::Body<'tcx>>>,
pub coverage_attr_on: for<'tcx> fn(TyCtxt<'tcx>, Span,
coverage_attr_on::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub coverage_ids_info: for<'tcx> fn(TyCtxt<'tcx>, Span,
coverage_ids_info::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx mir::coverage::CoverageIdsInfo>>>,
pub promoted_mir: for<'tcx> fn(TyCtxt<'tcx>, Span,
promoted_mir::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx IndexVec<mir::Promoted,
mir::Body<'tcx>>>>,
pub erase_and_anonymize_regions_ty: for<'tcx> fn(TyCtxt<'tcx>, Span,
erase_and_anonymize_regions_ty::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Ty<'tcx>>>,
pub wasm_import_module_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
wasm_import_module_map::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DefIdMap<String>>>,
pub trait_explicit_predicates_and_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
trait_explicit_predicates_and_bounds::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::GenericPredicates<'tcx>>>,
pub explicit_predicates_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_predicates_of::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::GenericPredicates<'tcx>>>,
pub inferred_outlives_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
inferred_outlives_of::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(ty::Clause<'tcx>,
Span)]>>,
pub explicit_super_predicates_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_super_predicates_of::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub explicit_implied_predicates_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_implied_predicates_of::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub explicit_supertraits_containing_assoc_item: for<'tcx> fn(TyCtxt<'tcx>,
Span, explicit_supertraits_containing_assoc_item::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub const_conditions: for<'tcx> fn(TyCtxt<'tcx>, Span,
const_conditions::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::ConstConditions<'tcx>>>,
pub explicit_implied_const_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
explicit_implied_const_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::PolyTraitRef<'tcx>, Span)]>>>,
pub type_param_predicates: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_param_predicates::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
&'tcx [(ty::Clause<'tcx>, Span)]>>>,
pub trait_def: for<'tcx> fn(TyCtxt<'tcx>, Span, trait_def::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::TraitDef>>,
pub adt_def: for<'tcx> fn(TyCtxt<'tcx>, Span, adt_def::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::AdtDef<'tcx>>>,
pub adt_destructor: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_destructor::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<ty::Destructor>>>,
pub adt_async_destructor: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_async_destructor::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<ty::AsyncDestructor>>>,
pub adt_sizedness_constraint: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_sizedness_constraint::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<ty::EarlyBinder<'tcx,
Ty<'tcx>>>>>,
pub adt_dtorck_constraint: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_dtorck_constraint::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DropckConstraint<'tcx>>>,
pub constness: for<'tcx> fn(TyCtxt<'tcx>, Span, constness::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<hir::Constness>>,
pub asyncness: for<'tcx> fn(TyCtxt<'tcx>, Span, asyncness::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::Asyncness>>,
pub is_promotable_const_fn: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_promotable_const_fn::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub coroutine_by_move_body_def_id: for<'tcx> fn(TyCtxt<'tcx>, Span,
coroutine_by_move_body_def_id::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<DefId>>,
pub coroutine_kind: for<'tcx> fn(TyCtxt<'tcx>, Span,
coroutine_kind::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<hir::CoroutineKind>>>,
pub coroutine_for_closure: for<'tcx> fn(TyCtxt<'tcx>, Span,
coroutine_for_closure::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<DefId>>,
pub coroutine_hidden_types: for<'tcx> fn(TyCtxt<'tcx>, Span,
coroutine_hidden_types::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::Binder<'tcx, ty::CoroutineWitnessTypes<TyCtxt<'tcx>>>>>>,
pub crate_variances: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_variances::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx ty::CrateVariancesMap<'tcx>>>,
pub variances_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
variances_of::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [ty::Variance]>>,
pub inferred_outlives_crate: for<'tcx> fn(TyCtxt<'tcx>, Span,
inferred_outlives_crate::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx ty::CratePredicatesMap<'tcx>>>,
pub associated_item_def_ids: for<'tcx> fn(TyCtxt<'tcx>, Span,
associated_item_def_ids::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub associated_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
associated_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::AssocItem>>,
pub associated_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
associated_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::AssocItems>>,
pub impl_item_implementor_ids: for<'tcx> fn(TyCtxt<'tcx>, Span,
impl_item_implementor_ids::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DefIdMap<DefId>>>,
pub associated_types_for_impl_traits_in_trait_or_impl: for<'tcx> fn(TyCtxt<'tcx>,
Span, associated_types_for_impl_traits_in_trait_or_impl::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DefIdMap<Vec<DefId>>>>,
pub impl_trait_header: for<'tcx> fn(TyCtxt<'tcx>, Span,
impl_trait_header::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::ImplTraitHeader<'tcx>>>,
pub impl_self_is_guaranteed_unsized: for<'tcx> fn(TyCtxt<'tcx>, Span,
impl_self_is_guaranteed_unsized::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub inherent_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
inherent_impls::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub incoherent_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
incoherent_impls::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub check_transmutes: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_transmutes::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_unsafety: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_unsafety::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_tail_calls: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_tail_calls::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<(),
rustc_errors::ErrorGuaranteed>>>,
pub assumed_wf_types: for<'tcx> fn(TyCtxt<'tcx>, Span,
assumed_wf_types::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [(Ty<'tcx>, Span)]>>,
pub assumed_wf_types_for_rpitit: for<'tcx> fn(TyCtxt<'tcx>, Span,
assumed_wf_types_for_rpitit::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [(Ty<'tcx>, Span)]>>,
pub fn_sig: for<'tcx> fn(TyCtxt<'tcx>, Span, fn_sig::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::EarlyBinder<'tcx,
ty::PolyFnSig<'tcx>>>>,
pub lint_mod: for<'tcx> fn(TyCtxt<'tcx>, Span, lint_mod::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<()>>,
pub check_unused_traits: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_unused_traits::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_mod_attrs: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_mod_attrs::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_mod_unstable_api_usage: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_mod_unstable_api_usage::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_mod_privacy: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_mod_privacy::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_liveness: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_liveness::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_index::bit_set::DenseBitSet<abi::FieldIdx>>>,
pub live_symbols_and_ignored_derived_traits: for<'tcx> fn(TyCtxt<'tcx>,
Span, live_symbols_and_ignored_derived_traits::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Result<(LocalDefIdSet,
LocalDefIdMap<FxIndexSet<DefId>>), ErrorGuaranteed>>>,
pub check_mod_deathness: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_mod_deathness::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub check_type_wf: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_type_wf::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub coerce_unsized_info: for<'tcx> fn(TyCtxt<'tcx>, Span,
coerce_unsized_info::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<ty::adjustment::CoerceUnsizedInfo,
ErrorGuaranteed>>>,
pub typeck: for<'tcx> fn(TyCtxt<'tcx>, Span, typeck::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::TypeckResults<'tcx>>>,
pub used_trait_imports: for<'tcx> fn(TyCtxt<'tcx>, Span,
used_trait_imports::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx UnordSet<LocalDefId>>>,
pub coherent_trait: for<'tcx> fn(TyCtxt<'tcx>, Span,
coherent_trait::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub mir_borrowck: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_borrowck::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx FxIndexMap<LocalDefId,
ty::DefinitionSiteHiddenType<'tcx>>, ErrorGuaranteed>>>,
pub crate_inherent_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_inherent_impls::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<(&'tcx CrateInherentImpls,
Result<(), ErrorGuaranteed>)>>,
pub crate_inherent_impls_validity_check: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_inherent_impls_validity_check::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub crate_inherent_impls_overlap_check: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_inherent_impls_overlap_check::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub orphan_check_impl: for<'tcx> fn(TyCtxt<'tcx>, Span,
orphan_check_impl::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub mir_callgraph_cyclic: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_callgraph_cyclic::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Option<UnordSet<LocalDefId>>>>,
pub mir_inliner_callees: for<'tcx> fn(TyCtxt<'tcx>, Span,
mir_inliner_callees::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(DefId,
GenericArgsRef<'tcx>)]>>,
pub tag_for_variant: for<'tcx> fn(TyCtxt<'tcx>, Span,
tag_for_variant::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<ty::ScalarInt>>>,
pub eval_to_allocation_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
eval_to_allocation_raw::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<EvalToAllocationRawResult<'tcx>>>,
pub eval_static_initializer: for<'tcx> fn(TyCtxt<'tcx>, Span,
eval_static_initializer::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<EvalStaticInitializerRawResult<'tcx>>>,
pub eval_to_const_value_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
eval_to_const_value_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<EvalToConstValueResult<'tcx>>>,
pub eval_to_valtree: for<'tcx> fn(TyCtxt<'tcx>, Span,
eval_to_valtree::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<EvalToValTreeResult<'tcx>>>,
pub valtree_to_const_val: for<'tcx> fn(TyCtxt<'tcx>, Span,
valtree_to_const_val::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<mir::ConstValue>>,
pub lit_to_const: for<'tcx> fn(TyCtxt<'tcx>, Span,
lit_to_const::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::Const<'tcx>>>,
pub check_match: for<'tcx> fn(TyCtxt<'tcx>, Span, check_match::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<(),
rustc_errors::ErrorGuaranteed>>>,
pub effective_visibilities: for<'tcx> fn(TyCtxt<'tcx>, Span,
effective_visibilities::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx EffectiveVisibilities>>,
pub check_private_in_public: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_private_in_public::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub reachable_set: for<'tcx> fn(TyCtxt<'tcx>, Span,
reachable_set::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx LocalDefIdSet>>,
pub region_scope_tree: for<'tcx> fn(TyCtxt<'tcx>, Span,
region_scope_tree::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx crate::middle::region::ScopeTree>>,
pub mir_shims: for<'tcx> fn(TyCtxt<'tcx>, Span, mir_shims::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx mir::Body<'tcx>>>,
pub symbol_name: for<'tcx> fn(TyCtxt<'tcx>, Span, symbol_name::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::SymbolName<'tcx>>>,
pub def_kind: for<'tcx> fn(TyCtxt<'tcx>, Span, def_kind::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<DefKind>>,
pub def_span: for<'tcx> fn(TyCtxt<'tcx>, Span, def_span::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<Span>>,
pub def_ident_span: for<'tcx> fn(TyCtxt<'tcx>, Span,
def_ident_span::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<Span>>>,
pub ty_span: for<'tcx> fn(TyCtxt<'tcx>, Span, ty_span::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<Span>>,
pub lookup_stability: for<'tcx> fn(TyCtxt<'tcx>, Span,
lookup_stability::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<hir::Stability>>>,
pub lookup_const_stability: for<'tcx> fn(TyCtxt<'tcx>, Span,
lookup_const_stability::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<hir::ConstStability>>>,
pub lookup_default_body_stability: for<'tcx> fn(TyCtxt<'tcx>, Span,
lookup_default_body_stability::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<hir::DefaultBodyStability>>>,
pub should_inherit_track_caller: for<'tcx> fn(TyCtxt<'tcx>, Span,
should_inherit_track_caller::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub inherited_align: for<'tcx> fn(TyCtxt<'tcx>, Span,
inherited_align::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<Align>>>,
pub lookup_deprecation_entry: for<'tcx> fn(TyCtxt<'tcx>, Span,
lookup_deprecation_entry::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<DeprecationEntry>>>,
pub is_doc_hidden: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_doc_hidden::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_doc_notable_trait: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_doc_notable_trait::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub attrs_for_def: for<'tcx> fn(TyCtxt<'tcx>, Span,
attrs_for_def::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [hir::Attribute]>>,
pub codegen_fn_attrs: for<'tcx> fn(TyCtxt<'tcx>, Span,
codegen_fn_attrs::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx CodegenFnAttrs>>,
pub asm_target_features: for<'tcx> fn(TyCtxt<'tcx>, Span,
asm_target_features::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx FxIndexSet<Symbol>>>,
pub fn_arg_idents: for<'tcx> fn(TyCtxt<'tcx>, Span,
fn_arg_idents::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [Option<rustc_span::Ident>]>>,
pub rendered_const: for<'tcx> fn(TyCtxt<'tcx>, Span,
rendered_const::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx String>>,
pub rendered_precise_capturing_args: for<'tcx> fn(TyCtxt<'tcx>, Span,
rendered_precise_capturing_args::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx [PreciseCapturingArgKind<Symbol,
Symbol>]>>>,
pub impl_parent: for<'tcx> fn(TyCtxt<'tcx>, Span, impl_parent::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<DefId>>>,
pub is_mir_available: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_mir_available::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub own_existential_vtable_entries: for<'tcx> fn(TyCtxt<'tcx>, Span,
own_existential_vtable_entries::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub vtable_entries: for<'tcx> fn(TyCtxt<'tcx>, Span,
vtable_entries::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [ty::VtblEntry<'tcx>]>>,
pub first_method_vtable_slot: for<'tcx> fn(TyCtxt<'tcx>, Span,
first_method_vtable_slot::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<usize>>,
pub supertrait_vtable_slot: for<'tcx> fn(TyCtxt<'tcx>, Span,
supertrait_vtable_slot::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<usize>>>,
pub vtable_allocation: for<'tcx> fn(TyCtxt<'tcx>, Span,
vtable_allocation::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<mir::interpret::AllocId>>,
pub codegen_select_candidate: for<'tcx> fn(TyCtxt<'tcx>, Span,
codegen_select_candidate::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx ImplSource<'tcx,
()>, CodegenObligationError>>>,
pub all_local_trait_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
all_local_trait_impls::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_data_structures::fx::FxIndexMap<DefId,
Vec<LocalDefId>>>>,
pub local_trait_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
local_trait_impls::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [LocalDefId]>>,
pub trait_impls_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
trait_impls_of::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx ty::trait_def::TraitImpls>>,
pub specialization_graph_of: for<'tcx> fn(TyCtxt<'tcx>, Span,
specialization_graph_of::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx specialization_graph::Graph,
ErrorGuaranteed>>>,
pub dyn_compatibility_violations: for<'tcx> fn(TyCtxt<'tcx>, Span,
dyn_compatibility_violations::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [DynCompatibilityViolation]>>,
pub is_dyn_compatible: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_dyn_compatible::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub param_env: for<'tcx> fn(TyCtxt<'tcx>, Span, param_env::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::ParamEnv<'tcx>>>,
pub typing_env_normalized_for_post_analysis: for<'tcx> fn(TyCtxt<'tcx>,
Span, typing_env_normalized_for_post_analysis::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::TypingEnv<'tcx>>>,
pub is_copy_raw: for<'tcx> fn(TyCtxt<'tcx>, Span, is_copy_raw::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<bool>>,
pub is_use_cloned_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_use_cloned_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_sized_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_sized_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_freeze_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_freeze_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_unpin_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_unpin_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_async_drop_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_async_drop_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub needs_drop_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
needs_drop_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub needs_async_drop_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
needs_async_drop_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_significant_drop_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_significant_drop_raw::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_structural_eq_impl: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_structural_eq_impl::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub adt_drop_tys: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_drop_tys::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>>,
pub adt_async_drop_tys: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_async_drop_tys::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>>,
pub adt_significant_drop_tys: for<'tcx> fn(TyCtxt<'tcx>, Span,
adt_significant_drop_tys::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx ty::List<Ty<'tcx>>,
AlwaysRequiresDrop>>>,
pub list_significant_drop_tys: for<'tcx> fn(TyCtxt<'tcx>, Span,
list_significant_drop_tys::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ty::List<Ty<'tcx>>>>,
pub layout_of: for<'tcx> fn(TyCtxt<'tcx>, Span, layout_of::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<ty::layout::TyAndLayout<'tcx>,
&'tcx ty::layout::LayoutError<'tcx>>>>,
pub fn_abi_of_fn_ptr: for<'tcx> fn(TyCtxt<'tcx>, Span,
fn_abi_of_fn_ptr::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx rustc_target::callconv::FnAbi<'tcx,
Ty<'tcx>>, &'tcx ty::layout::FnAbiError<'tcx>>>>,
pub fn_abi_of_instance: for<'tcx> fn(TyCtxt<'tcx>, Span,
fn_abi_of_instance::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx rustc_target::callconv::FnAbi<'tcx,
Ty<'tcx>>, &'tcx ty::layout::FnAbiError<'tcx>>>>,
pub dylib_dependency_formats: for<'tcx> fn(TyCtxt<'tcx>, Span,
dylib_dependency_formats::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(CrateNum,
LinkagePreference)]>>,
pub dependency_formats: for<'tcx> fn(TyCtxt<'tcx>, Span,
dependency_formats::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Arc<crate::middle::dependency_format::Dependencies>>>,
pub is_compiler_builtins: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_compiler_builtins::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_global_allocator: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_global_allocator::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_alloc_error_handler: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_alloc_error_handler::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_panic_handler: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_panic_handler::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_profiler_runtime: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_profiler_runtime::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub has_ffi_unwind_calls: for<'tcx> fn(TyCtxt<'tcx>, Span,
has_ffi_unwind_calls::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub required_panic_strategy: for<'tcx> fn(TyCtxt<'tcx>, Span,
required_panic_strategy::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<PanicStrategy>>>,
pub panic_in_drop_strategy: for<'tcx> fn(TyCtxt<'tcx>, Span,
panic_in_drop_strategy::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<PanicStrategy>>,
pub is_no_builtins: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_no_builtins::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub symbol_mangling_version: for<'tcx> fn(TyCtxt<'tcx>, Span,
symbol_mangling_version::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<SymbolManglingVersion>>,
pub extern_crate: for<'tcx> fn(TyCtxt<'tcx>, Span,
extern_crate::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<&'tcx ExternCrate>>>,
pub specialization_enabled_in: for<'tcx> fn(TyCtxt<'tcx>, Span,
specialization_enabled_in::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub specializes: for<'tcx> fn(TyCtxt<'tcx>, Span, specializes::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<bool>>,
pub in_scope_traits_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
in_scope_traits_map::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx ItemLocalMap<Box<[TraitCandidate]>>>>>,
pub defaultness: for<'tcx> fn(TyCtxt<'tcx>, Span, defaultness::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<hir::Defaultness>>,
pub default_field: for<'tcx> fn(TyCtxt<'tcx>, Span,
default_field::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<DefId>>>,
pub check_well_formed: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_well_formed::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub enforce_impl_non_lifetime_params_are_constrained: for<'tcx> fn(TyCtxt<'tcx>,
Span, enforce_impl_non_lifetime_params_are_constrained::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub reachable_non_generics: for<'tcx> fn(TyCtxt<'tcx>, Span,
reachable_non_generics::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx DefIdMap<SymbolExportInfo>>>,
pub is_reachable_non_generic: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_reachable_non_generic::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub is_unreachable_local_definition: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_unreachable_local_definition::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub upstream_monomorphizations: for<'tcx> fn(TyCtxt<'tcx>, Span,
upstream_monomorphizations::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx DefIdMap<UnordMap<GenericArgsRef<'tcx>,
CrateNum>>>>,
pub upstream_monomorphizations_for: for<'tcx> fn(TyCtxt<'tcx>, Span,
upstream_monomorphizations_for::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx UnordMap<GenericArgsRef<'tcx>,
CrateNum>>>>,
pub upstream_drop_glue_for: for<'tcx> fn(TyCtxt<'tcx>, Span,
upstream_drop_glue_for::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<CrateNum>>>,
pub upstream_async_drop_glue_for: for<'tcx> fn(TyCtxt<'tcx>, Span,
upstream_async_drop_glue_for::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<CrateNum>>>,
pub foreign_modules: for<'tcx> fn(TyCtxt<'tcx>, Span,
foreign_modules::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx FxIndexMap<DefId,
ForeignModule>>>,
pub clashing_extern_declarations: for<'tcx> fn(TyCtxt<'tcx>, Span,
clashing_extern_declarations::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub entry_fn: for<'tcx> fn(TyCtxt<'tcx>, Span, entry_fn::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<(DefId, EntryFnType)>>>,
pub proc_macro_decls_static: for<'tcx> fn(TyCtxt<'tcx>, Span,
proc_macro_decls_static::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<LocalDefId>>>,
pub crate_hash: for<'tcx> fn(TyCtxt<'tcx>, Span, crate_hash::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<Svh>>,
pub crate_host_hash: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_host_hash::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<Svh>>>,
pub extra_filename: for<'tcx> fn(TyCtxt<'tcx>, Span,
extra_filename::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx String>>,
pub crate_extern_paths: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_extern_paths::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Vec<PathBuf>>>,
pub implementations_of_trait: for<'tcx> fn(TyCtxt<'tcx>, Span,
implementations_of_trait::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(DefId,
Option<SimplifiedType>)]>>,
pub crate_incoherent_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_incoherent_impls::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub native_library: for<'tcx> fn(TyCtxt<'tcx>, Span,
native_library::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<&'tcx NativeLib>>>,
pub inherit_sig_for_delegation_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
inherit_sig_for_delegation_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [Ty<'tcx>]>>,
pub resolve_bound_vars: for<'tcx> fn(TyCtxt<'tcx>, Span,
resolve_bound_vars::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx ResolveBoundVars<'tcx>>>,
pub named_variable_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
named_variable_map::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx SortedMap<ItemLocalId,
ResolvedArg>>>,
pub is_late_bound_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_late_bound_map::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx FxIndexSet<ItemLocalId>>>>,
pub object_lifetime_default: for<'tcx> fn(TyCtxt<'tcx>, Span,
object_lifetime_default::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ObjectLifetimeDefault>>,
pub late_bound_vars_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
late_bound_vars_map::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx SortedMap<ItemLocalId,
Vec<ty::BoundVariableKind<'tcx>>>>>,
pub opaque_captured_lifetimes: for<'tcx> fn(TyCtxt<'tcx>, Span,
opaque_captured_lifetimes::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(ResolvedArg,
LocalDefId)]>>,
pub visibility: for<'tcx> fn(TyCtxt<'tcx>, Span, visibility::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::Visibility<DefId>>>,
pub inhabited_predicate_adt: for<'tcx> fn(TyCtxt<'tcx>, Span,
inhabited_predicate_adt::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::inhabitedness::InhabitedPredicate<'tcx>>>,
pub inhabited_predicate_type: for<'tcx> fn(TyCtxt<'tcx>, Span,
inhabited_predicate_type::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<ty::inhabitedness::InhabitedPredicate<'tcx>>>,
pub dep_kind: for<'tcx> fn(TyCtxt<'tcx>, Span, dep_kind::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<CrateDepKind>>,
pub crate_name: for<'tcx> fn(TyCtxt<'tcx>, Span, crate_name::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Symbol>>,
pub module_children: for<'tcx> fn(TyCtxt<'tcx>, Span,
module_children::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [ModChild]>>,
pub num_extern_def_ids: for<'tcx> fn(TyCtxt<'tcx>, Span,
num_extern_def_ids::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<usize>>,
pub lib_features: for<'tcx> fn(TyCtxt<'tcx>, Span,
lib_features::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx LibFeatures>>,
pub stability_implications: for<'tcx> fn(TyCtxt<'tcx>, Span,
stability_implications::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx UnordMap<Symbol,
Symbol>>>,
pub intrinsic_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
intrinsic_raw::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<rustc_middle::ty::IntrinsicDef>>>,
pub get_lang_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
get_lang_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx LanguageItems>>,
pub all_diagnostic_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
all_diagnostic_items::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_hir::diagnostic_items::DiagnosticItems>>,
pub defined_lang_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
defined_lang_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [(DefId, LangItem)]>>,
pub diagnostic_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
diagnostic_items::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx rustc_hir::diagnostic_items::DiagnosticItems>>,
pub missing_lang_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
missing_lang_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [LangItem]>>,
pub visible_parent_map: for<'tcx> fn(TyCtxt<'tcx>, Span,
visible_parent_map::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DefIdMap<DefId>>>,
pub trimmed_def_paths: for<'tcx> fn(TyCtxt<'tcx>, Span,
trimmed_def_paths::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DefIdMap<Symbol>>>,
pub missing_extern_crate_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
missing_extern_crate_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub used_crate_source: for<'tcx> fn(TyCtxt<'tcx>, Span,
used_crate_source::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Arc<CrateSource>>>,
pub debugger_visualizers: for<'tcx> fn(TyCtxt<'tcx>, Span,
debugger_visualizers::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Vec<DebuggerVisualizerFile>>>,
pub postorder_cnums: for<'tcx> fn(TyCtxt<'tcx>, Span,
postorder_cnums::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [CrateNum]>>,
pub is_private_dep: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_private_dep::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub allocator_kind: for<'tcx> fn(TyCtxt<'tcx>, Span,
allocator_kind::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<AllocatorKind>>>,
pub alloc_error_handler_kind: for<'tcx> fn(TyCtxt<'tcx>, Span,
alloc_error_handler_kind::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Option<AllocatorKind>>>,
pub upvars_mentioned: for<'tcx> fn(TyCtxt<'tcx>, Span,
upvars_mentioned::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx FxIndexMap<hir::HirId,
hir::Upvar>>>>,
pub crates: for<'tcx> fn(TyCtxt<'tcx>, Span, crates::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [CrateNum]>>,
pub used_crates: for<'tcx> fn(TyCtxt<'tcx>, Span, used_crates::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [CrateNum]>>,
pub duplicate_crate_names: for<'tcx> fn(TyCtxt<'tcx>, Span,
duplicate_crate_names::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [CrateNum]>>,
pub traits: for<'tcx> fn(TyCtxt<'tcx>, Span, traits::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub trait_impls_in_crate: for<'tcx> fn(TyCtxt<'tcx>, Span,
trait_impls_in_crate::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub stable_order_of_exportable_impls: for<'tcx> fn(TyCtxt<'tcx>, Span,
stable_order_of_exportable_impls::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx FxIndexMap<DefId,
usize>>>,
pub exportable_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
exportable_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub exported_non_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>, Span,
exported_non_generic_symbols::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(ExportedSymbol<'tcx>,
SymbolExportInfo)]>>,
pub exported_generic_symbols: for<'tcx> fn(TyCtxt<'tcx>, Span,
exported_generic_symbols::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx [(ExportedSymbol<'tcx>,
SymbolExportInfo)]>>,
pub collect_and_partition_mono_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
collect_and_partition_mono_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<MonoItemPartitions<'tcx>>>,
pub is_codegened_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_codegened_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub codegen_unit: for<'tcx> fn(TyCtxt<'tcx>, Span,
codegen_unit::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx CodegenUnit<'tcx>>>,
pub backend_optimization_level: for<'tcx> fn(TyCtxt<'tcx>, Span,
backend_optimization_level::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<OptLevel>>,
pub output_filenames: for<'tcx> fn(TyCtxt<'tcx>, Span,
output_filenames::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Arc<OutputFilenames>>>,
pub normalize_canonicalized_projection: for<'tcx> fn(TyCtxt<'tcx>, Span,
normalize_canonicalized_projection::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>>,
pub normalize_canonicalized_free_alias: for<'tcx> fn(TyCtxt<'tcx>, Span,
normalize_canonicalized_free_alias::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>>,
pub normalize_canonicalized_inherent_projection: for<'tcx> fn(TyCtxt<'tcx>,
Span, normalize_canonicalized_inherent_projection::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution>>>,
pub try_normalize_generic_arg_after_erasing_regions: for<'tcx> fn(TyCtxt<'tcx>,
Span, try_normalize_generic_arg_after_erasing_regions::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<GenericArg<'tcx>,
NoSolution>>>,
pub implied_outlives_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
implied_outlives_bounds::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
NoSolution>>>,
pub dropck_outlives: for<'tcx> fn(TyCtxt<'tcx>, Span,
dropck_outlives::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
NoSolution>>>,
pub evaluate_obligation: for<'tcx> fn(TyCtxt<'tcx>, Span,
evaluate_obligation::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<EvaluationResult,
OverflowError>>>,
pub type_op_ascribe_user_type: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_ascribe_user_type::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ()>>, NoSolution>>>,
pub type_op_prove_predicate: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_prove_predicate::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ()>>, NoSolution>>>,
pub type_op_normalize_ty: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_normalize_ty::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, Ty<'tcx>>>, NoSolution>>>,
pub type_op_normalize_clause: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_normalize_clause::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::Clause<'tcx>>>, NoSolution>>>,
pub type_op_normalize_poly_fn_sig: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_normalize_poly_fn_sig::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
NoSolution>>>,
pub type_op_normalize_fn_sig: for<'tcx> fn(TyCtxt<'tcx>, Span,
type_op_normalize_fn_sig::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<&'tcx Canonical<'tcx,
canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>, NoSolution>>>,
pub instantiate_and_check_impossible_predicates: for<'tcx> fn(TyCtxt<'tcx>,
Span, instantiate_and_check_impossible_predicates::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<bool>>,
pub is_impossible_associated_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
is_impossible_associated_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub method_autoderef_steps: for<'tcx> fn(TyCtxt<'tcx>, Span,
method_autoderef_steps::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<MethodAutoderefStepsResult<'tcx>>>,
pub evaluate_root_goal_for_proof_tree_raw: for<'tcx> fn(TyCtxt<'tcx>,
Span, evaluate_root_goal_for_proof_tree_raw::Key<'tcx>,
crate::query::QueryMode)
->
Option<crate::query::erase::Erased<(solve::QueryResult<'tcx>,
&'tcx solve::inspect::Probe<TyCtxt<'tcx>>)>>,
pub rust_target_features: for<'tcx> fn(TyCtxt<'tcx>, Span,
rust_target_features::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx UnordMap<String,
rustc_target::target_features::Stability>>>,
pub implied_target_features: for<'tcx> fn(TyCtxt<'tcx>, Span,
implied_target_features::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Vec<Symbol>>>,
pub features_query: for<'tcx> fn(TyCtxt<'tcx>, Span,
features_query::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx rustc_feature::Features>>,
pub crate_for_resolver: for<'tcx> fn(TyCtxt<'tcx>, Span,
crate_for_resolver::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx Steal<(rustc_ast::Crate,
rustc_ast::AttrVec)>>>,
pub resolve_instance_raw: for<'tcx> fn(TyCtxt<'tcx>, Span,
resolve_instance_raw::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<Option<ty::Instance<'tcx>>,
ErrorGuaranteed>>>,
pub reveal_opaque_types_in_bounds: for<'tcx> fn(TyCtxt<'tcx>, Span,
reveal_opaque_types_in_bounds::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::Clauses<'tcx>>>,
pub limits: for<'tcx> fn(TyCtxt<'tcx>, Span, limits::Key<'tcx>,
crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Limits>>,
pub diagnostic_hir_wf_check: for<'tcx> fn(TyCtxt<'tcx>, Span,
diagnostic_hir_wf_check::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<&'tcx ObligationCause<'tcx>>>>,
pub global_backend_features: for<'tcx> fn(TyCtxt<'tcx>, Span,
global_backend_features::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx Vec<String>>>,
pub check_validity_requirement: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_validity_requirement::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<bool,
&'tcx ty::layout::LayoutError<'tcx>>>>,
pub compare_impl_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
compare_impl_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<Result<(), ErrorGuaranteed>>>,
pub deduced_param_attrs: for<'tcx> fn(TyCtxt<'tcx>, Span,
deduced_param_attrs::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DeducedParamAttrs]>>,
pub doc_link_resolutions: for<'tcx> fn(TyCtxt<'tcx>, Span,
doc_link_resolutions::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx DocLinkResMap>>,
pub doc_link_traits_in_scope: for<'tcx> fn(TyCtxt<'tcx>, Span,
doc_link_traits_in_scope::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [DefId]>>,
pub stripped_cfg_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
stripped_cfg_items::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx [StrippedCfgItem]>>,
pub generics_require_sized_self: for<'tcx> fn(TyCtxt<'tcx>, Span,
generics_require_sized_self::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub cross_crate_inlinable: for<'tcx> fn(TyCtxt<'tcx>, Span,
cross_crate_inlinable::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<bool>>,
pub check_mono_item: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_mono_item::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<()>>,
pub skip_move_check_fns: for<'tcx> fn(TyCtxt<'tcx>, Span,
skip_move_check_fns::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<&'tcx FxIndexSet<DefId>>>,
pub items_of_instance: for<'tcx> fn(TyCtxt<'tcx>, Span,
items_of_instance::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Result<(&'tcx [Spanned<MonoItem<'tcx>>],
&'tcx [Spanned<MonoItem<'tcx>>]), NormalizationErrorInMono>>>,
pub size_estimate: for<'tcx> fn(TyCtxt<'tcx>, Span,
size_estimate::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<usize>>,
pub anon_const_kind: for<'tcx> fn(TyCtxt<'tcx>, Span,
anon_const_kind::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<ty::AnonConstKind>>,
pub trivial_const: for<'tcx> fn(TyCtxt<'tcx>, Span,
trivial_const::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<Option<(mir::ConstValue,
Ty<'tcx>)>>>,
pub sanitizer_settings_for: for<'tcx> fn(TyCtxt<'tcx>, Span,
sanitizer_settings_for::Key<'tcx>, crate::query::QueryMode)
-> Option<crate::query::erase::Erased<SanitizerFnAttrs>>,
pub check_externally_implementable_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
check_externally_implementable_items::Key<'tcx>,
crate::query::QueryMode) -> Option<crate::query::erase::Erased<()>>,
pub externally_implementable_items: for<'tcx> fn(TyCtxt<'tcx>, Span,
externally_implementable_items::Key<'tcx>, crate::query::QueryMode)
->
Option<crate::query::erase::Erased<&'tcx FxIndexMap<DefId,
(EiiDecl, FxIndexMap<DefId, EiiImpl>)>>>,
}rustc_with_all_queries! { define_callbacks! }2770impl<'tcx, K: crate::query::IntoQueryParam<LocalDefId> + Copy>
TyCtxtFeed<'tcx, K> {
#[inline(always)]
pub fn sanitizer_settings_for(self,
value: sanitizer_settings_for::ProvidedValue<'tcx>) {
let key = self.key().into_query_param();
let tcx = self.tcx;
let erased_value =
sanitizer_settings_for::provided_to_erased(tcx, value);
let dep_kind: dep_graph::DepKind =
dep_graph::dep_kinds::sanitizer_settings_for;
crate::query::inner::query_feed(tcx, dep_kind,
&tcx.query_system.query_vtables.sanitizer_settings_for,
&tcx.query_system.caches.sanitizer_settings_for, key,
erased_value);
}
}rustc_feedable_queries! { define_feedable! }