Skip to content

Commit 5eb1cf1

Browse files
committed
rustc_metadata: Rename schema to rmeta
And change `rmeta.rs` to `rmeta/mod.rs`
1 parent 2b75147 commit 5eb1cf1

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

Diff for: src/librustc_metadata/creader.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use crate::cstore::{self, CStore, MetadataBlob};
44
use crate::locator::{self, CratePaths};
5-
use crate::schema::{CrateRoot, CrateDep};
5+
use crate::rmeta::{CrateRoot, CrateDep};
66
use rustc_data_structures::sync::{Lock, Once, AtomicCell};
77

88
use rustc::hir::def_id::CrateNum;

Diff for: src/librustc_metadata/cstore.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// The crate store - a central repo for information collected about external
22
// crates and libraries
33

4-
use crate::schema;
4+
use crate::rmeta;
55
use rustc::dep_graph::DepNodeIndex;
66
use rustc::hir::def_id::{CrateNum, DefIndex};
77
use rustc::hir::map::definitions::DefPathTable;
@@ -17,7 +17,7 @@ use syntax_expand::base::SyntaxExtension;
1717
use syntax_pos;
1818
use proc_macro::bridge::client::ProcMacro;
1919

20-
pub use crate::schema::{provide, provide_extern};
20+
pub use crate::rmeta::{provide, provide_extern};
2121

2222
// A map from external crate numbers (as decoded from some crate file) to
2323
// local crate numbers (as generated during this session). Each external
@@ -49,7 +49,7 @@ crate struct CrateMetadata {
4949
/// lifetime is only used behind `Lazy`, and therefore acts like an
5050
/// universal (`for<'tcx>`), that is paired up with whichever `TyCtxt`
5151
/// is being used to decode those values.
52-
crate root: schema::CrateRoot<'static>,
52+
crate root: rmeta::CrateRoot<'static>,
5353
/// For each definition in this crate, we encode a key. When the
5454
/// crate is loaded, we read all the keys and put them in this
5555
/// hashmap, which gives the reverse mapping. This allows us to
@@ -59,7 +59,7 @@ crate struct CrateMetadata {
5959
/// Trait impl data.
6060
/// FIXME: Used only from queries and can use query cache,
6161
/// so pre-decoding can probably be avoided.
62-
crate trait_impls: FxHashMap<(u32, DefIndex), schema::Lazy<[DefIndex]>>,
62+
crate trait_impls: FxHashMap<(u32, DefIndex), rmeta::Lazy<[DefIndex]>>,
6363
/// Proc macro descriptions for this crate, if it's a proc macro crate.
6464
crate raw_proc_macros: Option<&'static [ProcMacro]>,
6565
/// Source maps for code from the crate.

Diff for: src/librustc_metadata/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod dependency_format;
3030
mod foreign_modules;
3131
mod link_args;
3232
mod native_libs;
33-
mod schema;
33+
mod rmeta;
3434

3535
pub mod creader;
3636
pub mod cstore;

Diff for: src/librustc_metadata/locator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
215215
use crate::cstore::MetadataBlob;
216216
use crate::creader::Library;
217-
use crate::schema::{METADATA_HEADER, rustc_version};
217+
use crate::rmeta::{METADATA_HEADER, rustc_version};
218218

219219
use rustc_data_structures::fx::FxHashSet;
220220
use rustc_data_structures::svh::Svh;

Diff for: src/librustc_metadata/schema/decoder.rs renamed to src/librustc_metadata/rmeta/decoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Decoding metadata from a single crate's metadata
22

33
use crate::cstore::{self, CrateMetadata, MetadataBlob};
4-
use crate::schema::*;
5-
use crate::schema::table::{FixedSizeEncoding, PerDefTable};
4+
use crate::rmeta::*;
5+
use crate::rmeta::table::{FixedSizeEncoding, PerDefTable};
66

77
use rustc_index::vec::IndexVec;
88
use rustc_data_structures::sync::Lrc;

Diff for: src/librustc_metadata/schema/decoder/cstore_impl.rs renamed to src/librustc_metadata/rmeta/decoder/cstore_impl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::cstore::{self, LoadedMacro};
22
use crate::link_args;
33
use crate::native_libs;
44
use crate::foreign_modules;
5-
use crate::schema::{self, encoder};
5+
use crate::rmeta::{self, encoder};
66

77
use rustc::ty::query::QueryConfig;
88
use rustc::middle::cstore::{CrateSource, CrateStore, DepKind, EncodedMetadata, NativeLibraryKind};
@@ -528,6 +528,6 @@ impl CrateStore for cstore::CStore {
528528

529529
fn metadata_encoding_version(&self) -> &[u8]
530530
{
531-
schema::METADATA_HEADER
531+
rmeta::METADATA_HEADER
532532
}
533533
}

Diff for: src/librustc_metadata/schema/encoder.rs renamed to src/librustc_metadata/rmeta/encoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::schema::*;
2-
use crate::schema::table::{FixedSizeEncoding, PerDefTable};
1+
use crate::rmeta::*;
2+
use crate::rmeta::table::{FixedSizeEncoding, PerDefTable};
33

44
use rustc::middle::cstore::{LinkagePreference, NativeLibrary,
55
EncodedMetadata, ForeignModule};
File renamed without changes.

Diff for: src/librustc_metadata/schema/table.rs renamed to src/librustc_metadata/rmeta/table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::schema::*;
1+
use crate::rmeta::*;
22

33
use rustc::hir::def_id::{DefId, DefIndex};
44
use rustc_serialize::{Encodable, opaque::Encoder};

0 commit comments

Comments
 (0)