Static rustc_lint_defs::builtin::PRIVATE_IN_PUBLIC
source · [−]pub static PRIVATE_IN_PUBLIC: &'static Lint
Expand description
The private_in_public
lint detects private items in public
interfaces not caught by the old implementation.
Example
struct SemiPriv;
mod m1 {
struct Priv;
impl super::SemiPriv {
pub fn f(_: Priv) {}
}
}
{{produces}}
Explanation
The visibility rules are intended to prevent exposing private items in public interfaces. This is a future-incompatible lint to transition this to a hard error in the future. See issue #34537 for more details.