-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
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.
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`