Closed
Description
I define #![deny(rust_2018_idioms)]
which implies #![deny(unreachable_pub)]
and I got linter complaining about the pub use
inside private module while I reexport the symbol at crate level.
Here is a small example of what I'm talking about
Looks ok. Let's do what linter suggests - change pub
to pub(crate)
and...
Get compilation error with 'Bar
is private'
What is the correct way to export Bar
in example? My guess is that second variant is correct, hence linter is correct as well, and the bug is in visibility system somewhere in rustc
. But I'm not an expert here.