pub static PRIVATE_IN_PUBLIC: &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.