better name for AdjustForForeignAbiError error variant in InterpError
This commit is contained in:
parent
a97f41fd69
commit
56b7d5fc49
2 changed files with 8 additions and 5 deletions
|
@ -347,7 +347,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> FnAbiOfHelpers<'tcx> for InterpCx
|
||||||
) -> InterpErrorInfo<'tcx> {
|
) -> InterpErrorInfo<'tcx> {
|
||||||
match err {
|
match err {
|
||||||
FnAbiError::Layout(err) => err_inval!(Layout(err)).into(),
|
FnAbiError::Layout(err) => err_inval!(Layout(err)).into(),
|
||||||
FnAbiError::AdjustForForeignAbi(err) => err_inval!(FnAbi(err)).into(),
|
FnAbiError::AdjustForForeignAbi(err) => {
|
||||||
|
err_inval!(FnAbiAdjustForForeignAbi(err)).into()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,9 +141,10 @@ pub enum InvalidProgramInfo<'tcx> {
|
||||||
AlreadyReported(ErrorReported),
|
AlreadyReported(ErrorReported),
|
||||||
/// An error occurred during layout computation.
|
/// An error occurred during layout computation.
|
||||||
Layout(layout::LayoutError<'tcx>),
|
Layout(layout::LayoutError<'tcx>),
|
||||||
/// An error occurred during FnAbi computation.
|
/// An error occurred during FnAbi computation: the passed --target lacks FFI support
|
||||||
/// (Not using `FnAbiError` as that contains a nested `LayoutError`.)
|
/// (which unfortunately typeck does not reject).
|
||||||
FnAbi(call::AdjustForForeignAbiError),
|
/// Not using `FnAbiError` as that contains a nested `LayoutError`.
|
||||||
|
FnAbiAdjustForForeignAbi(call::AdjustForForeignAbiError),
|
||||||
/// An invalid transmute happened.
|
/// An invalid transmute happened.
|
||||||
TransmuteSizeDiff(Ty<'tcx>, Ty<'tcx>),
|
TransmuteSizeDiff(Ty<'tcx>, Ty<'tcx>),
|
||||||
/// SizeOf of unsized type was requested.
|
/// SizeOf of unsized type was requested.
|
||||||
|
@ -160,7 +161,7 @@ impl fmt::Display for InvalidProgramInfo<'_> {
|
||||||
write!(f, "encountered constants with type errors, stopping evaluation")
|
write!(f, "encountered constants with type errors, stopping evaluation")
|
||||||
}
|
}
|
||||||
Layout(ref err) => write!(f, "{}", err),
|
Layout(ref err) => write!(f, "{}", err),
|
||||||
FnAbi(ref err) => write!(f, "{}", err),
|
FnAbiAdjustForForeignAbi(ref err) => write!(f, "{}", err),
|
||||||
TransmuteSizeDiff(from_ty, to_ty) => write!(
|
TransmuteSizeDiff(from_ty, to_ty) => write!(
|
||||||
f,
|
f,
|
||||||
"transmuting `{}` to `{}` is not possible, because these types do not have the same size",
|
"transmuting `{}` to `{}` is not possible, because these types do not have the same size",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue