summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_metadata/src/rmeta/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/mod.rs')
-rw-r--r--compiler/rustc_metadata/src/rmeta/mod.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs
index 9cffd96f4..a89e235ff 100644
--- a/compiler/rustc_metadata/src/rmeta/mod.rs
+++ b/compiler/rustc_metadata/src/rmeta/mod.rs
@@ -51,7 +51,7 @@ mod encoder;
mod table;
pub(crate) fn rustc_version(cfg_version: &'static str) -> String {
- format!("rustc {}", cfg_version)
+ format!("rustc {cfg_version}")
}
/// Metadata encoding version.
@@ -66,6 +66,12 @@ const METADATA_VERSION: u8 = 8;
/// unsigned integer, and further followed by the rustc version string.
pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_VERSION];
+#[derive(Encodable, Decodable)]
+enum SpanEncodingMode {
+ Shorthand(usize),
+ Direct,
+}
+
/// A value of type T referred to by its absolute position
/// in the metadata, and which can be decoded lazily.
///
@@ -264,7 +270,7 @@ pub(crate) struct CrateRoot {
traits: LazyArray<DefIndex>,
impls: LazyArray<TraitImpls>,
incoherent_impls: LazyArray<IncoherentImpls>,
- interpret_alloc_index: LazyArray<u32>,
+ interpret_alloc_index: LazyArray<u64>,
proc_macro_data: Option<ProcMacroData>,
tables: LazyTables,
@@ -451,6 +457,7 @@ define_tables! {
trait_impl_trait_tys: Table<DefIndex, LazyValue<FxHashMap<DefId, ty::EarlyBinder<Ty<'static>>>>>,
doc_link_resolutions: Table<DefIndex, LazyValue<DocLinkResMap>>,
doc_link_traits_in_scope: Table<DefIndex, LazyArray<DefId>>,
+ assumed_wf_types_for_rpitit: Table<DefIndex, LazyArray<(Ty<'static>, Span)>>,
}
#[derive(TyEncodable, TyDecodable)]