@@ -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,12 +37,14 @@ pub struct OpaqueHiddenTypeMismatch<'tcx> {
37
37
pub sub : TypeMismatchReason ,
38
38
}
39
39
40
+ // FIXME(autodiff): I should get used somewhere
40
41
#[ derive( Diagnostic ) ]
41
42
#[ diag( middle_unsupported_union) ]
42
43
pub struct UnsupportedUnion {
43
44
pub ty_name : String ,
44
45
}
45
46
47
+ // FIXME(autodiff): I should get used somewhere
46
48
#[ derive( Diagnostic ) ]
47
49
#[ diag( middle_autodiff_unsafe_inner_const_ref) ]
48
50
pub struct AutodiffUnsafeInnerConstRef {
@@ -67,7 +69,7 @@ pub enum TypeMismatchReason {
67
69
68
70
#[ derive( Diagnostic ) ]
69
71
#[ diag( middle_limit_invalid) ]
70
- pub struct LimitInvalid < ' a > {
72
+ pub ( crate ) struct LimitInvalid < ' a > {
71
73
#[ primary_span]
72
74
pub span : Span ,
73
75
#[ label]
@@ -78,14 +80,14 @@ pub struct LimitInvalid<'a> {
78
80
#[ derive( Diagnostic ) ]
79
81
#[ diag( middle_recursion_limit_reached) ]
80
82
#[ help]
81
- pub struct RecursionLimitReached < ' tcx > {
83
+ pub ( crate ) struct RecursionLimitReached < ' tcx > {
82
84
pub ty : Ty < ' tcx > ,
83
85
pub suggested_limit : rustc_session:: Limit ,
84
86
}
85
87
86
88
#[ derive( Diagnostic ) ]
87
89
#[ diag( middle_const_eval_non_int) ]
88
- pub struct ConstEvalNonIntError {
90
+ pub ( crate ) struct ConstEvalNonIntError {
89
91
#[ primary_span]
90
92
pub span : Span ,
91
93
}
@@ -159,27 +161,17 @@ pub enum LayoutError<'tcx> {
159
161
ReferencesError ,
160
162
}
161
163
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
164
#[ derive( Diagnostic ) ]
170
165
#[ diag( middle_erroneous_constant) ]
171
- pub struct ErroneousConstant {
166
+ pub ( crate ) struct ErroneousConstant {
172
167
#[ primary_span]
173
168
pub span : Span ,
174
169
}
175
170
176
- /// Used by `rustc_const_eval`
177
- pub use crate :: fluent_generated:: middle_adjust_for_foreign_abi_error;
178
-
179
171
#[ derive( Diagnostic ) ]
180
172
#[ diag( middle_type_length_limit) ]
181
173
#[ help( middle_consider_type_length_limit) ]
182
- pub struct TypeLengthLimit {
174
+ pub ( crate ) struct TypeLengthLimit {
183
175
#[ primary_span]
184
176
pub span : Span ,
185
177
pub shrunk : String ,
0 commit comments