Skip to main content

rustc_middle/dep_graph/
dep_node.rs

1//! This module defines the [`DepNode`] type which the compiler uses to represent
2//! nodes in the [dependency graph]. A `DepNode` consists of a [`DepKind`] (which
3//! specifies the kind of thing it represents, like a piece of HIR, MIR, etc.)
4//! and a "key fingerprint", a 128-bit hash value, the exact meaning of which
5//! depends on the node's `DepKind`. Together, the kind and the key fingerprint
6//! fully identify a dependency node, even across multiple compilation sessions.
7//! In other words, the value of the key fingerprint does not depend on anything
8//! that is specific to a given compilation session, like an unpredictable
9//! interning key (e.g., `NodeId`, `DefId`, `Symbol`) or the numeric value of a
10//! pointer. The concept behind this could be compared to how git commit hashes
11//! uniquely identify a given commit. The fingerprinting approach has
12//! a few advantages:
13//!
14//! * A `DepNode` can simply be serialized to disk and loaded in another session
15//!   without the need to do any "rebasing" (like we have to do for Spans and
16//!   NodeIds) or "retracing" (like we had to do for `DefId` in earlier
17//!   implementations of the dependency graph).
18//! * A `Fingerprint` is just a bunch of bits, which allows `DepNode` to
19//!   implement `Copy`, `Sync`, `Send`, `Freeze`, etc.
20//! * Since we just have a bit pattern, `DepNode` can be mapped from disk into
21//!   memory without any post-processing (e.g., "abomination-style" pointer
22//!   reconstruction).
23//! * Because a `DepNode` is self-contained, we can instantiate `DepNodes` that
24//!   refer to things that do not exist anymore. In previous implementations
25//!   `DepNode` contained a `DefId`. A `DepNode` referring to something that
26//!   had been removed between the previous and the current compilation session
27//!   could not be instantiated because the current compilation session
28//!   contained no `DefId` for thing that had been removed.
29//!
30//! `DepNode` definition happens in `rustc_middle` with the
31//! `define_dep_nodes!()` macro. This macro defines the `DepKind` enum. Each
32//! `DepKind` has its own parameters that are needed at runtime in order to
33//! construct a valid `DepNode` fingerprint. However, only `CompileCodegenUnit`
34//! and `CompileMonoItem` are constructed explicitly (with
35//! `make_compile_codegen_unit` and `make_compile_mono_item`).
36//!
37//! Because the macro sees what parameters a given `DepKind` requires, it can
38//! "infer" some properties for each kind of `DepNode`:
39//!
40//! * Whether a `DepNode` of a given kind has any parameters at all. Some
41//!   `DepNode`s could represent global concepts with only one value.
42//! * Whether it is possible, in principle, to reconstruct a query key from a
43//!   given `DepNode`. Many `DepKind`s only require a single `DefId` parameter,
44//!   in which case it is possible to map the node's key fingerprint back to the
45//!   `DefId` it was computed from. In other cases, too much information gets
46//!   lost when computing a key fingerprint.
47//!
48//! [dependency graph]: https://rustc-dev-guide.rust-lang.org/query.html
49
50use std::fmt;
51use std::hash::Hash;
52
53use rustc_data_structures::fingerprint::{Fingerprint, PackedFingerprint};
54use rustc_data_structures::stable_hash::{StableHasher, StableOrd};
55use rustc_hir::def_id::DefId;
56use rustc_hir::definitions::DefPathHash;
57use rustc_macros::{Decodable, Encodable, StableHash};
58use rustc_span::Symbol;
59
60use super::{DepNodeIndex, KeyFingerprintStyle, SerializedDepNodeIndex};
61use crate::dep_graph::DepNodeKey;
62use crate::mono::MonoItem;
63use crate::ty::{TyCtxt, tls};
64
65// `enum DepKind` is generated by `define_dep_nodes!` below.
66impl DepKind {
67    #[inline]
68    pub(crate) fn from_u16(u: u16) -> Self {
69        if u > Self::MAX {
70            { ::core::panicking::panic_fmt(format_args!("Invalid DepKind {0}", u)); };panic!("Invalid DepKind {u}");
71        }
72        // SAFETY: `DepKind` is `repr(u16)`, its variants are `0..=MAX`, and `u` was checked
73        // against `MAX` above.
74        unsafe { std::mem::transmute(u) }
75    }
76
77    #[inline]
78    pub(crate) const fn as_u16(&self) -> u16 {
79        *self as u16
80    }
81
82    #[inline]
83    pub const fn as_usize(&self) -> usize {
84        *self as usize
85    }
86
87    /// The number of dep kind variants.
88    pub(crate) const NUM_VARIANTS: usize = std::mem::variant_count::<DepKind>();
89
90    /// This is the highest value a `DepKind` can have. It's used during encoding to
91    /// pack information into the unused bits. u16 matches the `repr(u16)` on `DepKind`.
92    pub(crate) const MAX: u16 = {
93        let max = Self::NUM_VARIANTS - 1;
94        if !(max < u16::MAX as usize) {
    ::core::panicking::panic("assertion failed: max < u16::MAX as usize")
};assert!(max < u16::MAX as usize);
95        max as u16
96    };
97}
98
99/// Combination of a [`DepKind`] and a key fingerprint that uniquely identifies
100/// a node in the dep graph.
101#[derive(#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for DepNode { }
#[automatically_derived]
impl ::core::clone::Clone for DepNode {
    #[inline]
    fn clone(&self) -> DepNode {
        let _: ::core::clone::AssertParamIsClone<DepKind>;
        let _: ::core::clone::AssertParamIsClone<PackedFingerprint>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for DepNode { }Copy, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for DepNode { }
#[automatically_derived]
impl ::core::cmp::PartialEq for DepNode {
    #[inline]
    fn eq(&self, other: &DepNode) -> bool {
        self.kind == other.kind &&
            self.key_fingerprint == other.key_fingerprint
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for DepNode {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<DepKind>;
        let _: ::core::cmp::AssertParamIsEq<PackedFingerprint>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for DepNode {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.kind, state);
        ::core::hash::Hash::hash(&self.key_fingerprint, state)
    }
}Hash)]
102pub struct DepNode {
103    pub kind: DepKind,
104
105    /// If `kind` is a query method, then its "key fingerprint" is always a
106    /// stable hash of the query key.
107    ///
108    /// For non-query nodes, the content of this field varies:
109    /// - Some dep kinds always use a dummy `ZERO` fingerprint.
110    /// - Some dep kinds use the stable hash of some relevant key-like value.
111    /// - Some dep kinds use the `with_anon_task` mechanism, and set their key
112    ///   fingerprint to a hash derived from the task's dependencies.
113    ///
114    /// In some cases the key value can be reconstructed from this fingerprint;
115    /// see [`KeyFingerprintStyle`].
116    pub key_fingerprint: PackedFingerprint,
117}
118
119impl DepNode {
120    /// Creates a new, parameterless DepNode. This method will assert
121    /// that the DepNode corresponding to the given DepKind actually
122    /// does not require any parameters.
123    pub fn new_no_params<'tcx>(tcx: TyCtxt<'tcx>, kind: DepKind) -> DepNode {
124        if true {
    {
        match (&tcx.key_fingerprint_style(kind), &KeyFingerprintStyle::Unit) {
            (left_val, right_val) => {
                if !(*left_val == *right_val) {
                    let kind = ::core::panicking::AssertKind::Eq;
                    ::core::panicking::assert_failed(kind, &*left_val,
                        &*right_val, ::core::option::Option::None);
                }
            }
        }
    };
};debug_assert_eq!(tcx.key_fingerprint_style(kind), KeyFingerprintStyle::Unit);
125        DepNode { kind, key_fingerprint: Fingerprint::ZERO.into() }
126    }
127
128    pub fn construct<'tcx, Key>(tcx: TyCtxt<'tcx>, kind: DepKind, key: &Key) -> DepNode
129    where
130        Key: DepNodeKey<'tcx>,
131    {
132        DepNode { kind, key_fingerprint: key.to_fingerprint(tcx).into() }
133    }
134
135    /// Construct a DepNode from the given DepKind and DefPathHash. This
136    /// method will assert that the given DepKind actually requires a
137    /// single DefId/DefPathHash parameter.
138    pub fn from_def_path_hash<'tcx>(
139        tcx: TyCtxt<'tcx>,
140        def_path_hash: DefPathHash,
141        kind: DepKind,
142    ) -> Self {
143        if true {
    if !(tcx.key_fingerprint_style(kind) == KeyFingerprintStyle::DefPathHash)
        {
        ::core::panicking::panic("assertion failed: tcx.key_fingerprint_style(kind) == KeyFingerprintStyle::DefPathHash")
    };
};debug_assert!(tcx.key_fingerprint_style(kind) == KeyFingerprintStyle::DefPathHash);
144        DepNode { kind, key_fingerprint: def_path_hash.0.into() }
145    }
146}
147
148impl fmt::Debug for DepNode {
149    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
150        tls::with_opt(|opt_tcx| {
151            if let Some(tcx) = opt_tcx
152                && let Some(def_id) = self.extract_def_id(tcx)
153            {
154                f.write_fmt(format_args!("{0:?}({1})", self.kind,
        tcx.def_path_debug_str(def_id)))write!(f, "{:?}({})", self.kind, tcx.def_path_debug_str(def_id))?;
155            } else {
156                f.write_fmt(format_args!("{0:?}({1})", self.kind, self.key_fingerprint))write!(f, "{:?}({})", self.kind, self.key_fingerprint)?;
157            }
158            Ok(())
159        })
160    }
161}
162
163/// This struct stores function pointers and other metadata for a particular DepKind.
164///
165/// Information is retrieved by indexing the `DEP_KINDS` array using the integer value
166/// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
167/// jump table instead of large matches.
168pub struct DepKindVTable<'tcx> {
169    /// Eval-always queries do not track their dependencies, and are always recomputed, even if
170    /// their inputs have not changed since the last compiler invocation. The result is still
171    /// cached within one compiler invocation.
172    pub is_eval_always: bool,
173
174    /// Indicates whether and how a query key can be reconstructed from the
175    /// key fingerprint of a dep node with this [`DepKind`].
176    ///
177    /// The [`DepNodeKey`] trait determines the fingerprint style for each key type.
178    pub key_fingerprint_style: KeyFingerprintStyle,
179
180    /// The red/green evaluation system will try to mark a specific DepNode in the
181    /// dependency graph as green by recursively trying to mark the dependencies of
182    /// that `DepNode` as green. While doing so, it will sometimes encounter a `DepNode`
183    /// where we don't know if it is red or green and we therefore actually have
184    /// to recompute its value in order to find out. Since the only piece of
185    /// information that we have at that point is the `DepNode` we are trying to
186    /// re-evaluate, we need some way to re-run a query from just that. This is what
187    /// `force_from_dep_node()` implements.
188    ///
189    /// In the general case, a `DepNode` consists of a `DepKind` and an opaque
190    /// "key fingerprint" that will uniquely identify the node. This key fingerprint
191    /// is usually constructed by computing a stable hash of the query-key that the
192    /// `DepNode` corresponds to. Consequently, it is not in general possible to go
193    /// back from hash to query-key (since hash functions are not reversible). For
194    /// this reason `force_from_dep_node()` is expected to fail from time to time
195    /// because we just cannot find out, from the `DepNode` alone, what the
196    /// corresponding query-key is and therefore cannot re-run the query.
197    ///
198    /// The system deals with this case letting `try_mark_green` fail which forces
199    /// the root query to be re-evaluated.
200    ///
201    /// Now, if `force_from_dep_node()` would always fail, it would be pretty useless.
202    /// Fortunately, we can use some contextual information that will allow us to
203    /// reconstruct query-keys for certain kinds of `DepNode`s. In particular, we
204    /// enforce by construction that the key fingerprint of certain `DepNode`s is a
205    /// valid `DefPathHash`. Since we also always build a huge table that maps every
206    /// `DefPathHash` in the current codebase to the corresponding `DefId`, we have
207    /// everything we need to re-run the query.
208    ///
209    /// Take the `mir_promoted` query as an example. Like many other queries, it
210    /// just has a single parameter: the `DefId` of the item it will compute the
211    /// validated MIR for. Now, when we call `force_from_dep_node()` on a `DepNode`
212    /// with kind `mir_promoted`, we know that the key fingerprint of the `DepNode`
213    /// is actually a `DefPathHash`, and can therefore just look up the corresponding
214    /// `DefId` in `tcx.def_path_hash_to_def_id`.
215    pub force_from_dep_node_fn: Option<
216        fn(tcx: TyCtxt<'tcx>, dep_node: DepNode, prev_index: SerializedDepNodeIndex) -> bool,
217    >,
218
219    /// Load the on-disk cached value of a query into memory. The node is known
220    /// to be green, with `prev_index` its index in the previous session's dep
221    /// graph and `dep_node_index` its index in the current session's dep graph.
222    pub promote_from_disk_fn: Option<
223        fn(
224            tcx: TyCtxt<'tcx>,
225            dep_node: DepNode,
226            prev_index: SerializedDepNodeIndex,
227            dep_node_index: DepNodeIndex,
228        ),
229    >,
230}
231
232/// A "work product" corresponds to a `.o` (or other) file that we
233/// save in between runs. These IDs do not have a `DefId` but rather
234/// some independent path or string that persists between runs without
235/// the need to be mapped or unmapped. (This ensures we can serialize
236/// them even in the absence of a tcx.)
237#[derive(#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for WorkProductId { }
#[automatically_derived]
impl ::core::clone::Clone for WorkProductId {
    #[inline]
    fn clone(&self) -> WorkProductId {
        let _: ::core::clone::AssertParamIsClone<Fingerprint>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for WorkProductId { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for WorkProductId {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "WorkProductId",
            "hash", &&self.hash)
    }
}Debug, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for WorkProductId { }
#[automatically_derived]
impl ::core::cmp::PartialEq for WorkProductId {
    #[inline]
    fn eq(&self, other: &WorkProductId) -> bool { self.hash == other.hash }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for WorkProductId {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Fingerprint>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WorkProductId {
    #[inline]
    fn partial_cmp(&self, other: &WorkProductId)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::option::Option::Some(::core::cmp::Ord::cmp(self, other))
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for WorkProductId {
    #[inline]
    fn cmp(&self, other: &WorkProductId) -> ::core::cmp::Ordering {
        ::core::cmp::Ord::cmp(&self.hash, &other.hash)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WorkProductId {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.hash, state)
    }
}Hash)]
238#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WorkProductId {
            fn encode(&self, __encoder: &mut __E) {
                let WorkProductId { hash: ref __binding_0 } = *self;
                ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                    __encoder);
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WorkProductId {
            fn decode(__decoder: &mut __D) -> Self {
                WorkProductId {
                    hash: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, const _: () =
    {
        impl ::rustc_data_structures::stable_hash::StableHash for
            WorkProductId {
            #[inline]
            fn stable_hash<__Hcx: ::rustc_data_structures::stable_hash::StableHashCtxt>(&self,
                __hcx: &mut __Hcx,
                __hasher:
                    &mut ::rustc_data_structures::stable_hash::StableHasher) {
                match *self {
                    WorkProductId { hash: ref __binding_0 } => {
                        { __binding_0.stable_hash(__hcx, __hasher); }
                    }
                }
            }
        }
    };StableHash)]
239pub struct WorkProductId {
240    hash: Fingerprint,
241}
242
243impl WorkProductId {
244    pub fn from_cgu_name(cgu_name: &str) -> WorkProductId {
245        let mut hasher = StableHasher::new();
246        cgu_name.hash(&mut hasher);
247        WorkProductId { hash: hasher.finish() }
248    }
249}
250
251impl StableOrd for WorkProductId {
252    // Fingerprint can use unstable (just a tuple of `u64`s), so WorkProductId can as well
253    const CAN_USE_UNSTABLE_SORT: bool = true;
254
255    // `WorkProductId` sort order is not affected by (de)serialization.
256    const THIS_IMPLEMENTATION_HAS_BEEN_TRIPLE_CHECKED: () = ();
257}
258
259// Note: `$K` and `$V` are unused but present so this can be called by `rustc_with_all_queries`.
260macro_rules! define_dep_nodes {
261    (
262        queries {
263            $(
264                $(#[$q_attr:meta])*
265                fn $q_name:ident($K:ty) -> $V:ty
266                // Search for (QMODLIST) to find all occurrences of this query modifier list.
267                // Query modifiers are currently not used here, so skip the whole list.
268                { $($modifiers:tt)* }
269            )*
270        }
271        non_queries {
272            $(
273                $(#[$nq_attr:meta])*
274                $nq_name:ident,
275            )*
276        }
277    ) => {
278        // This enum has more than u8::MAX variants so we need some kind of multi-byte
279        // encoding. The derived Encodable/Decodable uses leb128 encoding which is
280        // dense when only considering this enum. But DepKind is encoded in a larger
281        // struct, and there we can take advantage of the unused bits in the u16.
282        #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
283        #[allow(non_camel_case_types)]
284        #[repr(u16)] // Must be kept in sync with the rest of `DepKind`.
285        pub enum DepKind {
286            $( $(#[$nq_attr])* $nq_name, )*
287            $( $(#[$q_attr])* $q_name, )*
288        }
289
290        /// Converts a string to a `DepKind`. Used for handling attributes like `rustc_clean` that
291        /// name dep kinds.
292        fn dep_kind_from_label_string(label: &str) -> Result<DepKind, ()> {
293            match label {
294                $( stringify!($nq_name) => Ok(self::DepKind::$nq_name), )*
295                $( stringify!($q_name) => Ok(self::DepKind::$q_name), )*
296                _ => Err(()),
297            }
298        }
299    };
300}
301
302// Create various data structures for each query, and also for a few things that aren't queries.
303#[allow(non_camel_case_types)]
#[repr(u16)]
pub enum DepKind {

    #[doc = " We use this for most things when incr. comp. is turned off."]
    Null,

    #[doc = " We use this to create a forever-red node."]
    Red,

    #[doc = " We use this to create a side effect node."]
    SideEffect,

    #[doc = " We use this to create the anon node with zero dependencies."]
    AnonZeroDeps,
    TraitSelect,
    CompileCodegenUnit,
    CompileMonoItem,
    Metadata,

    #[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."]
    derive_macro_expansion,

    #[doc =
    " This exists purely for testing the interactions between delayed bugs and incremental."]
    trigger_delayed_bug,

    #[doc =
    " Collects the list of all tools registered using `#![register_tool]` or `#![register_attribute_tool]`."]
    registered_attr_tools,

    #[doc =
    " Collects the list of all tools registered using `#![register_tool]` or `#![register_lint_tool]`."]
    registered_lint_tools,

    #[doc =
    "[query description - consider adding a doc-comment!] perform lints prior to AST lowering"]
    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."]
    env_var_os,

    #[doc =
    "[query description - consider adding a doc-comment!] getting the resolver outputs"]
    resolutions,

    #[doc =
    "[query description - consider adding a doc-comment!] getting the resolver for lowering"]
    resolver_for_lowering_raw,

    #[doc =
    "[query description - consider adding a doc-comment!] getting the AST for lowering"]
    index_ast,

    #[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."]
    source_span,

    #[doc =
    "[query description - consider adding a doc-comment!] lowering HIR for  `tcx.def_path_str(def_id)` "]
    lower_to_hir,

