Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed44c0e

Browse files
committedJun 13, 2025·
Auto merge of #142353 - workingjubilee:warn-less-about-cdecl-and-other-abis, r=ChrisDenton,RalfJung
compiler: Ease off the accelerator on `unsupported_calling_conventions` This is to give us more time to discuss #142330 without the ecosystem having an anxiety attack. I have withdrawn `unsupported_calling_conventions` from report-in-deps I believe we should consider this a simple suspension of the decision in #141435 to start this process, rather than a reversal. That is, we may continue with linting again. But I believe we are about to get a... reasonable amount of feedback just from currently available information and should allow ourselves time to process it.
2 parents bb3a3c5 + 9f50246 commit ed44c0e

File tree

9 files changed

+13
-370
lines changed

9 files changed

+13
-370
lines changed
 

‎compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ declare_lint! {
36643664
"use of unsupported calling convention",
36653665
@future_incompatible = FutureIncompatibleInfo {
36663666
reason: FutureIncompatibilityReason::FutureReleaseError,
3667-
report_in_deps: true,
3667+
report_in_deps: false,
36683668
reference: "issue #137018 <https://github.com/rust-lang/rust/issues/137018>",
36693669
};
36703670
}

‎tests/ui/abi/unsupported.aarch64.stderr

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -368,42 +368,6 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
368368
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
369369
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
370370

371-
Future breakage diagnostic:
372-
warning: use of calling convention not supported on this target
373-
--> $DIR/unsupported.rs:131:17
374-
|
375-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
376-
| ^^^^^^^^^^^^^^^^^^^
377-
|
378-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
379-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
380-
= help: use `extern "C"` instead
381-
= note: `#[warn(unsupported_calling_conventions)]` on by default
382-
383-
Future breakage diagnostic:
384-
warning: use of calling convention not supported on this target
385-
--> $DIR/unsupported.rs:136:1
386-
|
387-
LL | extern "cdecl" {}
388-
| ^^^^^^^^^^^^^^^^^
389-
|
390-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
391-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
392-
= help: use `extern "C"` instead
393-
= note: `#[warn(unsupported_calling_conventions)]` on by default
394-
395-
Future breakage diagnostic:
396-
warning: use of calling convention not supported on this target
397-
--> $DIR/unsupported.rs:139:1
398-
|
399-
LL | extern "cdecl-unwind" {}
400-
| ^^^^^^^^^^^^^^^^^^^^^^^^
401-
|
402-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
403-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
404-
= help: use `extern "C-unwind"` instead
405-
= note: `#[warn(unsupported_calling_conventions)]` on by default
406-
407371
Future breakage diagnostic:
408372
warning: the calling convention "vectorcall" is not supported on this target
409373
--> $DIR/unsupported.rs:145:22
@@ -437,15 +401,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
437401
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
438402
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
439403

440-
Future breakage diagnostic:
441-
warning: use of calling convention not supported on this target
442-
--> $DIR/unsupported.rs:128:1
443-
|
444-
LL | extern "cdecl" fn cdecl() {}
445-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
446-
|
447-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
448-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
449-
= help: use `extern "C"` instead
450-
= note: `#[warn(unsupported_calling_conventions)]` on by default
451-

‎tests/ui/abi/unsupported.arm.stderr

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -336,42 +336,6 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
336336
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
337337
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
338338

339-
Future breakage diagnostic:
340-
warning: use of calling convention not supported on this target
341-
--> $DIR/unsupported.rs:131:17
342-
|
343-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
344-
| ^^^^^^^^^^^^^^^^^^^
345-
|
346-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
347-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
348-
= help: use `extern "C"` instead
349-
= note: `#[warn(unsupported_calling_conventions)]` on by default
350-
351-
Future breakage diagnostic:
352-
warning: use of calling convention not supported on this target
353-
--> $DIR/unsupported.rs:136:1
354-
|
355-
LL | extern "cdecl" {}
356-
| ^^^^^^^^^^^^^^^^^
357-
|
358-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
359-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
360-
= help: use `extern "C"` instead
361-
= note: `#[warn(unsupported_calling_conventions)]` on by default
362-
363-
Future breakage diagnostic:
364-
warning: use of calling convention not supported on this target
365-
--> $DIR/unsupported.rs:139:1
366-
|
367-
LL | extern "cdecl-unwind" {}
368-
| ^^^^^^^^^^^^^^^^^^^^^^^^
369-
|
370-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
371-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
372-
= help: use `extern "C-unwind"` instead
373-
= note: `#[warn(unsupported_calling_conventions)]` on by default
374-
375339
Future breakage diagnostic:
376340
warning: the calling convention "vectorcall" is not supported on this target
377341
--> $DIR/unsupported.rs:145:22
@@ -405,15 +369,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
405369
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
406370
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
407371

