diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-02 14:10:12 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-02 19:35:00 +1100 |
| commit | f405ce86c2a5daab5972876e5b7600afdc308643 (patch) | |
| tree | 15a8cc5548704e0fc09bf43efc247310ae7e569a /compiler/rustc_session/src | |
| parent | 84773b3972d6330ee0838916b4a3f83cbc4cfd51 (diff) | |
| download | rust-f405ce86c2a5daab5972876e5b7600afdc308643.tar.gz rust-f405ce86c2a5daab5972876e5b7600afdc308643.zip | |
Minimize `pub` usage in `source_map.rs`.
Most notably, this commit changes the `pub use crate::*;` in that file to `use crate::*;`. This requires a lot of `use` items in other crates to be adjusted, because everything defined within `rustc_span::*` was also available via `rustc_span::source_map::*`, which is bizarre. The commit also removes `SourceMap::span_to_relative_line_string`, which is unused.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index a8ebab4ae33..4d3b9acd395 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -18,10 +18,9 @@ use rustc_target::spec::{Target, TargetTriple, TargetWarnings, TARGETS}; use rustc_feature::UnstableFeatures; use rustc_span::edition::{Edition, DEFAULT_EDITION, EDITION_NAME_LIST, LATEST_STABLE_EDITION}; -use rustc_span::source_map::{FileName, FilePathMapping}; +use rustc_span::source_map::FilePathMapping; use rustc_span::symbol::{sym, Symbol}; -use rustc_span::SourceFileHashAlgorithm; -use rustc_span::{FileNameDisplayPreference, RealFileName}; +use rustc_span::{FileName, FileNameDisplayPreference, RealFileName, SourceFileHashAlgorithm}; use rustc_errors::emitter::HumanReadableErrorType; use rustc_errors::{ColorConfig, DiagnosticArgValue, HandlerFlags, IntoDiagnosticArg}; diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index f823b556154..80a549b30f7 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -31,8 +31,8 @@ use rustc_errors::{ use rustc_macros::HashStable_Generic; pub use rustc_span::def_id::StableCrateId; use rustc_span::edition::Edition; -use rustc_span::source_map::{FileLoader, RealFileLoader, SourceMap, Span}; -use rustc_span::{SourceFileHashAlgorithm, Symbol}; +use rustc_span::source_map::{FileLoader, RealFileLoader, SourceMap}; +use rustc_span::{SourceFileHashAlgorithm, Span, Symbol}; use rustc_target::asm::InlineAsmArch; use rustc_target::spec::{CodeModel, PanicStrategy, RelocModel, RelroLevel}; use rustc_target::spec::{ |