    #[doc =
    "[query description - consider adding a doc-comment!] getting owner for  `tcx.def_path_str(def_id)` "]
    hir_owner,

    #[doc = " All items in the crate."]
    hir_crate_items,

    #[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."]
    hir_module_items,

    #[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."]
    hir_owner_parent_q,

    #[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."]
    hir_attr_map,

    #[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`."]
    const_param_default,

    #[doc =
    " Returns the const of the RHS of a (free or assoc) const item, if it is a `type const`, or if"]
    #[doc =
    " it is a directly represented `const` (i.e. a const with a `direct_const_arg!` RHS, or a"]
    #[doc =
    " const that `feature(macroless_generic_const_args)` has decided is direct)."]
    #[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 =
    " Returns `None` if the constant does not have a directly represented RHS. This does not"]
    #[doc =
    " necessarily mean the constant is invalid to use in the type system, as is the case for a"]
    #[doc = " `type const` in a trait definition without a RHS."]
    #[doc = ""]
    #[doc = " # Panics"]
    #[doc = ""]
    #[doc =
    " This query will panic if the given definition isn\'t a const item (free or associated const)."]
    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"]
    type_of,

    #[doc = " Returns the *hidden type* of the opaque type given by `DefId`."]
    #[doc = ""]
    #[doc = " # Panics"]
    #[doc = ""]
    #[doc =
    " This query will panic if the given definition is not an opaque type."]
    type_of_opaque,

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

    #[doc = " Returns whether the type alias given by `DefId` is checked."]
    #[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 `checked_type_aliases` 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"]
    type_alias_is_checked,

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

    #[doc =
    "[query description - consider adding a doc-comment!] determine where the opaque originates from"]
    opaque_ty_origin,

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

    #[doc =
    " The root query triggering all analysis passes like typeck or borrowck."]
    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."]
    check_expectations,

    #[doc = " Returns the *generics* of the definition given by `DefId`."]
    generics_of,

    #[doc =
    " Returns the (elaborated) *clauses* 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/clauses query that you want."]
    #[doc = ""]
    #[doc =
    " **Tip**: You can use `#[rustc_dump_clauses]` on an item to basically print"]
    #[doc =
    " the result of this query for use in UI tests or for debugging purposes."]
    clauses_of,

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

    #[doc =
    " A list of all bodies inside of `key`, nested bodies are always stored"]
    #[doc = " before their parent."]
    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 = " ```"]
    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"]
    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 = " ```"]
    item_bounds,

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] elaborating supertrait outlives for trait of  `tcx.def_path_str(key)` "]
    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"]
    native_libraries,

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

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

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

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

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

    #[doc = " Checks whether a type is representable or infinitely sized"]
    check_representability,

    #[doc =
    " An implementation detail for the `check_representability` query. See that query for more"]
    #[doc = " details, particularly on the modifiers."]
    check_representability_adt_ty,

    #[doc =
    " Set of param indexes for type params that are in the type\'s representation"]
    params_in_repr,

    #[doc =
    " Fetch the THIR for a given body. The THIR body gets stolen by unsafety checking unless"]
    #[doc = " `-Zno-steal-thir` is on."]
    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."]
    mir_keys,

    #[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`."]
    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"]
    mir_built,

    #[doc = " Try to build an abstract representation of the given constant."]
    thir_abstract_const,

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

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] finding symbols for captures of closure  `tcx.def_path_str(key)` "]
    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."]
    closure_saved_names_of_captured_variables,

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

    #[doc =
    "[query description - consider adding a doc-comment!] verify auto trait bounds for coroutine interior type  `tcx.def_path_str(key)` "]
    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."]
    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."]
    optimized_mir,

    #[doc =
    " Returns `true` if this def is a function-like thing that is eligible for"]
    #[doc = " coverage instrumentation under `-Cinstrument-coverage`."]
    #[doc = ""]
    #[doc =
    " (Eligible functions might nevertheless be skipped for other reasons.)"]
    is_eligible_for_coverage,

    #[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."]
    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 = " Returns `None` for functions that were not instrumented."]
    coverage_codegen_info,

    #[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."]
    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."]
    erase_and_anonymize_regions_ty,

    #[doc =
    "[query description - consider adding a doc-comment!] getting wasm import module map"]
    wasm_import_module_map,

    #[doc =
    " Returns the explicitly user-written *clauses and bounds* of the trait given by `DefId`."]
    #[doc = ""]
    #[doc = " Traits are unusual, because clauses 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_clauses_of`] and [`Self::explicit_item_bounds`] will"]
    #[doc = " then take the appropriate subsets of the clauses here."]
    #[doc = ""]
    #[doc = " # Panics"]
    #[doc = ""]
    #[doc = " This query will panic if the given definition is not a trait."]
    trait_explicit_clauses_and_bounds,

    #[doc =
    " Returns the explicitly user-written *clauses* 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 [`TyCtxt::clauses_of`] unless you\'re looking for"]
    #[doc = " clauses with explicit spans for diagnostics purposes."]
    explicit_clauses_of,

    #[doc =
    " Returns the *inferred outlives-clauses* 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_dump_inferred_outlives]` on an item to basically"]
    #[doc =
    " print the result of this query for use in UI tests or for debugging purposes."]
    inferred_outlives_of,

    #[doc =
    " Returns the explicitly user-written *super-clauses* of the trait given by `DefId`."]
    #[doc = ""]
    #[doc =
    " These clauses are unelaborated and consequently don\'t contain transitive super-clauses."]
    #[doc = ""]
    #[doc =
    " This is a subset of the full list of clauses. We store these in a separate map"]
    #[doc =
    " because we must evaluate them even during type conversion, often before the full"]
    #[doc =
    " clauses are available (note that super-clauses must not be cyclic)."]
    explicit_super_clauses_of,

    #[doc = " The clauses of the trait that are implied during elaboration."]
    #[doc = ""]
    #[doc =
    " This is a superset of the super-clauses of the trait, but a subset of the clauses"]
    #[doc =
    " of the trait. For regular traits, this includes all super-clauses and their"]
    #[doc =
    " associated type bounds. For trait aliases, currently, this includes all of the"]
    #[doc = " clauses of the trait alias."]
    explicit_implied_clauses_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`."]
    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 `clauses_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."]
    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."]
    explicit_implied_const_bounds,

    #[doc = " To avoid cycles within the clauses of a single item we compute"]
    #[doc = " per-type-parameter clauses for resolving `T::AssocTy`."]
    type_param_clauses,

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

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

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

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] computing drop-check constraints for  `tcx.def_path_str(key)` "]
    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."]
    constness,

    #[doc =
    "[query description - consider adding a doc-comment!] checking if the function is async:  `tcx.def_path_str(key)` "]
    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)."]
    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."]
    coroutine_by_move_body_def_id,

    #[doc =
    " Returns `Some(coroutine_kind)` if the node pointed to by `def_id` is a coroutine."]
    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"]
    coroutine_for_closure,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up the hidden types stored across await points in a coroutine"]
    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>"]
    crate_variances,

    #[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_dump_variances]` on an item to basically print"]
    #[doc =
    " the result of this query for use in UI tests or for debugging purposes."]
    variances_of,

    #[doc =
    " Gets a map with the inferred outlives-clauses 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>"]
    inferred_outlives_crate,

    #[doc = " Maps from an impl/trait or struct/variant `DefId`"]
    #[doc = " to a list of the `DefId`s of its associated items or fields."]
    associated_item_def_ids,

    #[doc =
    " Maps from a trait/impl item to the trait/impl item \"descriptor\"."]
    associated_item,

    #[doc = " Collects the associated items defined on a trait or impl."]
    associated_items,

    #[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 }`"]
    impl_item_implementor_ids,

    #[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."]
    associated_types_for_impl_traits_in_trait_or_impl,

    #[doc =
    " Given an `impl_id`, return the trait it implements along with some header information."]
    impl_trait_header,

    #[doc =
    " Whether all generic parameters of the type are unique unconstrained generic parameters"]
    #[doc =
    " of the impl. `Bar<\'static>` or `Foo<\'a, \'a>` or outlives bounds on the lifetimes cause"]
    #[doc = " this boolean to be false and `try_as_dyn` to return `None`."]
    impl_is_fully_generic_for_reflection,

    #[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."]
    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."]
    inherent_impls,

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

    #[doc = " Unsafety-check this `LocalDefId`."]
    check_transmutes,

    #[doc = " Type-check offloads calls given a typeck root"]
    check_offloads,

    #[doc = " Unsafety-check this `LocalDefId`."]
    check_unsafety,

    #[doc = " Checks well-formedness of tail calls (`become f()`)."]
    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."]
    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."]
    assumed_wf_types_for_rpitit,

    #[doc = " Computes the signature of the function."]
    fn_sig,

    #[doc = " Performs lint checking for the module."]
    lint_mod,

    #[doc =
    "[query description - consider adding a doc-comment!] checking unused trait imports in crate"]
    check_unused_traits,

    #[doc = " Checks the attributes in the module."]
    check_mod_attrs,

    #[doc = " Checks for uses of unstable APIs in the module."]
    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)` "]
    check_mod_privacy,

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

    #[doc = " Return dead-code liveness summary for the crate."]
    live_symbols_and_ignored_derived_traits,

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

    #[doc =
    "[query description - consider adding a doc-comment!] checking that types are well-formed"]
    check_type_wf,

    #[doc = " Caches `CoerceUnsized` kinds for impls on custom types."]
    coerce_unsized_info,

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

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

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

    #[doc =
    " Borrow-checks the given typeck root, e.g. functions, const/static items,"]
    #[doc = " and its children, e.g. closures, inline consts."]
    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>"]
    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>"]
    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>"]
    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."]
    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."]
    mir_callgraph_cyclic,

    #[doc = " Obtain all the calls into other local functions"]
    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."]
    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>"]
    eval_to_allocation_raw,

    #[doc =
    " Evaluate a static\'s initializer, returning the allocation of the initializer\'s memory."]
    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."]
    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."]
    eval_to_valtree,

    #[doc =
    " Converts a type-level constant value into a MIR constant value."]
    valtree_to_const_val,

    #[doc =
    "[query description - consider adding a doc-comment!] converting literal to const"]
    lit_to_const,

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

    #[doc =
    " Performs part of the privacy check and computes effective visibilities."]
    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)` "]
    check_private_in_public,

    #[doc =
    "[query description - consider adding a doc-comment!] reachability"]
    reachable_set,

    #[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."]
    region_scope_tree,

    #[doc = " Generates a MIR body for the shim."]
    mir_shims,

    #[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."]
    symbol_name,

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

    #[doc = " Gets the span for the definition."]
    def_span,

    #[doc = " Gets the span for the identifier of the definition."]
    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."]
    ty_span,

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

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

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

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

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

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

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

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

    #[doc = " Returns the attributes on the item at `def_id`."]
    #[doc = ""]
    #[doc = " <div class=\"warning\">"]
    #[doc = ""]
    #[doc =
    " Do not use this directly, use [`rustc_attr_ir::find_attr`] instead."]
    #[doc = ""]
    #[doc = " </div>"]
    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."]
    codegen_fn_attrs,

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

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

    #[doc =
    " Gets the rendered value of the specified constant or associated constant."]
    #[doc = " Used by rustdoc."]
    rendered_const,

    #[doc =
    " Gets the rendered precise capturing args for an opaque for use in rustdoc."]
    rendered_precise_capturing_args,

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] finding all existential vtable entries for trait  `tcx.def_path_str(key)` "]
    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)` "]
    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()` "]
    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"]
    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())` >"]
    vtable_allocation,

    #[doc =
    "[query description - consider adding a doc-comment!] computing candidate for  `key.value` "]
    codegen_select_candidate,

    #[doc = " Return all `impl` blocks in the current crate."]
    all_local_trait_impls,

    #[doc =
    " Return all `impl` blocks of the given trait in the current crate."]
    local_trait_impls,

    #[doc = " Given a trait `trait_id`, return all known `impl` blocks."]
    trait_impls_of,

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] checking if trait  `tcx.def_path_str(trait_id)`  is dyn-compatible"]
    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."]
    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."]
    param_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."]
    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."]
    is_use_cloned_raw,

    #[doc = " Query backing `Ty::is_sized`."]
    is_sized_raw,

    #[doc = " Query backing `Ty::is_freeze`."]
    is_freeze_raw,

    #[doc = " Query backing `Ty::is_unsafe_unpin`."]
    is_unsafe_unpin_raw,

    #[doc = " Query backing `Ty::is_unpin`."]
    is_unpin_raw,

    #[doc = " Query backing `Ty::is_async_drop`."]
    is_async_drop_raw,

    #[doc = " Query backing `Ty::needs_drop`."]
    needs_drop_raw,

    #[doc = " Query backing `Ty::needs_async_drop`."]
    needs_async_drop_raw,

    #[doc = " Query backing `Ty::has_significant_drop_raw`."]
    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."]
    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."]
    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."]
    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."]
    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."]
    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."]
    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`."]
    fn_abi_of_fn_ptr,

    #[doc =
    " Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for direct calls*"]
    #[doc =
    " to an `fn`. Indirectly-passed parameters in the returned ABI might not include all possible"]
    #[doc =
    " codegen optimization attributes (such as `ReadOnly` or `CapturesNone`), as deducing these"]
    #[doc =
    " requires inspection of function bodies that can lead to cycles when performed during typeck."]
    #[doc =
    " Post typeck, you should prefer the optimized ABI returned by `TyCtxt::fn_abi_of_instance`."]
    #[doc = ""]
    #[doc =
    " NB: the ABI returned by this query must not differ from that returned by"]
    #[doc = "     `fn_abi_of_instance_raw` in any other way."]
    #[doc = ""]
    #[doc =
    " * that includes virtual calls, which are represented by \"direct calls\" to an"]
    #[doc =
    "   `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
    fn_abi_of_instance_no_deduced_attrs,

    #[doc =
    " Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for direct calls*"]
    #[doc =
    " to an `fn`. Indirectly-passed parameters in the returned ABI will include applicable"]
    #[doc =
    " codegen optimization attributes, including `ReadOnly` and `CapturesNone` -- deduction of"]
    #[doc =
    " which requires inspection of function bodies that can lead to cycles when performed during"]
    #[doc =
    " typeck. During typeck, you should therefore use instead the unoptimized ABI returned by"]
    #[doc = " `fn_abi_of_instance_no_deduced_attrs`."]
    #[doc = ""]
    #[doc =
    " For performance reasons, you should prefer to call the inherent `TyCtxt::fn_abi_of_instance`"]
    #[doc =
    " method rather than invoke this query: it delegates to this query if necessary, but where"]
    #[doc =
    " possible delegates instead to the `fn_abi_of_instance_no_deduced_attrs` query (thus avoiding"]
    #[doc = " unnecessary query system overhead)."]
    #[doc = ""]
    #[doc =
    " * that includes virtual calls, which are represented by \"direct calls\" to an"]
    #[doc =
    "   `InstanceKind::Virtual` instance (of `<dyn Trait as Trait>::fn`)."]
    fn_abi_of_instance_raw,

    #[doc =
    "[query description - consider adding a doc-comment!] getting dylib dependency formats of crate"]
    dylib_dependency_formats,

    #[doc =
    "[query description - consider adding a doc-comment!] getting the linkage format of all dependencies"]
    dependency_formats,

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

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

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

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

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

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

    #[doc =
    "[query description - consider adding a doc-comment!] getting a crate's required panic strategy"]
    required_panic_strategy,

    #[doc =
    "[query description - consider adding a doc-comment!] getting a crate's configured panic-in-drop strategy"]
    panic_in_drop_strategy,

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

    #[doc =
    "[query description - consider adding a doc-comment!] getting a crate's symbol mangling version"]
    symbol_mangling_version,

    #[doc =
    "[query description - consider adding a doc-comment!] getting crate's ExternCrateData"]
    extern_crate,

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

    #[doc =
    "[query description - consider adding a doc-comment!] computing whether impls specialize one another"]
    specializes,

    #[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`."]
    defaultness,

    #[doc =
    " Returns whether the field corresponding to the `DefId` has a default field value."]
    default_field,

    #[doc =
    "[query description - consider adding a doc-comment!] checking that  `tcx.def_path_str(key)`  is well-formed"]
    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"]
    enforce_impl_non_lifetime_params_are_constrained,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up the exported symbols of a crate"]
    reachable_non_generics,

    #[doc =
    "[query description - consider adding a doc-comment!] checking whether  `tcx.def_path_str(def_id)`  is an exported symbol"]
    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"]
    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()`."]
    upstream_monomorphizations,

    #[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."]
    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)."]
    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)."]
    upstream_async_drop_glue_for,

    #[doc = " Returns a list of all `extern` blocks of a crate."]
    foreign_modules,

    #[doc =
    " Lint against `extern fn` declarations having incompatible types."]
    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)."]
    entry_fn,

    #[doc = " Finds the `rustc_proc_macro_decls` item of a crate."]
    proc_macro_decls_static,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up the hash of a crate"]
    crate_hash,

    #[doc =
    " Gets the hash for the host proc macro. Used to support -Z dual-proc-macro."]
    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."]
    extra_filename,

    #[doc = " Gets the paths where the crate came from in the file system."]
    crate_extern_paths,

    #[doc =
    " Given a crate and a trait, look up all impls of that trait in the crate."]
    #[doc = " Return `(impl_id, self_ty)`."]
    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."]
    crate_incoherent_impls,

    #[doc =
    " Get the corresponding native library from the `native_libraries` query"]
    native_library,

    #[doc =
    "[query description - consider adding a doc-comment!] inheriting delegation signature"]
    inherit_sig_for_delegation_item,

    #[doc =
    "[query description - consider adding a doc-comment!] getting delegation user-specified args"]
    delegation_user_specified_args,

    #[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."]
    resolve_bound_vars,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up a named region inside  `tcx.def_path_str(owner_id)` "]
    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)` "]
    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_dump_object_lifetime_defaults]` 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."]
    object_lifetime_default,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up late bound vars inside  `tcx.def_path_str(owner_id)` "]
    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 = " ```"]
    opaque_captured_lifetimes,

    #[doc =
    " For an opaque type or trait associated type, return the indices of potentially live"]
    #[doc =
    " generic args from the set of outlives bounds on that alias. Callers should use the"]
    #[doc = " indices with the concrete args of the alias."]
    #[doc = " ```ignore (illustrative)"]
    #[doc = " // Edition 2024: all args are captured"]
    #[doc =
    " fn foo<\'a, \'b, T: \'static>(&\'a &\'b T) -> impl Sized + \'a {}"]
    #[doc =
    " fn bar<\'a, \'b, T: \'static>(&\'a &\'b T) -> impl Sized + \'static {}"]
    #[doc = " fn baz<\'a, \'b, T: \'static>(&\'a &\'b T) -> impl Sized {}"]
    #[doc = " ```"]
    #[doc = ""]
    #[doc = " In the above:"]
    #[doc =
    "   - `foo` outlives `\'a`, but we know that `\'b: \'a` holds, so `\'b` is *also* potentially live"]
    #[doc = "     (and so is `T`, since `T: \'static` implies `T: \'a`)"]
    #[doc =
    "   - `bar` outlives `\'static`, so we know that no args are potentially live and we can return an empty set"]
    #[doc =
    "   - `baz` has no outlives bound, so all args are potentially live"]
    live_args_for_alias_from_outlives_bounds,

    #[doc =
    " For each region param of an alias, the indices of the identity args that are known to"]
    #[doc =
    " outlive it given only the alias\'s declared where-clauses. Used for liveness:"]
    #[doc =
    " these are the only args whose regions the underlying type of the alias"]
    #[doc =
    " could capture while satisfying an outlives bound on that param."]
    args_known_to_outlive_alias_params,

    #[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."]
    visibility,

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

    #[doc =
    " Do not call this query directly: invoke `Ty::inhabited_predicate` instead."]
    inhabited_predicate_type,

    #[doc =
    " Do not call this query directly: invoke `Ty::is_opsem_inhabited` instead."]
    is_opsem_inhabited_raw,

    #[doc =
    "[query description - consider adding a doc-comment!] fetching what a dependency looks like"]
    crate_dep_kind,

    #[doc = " Gets the name of the crate."]
    crate_name,

    #[doc = " Iterates over all named children of the given module,"]
    #[doc = " including both proper items and reexports."]
    #[doc =
    " Module here is understood in name resolution sense - it can be a `mod` item,"]
    #[doc = " or a crate root, or an enum, or a trait."]
    #[doc = ""]
    #[doc = " # Panics"]
    #[doc = ""]
    #[doc = " May panic if the provided `id` does not refer to a module."]
    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`."]
    num_extern_def_ids,

    #[doc =
    "[query description - consider adding a doc-comment!] calculating the lib features defined in a crate"]
    lib_features,

    #[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."]
    stability_implications,

    #[doc = " Whether the function is an intrinsic"]
    intrinsic_raw,

    #[doc =
    " Returns the lang items defined in all crates by loading them from metadata of dependencies"]
    #[doc = " and collecting the ones from the current crate."]
    get_lang_items,

    #[doc = " Returns all diagnostic items defined in all crates."]
    all_diagnostic_items,

    #[doc = " Returns all the canonical symbols defined in all crates."]
    all_canonical_symbols,

    #[doc =
    " Returns the lang items defined in another crate by loading it from metadata."]
    defined_lang_items,

    #[doc = " Returns the diagnostic items defined in a crate."]
    diagnostic_items,

    #[doc = " Returns the canonical symbols defined in a crate."]
    canonical_symbols,

    #[doc =
    "[query description - consider adding a doc-comment!] calculating the missing lang items in a crate"]
    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."]
    visible_parent_map,

    #[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."]
    trimmed_def_paths,

    #[doc =
    "[query description - consider adding a doc-comment!] seeing if we're missing an `extern crate` item for this crate"]
    missing_extern_crate_item,

    #[doc =
    "[query description - consider adding a doc-comment!] looking at the source for a crate"]
    used_crate_source,

    #[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."]
    debugger_visualizers,

    #[doc =
    "[query description - consider adding a doc-comment!] generating a postorder list of CrateNums"]
    postorder_cnums,

    #[doc = " Returns whether or not the crate with CrateNum \'cnum\'"]
    #[doc = " is marked as a private dependency"]
    is_private_dep,

    #[doc =
    "[query description - consider adding a doc-comment!] getting the allocator kind for the current crate"]
    allocator_kind,

    #[doc =
    "[query description - consider adding a doc-comment!] alloc error handler kind for the current crate"]
    alloc_error_handler_kind,

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

    #[doc =
    " All available crates in the graph, including those that should not be user-facing"]
    #[doc = " (such as private crates)."]
    crates,

    #[doc =
    "[query description - consider adding a doc-comment!] fetching `CrateNum`s for all crates loaded non-speculatively"]
    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."]
    duplicate_crate_names,

    #[doc =
    " A list of all traits in a crate, used by rustdoc and error reporting."]
    traits,

    #[doc =
    "[query description - consider adding a doc-comment!] fetching all trait impls in a crate"]
    trait_impls_in_crate,

    #[doc =
    "[query description - consider adding a doc-comment!] fetching the stable impl's order"]
    stable_order_of_exportable_impls,

    #[doc =
    "[query description - consider adding a doc-comment!] fetching all exportable items in a crate"]
    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."]
    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."]
    exported_generic_symbols,

    #[doc =
    "[query description - consider adding a doc-comment!] collect_and_partition_mono_items"]
    collect_and_partition_mono_items,

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

    #[doc =
    "[query description - consider adding a doc-comment!] getting codegen unit `{sym}`"]
    codegen_unit,

    #[doc =
    "[query description - consider adding a doc-comment!] optimization level used by backend"]
    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."]
    output_filenames,

    #[doc = " <div class=\"warning\">"]
    #[doc = ""]
    #[doc = " Do not call this query directly: Invoke `normalize` instead."]
    #[doc = ""]
    #[doc = " </div>"]
    normalize_canonicalized_projection,

    #[doc = " <div class=\"warning\">"]
    #[doc = ""]
    #[doc = " Do not call this query directly: Invoke `normalize` instead."]
    #[doc = ""]
    #[doc = " </div>"]
    normalize_canonicalized_free_alias,

    #[doc = " <div class=\"warning\">"]
    #[doc = ""]
    #[doc = " Do not call this query directly: Invoke `normalize` instead."]
    #[doc = ""]
    #[doc = " </div>"]
    normalize_canonicalized_inherent_projection,

    #[doc =
    " Do not call this query directly: invoke `try_normalize_erasing_regions` instead."]
    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 = {:?})"]
    implied_outlives_bounds,

    #[doc =
    "[query description - consider adding a doc-comment!] computing implied outlives bounds for borrowck for  `tcx.def_path_str(mir_def)` "]
    mir_borrowck_implied_outlives_bounds,

    #[doc = " Do not call this query directly:"]
    #[doc =
    " invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead."]
    dropck_outlives,

    #[doc =
    " Do not call this query directly: invoke `infcx.predicate_may_hold()` or"]
    #[doc = " `infcx.predicate_must_hold()` instead."]
    evaluate_obligation,

    #[doc = " Do not call this query directly: part of the `Eq` type-op"]
    type_op_ascribe_user_type,

    #[doc =
    " Do not call this query directly: part of the `ProvePredicate` type-op"]
    type_op_prove_predicate,

    #[doc =
    " Do not call this query directly: part of the `Normalize` type-op"]
    type_op_normalize_ty,

    #[doc =
    " Do not call this query directly: part of the `Normalize` type-op"]
    type_op_normalize_clause,

    #[doc =
    " Do not call this query directly: part of the `Normalize` type-op"]
    type_op_normalize_poly_fn_sig,

    #[doc =
    " Do not call this query directly: part of the `Normalize` type-op"]
    type_op_normalize_fn_sig,

    #[doc =
    "[query description - consider adding a doc-comment!] checking impossible instantiated clauses:  `tcx.def_path_str(key.0)` "]
    instantiate_and_check_impossible_clauses,

    #[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)` "]
    is_impossible_associated_item,

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

    #[doc = " Used by `-Znext-solver` to compute proof trees."]
    evaluate_root_goal_for_proof_tree_raw,

    #[doc =
    " Returns a list of all Rust target features for the current target (not just the ones that"]
    #[doc =
    " are enabled). These are not always the same as LLVM target features!"]
    all_rust_target_features,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up implied target features"]
    implied_target_features,

    #[doc =
    "[query description - consider adding a doc-comment!] looking up enabled feature gates"]
    features_query,

    #[doc =
    "[query description - consider adding a doc-comment!] the ast before macro expansion and name resolution"]
    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."]
    resolve_instance_raw,

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

    #[doc =
    "[query description - consider adding a doc-comment!] looking up limits"]
    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."]
    diagnostic_hir_wf_check,

    #[doc =
    " The list of backend features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,"]
    #[doc = " `--target` and similar)."]
    global_backend_features,

    #[doc =
    "[query description - consider adding a doc-comment!] checking validity requirement for  `key.1.value` :  `key.0` "]
    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."]
    compare_impl_item,

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

    #[doc =
    "[query description - consider adding a doc-comment!] resolutions for documentation links for a module"]
    doc_link_resolutions,

    #[doc =
    "[query description - consider adding a doc-comment!] traits in scope for documentation links for a module"]
    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."]
    stripped_cfg_items,

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

    #[doc =
    "[query description - consider adding a doc-comment!] whether the item should be made inlinable across crates"]
    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."]
    check_mono_item,

    #[doc =
    "[query description - consider adding a doc-comment!] collecting items used by  `key.0` "]
    items_of_instance,

    #[doc =
    "[query description - consider adding a doc-comment!] estimating codegen size of  `key` "]
    size_estimate,

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

    #[doc =
    "[query description - consider adding a doc-comment!] checking if  `tcx.def_path_str(def_id)`  is a trivial const"]
    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."]
    sanitizer_settings_for,

    #[doc =
    "[query description - consider adding a doc-comment!] check externally implementable items"]
    check_externally_implementable_items,

    #[doc = " Returns a list of all `externally implementable items` crate."]
    externally_implementable_items,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for DepKind { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for DepKind {
    #[inline]
    fn clone(&self) -> DepKind { *self }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for DepKind { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for DepKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                DepKind::Null => "Null",
                DepKind::Red => "Red",
                DepKind::SideEffect => "SideEffect",
                DepKind::AnonZeroDeps => "AnonZeroDeps",
                DepKind::TraitSelect => "TraitSelect",
                DepKind::CompileCodegenUnit => "CompileCodegenUnit",
                DepKind::CompileMonoItem => "CompileMonoItem",
                DepKind::Metadata => "Metadata",
                DepKind::derive_macro_expansion => "derive_macro_expansion",
                DepKind::trigger_delayed_bug => "trigger_delayed_bug",
                DepKind::registered_attr_tools => "registered_attr_tools",
                DepKind::registered_lint_tools => "registered_lint_tools",
                DepKind::early_lint_checks => "early_lint_checks",
                DepKind::env_var_os => "env_var_os",
                DepKind::resolutions => "resolutions",
                DepKind::resolver_for_lowering_raw =>
                    "resolver_for_lowering_raw",
                DepKind::index_ast => "index_ast",
                DepKind::source_span => "source_span",
                DepKind::lower_to_hir => "lower_to_hir",
                DepKind::hir_owner => "hir_owner",
                DepKind::hir_crate_items => "hir_crate_items",
                DepKind::hir_module_items => "hir_module_items",
                DepKind::hir_owner_parent_q => "hir_owner_parent_q",
                DepKind::hir_attr_map => "hir_attr_map",
                DepKind::const_param_default => "const_param_default",
                DepKind::const_of_item => "const_of_item",
                DepKind::type_of => "type_of",
                DepKind::type_of_opaque => "type_of_opaque",
                DepKind::type_of_opaque_hir_typeck =>
                    "type_of_opaque_hir_typeck",
                DepKind::type_alias_is_checked => "type_alias_is_checked",
                DepKind::collect_return_position_impl_trait_in_trait_tys =>
                    "collect_return_position_impl_trait_in_trait_tys",
                DepKind::opaque_ty_origin => "opaque_ty_origin",
                DepKind::unsizing_params_for_adt => "unsizing_params_for_adt",
                DepKind::analysis => "analysis",
                DepKind::check_expectations => "check_expectations",
                DepKind::generics_of => "generics_of",
                DepKind::clauses_of => "clauses_of",
                DepKind::opaque_types_defined_by => "opaque_types_defined_by",
                DepKind::nested_bodies_within => "nested_bodies_within",
                DepKind::explicit_item_bounds => "explicit_item_bounds",
                DepKind::explicit_item_self_bounds =>
                    "explicit_item_self_bounds",
                DepKind::item_bounds => "item_bounds",
                DepKind::item_self_bounds => "item_self_bounds",
                DepKind::item_non_self_bounds => "item_non_self_bounds",
                DepKind::impl_super_outlives => "impl_super_outlives",
                DepKind::native_libraries => "native_libraries",
                DepKind::shallow_lint_levels_on => "shallow_lint_levels_on",
                DepKind::lint_expectations => "lint_expectations",
                DepKind::skippable_lints => "skippable_lints",
                DepKind::expn_that_defined => "expn_that_defined",
                DepKind::is_panic_runtime => "is_panic_runtime",
                DepKind::check_representability => "check_representability",
                DepKind::check_representability_adt_ty =>
                    "check_representability_adt_ty",
                DepKind::params_in_repr => "params_in_repr",
                DepKind::thir_body => "thir_body",
                DepKind::mir_keys => "mir_keys",
                DepKind::mir_const_qualif => "mir_const_qualif",
                DepKind::mir_built => "mir_built",
                DepKind::thir_abstract_const => "thir_abstract_const",
                DepKind::mir_drops_elaborated_and_const_checked =>
                    "mir_drops_elaborated_and_const_checked",
                DepKind::mir_for_ctfe => "mir_for_ctfe",
                DepKind::mir_promoted => "mir_promoted",
                DepKind::closure_typeinfo => "closure_typeinfo",
                DepKind::closure_saved_names_of_captured_variables =>
                    "closure_saved_names_of_captured_variables",
                DepKind::mir_coroutine_witnesses => "mir_coroutine_witnesses",
                DepKind::check_coroutine_obligations =>
                    "check_coroutine_obligations",
                DepKind::check_potentially_region_dependent_goals =>
                    "check_potentially_region_dependent_goals",
                DepKind::optimized_mir => "optimized_mir",
                DepKind::is_eligible_for_coverage =>
                    "is_eligible_for_coverage",
                DepKind::coverage_attr_on => "coverage_attr_on",
                DepKind::coverage_codegen_info => "coverage_codegen_info",
                DepKind::promoted_mir => "promoted_mir",
                DepKind::erase_and_anonymize_regions_ty =>
                    "erase_and_anonymize_regions_ty",
                DepKind::wasm_import_module_map => "wasm_import_module_map",
                DepKind::trait_explicit_clauses_and_bounds =>
                    "trait_explicit_clauses_and_bounds",
                DepKind::explicit_clauses_of => "explicit_clauses_of",
                DepKind::inferred_outlives_of => "inferred_outlives_of",
                DepKind::explicit_super_clauses_of =>
                    "explicit_super_clauses_of",
                DepKind::explicit_implied_clauses_of =>
                    "explicit_implied_clauses_of",
                DepKind::explicit_supertraits_containing_assoc_item =>
                    "explicit_supertraits_containing_assoc_item",
                DepKind::const_conditions => "const_conditions",
                DepKind::explicit_implied_const_bounds =>
                    "explicit_implied_const_bounds",
                DepKind::type_param_clauses => "type_param_clauses",
                DepKind::trait_def => "trait_def",
                DepKind::adt_def => "adt_def",
                DepKind::adt_destructor => "adt_destructor",
                DepKind::adt_async_destructor => "adt_async_destructor",
                DepKind::adt_sizedness_constraint =>
                    "adt_sizedness_constraint",
                DepKind::adt_dtorck_constraint => "adt_dtorck_constraint",
                DepKind::constness => "constness",
                DepKind::asyncness => "asyncness",
                DepKind::is_promotable_const_fn => "is_promotable_const_fn",
                DepKind::coroutine_by_move_body_def_id =>
                    "coroutine_by_move_body_def_id",
                DepKind::coroutine_kind => "coroutine_kind",
                DepKind::coroutine_for_closure => "coroutine_for_closure",
                DepKind::coroutine_hidden_types => "coroutine_hidden_types",
                DepKind::crate_variances => "crate_variances",
                DepKind::variances_of => "variances_of",
                DepKind::inferred_outlives_crate => "inferred_outlives_crate",
                DepKind::associated_item_def_ids => "associated_item_def_ids",
                DepKind::associated_item => "associated_item",
                DepKind::associated_items => "associated_items",
                DepKind::impl_item_implementor_ids =>
                    "impl_item_implementor_ids",
                DepKind::associated_types_for_impl_traits_in_trait_or_impl =>
                    "associated_types_for_impl_traits_in_trait_or_impl",
                DepKind::impl_trait_header => "impl_trait_header",
                DepKind::impl_is_fully_generic_for_reflection =>
                    "impl_is_fully_generic_for_reflection",
                DepKind::impl_self_is_guaranteed_unsized =>
                    "impl_self_is_guaranteed_unsized",
                DepKind::inherent_impls => "inherent_impls",
                DepKind::incoherent_impls => "incoherent_impls",
                DepKind::check_transmutes => "check_transmutes",
                DepKind::check_offloads => "check_offloads",
                DepKind::check_unsafety => "check_unsafety",
                DepKind::check_tail_calls => "check_tail_calls",
                DepKind::assumed_wf_types => "assumed_wf_types",
                DepKind::assumed_wf_types_for_rpitit =>
                    "assumed_wf_types_for_rpitit",
                DepKind::fn_sig => "fn_sig",
                DepKind::lint_mod => "lint_mod",
                DepKind::check_unused_traits => "check_unused_traits",
                DepKind::check_mod_attrs => "check_mod_attrs",
                DepKind::check_mod_unstable_api_usage =>
                    "check_mod_unstable_api_usage",
                DepKind::check_mod_privacy => "check_mod_privacy",
                DepKind::check_liveness => "check_liveness",
                DepKind::live_symbols_and_ignored_derived_traits =>
                    "live_symbols_and_ignored_derived_traits",
                DepKind::check_mod_deathness => "check_mod_deathness",
                DepKind::check_type_wf => "check_type_wf",
                DepKind::coerce_unsized_info => "coerce_unsized_info",
                DepKind::typeck_root => "typeck_root",
                DepKind::used_trait_imports => "used_trait_imports",
                DepKind::coherent_trait => "coherent_trait",
                DepKind::mir_borrowck => "mir_borrowck",
                DepKind::crate_inherent_impls => "crate_inherent_impls",
                DepKind::crate_inherent_impls_validity_check =>
                    "crate_inherent_impls_validity_check",
                DepKind::crate_inherent_impls_overlap_check =>
                    "crate_inherent_impls_overlap_check",
                DepKind::orphan_check_impl => "orphan_check_impl",
                DepKind::mir_callgraph_cyclic => "mir_callgraph_cyclic",
                DepKind::mir_inliner_callees => "mir_inliner_callees",
                DepKind::tag_for_variant => "tag_for_variant",
                DepKind::eval_to_allocation_raw => "eval_to_allocation_raw",
                DepKind::eval_static_initializer => "eval_static_initializer",
                DepKind::eval_to_const_value_raw => "eval_to_const_value_raw",
                DepKind::eval_to_valtree => "eval_to_valtree",
                DepKind::valtree_to_const_val => "valtree_to_const_val",
                DepKind::lit_to_const => "lit_to_const",
                DepKind::check_match => "check_match",
                DepKind::effective_visibilities => "effective_visibilities",
                DepKind::check_private_in_public => "check_private_in_public",
                DepKind::reachable_set => "reachable_set",
                DepKind::region_scope_tree => "region_scope_tree",
                DepKind::mir_shims => "mir_shims",
                DepKind::symbol_name => "symbol_name",
                DepKind::def_kind => "def_kind",
                DepKind::def_span => "def_span",
                DepKind::def_ident_span => "def_ident_span",
                DepKind::ty_span => "ty_span",
                DepKind::lookup_stability => "lookup_stability",
                DepKind::lookup_const_stability => "lookup_const_stability",
                DepKind::lookup_default_body_stability =>
                    "lookup_default_body_stability",
                DepKind::should_inherit_track_caller =>
                    "should_inherit_track_caller",
                DepKind::inherited_align => "inherited_align",
                DepKind::lookup_deprecation_entry =>
                    "lookup_deprecation_entry",
                DepKind::is_doc_hidden => "is_doc_hidden",
                DepKind::is_doc_notable_trait => "is_doc_notable_trait",
                DepKind::attrs_for_def => "attrs_for_def",
                DepKind::codegen_fn_attrs => "codegen_fn_attrs",
                DepKind::asm_target_features => "asm_target_features",
                DepKind::fn_arg_idents => "fn_arg_idents",
                DepKind::rendered_const => "rendered_const",
                DepKind::rendered_precise_capturing_args =>
                    "rendered_precise_capturing_args",
                DepKind::impl_parent => "impl_parent",
                DepKind::is_mir_available => "is_mir_available",
                DepKind::own_existential_vtable_entries =>
                    "own_existential_vtable_entries",
                DepKind::vtable_entries => "vtable_entries",
                DepKind::first_method_vtable_slot =>
                    "first_method_vtable_slot",
                DepKind::supertrait_vtable_slot => "supertrait_vtable_slot",
                DepKind::vtable_allocation => "vtable_allocation",
                DepKind::codegen_select_candidate =>
                    "codegen_select_candidate",
                DepKind::all_local_trait_impls => "all_local_trait_impls",
                DepKind::local_trait_impls => "local_trait_impls",
                DepKind::trait_impls_of => "trait_impls_of",
                DepKind::specialization_graph_of => "specialization_graph_of",
                DepKind::dyn_compatibility_violations =>
                    "dyn_compatibility_violations",
                DepKind::is_dyn_compatible => "is_dyn_compatible",
                DepKind::param_env => "param_env",
                DepKind::param_env_normalized_for_post_analysis =>
                    "param_env_normalized_for_post_analysis",
                DepKind::is_copy_raw => "is_copy_raw",
                DepKind::is_use_cloned_raw => "is_use_cloned_raw",
                DepKind::is_sized_raw => "is_sized_raw",
                DepKind::is_freeze_raw => "is_freeze_raw",
                DepKind::is_unsafe_unpin_raw => "is_unsafe_unpin_raw",
                DepKind::is_unpin_raw => "is_unpin_raw",
                DepKind::is_async_drop_raw => "is_async_drop_raw",
                DepKind::needs_drop_raw => "needs_drop_raw",
                DepKind::needs_async_drop_raw => "needs_async_drop_raw",
                DepKind::has_significant_drop_raw =>
                    "has_significant_drop_raw",
                DepKind::has_structural_eq_impl => "has_structural_eq_impl",
                DepKind::adt_drop_tys => "adt_drop_tys",
                DepKind::adt_async_drop_tys => "adt_async_drop_tys",
                DepKind::adt_significant_drop_tys =>
                    "adt_significant_drop_tys",
                DepKind::list_significant_drop_tys =>
                    "list_significant_drop_tys",
                DepKind::layout_of => "layout_of",
                DepKind::fn_abi_of_fn_ptr => "fn_abi_of_fn_ptr",
                DepKind::fn_abi_of_instance_no_deduced_attrs =>
                    "fn_abi_of_instance_no_deduced_attrs",
                DepKind::fn_abi_of_instance_raw => "fn_abi_of_instance_raw",
                DepKind::dylib_dependency_formats =>
                    "dylib_dependency_formats",
                DepKind::dependency_formats => "dependency_formats",
                DepKind::is_compiler_builtins => "is_compiler_builtins",
                DepKind::has_global_allocator => "has_global_allocator",
                DepKind::has_alloc_error_handler => "has_alloc_error_handler",
                DepKind::has_panic_handler => "has_panic_handler",
                DepKind::is_profiler_runtime => "is_profiler_runtime",
                DepKind::has_ffi_unwind_calls => "has_ffi_unwind_calls",
                DepKind::required_panic_strategy => "required_panic_strategy",
                DepKind::panic_in_drop_strategy => "panic_in_drop_strategy",
                DepKind::is_no_builtins => "is_no_builtins",
                DepKind::symbol_mangling_version => "symbol_mangling_version",
                DepKind::extern_crate => "extern_crate",
                DepKind::specialization_enabled_in =>
                    "specialization_enabled_in",
                DepKind::specializes => "specializes",
                DepKind::defaultness => "defaultness",
                DepKind::default_field => "default_field",
                DepKind::check_well_formed => "check_well_formed",
                DepKind::enforce_impl_non_lifetime_params_are_constrained =>
                    "enforce_impl_non_lifetime_params_are_constrained",
                DepKind::reachable_non_generics => "reachable_non_generics",
                DepKind::is_reachable_non_generic =>
                    "is_reachable_non_generic",
                DepKind::is_unreachable_local_definition =>
                    "is_unreachable_local_definition",
                DepKind::upstream_monomorphizations =>
                    "upstream_monomorphizations",
                DepKind::upstream_monomorphizations_for =>
                    "upstream_monomorphizations_for",
                DepKind::upstream_drop_glue_for => "upstream_drop_glue_for",
                DepKind::upstream_async_drop_glue_for =>
                    "upstream_async_drop_glue_for",
                DepKind::foreign_modules => "foreign_modules",
                DepKind::clashing_extern_declarations =>
                    "clashing_extern_declarations",
                DepKind::entry_fn => "entry_fn",
                DepKind::proc_macro_decls_static => "proc_macro_decls_static",
                DepKind::crate_hash => "crate_hash",
                DepKind::crate_host_hash => "crate_host_hash",
                DepKind::extra_filename => "extra_filename",
                DepKind::crate_extern_paths => "crate_extern_paths",
                DepKind::implementations_of_trait =>
                    "implementations_of_trait",
                DepKind::crate_incoherent_impls => "crate_incoherent_impls",
                DepKind::native_library => "native_library",
                DepKind::inherit_sig_for_delegation_item =>
                    "inherit_sig_for_delegation_item",
                DepKind::delegation_user_specified_args =>
                    "delegation_user_specified_args",
                DepKind::resolve_bound_vars => "resolve_bound_vars",
                DepKind::named_variable_map => "named_variable_map",
                DepKind::is_late_bound_map => "is_late_bound_map",
                DepKind::object_lifetime_default => "object_lifetime_default",
                DepKind::late_bound_vars_map => "late_bound_vars_map",
                DepKind::opaque_captured_lifetimes =>
                    "opaque_captured_lifetimes",
                DepKind::live_args_for_alias_from_outlives_bounds =>
                    "live_args_for_alias_from_outlives_bounds",
                DepKind::args_known_to_outlive_alias_params =>
                    "args_known_to_outlive_alias_params",
                DepKind::visibility => "visibility",
                DepKind::inhabited_predicate_for_def =>
                    "inhabited_predicate_for_def",
                DepKind::inhabited_predicate_type =>
                    "inhabited_predicate_type",
                DepKind::is_opsem_inhabited_raw => "is_opsem_inhabited_raw",
                DepKind::crate_dep_kind => "crate_dep_kind",
                DepKind::crate_name => "crate_name",
                DepKind::module_children => "module_children",
                DepKind::num_extern_def_ids => "num_extern_def_ids",
                DepKind::lib_features => "lib_features",
                DepKind::stability_implications => "stability_implications",
                DepKind::intrinsic_raw => "intrinsic_raw",
                DepKind::get_lang_items => "get_lang_items",
                DepKind::all_diagnostic_items => "all_diagnostic_items",
                DepKind::all_canonical_symbols => "all_canonical_symbols",
                DepKind::defined_lang_items => "defined_lang_items",
                DepKind::diagnostic_items => "diagnostic_items",
                DepKind::canonical_symbols => "canonical_symbols",
                DepKind::missing_lang_items => "missing_lang_items",
                DepKind::visible_parent_map => "visible_parent_map",
                DepKind::trimmed_def_paths => "trimmed_def_paths",
                DepKind::missing_extern_crate_item =>
                    "missing_extern_crate_item",
                DepKind::used_crate_source => "used_crate_source",
                DepKind::debugger_visualizers => "debugger_visualizers",
                DepKind::postorder_cnums => "postorder_cnums",
                DepKind::is_private_dep => "is_private_dep",
                DepKind::allocator_kind => "allocator_kind",
                DepKind::alloc_error_handler_kind =>
                    "alloc_error_handler_kind",
                DepKind::upvars_mentioned => "upvars_mentioned",
                DepKind::crates => "crates",
                DepKind::used_crates => "used_crates",
                DepKind::duplicate_crate_names => "duplicate_crate_names",
                DepKind::traits => "traits",
                DepKind::trait_impls_in_crate => "trait_impls_in_crate",
                DepKind::stable_order_of_exportable_impls =>
                    "stable_order_of_exportable_impls",
                DepKind::exportable_items => "exportable_items",
                DepKind::exported_non_generic_symbols =>
                    "exported_non_generic_symbols",
                DepKind::exported_generic_symbols =>
                    "exported_generic_symbols",
                DepKind::collect_and_partition_mono_items =>
                    "collect_and_partition_mono_items",
                DepKind::is_codegened_item => "is_codegened_item",
                DepKind::codegen_unit => "codegen_unit",
                DepKind::backend_optimization_level =>
                    "backend_optimization_level",
                DepKind::output_filenames => "output_filenames",
                DepKind::normalize_canonicalized_projection =>
                    "normalize_canonicalized_projection",
                DepKind::normalize_canonicalized_free_alias =>
                    "normalize_canonicalized_free_alias",
                DepKind::normalize_canonicalized_inherent_projection =>
                    "normalize_canonicalized_inherent_projection",
                DepKind::try_normalize_generic_arg_after_erasing_regions =>
                    "try_normalize_generic_arg_after_erasing_regions",
                DepKind::implied_outlives_bounds => "implied_outlives_bounds",
                DepKind::mir_borrowck_implied_outlives_bounds =>
                    "mir_borrowck_implied_outlives_bounds",
                DepKind::dropck_outlives => "dropck_outlives",
                DepKind::evaluate_obligation => "evaluate_obligation",
                DepKind::type_op_ascribe_user_type =>
                    "type_op_ascribe_user_type",
                DepKind::type_op_prove_predicate => "type_op_prove_predicate",
                DepKind::type_op_normalize_ty => "type_op_normalize_ty",
                DepKind::type_op_normalize_clause =>
                    "type_op_normalize_clause",
                DepKind::type_op_normalize_poly_fn_sig =>
                    "type_op_normalize_poly_fn_sig",
                DepKind::type_op_normalize_fn_sig =>
                    "type_op_normalize_fn_sig",
                DepKind::instantiate_and_check_impossible_clauses =>
                    "instantiate_and_check_impossible_clauses",
                DepKind::is_impossible_associated_item =>
                    "is_impossible_associated_item",
                DepKind::method_autoderef_steps => "method_autoderef_steps",
                DepKind::evaluate_root_goal_for_proof_tree_raw =>
                    "evaluate_root_goal_for_proof_tree_raw",
                DepKind::all_rust_target_features =>
                    "all_rust_target_features",
                DepKind::implied_target_features => "implied_target_features",
                DepKind::features_query => "features_query",
                DepKind::crate_for_resolver => "crate_for_resolver",
                DepKind::resolve_instance_raw => "resolve_instance_raw",
                DepKind::reveal_opaque_types_in_bounds =>
                    "reveal_opaque_types_in_bounds",
                DepKind::limits => "limits",
                DepKind::diagnostic_hir_wf_check => "diagnostic_hir_wf_check",
                DepKind::global_backend_features => "global_backend_features",
                DepKind::check_validity_requirement =>
                    "check_validity_requirement",
                DepKind::compare_impl_item => "compare_impl_item",
                DepKind::deduced_param_attrs => "deduced_param_attrs",
                DepKind::doc_link_resolutions => "doc_link_resolutions",
                DepKind::doc_link_traits_in_scope =>
                    "doc_link_traits_in_scope",
                DepKind::stripped_cfg_items => "stripped_cfg_items",
                DepKind::generics_require_sized_self =>
                    "generics_require_sized_self",
                DepKind::cross_crate_inlinable => "cross_crate_inlinable",
                DepKind::check_mono_item => "check_mono_item",
                DepKind::items_of_instance => "items_of_instance",
                DepKind::size_estimate => "size_estimate",
                DepKind::anon_const_kind => "anon_const_kind",
                DepKind::trivial_const => "trivial_const",
                DepKind::sanitizer_settings_for => "sanitizer_settings_for",
                DepKind::check_externally_implementable_items =>
                    "check_externally_implementable_items",
                DepKind::externally_implementable_items =>
                    "externally_implementable_items",
            })
    }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for DepKind { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for DepKind {
    #[inline]
    fn eq(&self, other: &DepKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for DepKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for DepKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}
/// Converts a string to a `DepKind`. Used for handling attributes like `rustc_clean` that
/// name dep kinds.
fn dep_kind_from_label_string(label: &str) -> Result<DepKind, ()> {
    match label {
        "Null" => Ok(self::DepKind::Null),
        "Red" => Ok(self::DepKind::Red),
        "SideEffect" => Ok(self::DepKind::SideEffect),
        "AnonZeroDeps" => Ok(self::DepKind::AnonZeroDeps),
        "TraitSelect" => Ok(self::DepKind::TraitSelect),
        "CompileCodegenUnit" => Ok(self::DepKind::CompileCodegenUnit),
        "CompileMonoItem" => Ok(self::DepKind::CompileMonoItem),
        "Metadata" => Ok(self::DepKind::Metadata),
        "derive_macro_expansion" => Ok(self::DepKind::derive_macro_expansion),
        "trigger_delayed_bug" => Ok(self::DepKind::trigger_delayed_bug),
        "registered_attr_tools" => Ok(self::DepKind::registered_attr_tools),
        "registered_lint_tools" => Ok(self::DepKind::registered_lint_tools),
        "early_lint_checks" => Ok(self::DepKind::early_lint_checks),
        "env_var_os" => Ok(self::DepKind::env_var_os),
        "resolutions" => Ok(self::DepKind::resolutions),
        "resolver_for_lowering_raw" =>
            Ok(self::DepKind::resolver_for_lowering_raw),
        "index_ast" => Ok(self::DepKind::index_ast),
        "source_span" => Ok(self::DepKind::source_span),
        "lower_to_hir" => Ok(self::DepKind::lower_to_hir),
        "hir_owner" => Ok(self::DepKind::hir_owner),
        "hir_crate_items" => Ok(self::DepKind::hir_crate_items),
        "hir_module_items" => Ok(self::DepKind::hir_module_items),
        "hir_owner_parent_q" => Ok(self::DepKind::hir_owner_parent_q),
        "hir_attr_map" => Ok(self::DepKind::hir_attr_map),
        "const_param_default" => Ok(self::DepKind::const_param_default),
        "const_of_item" => Ok(self::DepKind::const_of_item),
        "type_of" => Ok(self::DepKind::type_of),
        "type_of_opaque" => Ok(self::DepKind::type_of_opaque),
        "type_of_opaque_hir_typeck" =>
            Ok(self::DepKind::type_of_opaque_hir_typeck),
        "type_alias_is_checked" => Ok(self::DepKind::type_alias_is_checked),
        "collect_return_position_impl_trait_in_trait_tys" =>
            Ok(self::DepKind::collect_return_position_impl_trait_in_trait_tys),
        "opaque_ty_origin" => Ok(self::DepKind::opaque_ty_origin),
        "unsizing_params_for_adt" =>
            Ok(self::DepKind::unsizing_params_for_adt),
        "analysis" => Ok(self::DepKind::analysis),
        "check_expectations" => Ok(self::DepKind::check_expectations),
        "generics_of" => Ok(self::DepKind::generics_of),
        "clauses_of" => Ok(self::DepKind::clauses_of),
        "opaque_types_defined_by" =>
            Ok(self::DepKind::opaque_types_defined_by),
        "nested_bodies_within" => Ok(self::DepKind::nested_bodies_within),
        "explicit_item_bounds" => Ok(self::DepKind::explicit_item_bounds),
        "explicit_item_self_bounds" =>
            Ok(self::DepKind::explicit_item_self_bounds),
        "item_bounds" => Ok(self::DepKind::item_bounds),
        "item_self_bounds" => Ok(self::DepKind::item_self_bounds),
        "item_non_self_bounds" => Ok(self::DepKind::item_non_self_bounds),
        "impl_super_outlives" => Ok(self::DepKind::impl_super_outlives),
        "native_libraries" => Ok(self::DepKind::native_libraries),
        "shallow_lint_levels_on" => Ok(self::DepKind::shallow_lint_levels_on),
        "lint_expectations" => Ok(self::DepKind::lint_expectations),
        "skippable_lints" => Ok(self::DepKind::skippable_lints),
        "expn_that_defined" => Ok(self::DepKind::expn_that_defined),
        "is_panic_runtime" => Ok(self::DepKind::is_panic_runtime),
        "check_representability" => Ok(self::DepKind::check_representability),
        "check_representability_adt_ty" =>
            Ok(self::DepKind::check_representability_adt_ty),
        "params_in_repr" => Ok(self::DepKind::params_in_repr),
        "thir_body" => Ok(self::DepKind::thir_body),
        "mir_keys" => Ok(self::DepKind::mir_keys),
        "mir_const_qualif" => Ok(self::DepKind::mir_const_qualif),
        "mir_built" => Ok(self::DepKind::mir_built),
        "thir_abstract_const" => Ok(self::DepKind::thir_abstract_const),
        "mir_drops_elaborated_and_const_checked" =>
            Ok(self::DepKind::mir_drops_elaborated_and_const_checked),
        "mir_for_ctfe" => Ok(self::DepKind::mir_for_ctfe),
        "mir_promoted" => Ok(self::DepKind::mir_promoted),
        "closure_typeinfo" => Ok(self::DepKind::closure_typeinfo),
        "closure_saved_names_of_captured_variables" =>
            Ok(self::DepKind::closure_saved_names_of_captured_variables),
        "mir_coroutine_witnesses" =>
            Ok(self::DepKind::mir_coroutine_witnesses),
        "check_coroutine_obligations" =>
            Ok(self::DepKind::check_coroutine_obligations),
        "check_potentially_region_dependent_goals" =>
            Ok(self::DepKind::check_potentially_region_dependent_goals),
        "optimized_mir" => Ok(self::DepKind::optimized_mir),
        "is_eligible_for_coverage" =>
            Ok(self::DepKind::is_eligible_for_coverage),
        "coverage_attr_on" => Ok(self::DepKind::coverage_attr_on),
        "coverage_codegen_info" => Ok(self::DepKind::coverage_codegen_info),
        "promoted_mir" => Ok(self::DepKind::promoted_mir),
        "erase_and_anonymize_regions_ty" =>
            Ok(self::DepKind::erase_and_anonymize_regions_ty),
        "wasm_import_module_map" => Ok(self::DepKind::wasm_import_module_map),
        "trait_explicit_clauses_and_bounds" =>
            Ok(self::DepKind::trait_explicit_clauses_and_bounds),
        "explicit_clauses_of" => Ok(self::DepKind::explicit_clauses_of),
        "inferred_outlives_of" => Ok(self::DepKind::inferred_outlives_of),
        "explicit_super_clauses_of" =>
            Ok(self::DepKind::explicit_super_clauses_of),
        "explicit_implied_clauses_of" =>
            Ok(self::DepKind::explicit_implied_clauses_of),
        "explicit_supertraits_containing_assoc_item" =>
            Ok(self::DepKind::explicit_supertraits_containing_assoc_item),
        "const_conditions" => Ok(self::DepKind::const_conditions),
        "explicit_implied_const_bounds" =>
            Ok(self::DepKind::explicit_implied_const_bounds),
        "type_param_clauses" => Ok(self::DepKind::type_param_clauses),
        "trait_def" => Ok(self::DepKind::trait_def),
        "adt_def" => Ok(self::DepKind::adt_def),
        "adt_destructor" => Ok(self::DepKind::adt_destructor),
        "adt_async_destructor" => Ok(self::DepKind::adt_async_destructor),
        "adt_sizedness_constraint" =>
            Ok(self::DepKind::adt_sizedness_constraint),
        "adt_dtorck_constraint" => Ok(self::DepKind::adt_dtorck_constraint),
        "constness" => Ok(self::DepKind::constness),
        "asyncness" => Ok(self::DepKind::asyncness),
        "is_promotable_const_fn" => Ok(self::DepKind::is_promotable_const_fn),
        "coroutine_by_move_body_def_id" =>
            Ok(self::DepKind::coroutine_by_move_body_def_id),
        "coroutine_kind" => Ok(self::DepKind::coroutine_kind),
        "coroutine_for_closure" => Ok(self::DepKind::coroutine_for_closure),
        "coroutine_hidden_types" => Ok(self::DepKind::coroutine_hidden_types),
        "crate_variances" => Ok(self::DepKind::crate_variances),
        "variances_of" => Ok(self::DepKind::variances_of),
        "inferred_outlives_crate" =>
            Ok(self::DepKind::inferred_outlives_crate),
        "associated_item_def_ids" =>
            Ok(self::DepKind::associated_item_def_ids),
        "associated_item" => Ok(self::DepKind::associated_item),
        "associated_items" => Ok(self::DepKind::associated_items),
        "impl_item_implementor_ids" =>
            Ok(self::DepKind::impl_item_implementor_ids),
        "associated_types_for_impl_traits_in_trait_or_impl" =>
            Ok(self::DepKind::associated_types_for_impl_traits_in_trait_or_impl),
        "impl_trait_header" => Ok(self::DepKind::impl_trait_header),
        "impl_is_fully_generic_for_reflection" =>
            Ok(self::DepKind::impl_is_fully_generic_for_reflection),
        "impl_self_is_guaranteed_unsized" =>
            Ok(self::DepKind::impl_self_is_guaranteed_unsized),
        "inherent_impls" => Ok(self::DepKind::inherent_impls),
        "incoherent_impls" => Ok(self::DepKind::incoherent_impls),
        "check_transmutes" => Ok(self::DepKind::check_transmutes),
        "check_offloads" => Ok(self::DepKind::check_offloads),
        "check_unsafety" => Ok(self::DepKind::check_unsafety),
        "check_tail_calls" => Ok(self::DepKind::check_tail_calls),
        "assumed_wf_types" => Ok(self::DepKind::assumed_wf_types),
        "assumed_wf_types_for_rpitit" =>
            Ok(self::DepKind::assumed_wf_types_for_rpitit),
        "fn_sig" => Ok(self::DepKind::fn_sig),
        "lint_mod" => Ok(self::DepKind::lint_mod),
        "check_unused_traits" => Ok(self::DepKind::check_unused_traits),
        "check_mod_attrs" => Ok(self::DepKind::check_mod_attrs),
        "check_mod_unstable_api_usage" =>
            Ok(self::DepKind::check_mod_unstable_api_usage),
        "check_mod_privacy" => Ok(self::DepKind::check_mod_privacy),
        "check_liveness" => Ok(self::DepKind::check_liveness),
        "live_symbols_and_ignored_derived_traits" =>
            Ok(self::DepKind::live_symbols_and_ignored_derived_traits),
        "check_mod_deathness" => Ok(self::DepKind::check_mod_deathness),
        "check_type_wf" => Ok(self::DepKind::check_type_wf),
        "coerce_unsized_info" => Ok(self::DepKind::coerce_unsized_info),
        "typeck_root" => Ok(self::DepKind::typeck_root),
        "used_trait_imports" => Ok(self::DepKind::used_trait_imports),
        "coherent_trait" => Ok(self::DepKind::coherent_trait),
        "mir_borrowck" => Ok(self::DepKind::mir_borrowck),
        "crate_inherent_impls" => Ok(self::DepKind::crate_inherent_impls),
        "crate_inherent_impls_validity_check" =>
            Ok(self::DepKind::crate_inherent_impls_validity_check),
        "crate_inherent_impls_overlap_check" =>
            Ok(self::DepKind::crate_inherent_impls_overlap_check),
        "orphan_check_impl" => Ok(self::DepKind::orphan_check_impl),
        "mir_callgraph_cyclic" => Ok(self::DepKind::mir_callgraph_cyclic),
        "mir_inliner_callees" => Ok(self::DepKind::mir_inliner_callees),
        "tag_for_variant" => Ok(self::DepKind::tag_for_variant),
        "eval_to_allocation_raw" => Ok(self::DepKind::eval_to_allocation_raw),
        "eval_static_initializer" =>
            Ok(self::DepKind::eval_static_initializer),
        "eval_to_const_value_raw" =>
            Ok(self::DepKind::eval_to_const_value_raw),
        "eval_to_valtree" => Ok(self::DepKind::eval_to_valtree),
        "valtree_to_const_val" => Ok(self::DepKind::valtree_to_const_val),
        "lit_to_const" => Ok(self::DepKind::lit_to_const),
        "check_match" => Ok(self::DepKind::check_match),
        "effective_visibilities" => Ok(self::DepKind::effective_visibilities),
        "check_private_in_public" =>
            Ok(self::DepKind::check_private_in_public),
        "reachable_set" => Ok(self::DepKind::reachable_set),
        "region_scope_tree" => Ok(self::DepKind::region_scope_tree),
        "mir_shims" => Ok(self::DepKind::mir_shims),
        "symbol_name" => Ok(self::DepKind::symbol_name),
        "def_kind" => Ok(self::DepKind::def_kind),
        "def_span" => Ok(self::DepKind::def_span),
        "def_ident_span" => Ok(self::DepKind::def_ident_span),
        "ty_span" => Ok(self::DepKind::ty_span),
        "lookup_stability" => Ok(self::DepKind::lookup_stability),
        "lookup_const_stability" => Ok(self::DepKind::lookup_const_stability),
        "lookup_default_body_stability" =>
            Ok(self::DepKind::lookup_default_body_stability),
        "should_inherit_track_caller" =>
            Ok(self::DepKind::should_inherit_track_caller),
        "inherited_align" => Ok(self::DepKind::inherited_align),
        "lookup_deprecation_entry" =>
            Ok(self::DepKind::lookup_deprecation_entry),
        "is_doc_hidden" => Ok(self::DepKind::is_doc_hidden),
        "is_doc_notable_trait" => Ok(self::DepKind::is_doc_notable_trait),
        "attrs_for_def" => Ok(self::DepKind::attrs_for_def),
        "codegen_fn_attrs" => Ok(self::DepKind::codegen_fn_attrs),
        "asm_target_features" => Ok(self::DepKind::asm_target_features),
        "fn_arg_idents" => Ok(self::DepKind::fn_arg_idents),
        "rendered_const" => Ok(self::DepKind::rendered_const),
        "rendered_precise_capturing_args" =>
            Ok(self::DepKind::rendered_precise_capturing_args),
        "impl_parent" => Ok(self::DepKind::impl_parent),
        "is_mir_available" => Ok(self::DepKind::is_mir_available),
        "own_existential_vtable_entries" =>
            Ok(self::DepKind::own_existential_vtable_entries),
        "vtable_entries" => Ok(self::DepKind::vtable_entries),
        "first_method_vtable_slot" =>
            Ok(self::DepKind::first_method_vtable_slot),
        "supertrait_vtable_slot" => Ok(self::DepKind::supertrait_vtable_slot),
        "vtable_allocation" => Ok(self::DepKind::vtable_allocation),
        "codegen_select_candidate" =>
            Ok(self::DepKind::codegen_select_candidate),
        "all_local_trait_impls" => Ok(self::DepKind::all_local_trait_impls),
        "local_trait_impls" => Ok(self::DepKind::local_trait_impls),
        "trait_impls_of" => Ok(self::DepKind::trait_impls_of),
        "specialization_graph_of" =>
            Ok(self::DepKind::specialization_graph_of),
        "dyn_compatibility_violations" =>
            Ok(self::DepKind::dyn_compatibility_violations),
        "is_dyn_compatible" => Ok(self::DepKind::is_dyn_compatible),
        "param_env" => Ok(self::DepKind::param_env),
        "param_env_normalized_for_post_analysis" =>
            Ok(self::DepKind::param_env_normalized_for_post_analysis),
        "is_copy_raw" => Ok(self::DepKind::is_copy_raw),
        "is_use_cloned_raw" => Ok(self::DepKind::is_use_cloned_raw),
        "is_sized_raw" => Ok(self::DepKind::is_sized_raw),
        "is_freeze_raw" => Ok(self::DepKind::is_freeze_raw),
        "is_unsafe_unpin_raw" => Ok(self::DepKind::is_unsafe_unpin_raw),
        "is_unpin_raw" => Ok(self::DepKind::is_unpin_raw),
        "is_async_drop_raw" => Ok(self::DepKind::is_async_drop_raw),
        "needs_drop_raw" => Ok(self::DepKind::needs_drop_raw),
        "needs_async_drop_raw" => Ok(self::DepKind::needs_async_drop_raw),
        "has_significant_drop_raw" =>
            Ok(self::DepKind::has_significant_drop_raw),
        "has_structural_eq_impl" => Ok(self::DepKind::has_structural_eq_impl),
        "adt_drop_tys" => Ok(self::DepKind::adt_drop_tys),
        "adt_async_drop_tys" => Ok(self::DepKind::adt_async_drop_tys),
        "adt_significant_drop_tys" =>
            Ok(self::DepKind::adt_significant_drop_tys),
        "list_significant_drop_tys" =>
            Ok(self::DepKind::list_significant_drop_tys),
        "layout_of" => Ok(self::DepKind::layout_of),
        "fn_abi_of_fn_ptr" => Ok(self::DepKind::fn_abi_of_fn_ptr),
        "fn_abi_of_instance_no_deduced_attrs" =>
            Ok(self::DepKind::fn_abi_of_instance_no_deduced_attrs),
        "fn_abi_of_instance_raw" => Ok(self::DepKind::fn_abi_of_instance_raw),
        "dylib_dependency_formats" =>
            Ok(self::DepKind::dylib_dependency_formats),
        "dependency_formats" => Ok(self::DepKind::dependency_formats),
        "is_compiler_builtins" => Ok(self::DepKind::is_compiler_builtins),
        "has_global_allocator" => Ok(self::DepKind::has_global_allocator),
        "has_alloc_error_handler" =>
            Ok(self::DepKind::has_alloc_error_handler),
        "has_panic_handler" => Ok(self::DepKind::has_panic_handler),
        "is_profiler_runtime" => Ok(self::DepKind::is_profiler_runtime),
        "has_ffi_unwind_calls" => Ok(self::DepKind::has_ffi_unwind_calls),
        "required_panic_strategy" =>
            Ok(self::DepKind::required_panic_strategy),
        "panic_in_drop_strategy" => Ok(self::DepKind::panic_in_drop_strategy),
        "is_no_builtins" => Ok(self::DepKind::is_no_builtins),
        "symbol_mangling_version" =>
            Ok(self::DepKind::symbol_mangling_version),
        "extern_crate" => Ok(self::DepKind::extern_crate),
        "specialization_enabled_in" =>
            Ok(self::DepKind::specialization_enabled_in),
        "specializes" => Ok(self::DepKind::specializes),
        "defaultness" => Ok(self::DepKind::defaultness),
        "default_field" => Ok(self::DepKind::default_field),
        "check_well_formed" => Ok(self::DepKind::check_well_formed),
        "enforce_impl_non_lifetime_params_are_constrained" =>
            Ok(self::DepKind::enforce_impl_non_lifetime_params_are_constrained),
        "reachable_non_generics" => Ok(self::DepKind::reachable_non_generics),
        "is_reachable_non_generic" =>
            Ok(self::DepKind::is_reachable_non_generic),
        "is_unreachable_local_definition" =>
            Ok(self::DepKind::is_unreachable_local_definition),
        "upstream_monomorphizations" =>
            Ok(self::DepKind::upstream_monomorphizations),
        "upstream_monomorphizations_for" =>
            Ok(self::DepKind::upstream_monomorphizations_for),
        "upstream_drop_glue_for" => Ok(self::DepKind::upstream_drop_glue_for),
        "upstream_async_drop_glue_for" =>
            Ok(self::DepKind::upstream_async_drop_glue_for),
        "foreign_modules" => Ok(self::DepKind::foreign_modules),
        "clashing_extern_declarations" =>
            Ok(self::DepKind::clashing_extern_declarations),
        "entry_fn" => Ok(self::DepKind::entry_fn),
        "proc_macro_decls_static" =>
            Ok(self::DepKind::proc_macro_decls_static),
        "crate_hash" => Ok(self::DepKind::crate_hash),
        "crate_host_hash" => Ok(self::DepKind::crate_host_hash),
        "extra_filename" => Ok(self::DepKind::extra_filename),
        "crate_extern_paths" => Ok(self::DepKind::crate_extern_paths),
        "implementations_of_trait" =>
            Ok(self::DepKind::implementations_of_trait),
        "crate_incoherent_impls" => Ok(self::DepKind::crate_incoherent_impls),
        "native_library" => Ok(self::DepKind::native_library),
        "inherit_sig_for_delegation_item" =>
            Ok(self::DepKind::inherit_sig_for_delegation_item),
        "delegation_user_specified_args" =>
            Ok(self::DepKind::delegation_user_specified_args),
        "resolve_bound_vars" => Ok(self::DepKind::resolve_bound_vars),
        "named_variable_map" => Ok(self::DepKind::named_variable_map),
        "is_late_bound_map" => Ok(self::DepKind::is_late_bound_map),
        "object_lifetime_default" =>
            Ok(self::DepKind::object_lifetime_default),
        "late_bound_vars_map" => Ok(self::DepKind::late_bound_vars_map),
        "opaque_captured_lifetimes" =>
            Ok(self::DepKind::opaque_captured_lifetimes),
        "live_args_for_alias_from_outlives_bounds" =>
            Ok(self::DepKind::live_args_for_alias_from_outlives_bounds),
        "args_known_to_outlive_alias_params" =>
            Ok(self::DepKind::args_known_to_outlive_alias_params),
        "visibility" => Ok(self::DepKind::visibility),
        "inhabited_predicate_for_def" =>
            Ok(self::DepKind::inhabited_predicate_for_def),
        "inhabited_predicate_type" =>
            Ok(self::DepKind::inhabited_predicate_type),
        "is_opsem_inhabited_raw" => Ok(self::DepKind::is_opsem_inhabited_raw),
        "crate_dep_kind" => Ok(self::DepKind::crate_dep_kind),
        "crate_name" => Ok(self::DepKind::crate_name),
        "module_children" => Ok(self::DepKind::module_children),
        "num_extern_def_ids" => Ok(self::DepKind::num_extern_def_ids),
        "lib_features" => Ok(self::DepKind::lib_features),
        "stability_implications" => Ok(self::DepKind::stability_implications),
        "intrinsic_raw" => Ok(self::DepKind::intrinsic_raw),
        "get_lang_items" => Ok(self::DepKind::get_lang_items),
        "all_diagnostic_items" => Ok(self::DepKind::all_diagnostic_items),
        "all_canonical_symbols" => Ok(self::DepKind::all_canonical_symbols),
        "defined_lang_items" => Ok(self::DepKind::defined_lang_items),
        "diagnostic_items" => Ok(self::DepKind::diagnostic_items),
        "canonical_symbols" => Ok(self::DepKind::canonical_symbols),
        "missing_lang_items" => Ok(self::DepKind::missing_lang_items),
        "visible_parent_map" => Ok(self::DepKind::visible_parent_map),
        "trimmed_def_paths" => Ok(self::DepKind::trimmed_def_paths),
        "missing_extern_crate_item" =>
            Ok(self::DepKind::missing_extern_crate_item),
        "used_crate_source" => Ok(self::DepKind::used_crate_source),
        "debugger_visualizers" => Ok(self::DepKind::debugger_visualizers),
        "postorder_cnums" => Ok(self::DepKind::postorder_cnums),
        "is_private_dep" => Ok(self::DepKind::is_private_dep),
        "allocator_kind" => Ok(self::DepKind::allocator_kind),
        "alloc_error_handler_kind" =>
            Ok(self::DepKind::alloc_error_handler_kind),
        "upvars_mentioned" => Ok(self::DepKind::upvars_mentioned),
        "crates" => Ok(self::DepKind::crates),
        "used_crates" => Ok(self::DepKind::used_crates),
        "duplicate_crate_names" => Ok(self::DepKind::duplicate_crate_names),
        "traits" => Ok(self::DepKind::traits),
        "trait_impls_in_crate" => Ok(self::DepKind::trait_impls_in_crate),
        "stable_order_of_exportable_impls" =>
            Ok(self::DepKind::stable_order_of_exportable_impls),
        "exportable_items" => Ok(self::DepKind::exportable_items),
        "exported_non_generic_symbols" =>
            Ok(self::DepKind::exported_non_generic_symbols),
        "exported_generic_symbols" =>
            Ok(self::DepKind::exported_generic_symbols),
        "collect_and_partition_mono_items" =>
            Ok(self::DepKind::collect_and_partition_mono_items),
        "is_codegened_item" => Ok(self::DepKind::is_codegened_item),
        "codegen_unit" => Ok(self::DepKind::codegen_unit),
        "backend_optimization_level" =>
            Ok(self::DepKind::backend_optimization_level),
        "output_filenames" => Ok(self::DepKind::output_filenames),
        "normalize_canonicalized_projection" =>
            Ok(self::DepKind::normalize_canonicalized_projection),
        "normalize_canonicalized_free_alias" =>
            Ok(self::DepKind::normalize_canonicalized_free_alias),
        "normalize_canonicalized_inherent_projection" =>
            Ok(self::DepKind::normalize_canonicalized_inherent_projection),
        "try_normalize_generic_arg_after_erasing_regions" =>
            Ok(self::DepKind::try_normalize_generic_arg_after_erasing_regions),
        "implied_outlives_bounds" =>
            Ok(self::DepKind::implied_outlives_bounds),
        "mir_borrowck_implied_outlives_bounds" =>
            Ok(self::DepKind::mir_borrowck_implied_outlives_bounds),
        "dropck_outlives" => Ok(self::DepKind::dropck_outlives),
        "evaluate_obligation" => Ok(self::DepKind::evaluate_obligation),
        "type_op_ascribe_user_type" =>
            Ok(self::DepKind::type_op_ascribe_user_type),
        "type_op_prove_predicate" =>
            Ok(self::DepKind::type_op_prove_predicate),
        "type_op_normalize_ty" => Ok(self::DepKind::type_op_normalize_ty),
        "type_op_normalize_clause" =>
            Ok(self::DepKind::type_op_normalize_clause),
        "type_op_normalize_poly_fn_sig" =>
            Ok(self::DepKind::type_op_normalize_poly_fn_sig),
        "type_op_normalize_fn_sig" =>
            Ok(self::DepKind::type_op_normalize_fn_sig),
        "instantiate_and_check_impossible_clauses" =>
            Ok(self::DepKind::instantiate_and_check_impossible_clauses),
        "is_impossible_associated_item" =>
            Ok(self::DepKind::is_impossible_associated_item),
        "method_autoderef_steps" => Ok(self::DepKind::method_autoderef_steps),
        "evaluate_root_goal_for_proof_tree_raw" =>
            Ok(self::DepKind::evaluate_root_goal_for_proof_tree_raw),
        "all_rust_target_features" =>
            Ok(self::DepKind::all_rust_target_features),
        "implied_target_features" =>
            Ok(self::DepKind::implied_target_features),
        "features_query" => Ok(self::DepKind::features_query),
        "crate_for_resolver" => Ok(self::DepKind::crate_for_resolver),
        "resolve_instance_raw" => Ok(self::DepKind::resolve_instance_raw),
        "reveal_opaque_types_in_bounds" =>
            Ok(self::DepKind::reveal_opaque_types_in_bounds),
        "limits" => Ok(self::DepKind::limits),
        "diagnostic_hir_wf_check" =>
            Ok(self::DepKind::diagnostic_hir_wf_check),
        "global_backend_features" =>
            Ok(self::DepKind::global_backend_features),
        "check_validity_requirement" =>
            Ok(self::DepKind::check_validity_requirement),
        "compare_impl_item" => Ok(self::DepKind::compare_impl_item),
        "deduced_param_attrs" => Ok(self::DepKind::deduced_param_attrs),
        "doc_link_resolutions" => Ok(self::DepKind::doc_link_resolutions),
        "doc_link_traits_in_scope" =>
            Ok(self::DepKind::doc_link_traits_in_scope),
        "stripped_cfg_items" => Ok(self::DepKind::stripped_cfg_items),
        "generics_require_sized_self" =>
            Ok(self::DepKind::generics_require_sized_self),
        "cross_crate_inlinable" => Ok(self::DepKind::cross_crate_inlinable),
        "check_mono_item" => Ok(self::DepKind::check_mono_item),
        "items_of_instance" => Ok(self::DepKind::items_of_instance),
        "size_estimate" => Ok(self::DepKind::size_estimate),
        "anon_const_kind" => Ok(self::DepKind::anon_const_kind),
        "trivial_const" => Ok(self::DepKind::trivial_const),
        "sanitizer_settings_for" => Ok(self::DepKind::sanitizer_settings_for),
        "check_externally_implementable_items" =>
            Ok(self::DepKind::check_externally_implementable_items),
        "externally_implementable_items" =>
            Ok(self::DepKind::externally_implementable_items),
        _ => Err(()),
    }
}crate::queries::rustc_with_all_queries! { define_dep_nodes! }
304
305// WARNING: `construct` is generic and does not know that `CompileCodegenUnit` takes `Symbol`s as keys.
306// Be very careful changing this type signature!
307pub(crate) fn make_compile_codegen_unit(tcx: TyCtxt<'_>, name: Symbol) -> DepNode {
308    DepNode::construct(tcx, DepKind::CompileCodegenUnit, &name)
309}
310
311// WARNING: `construct` is generic and does not know that `CompileMonoItem` takes `MonoItem`s as keys.
312// Be very careful changing this type signature!
313pub(crate) fn make_compile_mono_item<'tcx>(
314    tcx: TyCtxt<'tcx>,
315    mono_item: &MonoItem<'tcx>,
316) -> DepNode {
317    DepNode::construct(tcx, DepKind::CompileMonoItem, mono_item)
318}
319
320// WARNING: `construct` is generic and does not know that `Metadata` takes `()`s as keys.
321// Be very careful changing this type signature!
322pub(crate) fn make_metadata(tcx: TyCtxt<'_>) -> DepNode {
323    DepNode::construct(tcx, DepKind::Metadata, &())
324}
325
326impl DepNode {
327    /// Extracts the DefId corresponding to this DepNode. This will work
328    /// if two conditions are met:
329    ///
330    /// 1. The Fingerprint of the DepNode actually is a DefPathHash, and
331    /// 2. the item that the DefPath refers to exists in the current tcx.
332    ///
333    /// Condition (1) is determined by the DepKind variant of the
334    /// DepNode. Condition (2) might not be fulfilled if a DepNode
335    /// refers to something from the previous compilation session that
336    /// has been removed.
337    pub fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option<DefId> {
338        if tcx.key_fingerprint_style(self.kind) == KeyFingerprintStyle::DefPathHash {
339            tcx.def_path_hash_to_def_id(DefPathHash(self.key_fingerprint.into()))
340        } else {
341            None
342        }
343    }
344
345    pub fn from_label_string(
346        tcx: TyCtxt<'_>,
347        label: &str,
348        def_path_hash: DefPathHash,
349    ) -> Result<DepNode, ()> {
350        let kind = dep_kind_from_label_string(label)?;
351
352        match tcx.key_fingerprint_style(kind) {
353            KeyFingerprintStyle::Opaque | KeyFingerprintStyle::HirId => Err(()),
354            KeyFingerprintStyle::Unit => Ok(DepNode::new_no_params(tcx, kind)),
355            KeyFingerprintStyle::DefPathHash => {
356                Ok(DepNode::from_def_path_hash(tcx, def_path_hash, kind))
357            }
358        }
359    }
360
361    pub fn has_label_string(label: &str) -> bool {
362        dep_kind_from_label_string(label).is_ok()
363    }
364}
365
366/// Maps a query label to its DepKind. Panics if a query with the given label does not exist.
367pub fn dep_kind_from_label(label: &str) -> DepKind {
368    dep_kind_from_label_string(label)
369        .unwrap_or_else(|_| {
    ::core::panicking::panic_fmt(format_args!("Query label {0} does not exist",
            label));
}panic!("Query label {label} does not exist"))
370}
371
372// Some types are used a lot. Make sure they don't unintentionally get bigger.
373#[cfg(target_pointer_width = "64")]
374mod size_asserts {
375    use rustc_data_structures::static_assert_size;
376
377    use super::*;
378    // tidy-alphabetical-start
379    const _: [(); 2] = [(); ::std::mem::size_of::<DepKind>()];static_assert_size!(DepKind, 2);
380    const _: [(); 18] = [(); ::std::mem::size_of::<DepNode>()];static_assert_size!(DepNode, 18);
381    // tidy-alphabetical-end
382}