408-
Future breakage diagnostic:
409-
warning: use of calling convention not supported on this target
410-
--> $DIR/unsupported.rs:128:1
411-
|
412-
LL | extern "cdecl" fn cdecl() {}
413-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
414-
|
415-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
416-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
417-
= help: use `extern "C"` instead
418-
= note: `#[warn(unsupported_calling_conventions)]` on by default
419-

‎tests/ui/abi/unsupported.riscv32.stderr

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -336,42 +336,6 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
336336
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
337337
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
338338

339-
Future breakage diagnostic:
340-
warning: use of calling convention not supported on this target
341-
--> $DIR/unsupported.rs:131:17
342-
|
343-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
344-
| ^^^^^^^^^^^^^^^^^^^
345-
|
346-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
347-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
348-
= help: use `extern "C"` instead
349-
= note: `#[warn(unsupported_calling_conventions)]` on by default
350-
351-
Future breakage diagnostic:
352-
warning: use of calling convention not supported on this target
353-
--> $DIR/unsupported.rs:136:1
354-
|
355-
LL | extern "cdecl" {}
356-
| ^^^^^^^^^^^^^^^^^
357-
|
358-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
359-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
360-
= help: use `extern "C"` instead
361-
= note: `#[warn(unsupported_calling_conventions)]` on by default
362-
363-
Future breakage diagnostic:
364-
warning: use of calling convention not supported on this target
365-
--> $DIR/unsupported.rs:139:1
366-
|
367-
LL | extern "cdecl-unwind" {}
368-
| ^^^^^^^^^^^^^^^^^^^^^^^^
369-
|
370-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
371-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
372-
= help: use `extern "C-unwind"` instead
373-
= note: `#[warn(unsupported_calling_conventions)]` on by default
374-
375339
Future breakage diagnostic:
376340
warning: the calling convention "vectorcall" is not supported on this target
377341
--> $DIR/unsupported.rs:145:22
@@ -405,15 +369,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
405369
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
406370
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
407371

408-
Future breakage diagnostic:
409-
warning: use of calling convention not supported on this target
410-
--> $DIR/unsupported.rs:128:1
411-
|
412-
LL | extern "cdecl" fn cdecl() {}
413-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
414-
|
415-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
416-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
417-
= help: use `extern "C"` instead
418-
= note: `#[warn(unsupported_calling_conventions)]` on by default
419-

‎tests/ui/abi/unsupported.riscv64.stderr

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -336,42 +336,6 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
336336
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
337337
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
338338

339-
Future breakage diagnostic:
340-
warning: use of calling convention not supported on this target
341-
--> $DIR/unsupported.rs:131:17
342-
|
343-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
344-
| ^^^^^^^^^^^^^^^^^^^
345-
|
346-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
347-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
348-
= help: use `extern "C"` instead
349-
= note: `#[warn(unsupported_calling_conventions)]` on by default
350-
351-
Future breakage diagnostic:
352-
warning: use of calling convention not supported on this target
353-
--> $DIR/unsupported.rs:136:1
354-
|
355-
LL | extern "cdecl" {}
356-
| ^^^^^^^^^^^^^^^^^
357-
|
358-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
359-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
360-
= help: use `extern "C"` instead
361-
= note: `#[warn(unsupported_calling_conventions)]` on by default
362-
363-
Future breakage diagnostic:
364-
warning: use of calling convention not supported on this target
365-
--> $DIR/unsupported.rs:139:1
366-
|
367-
LL | extern "cdecl-unwind" {}
368-
| ^^^^^^^^^^^^^^^^^^^^^^^^
369-
|
370-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
371-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
372-
= help: use `extern "C-unwind"` instead
373-
= note: `#[warn(unsupported_calling_conventions)]` on by default
374-
375339
Future breakage diagnostic:
376340
warning: the calling convention "vectorcall" is not supported on this target
377341
--> $DIR/unsupported.rs:145:22
@@ -405,15 +369,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
405369
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
406370
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
407371

