@@ -5,7 +5,7 @@ use rustc_span::{Span, Symbol};
5
5
6
6
#[ derive( Diagnostic ) ]
7
7
#[ diag( privacy_field_is_private, code = E0451 ) ]
8
- pub struct FieldIsPrivate {
8
+ pub ( crate ) struct FieldIsPrivate {
9
9
#[ primary_span]
10
10
pub span : Span ,
11
11
pub field_name : Symbol ,
@@ -16,7 +16,7 @@ pub struct FieldIsPrivate {
16
16
}
17
17
18
18
#[ derive( Subdiagnostic ) ]
19
- pub enum FieldIsPrivateLabel {
19
+ pub ( crate ) enum FieldIsPrivateLabel {
20
20
#[ label( privacy_field_is_private_is_update_syntax_label) ]
21
21
IsUpdateSyntax {
22
22
#[ primary_span]
@@ -32,7 +32,7 @@ pub enum FieldIsPrivateLabel {
32
32
33
33
#[ derive( Diagnostic ) ]
34
34
#[ diag( privacy_item_is_private) ]
35
- pub struct ItemIsPrivate < ' a > {
35
+ pub ( crate ) struct ItemIsPrivate < ' a > {
36
36
#[ primary_span]
37
37
#[ label]
38
38
pub span : Span ,
@@ -42,15 +42,15 @@ pub struct ItemIsPrivate<'a> {
42
42
43
43
#[ derive( Diagnostic ) ]
44
44
#[ diag( privacy_unnamed_item_is_private) ]
45
- pub struct UnnamedItemIsPrivate {
45
+ pub ( crate ) struct UnnamedItemIsPrivate {
46
46
#[ primary_span]
47
47
pub span : Span ,
48
48
pub kind : & ' static str ,
49
49
}
50
50
51
51
#[ derive( Diagnostic ) ]
52
52
#[ diag( privacy_in_public_interface, code = E0446 ) ]
53
- pub struct InPublicInterface < ' a > {
53
+ pub ( crate ) struct InPublicInterface < ' a > {
54
54
#[ primary_span]
55
55
#[ label]
56
56
pub span : Span ,
@@ -63,23 +63,23 @@ pub struct InPublicInterface<'a> {
63
63
64
64
#[ derive( Diagnostic ) ]
65
65
#[ diag( privacy_report_effective_visibility) ]
66
- pub struct ReportEffectiveVisibility {
66
+ pub ( crate ) struct ReportEffectiveVisibility {
67
67
#[ primary_span]
68
68
pub span : Span ,
69
69
pub descr : String ,
70
70
}
71
71
72
72
#[ derive( LintDiagnostic ) ]
73
73
#[ diag( privacy_from_private_dep_in_public_interface) ]
74
- pub struct FromPrivateDependencyInPublicInterface < ' a > {
74
+ pub ( crate ) struct FromPrivateDependencyInPublicInterface < ' a > {
75
75
pub kind : & ' a str ,
76
76
pub descr : DiagArgFromDisplay < ' a > ,
77
77
pub krate : Symbol ,
78
78
}
79
79
80
80
#[ derive( LintDiagnostic ) ]
81
81
#[ diag( privacy_unnameable_types_lint) ]
82
- pub struct UnnameableTypesLint < ' a > {
82
+ pub ( crate ) struct UnnameableTypesLint < ' a > {
83
83
#[ label]
84
84
pub span : Span ,
85
85
pub kind : & ' a str ,
@@ -93,7 +93,7 @@ pub struct UnnameableTypesLint<'a> {
93
93
// See https://rust-lang.github.io/rfcs/2145-type-privacy.html for more details.
94
94
#[ derive( LintDiagnostic ) ]
95
95
#[ diag( privacy_private_interface_or_bounds_lint) ]
96
- pub struct PrivateInterfacesOrBoundsLint < ' a > {
96
+ pub ( crate ) struct PrivateInterfacesOrBoundsLint < ' a > {
97
97
#[ label( privacy_item_label) ]
98
98
pub item_span : Span ,
99
99
pub item_kind : & ' a str ,
0 commit comments