Skip to content

Commit

Permalink
Add warn(unreachable_pub) to rustc_span.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Sep 2, 2024
1 parent b457ab3 commit b0f22ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_span/src/analyze_source_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mod tests;
///
/// This function will use an SSE2 enhanced implementation if hardware support
/// is detected at runtime.
pub fn analyze_source_file(src: &str) -> (Vec<RelativeBytePos>, Vec<MultiByteChar>) {
pub(crate) fn analyze_source_file(src: &str) -> (Vec<RelativeBytePos>, Vec<MultiByteChar>) {
let mut lines = vec![RelativeBytePos::from_u32(0)];
let mut multi_byte_chars = vec![];

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#![feature(round_char_boundary)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

// The code produced by the `Encodable`/`Decodable` derive macros refer to
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_span/src/span_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl Span {
}

#[derive(Default)]
pub struct SpanInterner {
pub(crate) struct SpanInterner {
spans: FxIndexSet<SpanData>,
}

Expand Down

0 comments on commit b0f22ff

Please sign in to comment.