Skip to content

Commit 6614165

Browse files
committed
Add warn(unreachable_pub) to rustc_attr.
1 parent f2fc87d commit 6614165

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

compiler/rustc_attr/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#![doc(rust_logo)]
1010
#![feature(let_chains)]
1111
#![feature(rustdoc_internals)]
12+
#![warn(unreachable_pub)]
1213
// tidy-alphabetical-end
1314

1415
mod builtin;

compiler/rustc_attr/src/session_diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub(crate) enum InvalidIssueStringCause {
127127
}
128128

129129
impl InvalidIssueStringCause {
130-
pub fn from_int_error_kind(span: Span, kind: &IntErrorKind) -> Option<Self> {
130+
pub(crate) fn from_int_error_kind(span: Span, kind: &IntErrorKind) -> Option<Self> {
131131
match kind {
132132
IntErrorKind::Empty => Some(Self::Empty { span }),
133133
IntErrorKind::InvalidDigit => Some(Self::InvalidDigit { span }),
@@ -303,7 +303,7 @@ pub(crate) enum IncorrectReprFormatGenericCause<'a> {
303303
}
304304

305305
impl<'a> IncorrectReprFormatGenericCause<'a> {
306-
pub fn from_lit_kind(span: Span, kind: &ast::LitKind, name: &'a str) -> Option<Self> {
306+
pub(crate) fn from_lit_kind(span: Span, kind: &ast::LitKind, name: &'a str) -> Option<Self> {
307307
match kind {
308308
ast::LitKind::Int(int, ast::LitIntType::Unsuffixed) => {
309309
Some(Self::Int { span, name, int: int.get() })

0 commit comments

Comments
 (0)