@@ -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.
@@ -3415,7 +3377,6 @@ declare_lint_pass! {
34153377 PATTERNS_IN_FNS_WITHOUT_BODY ,
34163378 POINTER_STRUCTURAL_MATCH ,
34173379 PRIVATE_BOUNDS ,
3418- PRIVATE_IN_PUBLIC ,
34193380 PRIVATE_INTERFACES ,
34203381 PROC_MACRO_BACK_COMPAT ,
34213382 PROC_MACRO_DERIVE_RESOLUTION_FALLBACK ,
@@ -4334,9 +4295,7 @@ declare_lint! {
43344295 /// ### Example
43354296 ///
43364297 /// ```rust,compile_fail
4337- /// # #![feature(type_privacy_lints)]
43384298 /// # #![allow(unused)]
4339- /// # #![allow(private_in_public)]
43404299 /// #![deny(private_interfaces)]
43414300 /// struct SemiPriv;
43424301 ///
@@ -4357,9 +4316,8 @@ declare_lint! {
43574316 /// Having something private in primary interface guarantees that
43584317 /// the item will be unusable from outer modules due to type privacy.
43594318 pub PRIVATE_INTERFACES ,
4360- Allow ,
4319+ Warn ,
43614320 "private type in primary interface of an item" ,
4362- @feature_gate = sym:: type_privacy_lints;
43634321}
43644322
43654323declare_lint ! {
@@ -4370,8 +4328,6 @@ declare_lint! {
43704328 /// ### Example
43714329 ///
43724330 /// ```rust,compile_fail
4373- /// # #![feature(type_privacy_lints)]
4374- /// # #![allow(private_in_public)]
43754331 /// # #![allow(unused)]
43764332 /// #![deny(private_bounds)]
43774333 ///
@@ -4389,9 +4345,8 @@ declare_lint! {
43894345 /// Having private types or traits in item bounds makes it less clear what interface
43904346 /// the item actually provides.
43914347 pub PRIVATE_BOUNDS ,
4392- Allow ,
4348+ Warn ,
43934349 "private type in secondary interface of an item" ,
4394- @feature_gate = sym:: type_privacy_lints;
43954350}
43964351
43974352declare_lint ! {
0 commit comments