Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f50246

Browse files
workingjubileeChrisDenton
authored andcommitted
tests: Convert linkage-attr test to cross-compiling and bless
1 parent 8f0c09a commit 9f50246

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

‎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)

AltStyle によって変換されたページ (->オリジナル) /