Skip to main content

rustc_metadata/rmeta/
mod.rs

1use std::marker::PhantomData;
2use std::mem::size_of;
3use std::num::NonZero;
4
5use decoder::LazyDecoder;
6pub(crate) use decoder::{CrateMetadata, CrateNumMap, MetadataBlob, TargetModifiers};
7use def_path_hash_map::DefPathHashMapRef;
8use encoder::EncodeContext;
9pub use encoder::{EncodedMetadata, encode_metadata, rendered_const};
10pub(crate) use parameterized::ParameterizedOverTcx;
11use rustc_abi::{FieldIdx, ReprOptions, VariantIdx};
12use rustc_ast as ast;
13use rustc_attr_ir::lang_items::LangItem;
14use rustc_attr_ir::{Stability, StrippedCfgItem};
15use rustc_crate_store::{CrateDepKind, ForeignModule, LinkagePreference, NativeLib};
16use rustc_data_structures::fingerprint::Fingerprint;
17use rustc_data_structures::fx::FxHashMap;
18use rustc_data_structures::svh::Svh;
19use rustc_hir as hir;
20use rustc_hir::PreciseCapturingArgKind;
21use rustc_hir::def::{CtorKind, DefKind, MacroKinds};
22use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIndex, DefPathHash, StableCrateId};
23use rustc_hir::definitions::DefKey;
24use rustc_index::IndexVec;
25use rustc_index::bit_set::DenseBitSet;
26use rustc_macros::{
27    BlobDecodable, Decodable, Encodable, LazyDecodable, MetadataEncodable, TyDecodable, TyEncodable,
28};
29use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
30use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerFile;
31use rustc_middle::middle::deduced_param_attrs::DeducedParamAttrs;
32use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportInfo};
33use rustc_middle::middle::lib_features::FeatureStability;
34use rustc_middle::middle::resolve::{AmbigModChild, DocLinkResMap, ModChild};
35use rustc_middle::middle::resolve_bound_vars::ObjectLifetimeDefault;
36use rustc_middle::mir;
37use rustc_middle::mir::ConstValue;
38use rustc_middle::ty::fast_reject::SimplifiedType;
39use rustc_middle::ty::{self, Ty, TyCtxt};
40use rustc_middle::util::Providers;
41use rustc_serialize::opaque::FileEncoder;
42use rustc_session::config::mitigation_coverage::DeniedPartialMitigation;
43use rustc_session::config::{SymbolManglingVersion, TargetModifier};
44use rustc_span::edition::Edition;
45use rustc_span::hygiene::{ExpnIndex, MacroKind, SyntaxContextKey};
46use rustc_span::{self, ExpnData, ExpnHash, ExpnId, Ident, Span, Symbol};
47use rustc_target::spec::{PanicStrategy, TargetTuple};
48use table::TableBuilder;
49
50use crate::eii::EiiMapEncodedKeyValue;
51use crate::rmeta::table::TableBuilderSingleIdx;
52
53mod decoder;
54mod def_path_hash_map;
55mod encoder;
56mod parameterized;
57mod table;
58
59pub(crate) fn rustc_version(cfg_version: &'static str) -> String {
60    ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("rustc {0}", cfg_version))
    })format!("rustc {cfg_version}")
