diff options
| author | bors <bors@rust-lang.org> | 2021-06-10 00:39:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-10 00:39:25 +0000 |
| commit | 1639a16ebfaad2aa74fd535c778fd1614475b53d (patch) | |
| tree | 8944f45d0051f62fc82843035f7261ffacabfcbe /compiler/rustc_metadata/src | |
| parent | eab201df7028ebb6812c0b1a01702ac6ecfcceed (diff) | |
| parent | 4e3b220b02dafe2cad7d8cfdc604caf436e820c7 (diff) | |
| download | rust-1639a16ebfaad2aa74fd535c778fd1614475b53d.tar.gz rust-1639a16ebfaad2aa74fd535c778fd1614475b53d.zip | |
Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011
Drop metadata_encoding_version. Part of #85153 r? `@Aaron1011`
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/mod.rs | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_metadata/src/lib.rs b/compiler/rustc_metadata/src/lib.rs index 27842ac7796..2c9bad7e5ce 100644 --- a/compiler/rustc_metadata/src/lib.rs +++ b/compiler/rustc_metadata/src/lib.rs @@ -29,3 +29,5 @@ mod rmeta; pub mod creader; pub mod dynamic_lib; pub mod locator; + +pub use rmeta::METADATA_HEADER; diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 7cec4ce1d91..9a97835d9c0 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -1,7 +1,7 @@ use crate::creader::{CStore, LoadedMacro}; use crate::foreign_modules; use crate::native_libs; -use crate::rmeta::{self, encoder}; +use crate::rmeta::encoder; use rustc_ast as ast; use rustc_ast::expand::allocator::AllocatorKind; @@ -536,10 +536,6 @@ impl CrateStore for CStore { encoder::encode_metadata(tcx) } - fn metadata_encoding_version(&self) -> &[u8] { - rmeta::METADATA_HEADER - } - fn allocator_kind(&self) -> Option<AllocatorKind> { self.allocator_kind() } diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 04fe5cf5890..99ea0cc8f2f 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -52,7 +52,7 @@ const METADATA_VERSION: u8 = 5; /// This header is followed by the position of the `CrateRoot`, /// which is encoded as a 32-bit big-endian unsigned integer, /// and further followed by the rustc version string. -crate const METADATA_HEADER: &[u8; 8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_VERSION]; +pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_VERSION]; /// Additional metadata for a `Lazy<T>` where `T` may not be `Sized`, /// e.g. for `Lazy<[T]>`, this is the length (count of `T` values). |
