Open
Description
I tried this code:
pub use self::stuff::Trait1;
mod stuff {
pub trait Trait1 {
type Thing: Trait2;
}
// This triggers it:
// pub(crate) trait Trait2 {}
// This doesn't:
pub trait Trait2 {}
}
Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=3c1b275b4ccc88b9111b9780ee330916
I expected to see this happen: the private_bounds
lint triggers
Instead, this happened: the lint does not trigger - to make it trigger I must mark the second trait pub(crate)
Meta
rustc --version --verbose
:
rustc 1.87.0-nightly (f04bbc60f 2025-02-20)
binary: rustc
commit-hash: f04bbc60f8c353ee5ba0677bc583ac4a88b2c180
commit-date: 2025-02-20
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0
<backtrace>