408-
Future breakage diagnostic:
409-
warning: use of calling convention not supported on this target
410-
--> $DIR/unsupported.rs:128:1
411-
|
412-
LL | extern "cdecl" fn cdecl() {}
413-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
414-
|
415-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
416-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
417-
= help: use `extern "C"` instead
418-
= note: `#[warn(unsupported_calling_conventions)]` on by default
419-

‎tests/ui/abi/unsupported.x64.stderr

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -315,42 +315,6 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
315315
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
316316
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
317317

318-
Future breakage diagnostic:
319-
warning: use of calling convention not supported on this target
320-
--> $DIR/unsupported.rs:131:17
321-
|
322-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
323-
| ^^^^^^^^^^^^^^^^^^^
324-
|
325-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
326-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
327-
= help: use `extern "C"` instead
328-
= note: `#[warn(unsupported_calling_conventions)]` on by default
329-
330-
Future breakage diagnostic:
331-
warning: use of calling convention not supported on this target
332-
--> $DIR/unsupported.rs:136:1
333-
|
334-
LL | extern "cdecl" {}
335-
| ^^^^^^^^^^^^^^^^^
336-
|
337-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
338-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
339-
= help: use `extern "C"` instead
340-
= note: `#[warn(unsupported_calling_conventions)]` on by default
341-
342-
Future breakage diagnostic:
343-
warning: use of calling convention not supported on this target
344-
--> $DIR/unsupported.rs:139:1
345-
|
346-
LL | extern "cdecl-unwind" {}
347-
| ^^^^^^^^^^^^^^^^^^^^^^^^
348-
|
349-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
350-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
351-
= help: use `extern "C-unwind"` instead
352-
= note: `#[warn(unsupported_calling_conventions)]` on by default
353-
354318
Future breakage diagnostic:
355319
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
356320
--> $DIR/unsupported.rs:153:21
@@ -373,15 +337,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
373337
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
374338
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
375339

376-
Future breakage diagnostic:
377-
warning: use of calling convention not supported on this target
378-
--> $DIR/unsupported.rs:128:1
379-
|
380-
LL | extern "cdecl" fn cdecl() {}
381-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
382-
|
383-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
384-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
385-
= help: use `extern "C"` instead
386-
= note: `#[warn(unsupported_calling_conventions)]` on by default
387-

‎tests/ui/abi/unsupported.x64_win.stderr

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -321,78 +321,6 @@ LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
321321
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
322322
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
323323

324-
Future breakage diagnostic:
325-
warning: use of calling convention not supported on this target
326-
--> $DIR/unsupported.rs:112:19
327-
|
328-
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
329-
| ^^^^^^^^^^^^^^^^^^^^^
330-
|
331-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
332-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
333-
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
334-
= note: `#[warn(unsupported_calling_conventions)]` on by default
335-
336-
Future breakage diagnostic:
337-
warning: use of calling convention not supported on this target
338-
--> $DIR/unsupported.rs:119:1
339-
|
340-
LL | extern "stdcall" {}
341-
| ^^^^^^^^^^^^^^^^^^^
342-
|
343-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
344-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
345-
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
346-
= note: `#[warn(unsupported_calling_conventions)]` on by default
347-
348-
Future breakage diagnostic:
349-
warning: use of calling convention not supported on this target
350-
--> $DIR/unsupported.rs:123:1
351-
|
352-
LL | extern "stdcall-unwind" {}
353-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
354-
|
355-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
356-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
357-
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
358-
= note: `#[warn(unsupported_calling_conventions)]` on by default
359-
360-
Future breakage diagnostic:
361-
warning: use of calling convention not supported on this target
362-
--> $DIR/unsupported.rs:131:17
363-
|
364-
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
365-
| ^^^^^^^^^^^^^^^^^^^
366-
|
367-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
368-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
369-
= help: use `extern "C"` instead
370-
= note: `#[warn(unsupported_calling_conventions)]` on by default
371-
372-
Future breakage diagnostic:
373-
warning: use of calling convention not supported on this target
374-
--> $DIR/unsupported.rs:136:1
375-
|
376-
LL | extern "cdecl" {}
377-
| ^^^^^^^^^^^^^^^^^
378-
|
379-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
380-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
381-
= help: use `extern "C"` instead
382-
= note: `#[warn(unsupported_calling_conventions)]` on by default
383-
384-
Future breakage diagnostic:
385-
warning: use of calling convention not supported on this target
386-
--> $DIR/unsupported.rs:139:1
387-
|
388-
LL | extern "cdecl-unwind" {}
389-
| ^^^^^^^^^^^^^^^^^^^^^^^^
390-
|
391-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
392-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
393-
= help: use `extern "C-unwind"` instead
394-
= note: `#[warn(unsupported_calling_conventions)]` on by default
395-
396324
Future breakage diagnostic:
397325
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
398326
--> $DIR/unsupported.rs:153:21
@@ -415,39 +343,3 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
415343
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
416344
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
417345

