Skip to content

Commit 2e8e439

Browse files
committed
Deny unreachable_pub
1 parent 7fcbe0f commit 2e8e439

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version = "1.84.0"
1414

1515
[lints.rust]
1616
missing_docs = "warn"
17+
unreachable_pub = "warn"
1718
unsafe_op_in_unsafe_fn = "warn"
1819

1920
# rust_2018_idioms

src/raw/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub(crate) use self::inner::{do_alloc, Allocator, Global};
99
#[cfg(feature = "nightly")]
1010
mod inner {
1111
#[cfg(test)]
12-
pub use crate::alloc::alloc::AllocError;
12+
pub(crate) use crate::alloc::alloc::AllocError;
1313
use crate::alloc::alloc::Layout;
1414
pub(crate) use crate::alloc::alloc::{Allocator, Global};
1515
use core::ptr::NonNull;

src/raw/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl TableLayout {
242242
/// This is usually just a pointer to the element itself. However if the element
243243
/// is a ZST, then we instead track the index of the element in the table so
244244
/// that `erase` works properly.
245-
pub struct Bucket<T> {
245+
pub(crate) struct Bucket<T> {
246246
// Actually it is pointer to next element than element itself
247247
// this is needed to maintain pointer arithmetic invariants
248248
// keeping direct pointer to element introduces difficulty.

0 commit comments

Comments
 (0)