@@ -5,7 +5,7 @@ use rustc_span::{Span, Symbol};
55
66#[ derive( Diagnostic ) ]
77#[ diag( privacy_field_is_private, code = E0451 ) ]
8- pub struct FieldIsPrivate {
8+ pub ( crate ) struct FieldIsPrivate {
99 #[ primary_span]
1010 pub span : Span ,
1111 pub field_name : Symbol ,
@@ -16,7 +16,7 @@ pub struct FieldIsPrivate {
1616}
1717
1818#[ derive( Subdiagnostic ) ]
19- pub enum FieldIsPrivateLabel {
19+ pub ( crate ) enum FieldIsPrivateLabel {
2020 #[ label( privacy_field_is_private_is_update_syntax_label) ]
2121 IsUpdateSyntax {
2222 #[ primary_span]
@@ -32,7 +32,7 @@ pub enum FieldIsPrivateLabel {
3232
3333#[ derive( Diagnostic ) ]
3434#[ diag( privacy_item_is_private) ]
35- pub struct ItemIsPrivate < ' a > {
35+ pub ( crate ) struct ItemIsPrivate < ' a > {
3636 #[ primary_span]
3737 #[ label]
3838 pub span : Span ,
@@ -42,15 +42,15 @@ pub struct ItemIsPrivate<'a> {
4242
4343#[ derive( Diagnostic ) ]
4444#[ diag( privacy_unnamed_item_is_private) ]
45- pub struct UnnamedItemIsPrivate {
45+ pub ( crate ) struct UnnamedItemIsPrivate {
4646 #[ primary_span]
4747 pub span : Span ,
4848 pub kind : & ' static str ,
4949}
5050
5151#[ derive( Diagnostic ) ]
5252#[ diag( privacy_in_public_interface, code = E0446 ) ]
53- pub struct InPublicInterface < ' a > {
53+ pub ( crate ) struct InPublicInterface < ' a > {
5454 #[ primary_span]
5555 #[ label]
5656 pub span : Span ,
@@ -63,23 +63,23 @@ pub struct InPublicInterface<'a> {
6363
6464#[ derive( Diagnostic ) ]
6565#[ diag( privacy_report_effective_visibility) ]
66- pub struct ReportEffectiveVisibility {
66+ pub ( crate ) struct ReportEffectiveVisibility {
6767 #[ primary_span]
6868 pub span : Span ,
6969 pub descr : String ,
7070}
7171
7272#[ derive( LintDiagnostic ) ]
7373#[ diag( privacy_from_private_dep_in_public_interface) ]
74- pub struct FromPrivateDependencyInPublicInterface < ' a > {
74+ pub ( crate ) struct FromPrivateDependencyInPublicInterface < ' a > {
7575 pub kind : & ' a str ,
7676 pub descr : DiagArgFromDisplay < ' a > ,
7777 pub krate : Symbol ,
7878}
7979
8080#[ derive( LintDiagnostic ) ]
8181#[ diag( privacy_unnameable_types_lint) ]
82- pub struct UnnameableTypesLint < ' a > {
82+ pub ( crate ) struct UnnameableTypesLint < ' a > {
8383 #[ label]
8484 pub span : Span ,
8585 pub kind : & ' a str ,
@@ -93,7 +93,7 @@ pub struct UnnameableTypesLint<'a> {
9393// See https://rust-lang.github.io/rfcs/2145-type-privacy.html for more details.
9494#[ derive( LintDiagnostic ) ]
9595#[ diag( privacy_private_interface_or_bounds_lint) ]
96- pub struct PrivateInterfacesOrBoundsLint < ' a > {
96+ pub ( crate ) struct PrivateInterfacesOrBoundsLint < ' a > {
9797 #[ label( privacy_item_label) ]
9898 pub item_span : Span ,
9999 pub item_kind : & ' a str ,
0 commit comments