418-
Future breakage diagnostic:
419-
warning: use of calling convention not supported on this target
420-
--> $DIR/unsupported.rs:171:1
421-
|
422-
LL | extern "cdecl" {}
423-
| ^^^^^^^^^^^^^^^^^
424-
|
425-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
426-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
427-
= help: use `extern "C"` instead
428-
= note: `#[warn(unsupported_calling_conventions)]` on by default
429-
430-
Future breakage diagnostic:
431-
warning: use of calling convention not supported on this target
432-
--> $DIR/unsupported.rs:108:1
433-
|
434-
LL | extern "stdcall" fn stdcall() {}
435-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
436-
|
437-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
438-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
439-
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
440-
= note: `#[warn(unsupported_calling_conventions)]` on by default
441-
442-
Future breakage diagnostic:
443-
warning: use of calling convention not supported on this target
444-
--> $DIR/unsupported.rs:128:1
445-
|
446-
LL | extern "cdecl" fn cdecl() {}
447-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
448-
|
449-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
450-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
451-
= help: use `extern "C"` instead
452-
= note: `#[warn(unsupported_calling_conventions)]` on by default
453-

‎tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
//@ only-x86_64
2-
//@ only-windows
1+
//@ add-core-stubs
2+
//@ compile-flags: --target x86_64-pc-windows-msvc
33
//@ compile-flags: --crate-type lib --emit link
4+
//@ needs-llvm-components: x86
5+
#![no_core]
6+
#![feature(no_core)]
7+
extern crate minicore;
8+
9+
// It may seem weird this is a cross-platform-testable thing, since doesn't it test linkage?
10+
// However the main thing we are testing is an *error*, so it works fine!
11+
412
#[link(name = "foo", kind = "raw-dylib")]
513
extern "stdcall" {
614
//~^ WARN: calling convention not supported on this target
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: use of calling convention not supported on this target
2-
--> $DIR/unsupported-abi.rs:5:1
2+
--> $DIR/unsupported-abi.rs:13:1
33
|
44
LL | / extern "stdcall" {
55
LL | |
@@ -15,27 +15,10 @@ LL | | }
1515
= note: `#[warn(unsupported_calling_conventions)]` on by default
1616

1717
error: ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
18-
--> $DIR/unsupported-abi.rs:8:5
18+
--> $DIR/unsupported-abi.rs:16:5
1919
|
2020
LL | fn f(x: i32);
2121
| ^^^^^^^^^^^^^
2222

2323
error: aborting due to 1 previous error; 1 warning emitted
2424

25-
Future incompatibility report: Future breakage diagnostic:
26-
warning: use of calling convention not supported on this target
27-
--> $DIR/unsupported-abi.rs:5:1
28-
|
29-
LL | / extern "stdcall" {
30-
LL | |
31-
LL | |
32-
LL | | fn f(x: i32);
33-
LL | |
34-
LL | | }
35-
| |_^
36-
|
37-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
38-
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
39-
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
40-
= note: `#[warn(unsupported_calling_conventions)]` on by default
41-

0 commit comments

Comments
 (0)
Please sign in to comment.