about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs12
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr21
2 files changed, 12 insertions, 21 deletions
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
index df69782e154..9babc20d1a1 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
+++ b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
@@ -1,6 +1,14 @@
-//@ only-x86_64
-//@ only-windows
+//@ add-core-stubs
+//@ compile-flags: --target x86_64-pc-windows-msvc
 //@ compile-flags: --crate-type lib --emit link
+//@ needs-llvm-components: x86
+#![no_core]
+#![feature(no_core)]
+extern crate minicore;
+
+// It may seem weird this is a cross-platform-testable thing, since doesn't it test linkage?
+// However the main thing we are testing is an *error*, so it works fine!
+
 #[link(name = "foo", kind = "raw-dylib")]
 extern "stdcall" {
 //~^ WARN: calling convention not supported on this target
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
index e7a32f4c84b..95ea9080486 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
+++ b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
@@ -1,5 +1,5 @@
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported-abi.rs:5:1
+  --> $DIR/unsupported-abi.rs:13:1
    |
 LL | / extern "stdcall" {
 LL | |
@@ -15,27 +15,10 @@ LL | | }
    = note: `#[warn(unsupported_calling_conventions)]` on by default
 
 error: ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
-  --> $DIR/unsupported-abi.rs:8:5
+  --> $DIR/unsupported-abi.rs:16:5
    |
 LL |     fn f(x: i32);
    |     ^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error; 1 warning emitted
 
-Future incompatibility report: Future breakage diagnostic:
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported-abi.rs:5:1
-   |
-LL | / extern "stdcall" {
-LL | |
-LL | |
-LL | |     fn f(x: i32);
-LL | |
-LL | | }
-   | |_^
-   |
-   = 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
-