Open
Description
Code
#![allow(unused)]
struct Type<T>(T);
trait PubTrait {}
mod a {
trait PrivTrait {}
impl<T: PrivTrait> super::PubTrait for super::Type<T> {}
}
Current output
None
Desired output
private_bounds warning
Rationale and extra context
The T: PrivTrait
bound is more private than both PubTrait
and Type
, so that should give a warning.
Other cases
Rust Version
rustc 1.88.0-nightly (1799887bb 2025-03-29)
binary: rustc
commit-hash: 1799887bb281d1ab49287750f1950b8c738c6b77
commit-date: 2025-03-29
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.1
Anything else?
No response