Skip to content

Commit f622f45

Browse files
committed
Share serialization optimization between incr and metadata
1 parent cf7bef3 commit f622f45

File tree

6 files changed

+198
-178
lines changed

6 files changed

+198
-178
lines changed

src/librustc_metadata/rmeta/decoder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use std::num::NonZeroUsize;
4646
use std::path::Path;
4747

4848
pub use cstore_impl::{provide, provide_extern};
49-
use rustc_span::hygiene::HygieneContext;
49+
use rustc_span::hygiene::HygieneDecodeContext;
5050

5151
mod cstore_impl;
5252

@@ -111,10 +111,10 @@ crate struct CrateMetadata {
111111

112112
/// Additional data used for decoding `HygieneData` (e.g. `SyntaxContext`
113113
/// and `ExpnId`).
114-
/// Note that we store a `HygieneContext` for each `CrateMetadat`. This is
114+
/// Note that we store a `HygieneDecodeContext` for each `CrateMetadat`. This is
115115
/// because `SyntaxContext` ids are not globally unique, so we need
116116
/// to track which ids we've decoded on a per-crate basis.
117-
hygiene_context: HygieneContext,
117+
hygiene_context: HygieneDecodeContext,
118118

119119
// --- Data used only for improving diagnostics ---
120120
/// Information about the `extern crate` item or path that caused this crate to be loaded.
@@ -1671,7 +1671,7 @@ impl CrateMetadata {
16711671
private_dep,
16721672
host_hash,
16731673
extern_crate: Lock::new(None),
1674-
hygiene_context: HygieneContext::new(),
1674+
hygiene_context: Default::default(),
16751675
}
16761676
}
16771677

0 commit comments

Comments
 (0)