diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-24 22:29:54 +0000 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-07-17 14:02:06 -0700 |
| commit | c9ba9aab8ca58ab079e9c892eabd1bff340eb386 (patch) | |
| tree | 4c0db5632a4c920d0d2398b91684d4299a11af3a /tests | |
| parent | c24557234c6531af7d1cfcc8f518ec4aad55d823 (diff) | |
| download | rust-c9ba9aab8ca58ab079e9c892eabd1bff340eb386.tar.gz rust-c9ba9aab8ca58ab079e9c892eabd1bff340eb386.zip | |
Add rust-invalid ABI
(cherry picked from commit e245570def155191b61f73647eb543dd45685b2f)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/abi/invalid-call-abi.rs | 12 | ||||
| -rw-r--r-- | tests/ui/abi/invalid-call-abi.stderr | 9 | ||||
| -rw-r--r-- | tests/ui/print-calling-conventions.stdout | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/abi/invalid-call-abi.rs b/tests/ui/abi/invalid-call-abi.rs new file mode 100644 index 00000000000..14286e048ce --- /dev/null +++ b/tests/ui/abi/invalid-call-abi.rs @@ -0,0 +1,12 @@ +// Tests the `"rustc-invalid"` ABI, which is never canonizable. + +#![feature(rustc_attrs)] + +const extern "rust-invalid" fn foo() { + //~^ ERROR `"rust-invalid"` is not a supported ABI for the current target + panic!() +} + +fn main() { + foo(); +} diff --git a/tests/ui/abi/invalid-call-abi.stderr b/tests/ui/abi/invalid-call-abi.stderr new file mode 100644 index 00000000000..f7a25307d8b --- /dev/null +++ b/tests/ui/abi/invalid-call-abi.stderr @@ -0,0 +1,9 @@ +error[E0570]: `"rust-invalid"` is not a supported ABI for the current target + --> $DIR/invalid-call-abi.rs:5:1 + | +LL | const extern "rust-invalid" fn foo() { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0570`. diff --git a/tests/ui/print-calling-conventions.stdout b/tests/ui/print-calling-conventions.stdout index 7b5ae495660..4df6bd27f45 100644 --- a/tests/ui/print-calling-conventions.stdout +++ b/tests/ui/print-calling-conventions.stdout @@ -20,6 +20,7 @@ riscv-interrupt-m riscv-interrupt-s rust-call rust-cold +rust-invalid stdcall stdcall-unwind system |
