Reject unsupported `extern "{abi}"`s consistently in all positions
Modify the handling of extern "{abi}" in the compiler so that it has consistent errors without regard to the position in the grammar.
What
Implement the following breakages:
- Promote
unsupported_fn_ptr_calling_conventionsfrom a warning to a hard error - Guarantee future edge-cases like trait declarations will not escape so that ABIs that have already been unusable in most positions will now be unusable in all positions. See "How" and "Why or Why Not" for more details.
In particular, these architecture-specific ABIs now only compile on their architectures[^4]:
- amdgpu: "gpu-kernel"
- arm: "aapcs", "C-cmse-nonsecure-entry", "C-cmse-nonsecure-call"
- avr: "avr-interrupt", "avr-non-blocking-interrupt"
- msp430: "msp430-interrupt"
- nvptx64: "gpu-kernel", "ptx-kernel"
- riscv32 and riscv64: "riscv-interrupt-m", "riscv-interrupt-s"
- x86: "thiscall"
- x86 and x86_64: "x86-interrupt"
- x86_64: "sysv64", "win64"
ABIs that are logically x86-specific but actually permitted on all Windows targets remain permitted on Windows, as before. For non-Windows targets, they error if we had previously done so in other positions.
How
We modify rustc_ast_lowering to prevent unsupported ABIs from leaking through the HIR without being checked for target support to emit hard errors for every case where we would return Invalid from AbiMap::canonize_abi. Previously ad-hoc checking on various HIR items required making sure we check every HIR item which could contain an extern "{abi}" string. This is a losing proposition compared to gating the lowering itself.
As a consequence, unsupported ABI strings will now hard-error instead of triggering the FCW unsupported_fn_ptr_calling_conventions. The code is also simpler compared to some cases which split on unstable versus stable, only suffering some unavoidable complication to support the newly-revived unsupported_calling_conventions lint.[^5]
However, per rust-lang/rust#86232 this does cause errors for rare usages of extern "{abi}" that were theoretically possible to write in Rust source, without previous warning or error. For instance, trait declarations without impls were never checked. These are the exact kinds of leakages that this new approach prevents.
This differs from the following PRs:
- rust-lang/rust#141435 is orthogonal, as it adds a new lint for ABIs we have not warned on and are not touched by this PR
- rust-lang/rust#141877 is subsumed by this, in that this simply cuts out bad functionality instead of adding epicycles for stable code
Why or Why Not
We already made the decision to issue the unsupported_fn_ptr_calling_conventions future compatibility warning. It has warned in dependencies since rust-lang/rust#135767, which reached stable with Rust 1.87. That was released on 2025 May 17, and it is now June. As we already had erred on these ABI strings in most other positions, and warn on stable for function pointer types, this breakage has had reasonable foreshadowing.
Upgrading the warning to an error addresses a real problem. In some cases the Rust compiler can attempt to actually compute the ABI for calling a function. We could accept this case and compute unsupported ABIs according to some other ABI, silently[^6]. However, this obviously exposes Rust to errors in codegen. We cannot lower directly to the "obvious", target-incorrect ABI and then trust code generators like LLVM to reliably error on these cases, either.
Other considerations include:
- We could refactor the compiler to defer ABI computations, but that seems like it would suffer the "whack-a-mole" problem close to linking instead of after parsing and expansion.
- We could run a deprecation cycle for the edge cases, but we would be warning highly marginal cases, like this trait declaration without a definition that cannot be implemented without error[^9].
pub trait UsedToSneakBy {
pub extern "gpu-kernel" fn sneaky();
}
- The crater run on this PR's draft form suggests the primary issue is with implementations on function pointers, which has already been warned on, so it does not seem like we would be benefiting any real code.
- Converting this to a hard error now, in the same cycle that we ship the reanimation of the
unsupported_calling_conventionslint, means people who would otherwise have to deal with two lints only have to update their code in one batch. Of course, one of them is as breakage.
r? lang
Fixes rust-lang/rust#86232 Fixes rust-lang/rust#132430 Fixes rust-lang/rust#138738 Fixes rust-lang/rust#142107
[^9]: Upon any impl, even for provided fn within trait declarations, e.g. pub extern "gpu-kernel" fn sneaky() {}, different HIR types were used which would, in fact, get checked. Likewise for anything with function pointers. Thus we would be discussing deprecation cycles for code that is impotent or forewarned[^7].
[^4]: Some already will not compile, due to reaching ICEs or LLVM errors.
[^5]: That lint cannot be moved in a similar way yet because lints operate on HIR, so you cannot emit lints when the HIR has not been completely formed.
[^6]: We already do this for all AbiStr we cannot parse, pretending they are ExternAbi::Rust, but we also emit an error to prevent reaching too far into codegen.
[^7]: It actually did appear in two cases in rustc's test suite because we are a collection of Rust edge-cases by the simple fact that we don't care if the code actually runs. These cases are being excised in 643a9d233b4f1547220134daea4bcca809302d40
HIR ty lowering was modified
cc @fmease
This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #<issueNr>' to the PR description to autoclose the issue upon merge.
These commits modify tests/rustdoc-json.
rustdoc-json is a public (but unstable) interface.
Please ensure that if you've changed the output:
- It's intentional.
- The
FORMAT_VERSIONinsrc/librustdoc-json-typesis bumped if necessary.
cc @aDotInTheVoid, @obi1kenobi
@bors2 try
:hourglass: Trying commit c1db989aa4a9f7434fc7670492386563e01011b1 with merge 8b8eff55bd72abbb57167bc42222a7f91d41cb0d…
To cancel the try build, run the command @bors2 try cancel.
:sunny: Try build successful (CI)
Build commit: 8b8eff55bd72abbb57167bc42222a7f91d41cb0d (8b8eff55bd72abbb57167bc42222a7f91d41cb0d)
@craterbot run mode=build-only name=pr-142134-abi-ast-error cap-lints=warn
:construction: Experiment pr-142134-abi-ast-error is now running
:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
:ok_hand: Experiment pr-142134-abi-ast-error created and queued.
:robot: Automatically detected try build 8b8eff55bd72abbb57167bc42222a7f91d41cb0d
:mag: You can check out the queue and this experiment's details.
:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
:tada: Experiment pr-142134-abi-ast-error is completed!
:bar_chart: 57 regressed and 16 fixed (643383 total)
:newspaper: Open the full report.
:warning: If you notice any spurious failure please add them to the denylist! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
I'll send the necessary PRs to size-of and retour.
The primary culprit seems to be impls on function pointers, which are already warned on: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=e1e8ca91878cbbcba5c6dc3b064cea2b
on retour
I should note that while impls on function pointers are convenient, it's not clear that code that works at the low level that retour does can be correct when interacting with these function pointers unless it is written with full awareness that the relevant ABIs are translated to extern "C". Some simple versions, maybe, but often detouring libraries have to make assumptions about codegen, and consistently getting that correct seems unlikely. So I believe enforcing this lint in a now-absolutist fashion will, in fact, make the world's code more correct.
on size_of
For size_of the upgrade to warn-on-deps seems to have attracted notice: https://github.com/Kixiron/size-of/issues/6
I was able to contact the maintainer who is happy to run a release once I draft a PR that fixes this.
on the rest
- https://github.com/EnmanuelParache/msp430fr2476 is archived, but clearly only intended to be a crossbuild for msp430 devices which would support msp430-interrupt in the first place.
- https://github.com/ejaanens/msp430fr2476 is a skeleton project generated by svd2rust and has the same caveat.
- https://github.com/bekker/qvopenapi-rs looks abandoned and I expect a contrib will have a language barrier, but I'll try.
The "regressions" for libc, serde_derive, etc. all appear to be spurious failures due to build space running out.
:umbrella: The latest upstream changes (presumably #141435) made this pull request unmergeable. Please resolve the merge conflicts.
The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/abi/unsupported.rs#arm stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.arm/unsupported.arm.stderr`
diff of stderr:
145 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
146
147 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:134:8
+ --> $DIR/unsupported.rs:135:8
149 |
150 LL | extern "vectorcall" fn vectorcall() {}
151 | ^^^^^^^^^^^^
152
153 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:136:29
+ --> $DIR/unsupported.rs:137:29
155 |
156 LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
157 | ^^^^^^^^^^^^
158
159 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:140:8
---
165 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
167 |
168 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
169 | ^^^^^^^^^^^^^^^^^^^^^^^
170
171 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
173 |
174 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
175 | ^^^^^^^^^^^^^^^^^^^^^^^^
176
177 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
179 |
180 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
181 | ^^^^^^^^^^^^^^^^^^^^^^^^
182
183 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
185 |
186 LL | extern "C-cmse-nonsecure-entry" {}
187 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `arm`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "arm" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.arm" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=armv7-unknown-linux-gnueabihf" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.arm/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:74:8
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:76:24
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:80:8
|
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:83:8
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:85:22
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:89:8
|
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
---
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:105:26
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:111:8
|
LL | extern "stdcall" {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:115:8
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:135:8
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:137:29
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:141:8
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
---- [ui] tests/ui/abi/unsupported.rs#aarch64 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.aarch64/unsupported.aarch64.stderr`
diff of stderr:
163 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
164
165 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:134:8
+ --> $DIR/unsupported.rs:135:8
167 |
168 LL | extern "vectorcall" fn vectorcall() {}
169 | ^^^^^^^^^^^^
170
171 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:136:29
+ --> $DIR/unsupported.rs:137:29
173 |
174 LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
175 | ^^^^^^^^^^^^
176
177 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:140:8
---
183 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
185 |
186 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
187 | ^^^^^^^^^^^^^^^^^^^^^^^
188
189 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
191 |
192 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
193 | ^^^^^^^^^^^^^^^^^^^^^^^^
194
195 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
197 |
198 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
199 | ^^^^^^^^^^^^^^^^^^^^^^^^
200
201 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
203 |
204 LL | extern "C-cmse-nonsecure-entry" {}
205 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `aarch64`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "aarch64" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.aarch64" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=aarch64-unknown-linux-gnu" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.aarch64/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:74:8
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:76:24
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:80:8
|
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:83:8
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:85:22
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:89:8
|
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
---
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:105:26
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:111:8
|
LL | extern "stdcall" {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:115:8
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:135:8
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:137:29
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:141:8
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
------------------------------------------
---- [ui] tests/ui/abi/unsupported.rs#i686 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.i686/unsupported.i686.stderr`
diff of stderr:
95 | ^^^^^^^^^^^^^^^^^^^
96
97 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
99 |
100 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
101 | ^^^^^^^^^^^^^^^^^^^^^^^
102
103 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
105 |
106 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
107 | ^^^^^^^^^^^^^^^^^^^^^^^^
108
109 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
111 |
112 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
113 | ^^^^^^^^^^^^^^^^^^^^^^^^
114
115 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
117 |
118 LL | extern "C-cmse-nonsecure-entry" {}
119 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `i686`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "i686" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.i686" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=i686-unknown-linux-gnu" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.i686/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:74:8
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:76:24
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:80:8
|
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 20 previous errors
For more information about this error, try `rustc --explain E0570`.
------------------------------------------
---- [ui] tests/ui/abi/unsupported.rs#riscv32 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv32/unsupported.riscv32.stderr`
diff of stderr:
145 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
146
147 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:134:8
+ --> $DIR/unsupported.rs:135:8
149 |
150 LL | extern "vectorcall" fn vectorcall() {}
151 | ^^^^^^^^^^^^
152
153 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:136:29
+ --> $DIR/unsupported.rs:137:29
155 |
156 LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
157 | ^^^^^^^^^^^^
158
159 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:140:8
---
165 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
167 |
168 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
169 | ^^^^^^^^^^^^^^^^^^^^^^^
170
171 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
173 |
174 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
175 | ^^^^^^^^^^^^^^^^^^^^^^^^
176
177 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
179 |
180 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
181 | ^^^^^^^^^^^^^^^^^^^^^^^^
182
183 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
185 |
186 LL | extern "C-cmse-nonsecure-entry" {}
187 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `riscv32`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "riscv32" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv32" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=riscv32i-unknown-none-elf" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv32/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:83:8
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:85:22
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:89:8
|
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
---
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:105:26
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:111:8
|
LL | extern "stdcall" {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:115:8
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:135:8
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:137:29
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:141:8
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
------------------------------------------
---- [ui] tests/ui/abi/unsupported.rs#riscv64 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv64/unsupported.riscv64.stderr`
diff of stderr:
145 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
146
147 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:134:8
+ --> $DIR/unsupported.rs:135:8
149 |
150 LL | extern "vectorcall" fn vectorcall() {}
151 | ^^^^^^^^^^^^
152
153 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:136:29
+ --> $DIR/unsupported.rs:137:29
155 |
156 LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
157 | ^^^^^^^^^^^^
158
159 error[E0570]: `"vectorcall"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:140:8
---
165 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
167 |
168 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
169 | ^^^^^^^^^^^^^^^^^^^^^^^
170
171 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
173 |
174 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
175 | ^^^^^^^^^^^^^^^^^^^^^^^^
176
177 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
179 |
180 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
181 | ^^^^^^^^^^^^^^^^^^^^^^^^
182
183 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
185 |
186 LL | extern "C-cmse-nonsecure-entry" {}
187 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `riscv64`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "riscv64" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv64" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=riscv64gc-unknown-none-elf" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.riscv64/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:83:8
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:85:22
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:89:8
|
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
---
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:105:26
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:111:8
|
LL | extern "stdcall" {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:115:8
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:135:8
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:137:29
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:141:8
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
------------------------------------------
---- [ui] tests/ui/abi/unsupported.rs#x64 stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64/unsupported.x64.stderr`
diff of stderr:
145 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
146
147 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
149 |
150 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
151 | ^^^^^^^^^^^^^^^^^^^^^^^
152
153 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
155 |
156 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
157 | ^^^^^^^^^^^^^^^^^^^^^^^^
158
159 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
161 |
162 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
163 | ^^^^^^^^^^^^^^^^^^^^^^^^
164
165 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
167 |
168 LL | extern "C-cmse-nonsecure-entry" {}
169 | ^^^^^^^^^^^^^^^^^^^^^^^^
---
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `x64`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "x64" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=x86_64-unknown-linux-gnu" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:74:8
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:76:24
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:80:8
|
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
---
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:105:26
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:111:8
|
LL | extern "stdcall" {}
| ^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:115:8
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
------------------------------------------
---- [ui] tests/ui/abi/unsupported.rs#x64_win stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64_win/unsupported.x64_win.stderr`
diff of stderr:
113 | ^^^^^^^^^^
114
115 error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:143:28
+ --> $DIR/unsupported.rs:144:28
117 |
118 LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
119 | ^^^^^^^^^^^^^^^^^^^^^^^
120
121 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:148:8
+ --> $DIR/unsupported.rs:149:8
123 |
124 LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
125 | ^^^^^^^^^^^^^^^^^^^^^^^^
126
127 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:150:29
+ --> $DIR/unsupported.rs:151:29
129 |
130 LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
131 | ^^^^^^^^^^^^^^^^^^^^^^^^
132
133 error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
- --> $DIR/unsupported.rs:154:8
+ --> $DIR/unsupported.rs:155:8
135 |
136 LL | extern "C-cmse-nonsecure-entry" {}
137 | ^^^^^^^^^^^^^^^^^^^^^^^^
158 = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
159
160 warning: use of calling convention not supported on this target
- --> $DIR/unsupported.rs:127:1
+ --> $DIR/unsupported.rs:128:1
162 |
---
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args abi/unsupported.rs`
error in revision `x64_win`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "x64_win" "--check-cfg" "cfg(test,FALSE,x64,x64_win,i686,aarch64,arm,riscv32,riscv64)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64_win" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=x86_64-pc-windows-msvc" "--crate-type=rlib" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported.x64_win/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:36:8
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:38:22
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
| ^^^^^^^^^^^^
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:42:8
|
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:44:8
|
LL | extern "gpu-kernel" fn gpu() {}
| ^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:47:8
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:49:24
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
| ^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:53:8
|
LL | extern "aapcs" {}
| ^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:56:8
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:58:25
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:62:8
|
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:65:8
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:67:22
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
| ^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:71:8
|
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:74:8
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:76:24
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:80:8
|
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:92:8
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:94:27
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
| ^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:98:8
|
LL | extern "thiscall" {}
| ^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:144:28
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:149:8
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:151:29
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported.rs:155:8
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
---
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:115:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:128:1
|
LL | extern "cdecl" {}
---
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
---
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:115:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:128:1
---
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
##[warning] --> /checkout/tests/ui/abi/unsupported.rs:120:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
Fixes https://github.com/rust-lang/rust/issues/86232
So what does this do with invalid ABIs in traits? I can't see a new lint being introduced here -- but making this a hard error immediately would be a breaking change, no?
So what does this do with invalid ABIs in traits? I can't see a new lint being introduced here -- but making this a hard error immediately would be a breaking change, no?
Correct.
My proposal to lang is that they should consider it a functional non-event, because it truly seems to be. All the crater regressions are from doing things with function pointers, not unimplementable associated functions of traits. We have been writing these lints and missing cases every time, even though we thought we covered our bases last time. I think we should cut out the problem at the root. If they think we should write another lint, that's... probably fine, actually, but how many more times are we going to do this? I'd like to have a commitment to break; when the loop counter reaches some limit, even if we haven't done everything perfectly, before we go further.
Obviously, I think 0 would be a reasonable number of additional repetitions, but there's other integers I could see myself happy with.
@rustbot label: I-lang-nominated
We have been writing these lints and missing cases every time, even though we thought we covered our bases last time.
Did we? https://github.com/rust-lang/rust/issues/86232 was very clear about affecting traits and fn ptrs, and the fn ptr lint is very clear about only checking fn ptrs. I don't think anyone was confused about the trait case, it's just that so far nobody felt like implementing the lint for that.
Did we? #86232 was very clear about affecting traits and fn ptrs, and the fn ptr lint is very clear about only checking fn ptrs. I don't think anyone was confused about the trait case, it's just that so far nobody felt like implementing the lint for that.
"Nobody felt like it" is kind of the problem.
I have been triaging issues up and down the issue tracker for years, spending large amounts of time tagging and sorting issues, and increasingly trying to focus on understanding and collecting all the ones specifically related to ABI. Talking with you, even!... and ~last week was the first time I saw it. Even the people who know about it have bigger fish to fry. There is exactly zero code on crater that is affected by the edge-case breakage in practice. Usually, even the most obscure breakage at least hits some random unfinished project on GitHub, and then we decide whether to write off some abandoned code from 2017 or not, but the breakage I saw was purely about function pointers.
If people insist on a performance then I will be their Pierrot, but not before the ringmaster directs me. They know well I have more interesting acts I could be rehearsing.
0 crater regressions is a good sign, I agree. Crater doesn't see all code though, and it only builds for Linux (which is quite relevant when talking about target-specific behavior such as this).
:umbrella: The latest upstream changes (presumably #142299) made this pull request unmergeable. Please resolve the merge conflicts.
@rfcbot fcp merge
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:
- [x] @joshtriplett
- [x] @nikomatsakis
- [x] @scottmcm
- [x] @tmandry
- [x] @traviscross
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. See this document for info about what commands tagged team members can give me.
@rfcbot reviewed
@rfcbot reviewed
:bell: This is now entering its final comment period, as per the review above. :bell:
This PR modifies tests/auxiliary/minicore.rs.
cc @jieyouxu
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
[TIMING] core::build_steps::tool::Tidy { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.000
fmt check
fmt: checked 6055 files
tidy check
/checkout/tests/ui/abi/unsupported-abi-transmute.rs: revision [unspecified] should specify `needs-llvm-components:` as it has `--target` set
Running eslint on rustdoc JS files
tidy: Skipping binary file check, read-only filesystem
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.1.1)
linting python files
All checks passed!
checking python file formatting
28 files already formatted
checking C++ file formatting
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:17
local time: Thu Jun 12 01:01:13 UTC 2025
network time: Thu, 12 Jun 2025 01:01:13 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
1 error[E0570]: `"thiscall"` is not a supported ABI for the current target
- --> $DIR/unsupported-abi-transmute.rs:12:53
+ --> $DIR/unsupported-abi-transmute.rs:13:53
3 |
4 LL | let a = unsafe { mem::transmute::<usize, extern "thiscall" fn(i32)>(4) }(2);
5 | ^^^^^^^^^^
Note: some mismatched output was normalized before being compared
- --> /checkout/tests/ui/abi/unsupported-abi-transmute.rs:13:53
+ --> $DIR/unsupported-abi-transmute.rs:13:53
---
To only update this specific test, also pass `--test-args abi/unsupported-abi-transmute.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/unsupported-abi-transmute.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported-abi-transmute" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "--crate-type=lib" "--target" "x86_64-unknown-none" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/abi/unsupported-abi-transmute/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0570]: `"thiscall"` is not a supported ABI for the current target
##[error] --> /checkout/tests/ui/abi/unsupported-abi-transmute.rs:13:53
|
LL | let a = unsafe { mem::transmute::<usize, extern "thiscall" fn(i32)>(4) }(2);
| ^^^^^^^^^^
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0570`.
:umbrella: The latest upstream changes (presumably #142353) made this pull request unmergeable. Please resolve the merge conflicts.
The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
failures:
---- [ui] tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs stdout ----
error: /checkout/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs:13: unexpected WARN: '13:1: 18:2: "stdcall" is not a supported ABI for the current target [unsupported_calling_conventions]'
error: /checkout/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs:13: expected WARN not found: calling convention not supported on this target
error: 1 unexpected errors found, 1 expected errors not found
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/linkage-attr/raw-dylib/windows/unsupported-abi" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target" "x86_64-pc-windows-msvc" "--crate-type" "lib" "--emit" "link" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/linkage-attr/raw-dylib/windows/unsupported-abi/libminicore.rlib"
--- unexpected errors (from JSON output) ---
WARNline 13: 13:1: 18:2: "stdcall" is not a supported ABI for the current target [unsupported_calling_conventions]
---
--- not found errors (from test file) ---
WARNline 13: calling convention not supported on this target
---
:umbrella: The latest upstream changes (presumably #142443) made this pull request unmergeable. Please resolve the merge conflicts.
- rebased with minor cleanup: https://github.com/rust-lang/rust/compare/1530ca434819bf30294da3d930307a2dd0a3978b..536e96e25f4cbf2f5cbc42ef320282d66623fa45
:umbrella: The latest upstream changes (presumably #142483) made this pull request unmergeable. Please resolve the merge conflicts.