diff options
| author | Jubilee <workingjubilee@gmail.com> | 2025-06-24 19:45:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 19:45:31 -0700 |
| commit | 891dc0fb0972c93d0f9b88520ed19d65427d80c8 (patch) | |
| tree | b3bb23870b33b0656cc57937bb6386ec968d295d /tests/codegen | |
| parent | d46903b2b65ec6ec53cb4d0cbe185ac9e35c93b5 (diff) | |
| parent | 943d37958b377d4500345898cdb86d87da28d2e5 (diff) | |
| download | rust-891dc0fb0972c93d0f9b88520ed19d65427d80c8.tar.gz rust-891dc0fb0972c93d0f9b88520ed19d65427d80c8.zip | |
Rollup merge of #142633 - folkertdev:interrupt-abi-restrict-signature, r=workingjubilee
Error on invalid signatures for interrupt ABIs We recently added `extern "custom"`, which must have type `fn()`. The various `extern "interrupt"` ABIs impose similar constraints on the signature of functions with that ABI: `x86-interrupt` should not have a return type (linting on the exact argument types is left as future work), and the other interrupt ABIs cannot have any parameters or a return type. r? ```@workingjubilee```
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/abi-x86-interrupt.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/codegen/abi-x86-interrupt.rs b/tests/codegen/abi-x86-interrupt.rs index 255ccba2c11..9a1ded2c9e3 100644 --- a/tests/codegen/abi-x86-interrupt.rs +++ b/tests/codegen/abi-x86-interrupt.rs @@ -13,8 +13,6 @@ extern crate minicore; use minicore::*; -// CHECK: define x86_intrcc i64 @has_x86_interrupt_abi +// CHECK: define x86_intrcc void @has_x86_interrupt_abi #[no_mangle] -pub extern "x86-interrupt" fn has_x86_interrupt_abi(a: i64) -> i64 { - a -} +pub extern "x86-interrupt" fn has_x86_interrupt_abi() {} |