61}
62
63/// Metadata encoding version.
64/// N.B., increment this if you change the format of metadata such that
65/// the rustc version can't be found to compare with `rustc_version()`.
66const METADATA_VERSION: u8 = 11;
67
68/// Metadata header which includes `METADATA_VERSION`.
69///
70/// This header is followed by the `CrateRoot` and `CrateRootUnhashed` positions
71/// which represent the hashed and unhashed metadata contents respectively, the
72/// crate hash (SVH), and the rustc version string. See the offset constants
73/// below for the exact layout.
74pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_VERSION];
75
76/// Fixed-size fields encoded immediately after `METADATA_HEADER`, in order:
77/// `CrateRoot` position (u64), `CrateRootUnhashed` position (u64), crate hash
78/// (`Fingerprint`/SVH), then the variable-length rustc version string.
79const ROOT_POS_OFFSET: usize = METADATA_HEADER.len();
80const ROOT_POS_LEN: usize = size_of::<u64>();
81const UNHASHED_POS_OFFSET: usize = ROOT_POS_OFFSET + ROOT_POS_LEN;
82const UNHASHED_POS_LEN: usize = size_of::<u64>();
83const CRATE_HASH_OFFSET: usize = UNHASHED_POS_OFFSET + UNHASHED_POS_LEN;
84const CRATE_HASH_LEN: usize = size_of::<Fingerprint>();
85const VERSION_OFFSET: usize = CRATE_HASH_OFFSET + CRATE_HASH_LEN;
86
87/// A value of type T referred to by its absolute position
88/// in the metadata, and which can be decoded lazily.
89///
90/// Metadata is effective a tree, encoded in post-order,
91/// and with the root's position written next to the header.
92/// That means every single `LazyValue` points to some previous
93/// location in the metadata and is part of a larger node.
94///
95/// The first `LazyValue` in a node is encoded as the backwards
96/// distance from the position where the containing node
97/// starts and where the `LazyValue` points to, while the rest
98/// use the forward distance from the previous `LazyValue`.
99/// Distances start at 1, as 0-byte nodes are invalid.
100/// Also invalid are nodes being referred in a different
101/// order than they were encoded in.
102#[must_use]
103struct LazyValue<T> {
104    position: NonZero<usize>,
105    _marker: PhantomData<fn() -> T>,
106}
107
108impl<T> LazyValue<T> {
109    fn from_position(position: NonZero<usize>) -> LazyValue<T> {
110        LazyValue { position, _marker: PhantomData }
111    }
112}
113
114/// A list of lazily-decoded values.
115///
116/// Unlike `LazyValue<Vec<T>>`, the length is encoded next to the
117/// position, not at the position, which means that the length
118/// doesn't need to be known before encoding all the elements.
119///
120/// If the length is 0, no position is encoded, but otherwise,
121/// the encoding is that of `LazyArray`, with the distinction that
122/// the minimal distance the length of the sequence, i.e.
123/// it's assumed there's no 0-byte element in the sequence.
124struct LazyArray<T> {
125    position: NonZero<usize>,
126    num_elems: usize,
127    _marker: PhantomData<fn() -> T>,
128}
129
130impl<T> Default for LazyArray<T> {
131    fn default() -> LazyArray<T> {
132        LazyArray::from_position_and_num_elems(NonZero::new(1).unwrap(), 0)
133    }
134}
135
136impl<T> LazyArray<T> {
137    fn from_position_and_num_elems(position: NonZero<usize>, num_elems: usize) -> LazyArray<T> {
138        LazyArray { position, num_elems, _marker: PhantomData }
139    }
140}
141
142/// A list of lazily-decoded values, with the added capability of random access.
143///
144/// Random-access table (i.e. offering constant-time `get`/`set`), similar to
145/// `LazyArray<T>`, but without requiring encoding or decoding all the values
146/// eagerly and in-order.
147///
148/// `IdxEncode` - is a type of index that is used to write to the table,
149/// `IdxDecode` - is a type of index that is used to read from the table.
150struct LazyTable<IdxEncode, IdxDecode, T> {
151    position: NonZero<usize>,
152    /// The encoded size of the elements of a table is selected at runtime to drop
153    /// trailing zeroes. This is the number of bytes used for each table element.
154    width: usize,
155    /// How many elements are in the table.
156    len: usize,
157    _marker: PhantomData<fn(IdxEncode, IdxDecode) -> T>,
158}
159
160type LazyTableSingleIdx<TIdx, TValue> = LazyTable<TIdx, TIdx, TValue>;
161
162impl<Ie, Id, T> LazyTable<Ie, Id, T> {
163    fn from_position_and_encoded_size(
164        position: NonZero<usize>,
165        width: usize,
166        len: usize,
167    ) -> LazyTable<Ie, Id, T> {
168        LazyTable { position, width, len, _marker: PhantomData }
169    }
170}
171
172impl<T> Copy for LazyValue<T> {}
173impl<T> Clone for LazyValue<T> {
174    fn clone(&self) -> Self {
175        *self
176    }
177}
178
179impl<T> Copy for LazyArray<T> {}
180impl<T> Clone for LazyArray<T> {
181    fn clone(&self) -> Self {
182        *self
183    }
184}
185
186impl<Ie, Id, T> Copy for LazyTable<Ie, Id, T> {}
187impl<Ie, Id, T> Clone for LazyTable<Ie, Id, T> {
188    fn clone(&self) -> Self {
189        *self
190    }
191}
192
193/// Encoding / decoding state for `Lazy`s (`LazyValue`, `LazyArray`, and `LazyTable`).
194#[derive(#[automatically_derived]
impl ::core::marker::Copy for LazyState { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for LazyState { }
#[automatically_derived]
impl ::core::clone::Clone for LazyState {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<NonZero<usize>>;
        let _: ::core::clone::AssertParamIsClone<NonZero<usize>>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for LazyState { }
#[automatically_derived]
impl ::core::cmp::PartialEq for LazyState {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
                ::core::intrinsics::discriminant_value(other) &&
            match (self, other) {
                (Self::NodeStart(__self_0), Self::NodeStart(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (Self::Previous(__self_0), Self::Previous(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for LazyState {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<NonZero<usize>>;
        let _: ::core::cmp::AssertParamIsEq<NonZero<usize>>;
    }
}Eq, #[automatically_derived]
impl ::core::fmt::Debug for LazyState {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Self::NoNode => ::core::fmt::Formatter::write_str(f, "NoNode"),
            Self::NodeStart(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "NodeStart", &__self_0),
            Self::Previous(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Previous", &__self_0),
        }
    }
}Debug)]
195enum LazyState {
196    /// Outside of a metadata node.
197    NoNode,
198
199    /// Inside a metadata node, and before any `Lazy`s.
200    /// The position is that of the node itself.
201    NodeStart(NonZero<usize>),
202
203    /// Inside a metadata node, with a previous `Lazy`s.
204    /// The position is where that previous `Lazy` would start.
205    Previous(NonZero<usize>),
206}
207
208type SyntaxContextTable = LazyTableSingleIdx<u32, Option<LazyValue<SyntaxContextKey>>>;
209type ExpnDataTable = LazyTableSingleIdx<ExpnIndex, Option<LazyValue<ExpnData>>>;
210type ExpnHashTable = LazyTableSingleIdx<ExpnIndex, Option<LazyValue<ExpnHash>>>;
211
212#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            ProcMacroData {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let ProcMacroData {
                        proc_macro_decls_static: ref __binding_0,
                        stability: ref __binding_1,
                        macros: ref __binding_2,
                        proc_macro_quoted_spans: ref __binding_3 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_2, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_3, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            ProcMacroData {
            fn decode(__decoder: &mut __D) -> Self {
                ProcMacroData {
                    proc_macro_decls_static: ::rustc_serialize::Decodable::decode(__decoder),
                    stability: ::rustc_serialize::Decodable::decode(__decoder),
                    macros: ::rustc_serialize::Decodable::decode(__decoder),
                    proc_macro_quoted_spans: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };LazyDecodable)]
213pub(crate) struct ProcMacroData {
214    proc_macro_decls_static: DefIndex,
215    stability: Option<Stability>,
216    macros: LazyArray<(DefIndex, LazyValue<ProcMacroKind>)>,
217    proc_macro_quoted_spans: LazyTableSingleIdx<usize, Option<LazyValue<Span>>>,
218}
219
220#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            ProcMacroKind {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let disc =
                    match *self {
                        ProcMacroKind::CustomDerive {
                            trait_name: ref __binding_0, attributes: ref __binding_1 }
                            => {
                            0usize
                        }
                        ProcMacroKind::Attr { name: ref __binding_0 } => { 1usize }
                        ProcMacroKind::Bang { name: ref __binding_0 } => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ProcMacroKind::CustomDerive {
                        trait_name: ref __binding_0, attributes: ref __binding_1 }
                        => {
                        ::rustc_serialize::Encodable::<EncodeContext<'__a,
                                'tcx>>::encode(__binding_0, __encoder);
                        ::rustc_serialize::Encodable::<EncodeContext<'__a,
                                'tcx>>::encode(__binding_1, __encoder);
                    }
                    ProcMacroKind::Attr { name: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<EncodeContext<'__a,
                                'tcx>>::encode(__binding_0, __encoder);
                    }
                    ProcMacroKind::Bang { name: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<EncodeContext<'__a,
                                'tcx>>::encode(__binding_0, __encoder);
                    }
                }
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            ProcMacroKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ProcMacroKind::CustomDerive {
                            trait_name: ::rustc_serialize::Decodable::decode(__decoder),
                            attributes: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        ProcMacroKind::Attr {
                            name: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => {
                        ProcMacroKind::Bang {
                            name: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ProcMacroKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };LazyDecodable)]
221pub enum ProcMacroKind {
222    CustomDerive { trait_name: String, attributes: Vec<String> },
223    Attr { name: String },
224    Bang { name: String },
225}
226
227/// Serialized crate metadata.
228///
229/// This contains just enough information to determine if we should load the `CrateRoot` or not.
230/// Prefer [`CrateRoot`] whenever possible to avoid ICEs when using `omit-git-hash` locally.
231/// See #76720 for more details.
232///
233/// If you do modify this struct, also bump the [`METADATA_VERSION`] constant.
234#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            CrateHeader {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let CrateHeader {
                        triple: ref __binding_0,
                        name: ref __binding_1,
                        is_proc_macro_crate: ref __binding_2,
                        is_stub: ref __binding_3 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_2, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_3, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: ::rustc_span::BlobDecoder> ::rustc_serialize::Decodable<__D>
            for CrateHeader {
            fn decode(__decoder: &mut __D) -> Self {
                CrateHeader {
                    triple: ::rustc_serialize::Decodable::decode(__decoder),
                    name: ::rustc_serialize::Decodable::decode(__decoder),
                    is_proc_macro_crate: ::rustc_serialize::Decodable::decode(__decoder),
                    is_stub: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };BlobDecodable)]
235pub(crate) struct CrateHeader {
236    pub(crate) triple: TargetTuple,
237    pub(crate) name: Symbol,
238    /// Whether this is the header for a proc-macro crate.
239    ///
240    /// This is separate from [`ProcMacroData`] to avoid having to update [`METADATA_VERSION`] every
241    /// time ProcMacroData changes.
242    pub(crate) is_proc_macro_crate: bool,
243    /// Whether this crate metadata section is just a stub.
244    /// Stubs do not contain the full metadata (it will be typically stored
245    /// in a separate rmeta file).
246    ///
247    /// This is used inside rlibs and dylibs when using `-Zembed-metadata=no`.
248    pub(crate) is_stub: bool,
249}
250
251/// Serialized `.rmeta` data for a crate.
252///
253/// When compiling a proc-macro crate, we encode many of
254/// the `LazyArray<T>` fields as `Lazy::empty()`. This serves two purposes:
255///
256/// 1. We avoid performing unnecessary work. Proc-macro crates can only
257/// export proc-macros functions, which are compiled into a shared library.
258/// As a result, a large amount of the information we normally store
259/// (e.g. optimized MIR) is unneeded by downstream crates.
260/// 2. We avoid serializing invalid `CrateNum`s. When we deserialize
261/// a proc-macro crate, we don't load any of its dependencies (since we
262/// just need to invoke a native function from the shared library).
263/// This means that any foreign `CrateNum`s that we serialize cannot be
264/// deserialized, since we will not know how to map them into the current
265/// compilation session. If we were to serialize a proc-macro crate like
266/// a normal crate, much of what we serialized would be unusable in addition
267/// to being unused.
268#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            CrateRoot {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let CrateRoot {
                        header: ref __binding_0,
                        stable_crate_id: ref __binding_1,
                        required_panic_strategy: ref __binding_2,
                        panic_in_drop_strategy: ref __binding_3,
                        edition: ref __binding_4,
                        has_global_allocator: ref __binding_5,
                        has_alloc_error_handler: ref __binding_6,
                        has_panic_handler: ref __binding_7,
                        has_default_lib_allocator: ref __binding_8,
                        externally_implementable_items: ref __binding_9,
                        crate_deps: ref __binding_10,
                        dylib_dependency_formats: ref __binding_11,
                        lib_features: ref __binding_12,
                        stability_implications: ref __binding_13,
                        lang_items: ref __binding_14,
                        lang_items_missing: ref __binding_15,
                        stripped_cfg_items: ref __binding_16,
                        diagnostic_items: ref __binding_17,
                        canonical_symbols: ref __binding_18,
                        fake_doc_items: ref __binding_19,
                        native_libraries: ref __binding_20,
                        foreign_modules: ref __binding_21,
                        traits: ref __binding_22,
                        impls: ref __binding_23,
                        incoherent_impls: ref __binding_24,
                        interpret_alloc_index: ref __binding_25,
                        proc_macro_data: ref __binding_26,
                        tables: ref __binding_27,
                        debugger_visualizers: ref __binding_28,
                        exportable_items: ref __binding_29,
                        stable_order_of_exportable_impls: ref __binding_30,
                        exported_non_generic_symbols: ref __binding_31,
                        exported_generic_symbols: ref __binding_32,
                        syntax_contexts: ref __binding_33,
                        expn_data: ref __binding_34,
                        expn_hashes: ref __binding_35,
                        def_path_hash_map: ref __binding_36,
                        source_map: ref __binding_37,
                        target_modifiers: ref __binding_38,
                        denied_partial_mitigations: ref __binding_39,
                        compiler_builtins: ref __binding_40,
                        needs_allocator: ref __binding_41,
                        needs_panic_runtime: ref __binding_42,
                        no_builtins: ref __binding_43,
                        panic_runtime: ref __binding_44,
                        profiler_runtime: ref __binding_45,
                        symbol_mangling_version: ref __binding_46,
                        specialization_enabled_in: ref __binding_47 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_2, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_3, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_4, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_5, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_6, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_7, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_8, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_9, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_10, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_11, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_12, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_13, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_14, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_15, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_16, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_17, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_18, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_19, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_20, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_21, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_22, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_23, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_24, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_25, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_26, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_27, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_28, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_29, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_30, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_31, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_32, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_33, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_34, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_35, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_36, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_37, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_38, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_39, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_40, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_41, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_42, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_43, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_44, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_45, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_46, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_47, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for CrateRoot
            {
            fn decode(__decoder: &mut __D) -> Self {
                CrateRoot {
                    header: ::rustc_serialize::Decodable::decode(__decoder),
                    stable_crate_id: ::rustc_serialize::Decodable::decode(__decoder),
                    required_panic_strategy: ::rustc_serialize::Decodable::decode(__decoder),
                    panic_in_drop_strategy: ::rustc_serialize::Decodable::decode(__decoder),
                    edition: ::rustc_serialize::Decodable::decode(__decoder),
                    has_global_allocator: ::rustc_serialize::Decodable::decode(__decoder),
                    has_alloc_error_handler: ::rustc_serialize::Decodable::decode(__decoder),
                    has_panic_handler: ::rustc_serialize::Decodable::decode(__decoder),
                    has_default_lib_allocator: ::rustc_serialize::Decodable::decode(__decoder),
                    externally_implementable_items: ::rustc_serialize::Decodable::decode(__decoder),
                    crate_deps: ::rustc_serialize::Decodable::decode(__decoder),
                    dylib_dependency_formats: ::rustc_serialize::Decodable::decode(__decoder),
                    lib_features: ::rustc_serialize::Decodable::decode(__decoder),
                    stability_implications: ::rustc_serialize::Decodable::decode(__decoder),
                    lang_items: ::rustc_serialize::Decodable::decode(__decoder),
                    lang_items_missing: ::rustc_serialize::Decodable::decode(__decoder),
                    stripped_cfg_items: ::rustc_serialize::Decodable::decode(__decoder),
                    diagnostic_items: ::rustc_serialize::Decodable::decode(__decoder),
                    canonical_symbols: ::rustc_serialize::Decodable::decode(__decoder),
                    fake_doc_items: ::rustc_serialize::Decodable::decode(__decoder),
                    native_libraries: ::rustc_serialize::Decodable::decode(__decoder),
                    foreign_modules: ::rustc_serialize::Decodable::decode(__decoder),
                    traits: ::rustc_serialize::Decodable::decode(__decoder),
                    impls: ::rustc_serialize::Decodable::decode(__decoder),
                    incoherent_impls: ::rustc_serialize::Decodable::decode(__decoder),
                    interpret_alloc_index: ::rustc_serialize::Decodable::decode(__decoder),
                    proc_macro_data: ::rustc_serialize::Decodable::decode(__decoder),
                    tables: ::rustc_serialize::Decodable::decode(__decoder),
                    debugger_visualizers: ::rustc_serialize::Decodable::decode(__decoder),
                    exportable_items: ::rustc_serialize::Decodable::decode(__decoder),
                    stable_order_of_exportable_impls: ::rustc_serialize::Decodable::decode(__decoder),
                    exported_non_generic_symbols: ::rustc_serialize::Decodable::decode(__decoder),
                    exported_generic_symbols: ::rustc_serialize::Decodable::decode(__decoder),
                    syntax_contexts: ::rustc_serialize::Decodable::decode(__decoder),
                    expn_data: ::rustc_serialize::Decodable::decode(__decoder),
                    expn_hashes: ::rustc_serialize::Decodable::decode(__decoder),
                    def_path_hash_map: ::rustc_serialize::Decodable::decode(__decoder),
                    source_map: ::rustc_serialize::Decodable::decode(__decoder),
                    target_modifiers: ::rustc_serialize::Decodable::decode(__decoder),
                    denied_partial_mitigations: ::rustc_serialize::Decodable::decode(__decoder),
                    compiler_builtins: ::rustc_serialize::Decodable::decode(__decoder),
                    needs_allocator: ::rustc_serialize::Decodable::decode(__decoder),
                    needs_panic_runtime: ::rustc_serialize::Decodable::decode(__decoder),
                    no_builtins: ::rustc_serialize::Decodable::decode(__decoder),
                    panic_runtime: ::rustc_serialize::Decodable::decode(__decoder),
                    profiler_runtime: ::rustc_serialize::Decodable::decode(__decoder),
                    symbol_mangling_version: ::rustc_serialize::Decodable::decode(__decoder),
                    specialization_enabled_in: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };LazyDecodable)]
269pub(crate) struct CrateRoot {
270    /// A header used to detect if this is the right crate to load.
271    header: CrateHeader,
272
273    stable_crate_id: StableCrateId,
274    required_panic_strategy: Option<PanicStrategy>,
275    panic_in_drop_strategy: PanicStrategy,
276    edition: Edition,
277    has_global_allocator: bool,
278    has_alloc_error_handler: bool,
279    has_panic_handler: bool,
280    has_default_lib_allocator: bool,
281    externally_implementable_items: LazyArray<EiiMapEncodedKeyValue>,
282
283    crate_deps: LazyArray<CrateDep>,
284    dylib_dependency_formats: LazyArray<Option<LinkagePreference>>,
285    lib_features: LazyArray<(Symbol, FeatureStability)>,
286    stability_implications: LazyArray<(Symbol, Symbol)>,
287    lang_items: LazyArray<(DefIndex, LangItem)>,
288    lang_items_missing: LazyArray<LangItem>,
289    stripped_cfg_items: LazyArray<StrippedCfgItem<DefIndex>>,
290    diagnostic_items: LazyArray<(Symbol, DefIndex)>,
291    canonical_symbols: LazyArray<(Symbol, DefIndex)>,
292    fake_doc_items: LazyArray<DefIndex>,
293    native_libraries: LazyArray<NativeLib>,
294    foreign_modules: LazyArray<ForeignModule>,
295    traits: LazyArray<DefIndex>,
296    impls: LazyArray<TraitImpls>,
297    incoherent_impls: LazyArray<IncoherentImpls>,
298    interpret_alloc_index: LazyArray<u64>,
299    proc_macro_data: Option<ProcMacroData>,
300
301    tables: LazyTables,
302    debugger_visualizers: LazyArray<DebuggerVisualizerFile>,
303
304    exportable_items: LazyArray<DefIndex>,
305    stable_order_of_exportable_impls: LazyArray<(DefIndex, usize)>,
306    exported_non_generic_symbols: LazyArray<(ExportedSymbol<'static>, SymbolExportInfo)>,
307    exported_generic_symbols: LazyArray<(ExportedSymbol<'static>, SymbolExportInfo)>,
308
309    syntax_contexts: SyntaxContextTable,
310    expn_data: ExpnDataTable,
311    expn_hashes: ExpnHashTable,
312
313    def_path_hash_map: LazyValue<DefPathHashMapRef<'static>>,
314
315    source_map: LazyTableSingleIdx<u32, Option<LazyValue<rustc_span::SourceFile>>>,
316    target_modifiers: LazyArray<TargetModifier>,
317    denied_partial_mitigations: LazyArray<DeniedPartialMitigation>,
318
319    compiler_builtins: bool,
320    needs_allocator: bool,
321    needs_panic_runtime: bool,
322    no_builtins: bool,
323    panic_runtime: bool,
324    profiler_runtime: bool,
325    symbol_mangling_version: SymbolManglingVersion,
326
327    specialization_enabled_in: bool,
328}
329
330/// A separate struct for extra metadata that must be encoded *after*
331/// the main crate hash is finalized.
332#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            CrateRootUnhashed {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let CrateRootUnhashed {
                        extra_filename: ref __binding_0,
                        dep_extra_filenames: ref __binding_1 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            CrateRootUnhashed {
            fn decode(__decoder: &mut __D) -> Self {
                CrateRootUnhashed {
                    extra_filename: ::rustc_serialize::Decodable::decode(__decoder),
                    dep_extra_filenames: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };LazyDecodable)]
333pub(crate) struct CrateRootUnhashed {
334    extra_filename: String,
335
336    /// The `-C extra-filename` of each dependency, indexed by the `CrateNum` they had in *this*
337    /// crate's encoding. The `LOCAL_CRATE` slot is unused filler so that dependency `CrateNum`s
338    /// can index this directly; this crate's own value is `extra_filename` above.
339    dep_extra_filenames: IndexVec<CrateNum, String>,
340}
341
342/// On-disk representation of `DefId`.
343/// This creates a type-safe way to enforce that we remap the CrateNum between the on-disk
344/// representation and the compilation session.
345#[derive(#[automatically_derived]
impl ::core::marker::Copy for RawDefId { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for RawDefId { }
#[automatically_derived]
impl ::core::clone::Clone for RawDefId {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u32>;
        *self
    }
}Clone)]
346pub(crate) struct RawDefId {
347    krate: u32,
348    index: u32,
349}
350
351impl From<DefId> for RawDefId {
352    fn from(val: DefId) -> Self {
353        RawDefId { krate: val.krate.as_u32(), index: val.index.as_u32() }
354    }
355}
356
357impl RawDefId {
358    /// This exists so that `provide_one!` is happy
359    fn decode(self, meta: (&CrateMetadata, TyCtxt<'_>)) -> DefId {
360        let krate = CrateNum::from_u32(self.krate);
361        let krate = meta.0.map_encoded_cnum_to_current(krate);
362        DefId { krate, index: DefIndex::from_u32(self.index) }
363    }
364}
365
366/// A dependency record, as stored in the hashed [`CrateRoot`].
367///
368/// Note the absence of the dependency's `-C extra-filename`: it lives in
369/// [`CrateRootUnhashed::dep_extra_filenames`] instead, deliberately outside the hash.
370#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CrateDep {
            fn encode(&self, __encoder: &mut __E) {
                let CrateDep {
                        name: ref __binding_0,
                        hash: ref __binding_1,
                        host_hash: ref __binding_2,
                        kind: ref __binding_3,
                        is_private: ref __binding_4 } = *self;
                ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                    __encoder);
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::BlobDecoder> ::rustc_serialize::Decodable<__D>
            for CrateDep {
            fn decode(__decoder: &mut __D) -> Self {
                CrateDep {
                    name: ::rustc_serialize::Decodable::decode(__decoder),
                    hash: ::rustc_serialize::Decodable::decode(__decoder),
                    host_hash: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    is_private: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };BlobDecodable)]
371pub(crate) struct CrateDep {
372    pub name: Symbol,
373    pub hash: Svh,
374    pub host_hash: Option<Svh>,
375    pub kind: CrateDepKind,
376    pub is_private: bool,
377}
378
379#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            TraitImpls {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let TraitImpls {
                        trait_id: ref __binding_0, impls: ref __binding_1 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            TraitImpls {
            fn decode(__decoder: &mut __D) -> Self {
                TraitImpls {
                    trait_id: ::rustc_serialize::Decodable::decode(__decoder),
                    impls: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };LazyDecodable)]
380pub(crate) struct TraitImpls {
381    trait_id: (u32, DefIndex),
382    impls: LazyArray<(DefIndex, Option<SimplifiedType>)>,
383}
384
385#[derive(const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            IncoherentImpls {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let IncoherentImpls {
                        self_ty: ref __binding_0, impls: ref __binding_1 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
            }
        }
    };MetadataEncodable, const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            IncoherentImpls {
            fn decode(__decoder: &mut __D) -> Self {
                IncoherentImpls {
                    self_ty: ::rustc_serialize::Decodable::decode(__decoder),
                    impls: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };LazyDecodable)]
386pub(crate) struct IncoherentImpls {
387    self_ty: LazyValue<SimplifiedType>,
388    impls: LazyArray<DefIndex>,
389}
390
391/// Define `LazyTables` and `TableBuilders` at the same time.
392macro_rules! define_tables {
393    (
394        - defaulted: $($name1:ident: Table<$IDX1:ty, $T1:ty>,)+
395        - optional: $($name2:ident: Table<$IDX2:ty, $T2:ty>,)+
396    ) => {
397        #[derive(MetadataEncodable, LazyDecodable)]
398        pub(crate) struct LazyTables {
399            $($name1: LazyTableSingleIdx<$IDX1, $T1>,)+
400            $($name2: LazyTableSingleIdx<$IDX2, Option<$T2>>,)+
401        }
402
403        #[derive(Default)]
404        struct TableBuilders {
405            $($name1: TableBuilderSingleIdx<$IDX1, $T1>,)+
406            $($name2: TableBuilderSingleIdx<$IDX2, Option<$T2>>,)+
407        }
408
409        impl TableBuilders {
410            fn encode(&self, buf: &mut FileEncoder<'_>) -> LazyTables {
411                LazyTables {
412                    $($name1: self.$name1.encode(buf),)+
413                    $($name2: self.$name2.encode(buf),)+
414                }
415            }
416        }
417    }
418}
419
420pub(crate) struct LazyTables {
    intrinsic: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::IntrinsicDef>>>,
    is_macro_rules: LazyTableSingleIdx<DefIndex, bool>,
    type_alias_is_checked: LazyTableSingleIdx<DefIndex, bool>,
    attr_flags: LazyTableSingleIdx<DefIndex, AttrFlags>,
    def_path_hashes: LazyTableSingleIdx<DefIndex, u64>,
    explicit_item_bounds: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_item_self_bounds: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    inferred_outlives_of: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_super_clauses_of: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_implied_clauses_of: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_implied_const_bounds: LazyTableSingleIdx<DefIndex,
    LazyArray<(ty::PolyTraitRef<'static>, Span)>>,
    inherent_impls: LazyTableSingleIdx<DefIndex, LazyArray<DefIndex>>,
    opt_rpitit_info: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::ImplTraitInTraitData>>>,
    module_children_reexports: LazyTableSingleIdx<DefIndex,
    LazyArray<ModChild>>,
    ambig_module_children: LazyTableSingleIdx<DefIndex,
    LazyArray<AmbigModChild>>,
    cross_crate_inlinable: LazyTableSingleIdx<DefIndex, bool>,
    asyncness: LazyTableSingleIdx<DefIndex, ty::Asyncness>,
    constness: LazyTableSingleIdx<DefIndex, hir::Constness>,
    safety: LazyTableSingleIdx<DefIndex, hir::Safety>,
    defaultness: LazyTableSingleIdx<DefIndex, hir::Defaultness>,
    impl_is_fully_generic_for_reflection: LazyTableSingleIdx<DefIndex, bool>,
    attributes: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<rustc_attr_ir::Attribute>>>,
    module_children_non_reexports: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<DefIndex>>>,
    associated_item_or_field_def_ids: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<DefIndex>>>,
    def_kind: LazyTableSingleIdx<DefIndex, Option<DefKind>>,
    visibility: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::Visibility<DefIndex>>>>,
    def_span: LazyTableSingleIdx<DefIndex, Option<LazyValue<Span>>>,
    def_ident_span: LazyTableSingleIdx<DefIndex, Option<LazyValue<Span>>>,
    lookup_stability: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<Stability>>>,
    lookup_const_stability: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::ConstStability>>>,
    lookup_default_body_stability: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::DefaultBodyStability>>>,
    lookup_deprecation_entry: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::Deprecation>>>,
    explicit_clauses_of: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::GenericClauses<'static>>>>,
    generics_of: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::Generics>>>,
    type_of: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, Ty<'static>>>>>,
    variances_of: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<ty::Variance>>>,
    fn_sig: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, ty::PolyFnSig<'static>>>>>,
    codegen_fn_attrs: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<CodegenFnAttrs>>>,
    impl_trait_header: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::ImplTraitHeader<'static>>>>,
    const_param_default: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static,
    rustc_middle::ty::Const<'static>>>>>,
    object_lifetime_default: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ObjectLifetimeDefault>>>,
    optimized_mir: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<mir::Body<'static>>>>,
    mir_for_ctfe: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<mir::Body<'static>>>>,
    trivial_const: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<(ConstValue, Ty<'static>)>>>,
    closure_saved_names_of_captured_variables: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<IndexVec<FieldIdx, Symbol>>>>,
    mir_coroutine_witnesses: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<mir::CoroutineLayout<'static>>>>,
    promoted_mir: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>>,
    thir_abstract_const: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, ty::Const<'static>>>>>,
    impl_parent: LazyTableSingleIdx<DefIndex, Option<RawDefId>>,
    const_conditions: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::ConstConditions<'static>>>>,
    coerce_unsized_info: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::adjustment::CoerceUnsizedInfo>>>,
    mir_const_qualif: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<mir::ConstQualifs>>>,
    rendered_const: LazyTableSingleIdx<DefIndex, Option<LazyValue<String>>>,
    rendered_precise_capturing_args: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<PreciseCapturingArgKind<Symbol, Symbol>>>>,
    fn_arg_idents: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<Option<Ident>>>>,
    coroutine_kind: LazyTableSingleIdx<DefIndex, Option<hir::CoroutineKind>>,
    coroutine_for_closure: LazyTableSingleIdx<DefIndex, Option<RawDefId>>,
    adt_destructor: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::Destructor>>>,
    adt_async_destructor: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::AsyncDestructor>>>,
    coroutine_by_move_body_def_id: LazyTableSingleIdx<DefIndex,
    Option<RawDefId>>,
    eval_static_initializer: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<mir::interpret::ConstAllocation<'static>>>>,
    trait_def: LazyTableSingleIdx<DefIndex, Option<LazyValue<ty::TraitDef>>>,
    expn_that_defined: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ExpnId>>>,
    default_fields: LazyTableSingleIdx<DefIndex, Option<LazyValue<DefId>>>,
    params_in_repr: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<DenseBitSet<u32>>>>,
    repr_options: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ReprOptions>>>,
    def_keys: LazyTableSingleIdx<DefIndex, Option<LazyValue<DefKey>>>,
    variant_data: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<VariantData>>>,
    assoc_container: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::AssocContainer>>>,
    macro_definition: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ast::DelimArgs>>>,
    deduced_param_attrs: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<DeducedParamAttrs>>>,
    collect_return_position_impl_trait_in_trait_tys: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<DefIdMap<ty::EarlyBinder<'static, Ty<'static>>>>>>,
    doc_link_resolutions: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<DocLinkResMap>>>,
    doc_link_traits_in_scope: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<DefId>>>,
    assumed_wf_types_for_rpitit: LazyTableSingleIdx<DefIndex,
    Option<LazyArray<(Ty<'static>, Span)>>>,
    opaque_ty_origin: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<hir::OpaqueTyOrigin<DefId>>>>,
    anon_const_kind: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::AnonConstKind>>>,
    const_of_item: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<Option<ty::EarlyBinder<'static, ty::Const<'static>>>>>>,
    associated_types_for_impl_traits_in_trait_or_impl: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<DefIdMap<Vec<DefId>>>>>,
    live_args_for_alias_from_outlives_bounds: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<DenseBitSet<u32>>>>,
    args_known_to_outlive_alias_params: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<Vec<(usize, DenseBitSet<u32>)>>>>,
    mut_restriction: LazyTableSingleIdx<DefIndex,
    Option<LazyValue<ty::RestrictionKind>>>,
}
const _: () =
    {
        impl<'tcx, '__a>
            ::rustc_serialize::Encodable<EncodeContext<'__a, 'tcx>> for
            LazyTables {
            fn encode(&self, __encoder: &mut EncodeContext<'__a, 'tcx>) {
                #![allow(unreachable_code)]
                let LazyTables {
                        intrinsic: ref __binding_0,
                        is_macro_rules: ref __binding_1,
                        type_alias_is_checked: ref __binding_2,
                        attr_flags: ref __binding_3,
                        def_path_hashes: ref __binding_4,
                        explicit_item_bounds: ref __binding_5,
                        explicit_item_self_bounds: ref __binding_6,
                        inferred_outlives_of: ref __binding_7,
                        explicit_super_clauses_of: ref __binding_8,
                        explicit_implied_clauses_of: ref __binding_9,
                        explicit_implied_const_bounds: ref __binding_10,
                        inherent_impls: ref __binding_11,
                        opt_rpitit_info: ref __binding_12,
                        module_children_reexports: ref __binding_13,
                        ambig_module_children: ref __binding_14,
                        cross_crate_inlinable: ref __binding_15,
                        asyncness: ref __binding_16,
                        constness: ref __binding_17,
                        safety: ref __binding_18,
                        defaultness: ref __binding_19,
                        impl_is_fully_generic_for_reflection: ref __binding_20,
                        attributes: ref __binding_21,
                        module_children_non_reexports: ref __binding_22,
                        associated_item_or_field_def_ids: ref __binding_23,
                        def_kind: ref __binding_24,
                        visibility: ref __binding_25,
                        def_span: ref __binding_26,
                        def_ident_span: ref __binding_27,
                        lookup_stability: ref __binding_28,
                        lookup_const_stability: ref __binding_29,
                        lookup_default_body_stability: ref __binding_30,
                        lookup_deprecation_entry: ref __binding_31,
                        explicit_clauses_of: ref __binding_32,
                        generics_of: ref __binding_33,
                        type_of: ref __binding_34,
                        variances_of: ref __binding_35,
                        fn_sig: ref __binding_36,
                        codegen_fn_attrs: ref __binding_37,
                        impl_trait_header: ref __binding_38,
                        const_param_default: ref __binding_39,
                        object_lifetime_default: ref __binding_40,
                        optimized_mir: ref __binding_41,
                        mir_for_ctfe: ref __binding_42,
                        trivial_const: ref __binding_43,
                        closure_saved_names_of_captured_variables: ref __binding_44,
                        mir_coroutine_witnesses: ref __binding_45,
                        promoted_mir: ref __binding_46,
                        thir_abstract_const: ref __binding_47,
                        impl_parent: ref __binding_48,
                        const_conditions: ref __binding_49,
                        coerce_unsized_info: ref __binding_50,
                        mir_const_qualif: ref __binding_51,
                        rendered_const: ref __binding_52,
                        rendered_precise_capturing_args: ref __binding_53,
                        fn_arg_idents: ref __binding_54,
                        coroutine_kind: ref __binding_55,
                        coroutine_for_closure: ref __binding_56,
                        adt_destructor: ref __binding_57,
                        adt_async_destructor: ref __binding_58,
                        coroutine_by_move_body_def_id: ref __binding_59,
                        eval_static_initializer: ref __binding_60,
                        trait_def: ref __binding_61,
                        expn_that_defined: ref __binding_62,
                        default_fields: ref __binding_63,
                        params_in_repr: ref __binding_64,
                        repr_options: ref __binding_65,
                        def_keys: ref __binding_66,
                        variant_data: ref __binding_67,
                        assoc_container: ref __binding_68,
                        macro_definition: ref __binding_69,
                        deduced_param_attrs: ref __binding_70,
                        collect_return_position_impl_trait_in_trait_tys: ref __binding_71,
                        doc_link_resolutions: ref __binding_72,
                        doc_link_traits_in_scope: ref __binding_73,
                        assumed_wf_types_for_rpitit: ref __binding_74,
                        opaque_ty_origin: ref __binding_75,
                        anon_const_kind: ref __binding_76,
                        const_of_item: ref __binding_77,
                        associated_types_for_impl_traits_in_trait_or_impl: ref __binding_78,
                        live_args_for_alias_from_outlives_bounds: ref __binding_79,
                        args_known_to_outlive_alias_params: ref __binding_80,
                        mut_restriction: ref __binding_81 } = *self;
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_0, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_1, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_2, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_3, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_4, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_5, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_6, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_7, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_8, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_9, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_10, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_11, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_12, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_13, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_14, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_15, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_16, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_17, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_18, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_19, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_20, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_21, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_22, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_23, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_24, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_25, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_26, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_27, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_28, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_29, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_30, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_31, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_32, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_33, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_34, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_35, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_36, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_37, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_38, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_39, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_40, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_41, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_42, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_43, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_44, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_45, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_46, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_47, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_48, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_49, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_50, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_51, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_52, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_53, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_54, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_55, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_56, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_57, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_58, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_59, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_60, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_61, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_62, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_63, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_64, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_65, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_66, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_67, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_68, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_69, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_70, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_71, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_72, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_73, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_74, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_75, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_76, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_77, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_78, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_79, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_80, __encoder);
                ::rustc_serialize::Encodable::<EncodeContext<'__a,
                        'tcx>>::encode(__binding_81, __encoder);
            }
        }
    };
const _: () =
    {
        impl<__D: LazyDecoder> ::rustc_serialize::Decodable<__D> for
            LazyTables {
            fn decode(__decoder: &mut __D) -> Self {
                LazyTables {
                    intrinsic: ::rustc_serialize::Decodable::decode(__decoder),
                    is_macro_rules: ::rustc_serialize::Decodable::decode(__decoder),
                    type_alias_is_checked: ::rustc_serialize::Decodable::decode(__decoder),
                    attr_flags: ::rustc_serialize::Decodable::decode(__decoder),
                    def_path_hashes: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_item_bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_item_self_bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    inferred_outlives_of: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_super_clauses_of: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_implied_clauses_of: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_implied_const_bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    inherent_impls: ::rustc_serialize::Decodable::decode(__decoder),
                    opt_rpitit_info: ::rustc_serialize::Decodable::decode(__decoder),
                    module_children_reexports: ::rustc_serialize::Decodable::decode(__decoder),
                    ambig_module_children: ::rustc_serialize::Decodable::decode(__decoder),
                    cross_crate_inlinable: ::rustc_serialize::Decodable::decode(__decoder),
                    asyncness: ::rustc_serialize::Decodable::decode(__decoder),
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    defaultness: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_is_fully_generic_for_reflection: ::rustc_serialize::Decodable::decode(__decoder),
                    attributes: ::rustc_serialize::Decodable::decode(__decoder),
                    module_children_non_reexports: ::rustc_serialize::Decodable::decode(__decoder),
                    associated_item_or_field_def_ids: ::rustc_serialize::Decodable::decode(__decoder),
                    def_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    visibility: ::rustc_serialize::Decodable::decode(__decoder),
                    def_span: ::rustc_serialize::Decodable::decode(__decoder),
                    def_ident_span: ::rustc_serialize::Decodable::decode(__decoder),
                    lookup_stability: ::rustc_serialize::Decodable::decode(__decoder),
                    lookup_const_stability: ::rustc_serialize::Decodable::decode(__decoder),
                    lookup_default_body_stability: ::rustc_serialize::Decodable::decode(__decoder),
                    lookup_deprecation_entry: ::rustc_serialize::Decodable::decode(__decoder),
                    explicit_clauses_of: ::rustc_serialize::Decodable::decode(__decoder),
                    generics_of: ::rustc_serialize::Decodable::decode(__decoder),
                    type_of: ::rustc_serialize::Decodable::decode(__decoder),
                    variances_of: ::rustc_serialize::Decodable::decode(__decoder),
                    fn_sig: ::rustc_serialize::Decodable::decode(__decoder),
                    codegen_fn_attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_trait_header: ::rustc_serialize::Decodable::decode(__decoder),
                    const_param_default: ::rustc_serialize::Decodable::decode(__decoder),
                    object_lifetime_default: ::rustc_serialize::Decodable::decode(__decoder),
                    optimized_mir: ::rustc_serialize::Decodable::decode(__decoder),
                    mir_for_ctfe: ::rustc_serialize::Decodable::decode(__decoder),
                    trivial_const: ::rustc_serialize::Decodable::decode(__decoder),
                    closure_saved_names_of_captured_variables: ::rustc_serialize::Decodable::decode(__decoder),
                    mir_coroutine_witnesses: ::rustc_serialize::Decodable::decode(__decoder),
                    promoted_mir: ::rustc_serialize::Decodable::decode(__decoder),
                    thir_abstract_const: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_parent: ::rustc_serialize::Decodable::decode(__decoder),
                    const_conditions: ::rustc_serialize::Decodable::decode(__decoder),
                    coerce_unsized_info: ::rustc_serialize::Decodable::decode(__decoder),
                    mir_const_qualif: ::rustc_serialize::Decodable::decode(__decoder),
                    rendered_const: ::rustc_serialize::Decodable::decode(__decoder),
                    rendered_precise_capturing_args: ::rustc_serialize::Decodable::decode(__decoder),
                    fn_arg_idents: ::rustc_serialize::Decodable::decode(__decoder),
                    coroutine_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    coroutine_for_closure: ::rustc_serialize::Decodable::decode(__decoder),
                    adt_destructor: ::rustc_serialize::Decodable::decode(__decoder),
                    adt_async_destructor: ::rustc_serialize::Decodable::decode(__decoder),
                    coroutine_by_move_body_def_id: ::rustc_serialize::Decodable::decode(__decoder),
                    eval_static_initializer: ::rustc_serialize::Decodable::decode(__decoder),
                    trait_def: ::rustc_serialize::Decodable::decode(__decoder),
                    expn_that_defined: ::rustc_serialize::Decodable::decode(__decoder),
                    default_fields: ::rustc_serialize::Decodable::decode(__decoder),
                    params_in_repr: ::rustc_serialize::Decodable::decode(__decoder),
                    repr_options: ::rustc_serialize::Decodable::decode(__decoder),
                    def_keys: ::rustc_serialize::Decodable::decode(__decoder),
                    variant_data: ::rustc_serialize::Decodable::decode(__decoder),
                    assoc_container: ::rustc_serialize::Decodable::decode(__decoder),
                    macro_definition: ::rustc_serialize::Decodable::decode(__decoder),
                    deduced_param_attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    collect_return_position_impl_trait_in_trait_tys: ::rustc_serialize::Decodable::decode(__decoder),
                    doc_link_resolutions: ::rustc_serialize::Decodable::decode(__decoder),
                    doc_link_traits_in_scope: ::rustc_serialize::Decodable::decode(__decoder),
                    assumed_wf_types_for_rpitit: ::rustc_serialize::Decodable::decode(__decoder),
                    opaque_ty_origin: ::rustc_serialize::Decodable::decode(__decoder),
                    anon_const_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    const_of_item: ::rustc_serialize::Decodable::decode(__decoder),
                    associated_types_for_impl_traits_in_trait_or_impl: ::rustc_serialize::Decodable::decode(__decoder),
                    live_args_for_alias_from_outlives_bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    args_known_to_outlive_alias_params: ::rustc_serialize::Decodable::decode(__decoder),
                    mut_restriction: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };
struct TableBuilders {
    intrinsic: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::IntrinsicDef>>>,
    is_macro_rules: TableBuilderSingleIdx<DefIndex, bool>,
    type_alias_is_checked: TableBuilderSingleIdx<DefIndex, bool>,
    attr_flags: TableBuilderSingleIdx<DefIndex, AttrFlags>,
    def_path_hashes: TableBuilderSingleIdx<DefIndex, u64>,
    explicit_item_bounds: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_item_self_bounds: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    inferred_outlives_of: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_super_clauses_of: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_implied_clauses_of: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::Clause<'static>, Span)>>,
    explicit_implied_const_bounds: TableBuilderSingleIdx<DefIndex,
    LazyArray<(ty::PolyTraitRef<'static>, Span)>>,
    inherent_impls: TableBuilderSingleIdx<DefIndex, LazyArray<DefIndex>>,
    opt_rpitit_info: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::ImplTraitInTraitData>>>,
    module_children_reexports: TableBuilderSingleIdx<DefIndex,
    LazyArray<ModChild>>,
    ambig_module_children: TableBuilderSingleIdx<DefIndex,
    LazyArray<AmbigModChild>>,
    cross_crate_inlinable: TableBuilderSingleIdx<DefIndex, bool>,
    asyncness: TableBuilderSingleIdx<DefIndex, ty::Asyncness>,
    constness: TableBuilderSingleIdx<DefIndex, hir::Constness>,
    safety: TableBuilderSingleIdx<DefIndex, hir::Safety>,
    defaultness: TableBuilderSingleIdx<DefIndex, hir::Defaultness>,
    impl_is_fully_generic_for_reflection: TableBuilderSingleIdx<DefIndex,
    bool>,
    attributes: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<rustc_attr_ir::Attribute>>>,
    module_children_non_reexports: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<DefIndex>>>,
    associated_item_or_field_def_ids: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<DefIndex>>>,
    def_kind: TableBuilderSingleIdx<DefIndex, Option<DefKind>>,
    visibility: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::Visibility<DefIndex>>>>,
    def_span: TableBuilderSingleIdx<DefIndex, Option<LazyValue<Span>>>,
    def_ident_span: TableBuilderSingleIdx<DefIndex, Option<LazyValue<Span>>>,
    lookup_stability: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<Stability>>>,
    lookup_const_stability: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::ConstStability>>>,
    lookup_default_body_stability: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::DefaultBodyStability>>>,
    lookup_deprecation_entry: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<rustc_attr_ir::Deprecation>>>,
    explicit_clauses_of: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::GenericClauses<'static>>>>,
    generics_of: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::Generics>>>,
    type_of: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, Ty<'static>>>>>,
    variances_of: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<ty::Variance>>>,
    fn_sig: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, ty::PolyFnSig<'static>>>>>,
    codegen_fn_attrs: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<CodegenFnAttrs>>>,
    impl_trait_header: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::ImplTraitHeader<'static>>>>,
    const_param_default: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static,
    rustc_middle::ty::Const<'static>>>>>,
    object_lifetime_default: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ObjectLifetimeDefault>>>,
    optimized_mir: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<mir::Body<'static>>>>,
    mir_for_ctfe: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<mir::Body<'static>>>>,
    trivial_const: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<(ConstValue, Ty<'static>)>>>,
    closure_saved_names_of_captured_variables: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<IndexVec<FieldIdx, Symbol>>>>,
    mir_coroutine_witnesses: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<mir::CoroutineLayout<'static>>>>,
    promoted_mir: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>>,
    thir_abstract_const: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::EarlyBinder<'static, ty::Const<'static>>>>>,
    impl_parent: TableBuilderSingleIdx<DefIndex, Option<RawDefId>>,
    const_conditions: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::ConstConditions<'static>>>>,
    coerce_unsized_info: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::adjustment::CoerceUnsizedInfo>>>,
    mir_const_qualif: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<mir::ConstQualifs>>>,
    rendered_const: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<String>>>,
    rendered_precise_capturing_args: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<PreciseCapturingArgKind<Symbol, Symbol>>>>,
    fn_arg_idents: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<Option<Ident>>>>,
    coroutine_kind: TableBuilderSingleIdx<DefIndex,
    Option<hir::CoroutineKind>>,
    coroutine_for_closure: TableBuilderSingleIdx<DefIndex, Option<RawDefId>>,
    adt_destructor: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::Destructor>>>,
    adt_async_destructor: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::AsyncDestructor>>>,
    coroutine_by_move_body_def_id: TableBuilderSingleIdx<DefIndex,
    Option<RawDefId>>,
    eval_static_initializer: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<mir::interpret::ConstAllocation<'static>>>>,
    trait_def: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::TraitDef>>>,
    expn_that_defined: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ExpnId>>>,
    default_fields: TableBuilderSingleIdx<DefIndex, Option<LazyValue<DefId>>>,
    params_in_repr: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<DenseBitSet<u32>>>>,
    repr_options: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ReprOptions>>>,
    def_keys: TableBuilderSingleIdx<DefIndex, Option<LazyValue<DefKey>>>,
    variant_data: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<VariantData>>>,
    assoc_container: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::AssocContainer>>>,
    macro_definition: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ast::DelimArgs>>>,
    deduced_param_attrs: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<DeducedParamAttrs>>>,
    collect_return_position_impl_trait_in_trait_tys: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<DefIdMap<ty::EarlyBinder<'static, Ty<'static>>>>>>,
    doc_link_resolutions: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<DocLinkResMap>>>,
    doc_link_traits_in_scope: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<DefId>>>,
    assumed_wf_types_for_rpitit: TableBuilderSingleIdx<DefIndex,
    Option<LazyArray<(Ty<'static>, Span)>>>,
    opaque_ty_origin: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<hir::OpaqueTyOrigin<DefId>>>>,
    anon_const_kind: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::AnonConstKind>>>,
    const_of_item: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<Option<ty::EarlyBinder<'static, ty::Const<'static>>>>>>,
    associated_types_for_impl_traits_in_trait_or_impl: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<DefIdMap<Vec<DefId>>>>>,
    live_args_for_alias_from_outlives_bounds: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<DenseBitSet<u32>>>>,
    args_known_to_outlive_alias_params: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<Vec<(usize, DenseBitSet<u32>)>>>>,
    mut_restriction: TableBuilderSingleIdx<DefIndex,
    Option<LazyValue<ty::RestrictionKind>>>,
}
#[automatically_derived]
impl ::core::default::Default for TableBuilders {
    #[inline]
    fn default() -> Self {
        Self {
            intrinsic: ::core::default::Default::default(),
            is_macro_rules: ::core::default::Default::default(),
            type_alias_is_checked: ::core::default::Default::default(),
            attr_flags: ::core::default::Default::default(),
            def_path_hashes: ::core::default::Default::default(),
            explicit_item_bounds: ::core::default::Default::default(),
            explicit_item_self_bounds: ::core::default::Default::default(),
            inferred_outlives_of: ::core::default::Default::default(),
            explicit_super_clauses_of: ::core::default::Default::default(),
            explicit_implied_clauses_of: ::core::default::Default::default(),
            explicit_implied_const_bounds: ::core::default::Default::default(),
            inherent_impls: ::core::default::Default::default(),
            opt_rpitit_info: ::core::default::Default::default(),
            module_children_reexports: ::core::default::Default::default(),
            ambig_module_children: ::core::default::Default::default(),
            cross_crate_inlinable: ::core::default::Default::default(),
            asyncness: ::core::default::Default::default(),
            constness: ::core::default::Default::default(),
            safety: ::core::default::Default::default(),
            defaultness: ::core::default::Default::default(),
            impl_is_fully_generic_for_reflection: ::core::default::Default::default(),
            attributes: ::core::default::Default::default(),
            module_children_non_reexports: ::core::default::Default::default(),
            associated_item_or_field_def_ids: ::core::default::Default::default(),
            def_kind: ::core::default::Default::default(),
            visibility: ::core::default::Default::default(),
            def_span: ::core::default::Default::default(),
            def_ident_span: ::core::default::Default::default(),
            lookup_stability: ::core::default::Default::default(),
            lookup_const_stability: ::core::default::Default::default(),
            lookup_default_body_stability: ::core::default::Default::default(),
            lookup_deprecation_entry: ::core::default::Default::default(),
            explicit_clauses_of: ::core::default::Default::default(),
            generics_of: ::core::default::Default::default(),
            type_of: ::core::default::Default::default(),
            variances_of: ::core::default::Default::default(),
            fn_sig: ::core::default::Default::default(),
            codegen_fn_attrs: ::core::default::Default::default(),
            impl_trait_header: ::core::default::Default::default(),
            const_param_default: ::core::default::Default::default(),
            object_lifetime_default: ::core::default::Default::default(),
            optimized_mir: ::core::default::Default::default(),
            mir_for_ctfe: ::core::default::Default::default(),
            trivial_const: ::core::default::Default::default(),
            closure_saved_names_of_captured_variables: ::core::default::Default::default(),
            mir_coroutine_witnesses: ::core::default::Default::default(),
            promoted_mir: ::core::default::Default::default(),
            thir_abstract_const: ::core::default::Default::default(),
            impl_parent: ::core::default::Default::default(),
            const_conditions: ::core::default::Default::default(),
            coerce_unsized_info: ::core::default::Default::default(),
            mir_const_qualif: ::core::default::Default::default(),
            rendered_const: ::core::default::Default::default(),
            rendered_precise_capturing_args: ::core::default::Default::default(),
            fn_arg_idents: ::core::default::Default::default(),
            coroutine_kind: ::core::default::Default::default(),
            coroutine_for_closure: ::core::default::Default::default(),
            adt_destructor: ::core::default::Default::default(),
            adt_async_destructor: ::core::default::Default::default(),
            coroutine_by_move_body_def_id: ::core::default::Default::default(),
            eval_static_initializer: ::core::default::Default::default(),
            trait_def: ::core::default::Default::default(),
            expn_that_defined: ::core::default::Default::default(),
            default_fields: ::core::default::Default::default(),
            params_in_repr: ::core::default::Default::default(),
            repr_options: ::core::default::Default::default(),
            def_keys: ::core::default::Default::default(),
            variant_data: ::core::default::Default::default(),
            assoc_container: ::core::default::Default::default(),
            macro_definition: ::core::default::Default::default(),
            deduced_param_attrs: ::core::default::Default::default(),
            collect_return_position_impl_trait_in_trait_tys: ::core::default::Default::default(),
            doc_link_resolutions: ::core::default::Default::default(),
            doc_link_traits_in_scope: ::core::default::Default::default(),
            assumed_wf_types_for_rpitit: ::core::default::Default::default(),
            opaque_ty_origin: ::core::default::Default::default(),
            anon_const_kind: ::core::default::Default::default(),
            const_of_item: ::core::default::Default::default(),
            associated_types_for_impl_traits_in_trait_or_impl: ::core::default::Default::default(),
            live_args_for_alias_from_outlives_bounds: ::core::default::Default::default(),
            args_known_to_outlive_alias_params: ::core::default::Default::default(),
            mut_restriction: ::core::default::Default::default(),
        }
    }
}
impl TableBuilders {
    fn encode(&self, buf: &mut FileEncoder<'_>) -> LazyTables {
        LazyTables {
            intrinsic: self.intrinsic.encode(buf),
            is_macro_rules: self.is_macro_rules.encode(buf),
            type_alias_is_checked: self.type_alias_is_checked.encode(buf),
            attr_flags: self.attr_flags.encode(buf),
            def_path_hashes: self.def_path_hashes.encode(buf),
            explicit_item_bounds: self.explicit_item_bounds.encode(buf),
            explicit_item_self_bounds: self.explicit_item_self_bounds.encode(buf),
            inferred_outlives_of: self.inferred_outlives_of.encode(buf),
            explicit_super_clauses_of: self.explicit_super_clauses_of.encode(buf),
            explicit_implied_clauses_of: self.explicit_implied_clauses_of.encode(buf),
            explicit_implied_const_bounds: self.explicit_implied_const_bounds.encode(buf),
            inherent_impls: self.inherent_impls.encode(buf),
            opt_rpitit_info: self.opt_rpitit_info.encode(buf),
            module_children_reexports: self.module_children_reexports.encode(buf),
            ambig_module_children: self.ambig_module_children.encode(buf),
            cross_crate_inlinable: self.cross_crate_inlinable.encode(buf),
            asyncness: self.asyncness.encode(buf),
            constness: self.constness.encode(buf),
            safety: self.safety.encode(buf),
            defaultness: self.defaultness.encode(buf),
            impl_is_fully_generic_for_reflection: self.impl_is_fully_generic_for_reflection.encode(buf),
            attributes: self.attributes.encode(buf),
            module_children_non_reexports: self.module_children_non_reexports.encode(buf),
            associated_item_or_field_def_ids: self.associated_item_or_field_def_ids.encode(buf),
            def_kind: self.def_kind.encode(buf),
            visibility: self.visibility.encode(buf),
            def_span: self.def_span.encode(buf),
            def_ident_span: self.def_ident_span.encode(buf),
            lookup_stability: self.lookup_stability.encode(buf),
            lookup_const_stability: self.lookup_const_stability.encode(buf),
            lookup_default_body_stability: self.lookup_default_body_stability.encode(buf),
            lookup_deprecation_entry: self.lookup_deprecation_entry.encode(buf),
            explicit_clauses_of: self.explicit_clauses_of.encode(buf),
            generics_of: self.generics_of.encode(buf),
            type_of: self.type_of.encode(buf),
            variances_of: self.variances_of.encode(buf),
            fn_sig: self.fn_sig.encode(buf),
            codegen_fn_attrs: self.codegen_fn_attrs.encode(buf),
            impl_trait_header: self.impl_trait_header.encode(buf),
            const_param_default: self.const_param_default.encode(buf),
            object_lifetime_default: self.object_lifetime_default.encode(buf),
            optimized_mir: self.optimized_mir.encode(buf),
            mir_for_ctfe: self.mir_for_ctfe.encode(buf),
            trivial_const: self.trivial_const.encode(buf),
            closure_saved_names_of_captured_variables: self.closure_saved_names_of_captured_variables.encode(buf),
            mir_coroutine_witnesses: self.mir_coroutine_witnesses.encode(buf),
            promoted_mir: self.promoted_mir.encode(buf),
            thir_abstract_const: self.thir_abstract_const.encode(buf),
            impl_parent: self.impl_parent.encode(buf),
            const_conditions: self.const_conditions.encode(buf),
            coerce_unsized_info: self.coerce_unsized_info.encode(buf),
            mir_const_qualif: self.mir_const_qualif.encode(buf),
            rendered_const: self.rendered_const.encode(buf),
            rendered_precise_capturing_args: self.rendered_precise_capturing_args.encode(buf),
            fn_arg_idents: self.fn_arg_idents.encode(buf),
            coroutine_kind: self.coroutine_kind.encode(buf),
            coroutine_for_closure: self.coroutine_for_closure.encode(buf),
            adt_destructor: self.adt_destructor.encode(buf),
            adt_async_destructor: self.adt_async_destructor.encode(buf),
            coroutine_by_move_body_def_id: self.coroutine_by_move_body_def_id.encode(buf),
            eval_static_initializer: self.eval_static_initializer.encode(buf),
            trait_def: self.trait_def.encode(buf),
            expn_that_defined: self.expn_that_defined.encode(buf),
            default_fields: self.default_fields.encode(buf),
            params_in_repr: self.params_in_repr.encode(buf),
            repr_options: self.repr_options.encode(buf),
            def_keys: self.def_keys.encode(buf),
            variant_data: self.variant_data.encode(buf),
            assoc_container: self.assoc_container.encode(buf),
            macro_definition: self.macro_definition.encode(buf),
            deduced_param_attrs: self.deduced_param_attrs.encode(buf),
            collect_return_position_impl_trait_in_trait_tys: self.collect_return_position_impl_trait_in_trait_tys.encode(buf),
            doc_link_resolutions: self.doc_link_resolutions.encode(buf),
            doc_link_traits_in_scope: self.doc_link_traits_in_scope.encode(buf),
            assumed_wf_types_for_rpitit: self.assumed_wf_types_for_rpitit.encode(buf),
            opaque_ty_origin: self.opaque_ty_origin.encode(buf),
            anon_const_kind: self.anon_const_kind.encode(buf),
            const_of_item: self.const_of_item.encode(buf),
            associated_types_for_impl_traits_in_trait_or_impl: self.associated_types_for_impl_traits_in_trait_or_impl.encode(buf),
            live_args_for_alias_from_outlives_bounds: self.live_args_for_alias_from_outlives_bounds.encode(buf),
            args_known_to_outlive_alias_params: self.args_known_to_outlive_alias_params.encode(buf),
            mut_restriction: self.mut_restriction.encode(buf),
        }
    }
}define_tables! {
421- defaulted:
422    intrinsic: Table<DefIndex, Option<LazyValue<ty::IntrinsicDef>>>,
423    is_macro_rules: Table<DefIndex, bool>,
424    type_alias_is_checked: Table<DefIndex, bool>,
425    attr_flags: Table<DefIndex, AttrFlags>,
426    // The u64 is the crate-local part of the DefPathHash. All hashes in this crate have the same
427    // StableCrateId, so we omit encoding those into the table.
428    //
429    // Note also that this table is fully populated (no gaps) as every DefIndex should have a
430    // corresponding DefPathHash.
431    def_path_hashes: Table<DefIndex, u64>,
432    explicit_item_bounds: Table<DefIndex, LazyArray<(ty::Clause<'static>, Span)>>,
433    explicit_item_self_bounds: Table<DefIndex, LazyArray<(ty::Clause<'static>, Span)>>,
434    inferred_outlives_of: Table<DefIndex, LazyArray<(ty::Clause<'static>, Span)>>,
435    explicit_super_clauses_of: Table<DefIndex, LazyArray<(ty::Clause<'static>, Span)>>,
436    explicit_implied_clauses_of: Table<DefIndex, LazyArray<(ty::Clause<'static>, Span)>>,
437    explicit_implied_const_bounds: Table<DefIndex, LazyArray<(ty::PolyTraitRef<'static>, Span)>>,
438    inherent_impls: Table<DefIndex, LazyArray<DefIndex>>,
439    opt_rpitit_info: Table<DefIndex, Option<LazyValue<ty::ImplTraitInTraitData>>>,
440    // Reexported names are not associated with individual `DefId`s,
441    // e.g. a glob import can introduce a lot of names, all with the same `DefId`.
442    // That's why the encoded list needs to contain `ModChild` structures describing all the names
443    // individually instead of `DefId`s.
444    module_children_reexports: Table<DefIndex, LazyArray<ModChild>>,
445    ambig_module_children: Table<DefIndex, LazyArray<AmbigModChild>>,
446    cross_crate_inlinable: Table<DefIndex, bool>,
447    asyncness: Table<DefIndex, ty::Asyncness>,
448    constness: Table<DefIndex, hir::Constness>,
449    safety: Table<DefIndex, hir::Safety>,
450    defaultness: Table<DefIndex, hir::Defaultness>,
451    impl_is_fully_generic_for_reflection: Table<DefIndex, bool>,
452
453- optional:
454    attributes: Table<DefIndex, LazyArray<rustc_attr_ir::Attribute>>,
455    // For non-reexported names in a module every name is associated with a separate `DefId`,
456    // so we can take their names, visibilities etc from other encoded tables.
457    module_children_non_reexports: Table<DefIndex, LazyArray<DefIndex>>,
458    associated_item_or_field_def_ids: Table<DefIndex, LazyArray<DefIndex>>,
459    def_kind: Table<DefIndex, DefKind>,
460    visibility: Table<DefIndex, LazyValue<ty::Visibility<DefIndex>>>,
461    def_span: Table<DefIndex, LazyValue<Span>>,
462    def_ident_span: Table<DefIndex, LazyValue<Span>>,
463    lookup_stability: Table<DefIndex, LazyValue<Stability>>,
464    lookup_const_stability: Table<DefIndex, LazyValue<rustc_attr_ir::ConstStability>>,
465    lookup_default_body_stability: Table<DefIndex, LazyValue<rustc_attr_ir::DefaultBodyStability>>,
466    lookup_deprecation_entry: Table<DefIndex, LazyValue<rustc_attr_ir::Deprecation>>,
467    explicit_clauses_of: Table<DefIndex, LazyValue<ty::GenericClauses<'static>>>,
468    generics_of: Table<DefIndex, LazyValue<ty::Generics>>,
469    type_of: Table<DefIndex, LazyValue<ty::EarlyBinder<'static, Ty<'static>>>>,
470    variances_of: Table<DefIndex, LazyArray<ty::Variance>>,
471    fn_sig: Table<DefIndex, LazyValue<ty::EarlyBinder<'static, ty::PolyFnSig<'static>>>>,
472    codegen_fn_attrs: Table<DefIndex, LazyValue<CodegenFnAttrs>>,
473    impl_trait_header: Table<DefIndex, LazyValue<ty::ImplTraitHeader<'static>>>,
474    const_param_default: Table<DefIndex, LazyValue<ty::EarlyBinder<'static, rustc_middle::ty::Const<'static>>>>,
475    object_lifetime_default: Table<DefIndex, LazyValue<ObjectLifetimeDefault>>,
476    optimized_mir: Table<DefIndex, LazyValue<mir::Body<'static>>>,
477    mir_for_ctfe: Table<DefIndex, LazyValue<mir::Body<'static>>>,
478    trivial_const: Table<DefIndex, LazyValue<(ConstValue, Ty<'static>)>>,
479    closure_saved_names_of_captured_variables: Table<DefIndex, LazyValue<IndexVec<FieldIdx, Symbol>>>,
480    mir_coroutine_witnesses: Table<DefIndex, LazyValue<mir::CoroutineLayout<'static>>>,
481    promoted_mir: Table<DefIndex, LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>,
482    thir_abstract_const: Table<DefIndex, LazyValue<ty::EarlyBinder<'static, ty::Const<'static>>>>,
483    impl_parent: Table<DefIndex, RawDefId>,
484    const_conditions: Table<DefIndex, LazyValue<ty::ConstConditions<'static>>>,
485    // FIXME(eddyb) perhaps compute this on the fly if cheap enough?
486    coerce_unsized_info: Table<DefIndex, LazyValue<ty::adjustment::CoerceUnsizedInfo>>,
487    mir_const_qualif: Table<DefIndex, LazyValue<mir::ConstQualifs>>,
488    rendered_const: Table<DefIndex, LazyValue<String>>,
489    rendered_precise_capturing_args: Table<DefIndex, LazyArray<PreciseCapturingArgKind<Symbol, Symbol>>>,
490    fn_arg_idents: Table<DefIndex, LazyArray<Option<Ident>>>,
491    coroutine_kind: Table<DefIndex, hir::CoroutineKind>,
492    coroutine_for_closure: Table<DefIndex, RawDefId>,
493    adt_destructor: Table<DefIndex, LazyValue<ty::Destructor>>,
494    adt_async_destructor: Table<DefIndex, LazyValue<ty::AsyncDestructor>>,
495    coroutine_by_move_body_def_id: Table<DefIndex, RawDefId>,
496    eval_static_initializer: Table<DefIndex, LazyValue<mir::interpret::ConstAllocation<'static>>>,
497    trait_def: Table<DefIndex, LazyValue<ty::TraitDef>>,
498    expn_that_defined: Table<DefIndex, LazyValue<ExpnId>>,
499    default_fields: Table<DefIndex, LazyValue<DefId>>,
500    params_in_repr: Table<DefIndex, LazyValue<DenseBitSet<u32>>>,
501    repr_options: Table<DefIndex, LazyValue<ReprOptions>>,
502    // `def_keys` and `def_path_hashes` represent a lazy version of a
503    // `DefPathTable`. This allows us to avoid deserializing an entire
504    // `DefPathTable` up front, since we may only ever use a few
505    // definitions from any given crate.
506    def_keys: Table<DefIndex, LazyValue<DefKey>>,
507    variant_data: Table<DefIndex, LazyValue<VariantData>>,
508    assoc_container: Table<DefIndex, LazyValue<ty::AssocContainer>>,
509    macro_definition: Table<DefIndex, LazyValue<ast::DelimArgs>>,
510    deduced_param_attrs: Table<DefIndex, LazyArray<DeducedParamAttrs>>,
511    collect_return_position_impl_trait_in_trait_tys: Table<DefIndex, LazyValue<DefIdMap<ty::EarlyBinder<'static, Ty<'static>>>>>,
512    doc_link_resolutions: Table<DefIndex, LazyValue<DocLinkResMap>>,
513    doc_link_traits_in_scope: Table<DefIndex, LazyArray<DefId>>,
514    assumed_wf_types_for_rpitit: Table<DefIndex, LazyArray<(Ty<'static>, Span)>>,
515    opaque_ty_origin: Table<DefIndex, LazyValue<hir::OpaqueTyOrigin<DefId>>>,
516    anon_const_kind: Table<DefIndex, LazyValue<ty::AnonConstKind>>,
517    const_of_item: Table<DefIndex, LazyValue<Option<ty::EarlyBinder<'static, ty::Const<'static>>>>>,
518    associated_types_for_impl_traits_in_trait_or_impl: Table<DefIndex, LazyValue<DefIdMap<Vec<DefId>>>>,
519    live_args_for_alias_from_outlives_bounds: Table<DefIndex, LazyValue<DenseBitSet<u32>>>,
520    args_known_to_outlive_alias_params: Table<DefIndex, LazyValue<Vec<(usize, DenseBitSet<u32>)>>>,
521    mut_restriction: Table<DefIndex, LazyValue<ty::RestrictionKind>>,
522}
523
524#[derive(const _: () =
    {
        impl<'tcx, __E: ::rustc_middle::ty::codec::TyEncoder<'tcx>>
            ::rustc_serialize::Encodable<__E> for VariantData {
            fn encode(&self, __encoder: &mut __E) {
                let VariantData {
                        idx: ref __binding_0,
                        discr: ref __binding_1,
                        ctor: ref __binding_2,
                        is_non_exhaustive: ref __binding_3 } = *self;
                ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                    __encoder);
                ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                    __encoder);
            }
        }
    };TyEncodable, const _: () =
    {
        impl<'tcx, __D: ::rustc_middle::ty::codec::TyDecoder<'tcx>>
            ::rustc_serialize::Decodable<__D> for VariantData {
            fn decode(__decoder: &mut __D) -> Self {
                VariantData {
                    idx: ::rustc_serialize::Decodable::decode(__decoder),
                    discr: ::rustc_serialize::Decodable::decode(__decoder),
                    ctor: ::rustc_serialize::Decodable::decode(__decoder),
                    is_non_exhaustive: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };TyDecodable)]
525struct VariantData {
526    idx: VariantIdx,
527    discr: ty::VariantDiscr,
528    /// If this is unit or tuple-variant/struct, then this is the index of the ctor id.
529    ctor: Option<(CtorKind, DefIndex)>,
530    is_non_exhaustive: bool,
531}
532
533pub struct AttrFlags(<AttrFlags as
    ::bitflags::__private::PublicFlags>::Internal);
#[automatically_derived]
impl ::core::default::Default for AttrFlags {
    #[inline]
    fn default() -> Self { Self(::core::default::Default::default()) }
}
impl AttrFlags {
    #[allow(deprecated, non_upper_case_globals,)]
    pub const IS_DOC_HIDDEN: Self = Self::from_bits_retain(1 << 0);
}
impl ::bitflags::Flags for AttrFlags {
    const FLAGS: &'static [::bitflags::Flag<AttrFlags>] =
        &[{

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("IS_DOC_HIDDEN",
                            AttrFlags::IS_DOC_HIDDEN)
                    }];
    type Bits = u8;
    fn bits(&self) -> u8 { AttrFlags::bits(self) }
    fn from_bits_retain(bits: u8) -> AttrFlags {
        AttrFlags::from_bits_retain(bits)
    }
}
#[allow(dead_code, deprecated, unused_doc_comments, unused_attributes,
unused_mut, unused_imports, non_upper_case_globals, clippy ::
assign_op_pattern, clippy :: indexing_slicing, clippy :: same_name_method,
clippy :: iter_without_into_iter,)]
const _: () =
    {
        #[repr(transparent)]
        pub struct InternalBitFlags(u8);
        #[automatically_derived]
        #[doc(hidden)]
        unsafe impl ::core::clone::TrivialClone for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::clone::Clone for InternalBitFlags {
            #[inline]
            fn clone(&self) -> Self {
                let _: ::core::clone::AssertParamIsClone<u8>;
                *self
            }
        }
        #[automatically_derived]
        impl ::core::marker::Copy for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::marker::StructuralPartialEq for InternalBitFlags { }
        #[automatically_derived]
        impl ::core::cmp::PartialEq for InternalBitFlags {
            #[inline]
            fn eq(&self, other: &Self) -> bool { self.0 == other.0 }
        }
        #[automatically_derived]
        impl ::core::cmp::Eq for InternalBitFlags {
            #[inline]
            #[doc(hidden)]
            #[coverage(off)]
            fn assert_fields_are_eq(&self) {
                let _: ::core::cmp::AssertParamIsEq<u8>;
            }
        }
        #[automatically_derived]
        impl ::core::cmp::PartialOrd for InternalBitFlags {
            #[inline]
            fn partial_cmp(&self, other: &Self)
                -> ::core::option::Option<::core::cmp::Ordering> {
                ::core::option::Option::Some(::core::cmp::Ord::cmp(self,
                        other))
            }
        }
        #[automatically_derived]
        impl ::core::cmp::Ord for InternalBitFlags {
            #[inline]
            fn cmp(&self, other: &Self) -> ::core::cmp::Ordering {
                ::core::cmp::Ord::cmp(&self.0, &other.0)
            }
        }
        #[automatically_derived]
        impl ::core::hash::Hash for InternalBitFlags {
            #[inline]
            fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
                ::core::hash::Hash::hash(&self.0, state)
            }
        }
        impl ::bitflags::__private::PublicFlags for AttrFlags {
            type Primitive = u8;
            type Internal = InternalBitFlags;
        }
        impl ::bitflags::__private::core::default::Default for
            InternalBitFlags {
            #[inline]
            fn default() -> Self { InternalBitFlags::empty() }
        }
        impl ::bitflags::__private::core::fmt::Debug for InternalBitFlags {
            fn fmt(&self,
                f: &mut ::bitflags::__private::core::fmt::Formatter<'_>)
                -> ::bitflags::__private::core::fmt::Result {
                if self.is_empty() {
                    f.write_fmt(format_args!("{0:#x}",
                            <u8 as ::bitflags::Bits>::EMPTY))
                } else {
                    ::bitflags::__private::core::fmt::Display::fmt(self, f)
                }
            }
        }
        impl ::bitflags::__private::core::fmt::Display for InternalBitFlags {
            fn fmt(&self,
                f: &mut ::bitflags::__private::core::fmt::Formatter<'_>)
                -> ::bitflags::__private::core::fmt::Result {
                ::bitflags::parser::to_writer(&AttrFlags(*self), f)
            }
        }
        impl ::bitflags::__private::core::str::FromStr for InternalBitFlags {
            type Err = ::bitflags::parser::ParseError;
            fn from_str(s: &str)
                ->
                    ::bitflags::__private::core::result::Result<Self,
                    Self::Err> {
                ::bitflags::parser::from_str::<AttrFlags>(s).map(|flags|
                        flags.0)
            }
        }
        impl ::bitflags::__private::core::convert::AsRef<u8> for
            InternalBitFlags {
            fn as_ref(&self) -> &u8 { &self.0 }
        }
        impl ::bitflags::__private::core::convert::From<u8> for
            InternalBitFlags {
            fn from(bits: u8) -> Self { Self::from_bits_retain(bits) }
        }
        #[allow(dead_code, deprecated, unused_attributes)]
        impl InternalBitFlags {
            /// Get a flags value with all bits unset.
            #[inline]
            pub const fn empty() -> Self {
                Self(<u8 as ::bitflags::Bits>::EMPTY)
            }
            /// Get a flags value with all known bits set.
            #[inline]
            pub const fn all() -> Self {
                let mut truncated = <u8 as ::bitflags::Bits>::EMPTY;
                let mut i = 0;
                {
                    {
                        let flag =
                            <AttrFlags as ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                let _ = i;
                Self(truncated)
            }
            /// Get the underlying bits value.
            ///
            /// The returned value is exactly the bits set in this flags value.
            #[inline]
            pub const fn bits(&self) -> u8 { self.0 }
            /// Convert from a bits value.
            ///
            /// This method will return `None` if any unknown bits are set.
            #[inline]
            pub const fn from_bits(bits: u8)
                -> ::bitflags::__private::core::option::Option<Self> {
                let truncated = Self::from_bits_truncate(bits).0;
                if truncated == bits {
                    ::bitflags::__private::core::option::Option::Some(Self(bits))
                } else { ::bitflags::__private::core::option::Option::None }
            }
            /// Convert from a bits value, unsetting any unknown bits.
            #[inline]
            pub const fn from_bits_truncate(bits: u8) -> Self {
                Self(bits & Self::all().0)
            }
            /// Convert from a bits value exactly.
            #[inline]
            pub const fn from_bits_retain(bits: u8) -> Self { Self(bits) }
            /// Get a flags value with the bits of a flag with the given name set.
            ///
            /// This method will return `None` if `name` is empty or doesn't
            /// correspond to any named flag.
            #[inline]
            pub fn from_name(name: &str)
                -> ::bitflags::__private::core::option::Option<Self> {
                {
                    if name == "IS_DOC_HIDDEN" {
                        return ::bitflags::__private::core::option::Option::Some(Self(AttrFlags::IS_DOC_HIDDEN.bits()));
                    }
                };
                ;
                let _ = name;
                ::bitflags::__private::core::option::Option::None
            }
            /// Whether all bits in this flags value are unset.
            #[inline]
            pub const fn is_empty(&self) -> bool {
                self.0 == <u8 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all known bits in this flags value are set.
            #[inline]
            pub const fn is_all(&self) -> bool {
                Self::all().0 | self.0 == self.0
            }
            /// Whether any set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn intersects(&self, other: Self) -> bool {
                self.0 & other.0 != <u8 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn contains(&self, other: Self) -> bool {
                self.0 & other.0 == other.0
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            pub fn insert(&mut self, other: Self) {
                *self = Self(self.0).union(other);
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `remove` won't truncate `other`, but the `!` operator will.
            #[inline]
            pub fn remove(&mut self, other: Self) {
                *self = Self(self.0).difference(other);
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            pub fn toggle(&mut self, other: Self) {
                *self = Self(self.0).symmetric_difference(other);
            }
            /// Call `insert` when `value` is `true` or `remove` when `value` is `false`.
            #[inline]
            pub fn set(&mut self, other: Self, value: bool) {
                if value { self.insert(other); } else { self.remove(other); }
            }
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn intersection(self, other: Self) -> Self {
                Self(self.0 & other.0)
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn union(self, other: Self) -> Self {
                Self(self.0 | other.0)
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            #[must_use]
            pub const fn difference(self, other: Self) -> Self {
                Self(self.0 & !other.0)
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn symmetric_difference(self, other: Self) -> Self {
                Self(self.0 ^ other.0)
            }
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            #[must_use]
            pub const fn complement(self) -> Self {
                Self::from_bits_truncate(!self.0)
            }
        }
        impl ::bitflags::__private::core::fmt::Binary for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Binary::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::Octal for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Octal::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::LowerHex for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::LowerHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::UpperHex for InternalBitFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::UpperHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::ops::BitOr for InternalBitFlags {
            type Output = Self;
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor(self, other: InternalBitFlags) -> Self {
                self.union(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitOrAssign for
            InternalBitFlags {
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor_assign(&mut self, other: Self) { self.insert(other); }
        }
        impl ::bitflags::__private::core::ops::BitXor for InternalBitFlags {
            type Output = Self;
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor(self, other: Self) -> Self {
                self.symmetric_difference(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitXorAssign for
            InternalBitFlags {
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor_assign(&mut self, other: Self) { self.toggle(other); }
        }
        impl ::bitflags::__private::core::ops::BitAnd for InternalBitFlags {
            type Output = Self;
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand(self, other: Self) -> Self { self.intersection(other) }
        }
        impl ::bitflags::__private::core::ops::BitAndAssign for
            InternalBitFlags {
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand_assign(&mut self, other: Self) {
                *self =
                    Self::from_bits_retain(self.bits()).intersection(other);
            }
        }
        impl ::bitflags::__private::core::ops::Sub for InternalBitFlags {
            type Output = Self;
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub(self, other: Self) -> Self { self.difference(other) }
        }
        impl ::bitflags::__private::core::ops::SubAssign for InternalBitFlags
            {
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub_assign(&mut self, other: Self) { self.remove(other); }
        }
        impl ::bitflags::__private::core::ops::Not for InternalBitFlags {
            type Output = Self;
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            fn not(self) -> Self { self.complement() }
        }
        impl ::bitflags::__private::core::iter::Extend<InternalBitFlags> for
            InternalBitFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn extend<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(&mut self, iterator: T) {
                for item in iterator { self.insert(item) }
            }
        }
        impl ::bitflags::__private::core::iter::FromIterator<InternalBitFlags>
            for InternalBitFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn from_iter<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(iterator: T) -> Self {
                use ::bitflags::__private::core::iter::Extend;
                let mut result = Self::empty();
                result.extend(iterator);
                result
            }
        }
        impl InternalBitFlags {
            /// Yield a set of contained flags values.
            ///
            /// Each yielded flags value will correspond to a defined named flag. Any unknown bits
            /// will be yielded together as a final flags value.
            #[inline]
            pub const fn iter(&self) -> ::bitflags::iter::Iter<AttrFlags> {
                ::bitflags::iter::Iter::__private_const_new(<AttrFlags as
                        ::bitflags::Flags>::FLAGS,
                    AttrFlags::from_bits_retain(self.bits()),
                    AttrFlags::from_bits_retain(self.bits()))
            }
            /// Yield a set of contained named flags values.
            ///
            /// This method is like [`iter`](#method.iter), except only yields bits in contained named flags.
            /// Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
            #[inline]
            pub const fn iter_names(&self)
                -> ::bitflags::iter::IterNames<AttrFlags> {
                ::bitflags::iter::IterNames::__private_const_new(<AttrFlags as
                        ::bitflags::Flags>::FLAGS,
                    AttrFlags::from_bits_retain(self.bits()),
                    AttrFlags::from_bits_retain(self.bits()))
            }
        }
        impl ::bitflags::__private::core::iter::IntoIterator for
            InternalBitFlags {
            type Item = AttrFlags;
            type IntoIter = ::bitflags::iter::Iter<AttrFlags>;
            fn into_iter(self) -> Self::IntoIter { self.iter() }
        }
        impl InternalBitFlags {
            /// Returns a mutable reference to the raw value of the flags currently stored.
            #[inline]
            pub fn bits_mut(&mut self) -> &mut u8 { &mut self.0 }
        }
        #[allow(dead_code, deprecated, unused_attributes)]
        impl AttrFlags {
            /// Get a flags value with all bits unset.
            #[inline]
            pub const fn empty() -> Self { Self(InternalBitFlags::empty()) }
            /// Get a flags value with all known bits set.
            #[inline]
            pub const fn all() -> Self { Self(InternalBitFlags::all()) }
            /// Get the underlying bits value.
            ///
            /// The returned value is exactly the bits set in this flags value.
            #[inline]
            pub const fn bits(&self) -> u8 { self.0.bits() }
            /// Convert from a bits value.
            ///
            /// This method will return `None` if any unknown bits are set.
            #[inline]
            pub const fn from_bits(bits: u8)
                -> ::bitflags::__private::core::option::Option<Self> {
                match InternalBitFlags::from_bits(bits) {
                    ::bitflags::__private::core::option::Option::Some(bits) =>
                        ::bitflags::__private::core::option::Option::Some(Self(bits)),
                    ::bitflags::__private::core::option::Option::None =>
                        ::bitflags::__private::core::option::Option::None,
                }
            }
            /// Convert from a bits value, unsetting any unknown bits.
            #[inline]
            pub const fn from_bits_truncate(bits: u8) -> Self {
                Self(InternalBitFlags::from_bits_truncate(bits))
            }
            /// Convert from a bits value exactly.
            #[inline]
            pub const fn from_bits_retain(bits: u8) -> Self {
                Self(InternalBitFlags::from_bits_retain(bits))
            }
            /// Get a flags value with the bits of a flag with the given name set.
            ///
            /// This method will return `None` if `name` is empty or doesn't
            /// correspond to any named flag.
            #[inline]
            pub fn from_name(name: &str)
                -> ::bitflags::__private::core::option::Option<Self> {
                match InternalBitFlags::from_name(name) {
                    ::bitflags::__private::core::option::Option::Some(bits) =>
                        ::bitflags::__private::core::option::Option::Some(Self(bits)),
                    ::bitflags::__private::core::option::Option::None =>
                        ::bitflags::__private::core::option::Option::None,
                }
            }
            /// Whether all bits in this flags value are unset.
            #[inline]
            pub const fn is_empty(&self) -> bool { self.0.is_empty() }
            /// Whether all known bits in this flags value are set.
            #[inline]
            pub const fn is_all(&self) -> bool { self.0.is_all() }
            /// Whether any set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn intersects(&self, other: Self) -> bool {
                self.0.intersects(other.0)
            }
            /// Whether all set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn contains(&self, other: Self) -> bool {
                self.0.contains(other.0)
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            pub fn insert(&mut self, other: Self) { self.0.insert(other.0) }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `remove` won't truncate `other`, but the `!` operator will.
            #[inline]
            pub fn remove(&mut self, other: Self) { self.0.remove(other.0) }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            pub fn toggle(&mut self, other: Self) { self.0.toggle(other.0) }
            /// Call `insert` when `value` is `true` or `remove` when `value` is `false`.
            #[inline]
            pub fn set(&mut self, other: Self, value: bool) {
                self.0.set(other.0, value)
            }
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn intersection(self, other: Self) -> Self {
                Self(self.0.intersection(other.0))
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn union(self, other: Self) -> Self {
                Self(self.0.union(other.0))
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            #[must_use]
            pub const fn difference(self, other: Self) -> Self {
                Self(self.0.difference(other.0))
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn symmetric_difference(self, other: Self) -> Self {
                Self(self.0.symmetric_difference(other.0))
            }
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            #[must_use]
            pub const fn complement(self) -> Self {
                Self(self.0.complement())
            }
        }
        impl ::bitflags::__private::core::fmt::Binary for AttrFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Binary::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::Octal for AttrFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Octal::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::LowerHex for AttrFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::LowerHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::UpperHex for AttrFlags {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::UpperHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::ops::BitOr for AttrFlags {
            type Output = Self;
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor(self, other: AttrFlags) -> Self { self.union(other) }
        }
        impl ::bitflags::__private::core::ops::BitOrAssign for AttrFlags {
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor_assign(&mut self, other: Self) { self.insert(other); }
        }
        impl ::bitflags::__private::core::ops::BitXor for AttrFlags {
            type Output = Self;
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor(self, other: Self) -> Self {
                self.symmetric_difference(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitXorAssign for AttrFlags {
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor_assign(&mut self, other: Self) { self.toggle(other); }
        }
        impl ::bitflags::__private::core::ops::BitAnd for AttrFlags {
            type Output = Self;
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand(self, other: Self) -> Self { self.intersection(other) }
        }
        impl ::bitflags::__private::core::ops::BitAndAssign for AttrFlags {
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand_assign(&mut self, other: Self) {
                *self =
                    Self::from_bits_retain(self.bits()).intersection(other);
            }
        }
        impl ::bitflags::__private::core::ops::Sub for AttrFlags {
            type Output = Self;
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub(self, other: Self) -> Self { self.difference(other) }
        }
        impl ::bitflags::__private::core::ops::SubAssign for AttrFlags {
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub_assign(&mut self, other: Self) { self.remove(other); }
        }
        impl ::bitflags::__private::core::ops::Not for AttrFlags {
            type Output = Self;
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            fn not(self) -> Self { self.complement() }
        }
        impl ::bitflags::__private::core::iter::Extend<AttrFlags> for
            AttrFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn extend<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(&mut self, iterator: T) {
                for item in iterator { self.insert(item) }
            }
        }
        impl ::bitflags::__private::core::iter::FromIterator<AttrFlags> for
            AttrFlags {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn from_iter<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(iterator: T) -> Self {
                use ::bitflags::__private::core::iter::Extend;
                let mut result = Self::empty();
                result.extend(iterator);
                result
            }
        }
        impl AttrFlags {
            /// Yield a set of contained flags values.
            ///
            /// Each yielded flags value will correspond to a defined named flag. Any unknown bits
            /// will be yielded together as a final flags value.
            #[inline]
            pub const fn iter(&self) -> ::bitflags::iter::Iter<AttrFlags> {
                ::bitflags::iter::Iter::__private_const_new(<AttrFlags as
                        ::bitflags::Flags>::FLAGS,
                    AttrFlags::from_bits_retain(self.bits()),
                    AttrFlags::from_bits_retain(self.bits()))
            }
            /// Yield a set of contained named flags values.
            ///
            /// This method is like [`iter`](#method.iter), except only yields bits in contained named flags.
            /// Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
            #[inline]
            pub const fn iter_names(&self)
                -> ::bitflags::iter::IterNames<AttrFlags> {
                ::bitflags::iter::IterNames::__private_const_new(<AttrFlags as
                        ::bitflags::Flags>::FLAGS,
                    AttrFlags::from_bits_retain(self.bits()),
                    AttrFlags::from_bits_retain(self.bits()))
            }
        }
        impl ::bitflags::__private::core::iter::IntoIterator for AttrFlags {
            type Item = AttrFlags;
            type IntoIter = ::bitflags::iter::Iter<AttrFlags>;
            fn into_iter(self) -> Self::IntoIter { self.iter() }
        }
    };bitflags::bitflags! {
534    #[derive(Default)]
535    pub struct AttrFlags: u8 {
536        const IS_DOC_HIDDEN = 1 << 0;
537    }
538}
539
540/// A span tag byte encodes a bunch of data, so that we can cut out a few extra bytes from span
541/// encodings (which are very common, for example, libcore has ~650,000 unique spans and over 1.1
542/// million references to prior-written spans).
543///
544/// The byte format is split into several parts:
545///
546/// [ a a a a a c d d ]
547///
548/// `a` bits represent the span length. We have 5 bits, so we can store lengths up to 30 inline, with
549/// an all-1s pattern representing that the length is stored separately.
550///
551/// `c` represents whether the span context is zero (and then it is not stored as a separate varint)
552/// for direct span encodings, and whether the offset is absolute or relative otherwise (zero for
553/// absolute).
554///
555/// d bits represent the kind of span we are storing (local, foreign, partial, indirect).
556#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for SpanTag {
            fn encode(&self, __encoder: &mut __E) {
                let SpanTag(ref __binding_0) = *self;
                ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                    __encoder);
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for SpanTag {
            fn decode(__decoder: &mut __D) -> Self {
                SpanTag(::rustc_serialize::Decodable::decode(__decoder))
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::marker::Copy for SpanTag { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for SpanTag { }
#[automatically_derived]
impl ::core::clone::Clone for SpanTag {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u8>;
        *self
    }
}Clone)]
557struct SpanTag(u8);
558
559#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SpanKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                SpanKind::Local => "Local",
                SpanKind::Foreign => "Foreign",
                SpanKind::Partial => "Partial",
                SpanKind::Indirect => "Indirect",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for SpanKind { }Copy, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for SpanKind { }
#[automatically_derived]
impl ::core::clone::Clone for SpanKind {
    #[inline]
    fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for SpanKind { }
#[automatically_derived]
impl ::core::cmp::PartialEq for SpanKind {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for SpanKind { }Eq)]
560enum SpanKind {
561    Local = 0b00,
562    Foreign = 0b01,
563    Partial = 0b10,
564    // Indicates the actual span contents are elsewhere.
565    // If this is the kind, then the span context bit represents whether it is a relative or
566    // absolute offset.
567    Indirect = 0b11,
568}
569
570impl SpanTag {
571    fn new(kind: SpanKind, context: rustc_span::SyntaxContext, length: usize) -> SpanTag {
572        let mut data = 0u8;
573        data |= kind as u8;
574        if context.is_root() {
575            data |= 0b100;
576        }
577        let all_1s_len = (0xffu8 << 3) >> 3;
578        // strictly less than - all 1s pattern is a sentinel for storage being out of band.
579        if length < all_1s_len as usize {
580            data |= (length as u8) << 3;
581        } else {
582            data |= all_1s_len << 3;
583        }
584
585        SpanTag(data)
586    }
587
588    fn indirect(relative: bool, length_bytes: u8) -> SpanTag {
589        let mut tag = SpanTag(SpanKind::Indirect as u8);
590        if relative {
591            tag.0 |= 0b100;
592        }
593        if !(length_bytes <= 8) {
    ::core::panicking::panic("assertion failed: length_bytes <= 8")
};assert!(length_bytes <= 8);
594        tag.0 |= length_bytes << 3;
595        tag
596    }
597
598    fn kind(self) -> SpanKind {
599        let masked = self.0 & 0b11;
600        match masked {
601            0b00 => SpanKind::Local,
602            0b01 => SpanKind::Foreign,
603            0b10 => SpanKind::Partial,
604            0b11 => SpanKind::Indirect,
605            _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
606        }
607    }
608
609    fn is_relative_offset(self) -> bool {
610        if true {
    {
        match (&self.kind(), &SpanKind::Indirect) {
            (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!(self.kind(), SpanKind::Indirect);
611        self.0 & 0b100 != 0
612    }
613
614    fn context(self) -> Option<rustc_span::SyntaxContext> {
615        if self.0 & 0b100 != 0 { Some(rustc_span::SyntaxContext::root()) } else { None }
616    }
617
618    fn length(self) -> Option<rustc_span::BytePos> {
619        let all_1s_len = (0xffu8 << 3) >> 3;
620        let len = self.0 >> 3;
621        if len != all_1s_len { Some(rustc_span::BytePos(u32::from(len))) } else { None }
622    }
623}
624
625// Tags for encoding Symbol's
626const SYMBOL_STR: u8 = 0;
627const SYMBOL_OFFSET: u8 = 1;
628const SYMBOL_PREDEFINED: u8 = 2;
629
630pub fn provide(providers: &mut Providers) {
631    encoder::provide(&mut providers.queries);
632    decoder::provide(providers);
633}