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 | e1ec2d5cc98cea75d222fc67d31e1d15bfc1d6f1 (patch) | |
| tree | ca6744875782806722df03e6cfc01fa89f8403d8 /clippy_utils/src | |
| parent | 2e907aa90c67d73fadc9be54c6609f618045c10c (diff) | |
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 'clippy_utils/src')
| -rw-r--r-- | clippy_utils/src/diagnostics.rs | 2 | ||||
| -rw-r--r-- | clippy_utils/src/sugg.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/diagnostics.rs b/clippy_utils/src/diagnostics.rs index edd87546a5f..61c15aff355 100644 --- a/clippy_utils/src/diagnostics.rs +++ b/clippy_utils/src/diagnostics.rs @@ -11,7 +11,7 @@ use rustc_errors::{Applicability, Diagnostic, MultiSpan}; use rustc_hir::HirId; use rustc_lint::{LateContext, Lint, LintContext}; -use rustc_span::source_map::Span; +use rustc_span::Span; use std::env; fn docs_link(diag: &mut Diagnostic, lint: &'static Lint) { diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs index 836f8cc1916..fe274b9c50b 100644 --- a/clippy_utils/src/sugg.rs +++ b/clippy_utils/src/sugg.rs @@ -16,7 +16,7 @@ use rustc_lint::{EarlyContext, LateContext, LintContext}; use rustc_middle::hir::place::ProjectionKind; use rustc_middle::mir::{FakeReadCause, Mutability}; use rustc_middle::ty; -use rustc_span::source_map::{BytePos, CharPos, Pos, Span, SyntaxContext}; +use rustc_span::{BytePos, CharPos, Pos, Span, SyntaxContext}; use std::borrow::Cow; use std::fmt::{self, Display, Write as _}; use std::ops::{Add, Neg, Not, Sub}; |
