Skip to content

Commit

Permalink
Move SourceMap to syntax_pos
Browse files Browse the repository at this point in the history
This does not update the use sites or delete the now unnecessary
SourceMapper trait, to allow git to interpret the file move as a rename
rather than a new file.
  • Loading branch information
Mark-Simulacrum committed Nov 15, 2019
1 parent e1a87ca commit 942f0a6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4445,6 +4445,7 @@ version = "0.0.0"
dependencies = [
"arena",
"cfg-if",
"log",
"rustc_data_structures",
"rustc_index",
"rustc_macros",
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub mod json;
pub mod ast;
pub mod attr;
pub mod expand;
pub mod source_map;
pub use syntax_pos::source_map;
pub mod entry;
pub mod feature_gate;
pub mod mut_visit;
Expand Down
1 change: 1 addition & 0 deletions src/libsyntax_pos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ arena = { path = "../libarena" }
scoped-tls = "1.0"
unicode-width = "0.1.4"
cfg-if = "0.1.2"
log = "0.4"
2 changes: 2 additions & 0 deletions src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

use rustc_serialize::{Encodable, Decodable, Encoder, Decoder};

pub mod source_map;

pub mod edition;
use edition::Edition;
pub mod hygiene;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//! within the `SourceMap`, which upon request can be converted to line and column
//! information, source code snippets, etc.
pub use syntax_pos::*;
pub use syntax_pos::hygiene::{ExpnKind, ExpnData};
pub use crate::*;
pub use crate::hygiene::{ExpnKind, ExpnData};

use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::StableHasher;
Expand Down Expand Up @@ -216,7 +216,7 @@ impl SourceMap {
self.try_new_source_file(filename, src)
.unwrap_or_else(|OffsetOverflowError| {
eprintln!("fatal error: rustc does not support files larger than 4GB");
errors::FatalError.raise()
crate::fatal_error::FatalError.raise()
})
}

Expand Down
File renamed without changes.

0 comments on commit 942f0a6

Please sign in to comment.