diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-28 01:16:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 01:16:40 +0200 |
| commit | d33c8f933696ab1fcdbca369d4c18f436a7faf4c (patch) | |
| tree | b12b80578c1851d4cb53c64aed721e1f00f7fd25 /compiler/rustc_middle/src | |
| parent | ea7e53938674f44e906cb18017c36ddc8a2bb89b (diff) | |
| parent | 296586fb026539916a39b79af9a2c3440ce93976 (diff) | |
| download | rust-d33c8f933696ab1fcdbca369d4c18f436a7faf4c.tar.gz rust-d33c8f933696ab1fcdbca369d4c18f436a7faf4c.zip | |
Rollup merge of #144535 - RalfJung:abi-mismatch-err, r=compiler-errors
miri: for ABI mismatch errors, say which argument is the problem
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/error.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 2b0cfb86564..3e895c6b280 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -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> }, } |
