Closed
Description
First reported upstream this code:
#![warn(unreachable_pub)]
pub use self::m::f;
mod m {
pub use self::imp::f; // Recommends pub(crate), but that causes an error above.
mod imp {
pub fn f() {}
}
}
warning: unreachable `pub` item
--> src/lib.rs:6:5
|
6 | pub use self::imp::f; // Recommends pub(crate), but that causes an error above.
| ---^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
note: lint level defined here
--> src/lib.rs:1:9
|
1 | #![warn(unreachable_pub)]
| ^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
Finished dev [unoptimized + debuginfo] target(s) in 0.57s
but the suggestions, when applied, doesn't compile!