@@ -141,9 +141,10 @@ pub enum InvalidProgramInfo<'tcx> {
141
141
AlreadyReported ( ErrorReported ) ,
142
142
/// An error occurred during layout computation.
143
143
Layout ( layout:: LayoutError < ' tcx > ) ,
144
- /// An error occurred during FnAbi computation.
145
- /// (Not using `FnAbiError` as that contains a nested `LayoutError`.)
146
- FnAbi ( call:: AdjustForForeignAbiError ) ,
144
+ /// An error occurred during FnAbi computation: the passed --target lacks FFI support
145
+ /// (which unfortunately typeck does not reject).
146
+ /// Not using `FnAbiError` as that contains a nested `LayoutError`.
147
+ FnAbiAdjustForForeignAbi ( call:: AdjustForForeignAbiError ) ,
147
148
/// An invalid transmute happened.
148
149
TransmuteSizeDiff ( Ty < ' tcx > , Ty < ' tcx > ) ,
149
150
/// SizeOf of unsized type was requested.
@@ -160,7 +161,7 @@ impl fmt::Display for InvalidProgramInfo<'_> {
160
161
write ! ( f, "encountered constants with type errors, stopping evaluation" )
161
162
}
162
163
Layout ( ref err) => write ! ( f, "{}" , err) ,
163
- FnAbi ( ref err) => write ! ( f, "{}" , err) ,
164
+ FnAbiAdjustForForeignAbi ( ref err) => write ! ( f, "{}" , err) ,
164
165
TransmuteSizeDiff ( from_ty, to_ty) => write ! (
165
166
f,
166
167
"transmuting `{}` to `{}` is not possible, because these types do not have the same size" ,
0 commit comments