Skip to content

Commit f8c7946

Browse files
committed
Add warn(unreachable_pub) to rustc_span.
1 parent e203011 commit f8c7946

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

compiler/rustc_span/src/analyze_source_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod tests;
88
///
99
/// This function will use an SSE2 enhanced implementation if hardware support
1010
/// is detected at runtime.
11-
pub fn analyze_source_file(src: &str) -> (Vec<RelativeBytePos>, Vec<MultiByteChar>) {
11+
pub(crate) fn analyze_source_file(src: &str) -> (Vec<RelativeBytePos>, Vec<MultiByteChar>) {
1212
let mut lines = vec![RelativeBytePos::from_u32(0)];
1313
let mut multi_byte_chars = vec![];
1414

compiler/rustc_span/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#![feature(round_char_boundary)]
3131
#![feature(rustc_attrs)]
3232
#![feature(rustdoc_internals)]
33+
#![warn(unreachable_pub)]
3334
// tidy-alphabetical-end
3435

3536
// The code produced by the `Encodable`/`Decodable` derive macros refer to

compiler/rustc_span/src/span_encoding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ impl Span {
424424
}
425425

426426
#[derive(Default)]
427-
pub struct SpanInterner {
427+
pub(crate) struct SpanInterner {
428428
spans: FxIndexSet<SpanData>,
429429
}
430430

0 commit comments

Comments
 (0)