Add warn(unreachable_pub) to several crates.

It requires no additonal changes to these crates, but will prevent
unnecessary `pub`s in the future.
This commit is contained in:
Nicholas Nethercote 2024-06-11 10:27:44 +10:00
parent 13a52890dd
commit 194489473d
3 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#![cfg_attr(feature = "nightly", doc(rust_logo))] #![cfg_attr(feature = "nightly", doc(rust_logo))]
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))] #![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
#![cfg_attr(feature = "nightly", feature(step_trait))] #![cfg_attr(feature = "nightly", feature(step_trait))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end // tidy-alphabetical-end
use std::fmt; use std::fmt;

View File

@ -19,6 +19,7 @@
#![feature(never_type)] #![feature(never_type)]
#![feature(rustdoc_internals)] #![feature(rustdoc_internals)]
#![feature(stmt_expr_attributes)] #![feature(stmt_expr_attributes)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end // tidy-alphabetical-end
pub mod util { pub mod util {

View File

@ -2,6 +2,7 @@
#![cfg_attr(feature = "nightly", allow(internal_features))] #![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", feature(never_type))] #![cfg_attr(feature = "nightly", feature(never_type))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))] #![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end // tidy-alphabetical-end
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]