Closed
Description
I tried this code:
#![deny(unreachable_pub)]
mod foo {
pub enum FooError {}
pub type FooResult<T> = Result<T, FooError>;
}
pub use foo::FooResult;
I expected an unreachable_pub
lint because FooError
is unreachable. Instead, there is no diagnostic output.
The FooError
type is in principle nameable via defining a suitable trait and associated type, but this is probably not the intent of the unreachable_pub
lint; the author probably wants to be told to reexport FooError
.
Meta
rustc --version --verbose
:
rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: x86_64-apple-darwin
release: 1.73.0
LLVM version: 17.0.2
rustc 1.75.0-nightly (2bbb61989 2023-10-04)
binary: rustc
commit-hash: 2bbb6198933abf193c0ef1d18d9d70f99eed59ba
commit-date: 2023-10-04
host: x86_64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.2
@rustbot label +A-lint +A-visibility