@@ -11,7 +11,7 @@ use crate::ty::Ty;
1111#[ derive( Diagnostic ) ]
1212#[ diag( middle_drop_check_overflow, code = E0320 ) ]
1313#[ note]
14- pub struct DropCheckOverflow < ' tcx > {
14+ pub ( crate ) struct DropCheckOverflow < ' tcx > {
1515 #[ primary_span]
1616 pub span : Span ,
1717 pub ty : Ty < ' tcx > ,
@@ -20,14 +20,14 @@ pub struct DropCheckOverflow<'tcx> {
2020
2121#[ derive( Diagnostic ) ]
2222#[ diag( middle_failed_writing_file) ]
23- pub struct FailedWritingFile < ' a > {
23+ pub ( crate ) struct FailedWritingFile < ' a > {
2424 pub path : & ' a Path ,
2525 pub error : io:: Error ,
2626}
2727
2828#[ derive( Diagnostic ) ]
2929#[ diag( middle_opaque_hidden_type_mismatch) ]
30- pub struct OpaqueHiddenTypeMismatch < ' tcx > {
30+ pub ( crate ) struct OpaqueHiddenTypeMismatch < ' tcx > {
3131 pub self_ty : Ty < ' tcx > ,
3232 pub other_ty : Ty < ' tcx > ,
3333 #[ primary_span]
@@ -37,12 +37,14 @@ pub struct OpaqueHiddenTypeMismatch<'tcx> {
3737 pub sub : TypeMismatchReason ,
3838}
3939
40+ // FIXME(autodiff): I should get used somewhere
4041#[ derive( Diagnostic ) ]
4142#[ diag( middle_unsupported_union) ]
4243pub struct UnsupportedUnion {
4344 pub ty_name : String ,
4445}
4546
47+ // FIXME(autodiff): I should get used somewhere
4648#[ derive( Diagnostic ) ]
4749#[ diag( middle_autodiff_unsafe_inner_const_ref) ]
4850pub struct AutodiffUnsafeInnerConstRef {
@@ -67,7 +69,7 @@ pub enum TypeMismatchReason {
6769
6870#[ derive( Diagnostic ) ]
6971#[ diag( middle_limit_invalid) ]
70- pub struct LimitInvalid < ' a > {
72+ pub ( crate ) struct LimitInvalid < ' a > {
7173 #[ primary_span]
7274 pub span : Span ,
7375 #[ label]
@@ -78,14 +80,14 @@ pub struct LimitInvalid<'a> {
7880#[ derive( Diagnostic ) ]
7981#[ diag( middle_recursion_limit_reached) ]
8082#[ help]
81- pub struct RecursionLimitReached < ' tcx > {
83+ pub ( crate ) struct RecursionLimitReached < ' tcx > {
8284 pub ty : Ty < ' tcx > ,
8385 pub suggested_limit : rustc_session:: Limit ,
8486}
8587
8688#[ derive( Diagnostic ) ]
8789#[ diag( middle_const_eval_non_int) ]
88- pub struct ConstEvalNonIntError {
90+ pub ( crate ) struct ConstEvalNonIntError {
8991 #[ primary_span]
9092 pub span : Span ,
9193}
@@ -159,27 +161,17 @@ pub enum LayoutError<'tcx> {
159161 ReferencesError ,
160162}
161163
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-
169164#[ derive( Diagnostic ) ]
170165#[ diag( middle_erroneous_constant) ]
171- pub struct ErroneousConstant {
166+ pub ( crate ) struct ErroneousConstant {
172167 #[ primary_span]
173168 pub span : Span ,
174169}
175170
176- /// Used by `rustc_const_eval`
177- pub use crate :: fluent_generated:: middle_adjust_for_foreign_abi_error;
178-
179171#[ derive( Diagnostic ) ]
180172#[ diag( middle_type_length_limit) ]
181173#[ help( middle_consider_type_length_limit) ]
182- pub struct TypeLengthLimit {
174+ pub ( crate ) struct TypeLengthLimit {
183175 #[ primary_span]
184176 pub span : Span ,
185177 pub shrunk : String ,
0 commit comments