Add warn(unreachable_pub) to rustc_attr.

This commit is contained in:
Nicholas Nethercote 2024-07-06 21:31:11 +10:00
parent f2fc87db44
commit 6614165eac
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#![doc(rust_logo)]
#![feature(let_chains)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end
mod builtin;

View File

@ -127,7 +127,7 @@ pub(crate) enum InvalidIssueStringCause {
}
impl InvalidIssueStringCause {
pub fn from_int_error_kind(span: Span, kind: &IntErrorKind) -> Option<Self> {
pub(crate) fn from_int_error_kind(span: Span, kind: &IntErrorKind) -> Option<Self> {
match kind {
IntErrorKind::Empty => Some(Self::Empty { span }),
IntErrorKind::InvalidDigit => Some(Self::InvalidDigit { span }),
@ -303,7 +303,7 @@ pub(crate) enum IncorrectReprFormatGenericCause<'a> {
}
impl<'a> IncorrectReprFormatGenericCause<'a> {
pub fn from_lit_kind(span: Span, kind: &ast::LitKind, name: &'a str) -> Option<Self> {
pub(crate) fn from_lit_kind(span: Span, kind: &ast::LitKind, name: &'a str) -> Option<Self> {
match kind {
ast::LitKind::Int(int, ast::LitIntType::Unsuffixed) => {
Some(Self::Int { span, name, int: int.get() })