@@ -982,44 +982,6 @@ declare_lint! {
982982 "detects trivial casts of numeric types which could be removed"
983983}
984984
985- declare_lint ! {
986- /// The `private_in_public` lint detects private items in public
987- /// interfaces not caught by the old implementation.
988- ///
989- /// ### Example
990- ///
991- /// ```rust
992- /// # #![allow(unused)]
993- /// struct SemiPriv;
994- ///
995- /// mod m1 {
996- /// struct Priv;
997- /// impl super::SemiPriv {
998- /// pub fn f(_: Priv) {}
999- /// }
1000- /// }
1001- /// # fn main() {}
1002- /// ```
1003- ///
1004- /// {{produces}}
1005- ///
1006- /// ### Explanation
1007- ///
1008- /// The visibility rules are intended to prevent exposing private items in
1009- /// public interfaces. This is a [future-incompatible] lint to transition
1010- /// this to a hard error in the future. See [issue #34537] for more
1011- /// details.
1012- ///
1013- /// [issue #34537]: https://github.com/rust-lang/rust/issues/34537
1014- /// [future-incompatible]: ../index.md#future-incompatible-lints
1015- pub PRIVATE_IN_PUBLIC ,
1016- Warn ,
1017- "detect private items in public interfaces not caught by the old implementation" ,
1018- @future_incompatible = FutureIncompatibleInfo {
1019- reference: "issue #34537 <https://github.com/rust-lang/rust/issues/34537>" ,
1020- } ;
1021- }
1022-
1023985declare_lint ! {
1024986 /// The `invalid_alignment` lint detects dereferences of misaligned pointers during
1025987 /// constant evaluation.
@@ -3374,7 +3336,6 @@ declare_lint_pass! {
33743336 PATTERNS_IN_FNS_WITHOUT_BODY ,
33753337 POINTER_STRUCTURAL_MATCH ,
33763338 PRIVATE_BOUNDS ,
3377- PRIVATE_IN_PUBLIC ,
33783339 PRIVATE_INTERFACES ,
33793340 PROC_MACRO_BACK_COMPAT ,
33803341 PROC_MACRO_DERIVE_RESOLUTION_FALLBACK ,
@@ -4293,9 +4254,7 @@ declare_lint! {
42934254 /// ### Example
42944255 ///
42954256 /// ```rust,compile_fail
4296- /// # #![feature(type_privacy_lints)]
42974257 /// # #![allow(unused)]
4298- /// # #![allow(private_in_public)]
42994258 /// #![deny(private_interfaces)]
43004259 /// struct SemiPriv;
43014260 ///
@@ -4316,9 +4275,8 @@ declare_lint! {
43164275 /// Having something private in primary interface guarantees that
43174276 /// the item will be unusable from outer modules due to type privacy.
43184277 pub PRIVATE_INTERFACES ,
4319- Allow ,
4278+ Warn ,
43204279 "private type in primary interface of an item" ,
4321- @feature_gate = sym:: type_privacy_lints;
43224280}
43234281
43244282declare_lint ! {
@@ -4329,8 +4287,6 @@ declare_lint! {
43294287 /// ### Example
43304288 ///
43314289 /// ```rust,compile_fail
4332- /// # #![feature(type_privacy_lints)]
4333- /// # #![allow(private_in_public)]
43344290 /// # #![allow(unused)]
43354291 /// #![deny(private_bounds)]
43364292 ///
@@ -4348,9 +4304,8 @@ declare_lint! {
43484304 /// Having private types or traits in item bounds makes it less clear what interface
43494305 /// the item actually provides.
43504306 pub PRIVATE_BOUNDS ,
4351- Allow ,
4307+ Warn ,
43524308 "private type in secondary interface of an item" ,
4353- @feature_gate = sym:: type_privacy_lints;
43544309}
43554310
43564311declare_lint ! {
0 commit comments