Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov · rust-lang/rust@1accf06 (original) (raw)
`@@ -982,44 +982,6 @@ declare_lint! {
`
982
982
`"detects trivial casts of numeric types which could be removed"
`
983
983
`}
`
984
984
``
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
``
-
1023
985
`declare_lint! {
`
1024
986
`` /// The invalid_alignment
lint detects dereferences of misaligned pointers during
``
1025
987
`/// constant evaluation.
`
`@@ -3415,7 +3377,6 @@ declare_lint_pass! {
`
3415
3377
`PATTERNS_IN_FNS_WITHOUT_BODY,
`
3416
3378
`POINTER_STRUCTURAL_MATCH,
`
3417
3379
`PRIVATE_BOUNDS,
`
3418
``
`-
PRIVATE_IN_PUBLIC,
`
3419
3380
`PRIVATE_INTERFACES,
`
3420
3381
`PROC_MACRO_BACK_COMPAT,
`
3421
3382
`PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
`
`@@ -4334,9 +4295,7 @@ declare_lint! {
`
4334
4295
`/// ### Example
`
4335
4296
`///
`
4336
4297
```` /// ```rust,compile_fail
`4337`
``
`-
/// # #![feature(type_privacy_lints)]
`
`4338`
`4298`
`/// # #![allow(unused)]
`
`4339`
``
`-
/// # #![allow(private_in_public)]
`
`4340`
`4299`
`/// #![deny(private_interfaces)]
`
`4341`
`4300`
`/// struct SemiPriv;
`
`4342`
`4301`
`///
`
`@@ -4357,9 +4316,8 @@ declare_lint! {
`
`4357`
`4316`
`/// Having something private in primary interface guarantees that
`
`4358`
`4317`
`/// the item will be unusable from outer modules due to type privacy.
`
`4359`
`4318`
`pub PRIVATE_INTERFACES,
`
`4360`
``
`-
Allow,
`
``
`4319`
`+
Warn,
`
`4361`
`4320`
`"private type in primary interface of an item",
`
`4362`
``
`-
@feature_gate = sym::type_privacy_lints;
`
`4363`
`4321`
`}
`
`4364`
`4322`
``
`4365`
`4323`
`declare_lint! {
`
`@@ -4370,8 +4328,6 @@ declare_lint! {
`
`4370`
`4328`
`/// ### Example
`
`4371`
`4329`
`///
`
`4372`
`4330`
```` /// ```rust,compile_fail
4373
``
`-
/// # #![feature(type_privacy_lints)]
`
4374
``
`-
/// # #![allow(private_in_public)]
`
4375
4331
`/// # #![allow(unused)]
`
4376
4332
`/// #![deny(private_bounds)]
`
4377
4333
`///
`
`@@ -4389,9 +4345,8 @@ declare_lint! {
`
4389
4345
`/// Having private types or traits in item bounds makes it less clear what interface
`
4390
4346
`/// the item actually provides.
`
4391
4347
`pub PRIVATE_BOUNDS,
`
4392
``
`-
Allow,
`
``
4348
`+
Warn,
`
4393
4349
`"private type in secondary interface of an item",
`
4394
``
`-
@feature_gate = sym::type_privacy_lints;
`
4395
4350
`}
`
4396
4351
``
4397
4352
`declare_lint! {
`