@@ -11,7 +11,7 @@ use crate::ty::Ty;
11
11
#[ derive( Diagnostic ) ]
12
12
#[ diag( middle_drop_check_overflow, code = E0320 ) ]
13
13
#[ note]
14
- pub struct DropCheckOverflow < ' tcx > {
14
+ pub ( crate ) struct DropCheckOverflow < ' tcx > {
15
15
#[ primary_span]
16
16
pub span : Span ,
17
17
pub ty : Ty < ' tcx > ,
@@ -20,14 +20,14 @@ pub struct DropCheckOverflow<'tcx> {
20
20
21
21
#[ derive( Diagnostic ) ]
22
22
#[ diag( middle_failed_writing_file) ]
23
- pub struct FailedWritingFile < ' a > {
23
+ pub ( crate ) struct FailedWritingFile < ' a > {
24
24
pub path : & ' a Path ,
25
25
pub error : io:: Error ,
26
26
}
27
27
28
28
#[ derive( Diagnostic ) ]
29
29
#[ diag( middle_opaque_hidden_type_mismatch) ]
30
- pub struct OpaqueHiddenTypeMismatch < ' tcx > {
30
+ pub ( crate ) struct OpaqueHiddenTypeMismatch < ' tcx > {
31
31
pub self_ty : Ty < ' tcx > ,
32
32
pub other_ty : Ty < ' tcx > ,
33
33
#[ primary_span]
@@ -37,20 +37,6 @@ pub struct OpaqueHiddenTypeMismatch<'tcx> {
37
37
pub sub : TypeMismatchReason ,
38
38
}
39
39
40
- #[ derive( Diagnostic ) ]
41
- #[ diag( middle_unsupported_union) ]
42
- pub struct UnsupportedUnion {
43
- pub ty_name : String ,
44
- }
45
-
46
- #[ derive( Diagnostic ) ]
47
- #[ diag( middle_autodiff_unsafe_inner_const_ref) ]
48
- pub struct AutodiffUnsafeInnerConstRef {
49
- #[ primary_span]
50
- pub span : Span ,
51
- pub ty : String ,
52
- }
53
-
54
40
#[ derive( Subdiagnostic ) ]
55
41
pub enum TypeMismatchReason {
56
42
#[ label( middle_conflict_types) ]
@@ -67,7 +53,7 @@ pub enum TypeMismatchReason {
67
53
68
54
#[ derive( Diagnostic ) ]
69
55
#[ diag( middle_limit_invalid) ]
70
- pub struct LimitInvalid < ' a > {
56
+ pub ( crate ) struct LimitInvalid < ' a > {
71
57
#[ primary_span]
72
58
pub span : Span ,
73
59
#[ label]
@@ -78,14 +64,14 @@ pub struct LimitInvalid<'a> {
78
64
#[ derive( Diagnostic ) ]
79
65
#[ diag( middle_recursion_limit_reached) ]
80
66
#[ help]
81
- pub struct RecursionLimitReached < ' tcx > {
67
+ pub ( crate ) struct RecursionLimitReached < ' tcx > {
82
68
pub ty : Ty < ' tcx > ,
83
69
pub suggested_limit : rustc_session:: Limit ,
84
70
}
85
71
86
72
#[ derive( Diagnostic ) ]
87
73
#[ diag( middle_const_eval_non_int) ]
88
- pub struct ConstEvalNonIntError {
74
+ pub ( crate ) struct ConstEvalNonIntError {
89
75
#[ primary_span]
90
76
pub span : Span ,
91
77
}
@@ -159,27 +145,17 @@ pub enum LayoutError<'tcx> {
159
145
ReferencesError ,
160
146
}
161
147
162
- #[ derive( Diagnostic ) ]
163
- #[ diag( middle_adjust_for_foreign_abi_error) ]
164
- pub struct UnsupportedFnAbi {
165
- pub arch : Symbol ,
166
- pub abi : & ' static str ,
167
- }
168
-
169
148
#[ derive( Diagnostic ) ]
170
149
#[ diag( middle_erroneous_constant) ]
171
- pub struct ErroneousConstant {
150
+ pub ( crate ) struct ErroneousConstant {
172
151
#[ primary_span]
173
152
pub span : Span ,
174
153
}
175
154
176
- /// Used by `rustc_const_eval`
177
- pub use crate :: fluent_generated:: middle_adjust_for_foreign_abi_error;
178
-
179
155
#[ derive( Diagnostic ) ]
180
156
#[ diag( middle_type_length_limit) ]
181
157
#[ help( middle_consider_type_length_limit) ]
182
- pub struct TypeLengthLimit {
158
+ pub ( crate ) struct TypeLengthLimit {
183
159
#[ primary_span]
184
160
pub span : Span ,
185
161
pub shrunk : String ,
0 commit comments