Rollup merge of #144535 - RalfJung:abi-mismatch-err, r=compiler-errors

miri: for ABI mismatch errors, say which argument is the problem
This commit is contained in:
Matthias Krüger
2025-07-28 01:16:40 +02:00
committed by GitHub
25 changed files with 45 additions and 35 deletions

View File

@@ -426,7 +426,12 @@ pub enum UndefinedBehaviorInfo<'tcx> {
/// Trying to set discriminant to the niched variant, but the value does not match.
InvalidNichedEnumVariantWritten { enum_ty: Ty<'tcx> },
/// ABI-incompatible argument types.
AbiMismatchArgument { caller_ty: Ty<'tcx>, callee_ty: Ty<'tcx> },
AbiMismatchArgument {
/// The index of the argument whose type is wrong.
arg_idx: usize,
caller_ty: Ty<'tcx>,
callee_ty: Ty<'tcx>,
},
/// ABI-incompatible return types.
AbiMismatchReturn { caller_ty: Ty<'tcx>, callee_ty: Ty<'tcx> },
}