about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-03-14 13:28:34 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-05-15 02:45:47 +0300
commit4fa24bcb54cd11ec9c5e95d6d0ef366e512d27d6 (patch)
treeb4cdd23b4393d38383b89a25650f34dabf1ec378 /src/test/ui/error-codes
parent70b3681bf621bc0de91ffab711b2350068b4c466 (diff)
downloadrust-4fa24bcb54cd11ec9c5e95d6d0ef366e512d27d6.tar.gz
rust-4fa24bcb54cd11ec9c5e95d6d0ef366e512d27d6.zip
rustc: Stricter checking for #[link] attributes
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0454.stderr6
-rw-r--r--src/test/ui/error-codes/E0458.stderr10
-rw-r--r--src/test/ui/error-codes/E0459.stderr2
3 files changed, 8 insertions, 10 deletions
diff --git a/src/test/ui/error-codes/E0454.stderr b/src/test/ui/error-codes/E0454.stderr
index 6b62bef112f..b9a506fee83 100644
--- a/src/test/ui/error-codes/E0454.stderr
+++ b/src/test/ui/error-codes/E0454.stderr
@@ -1,8 +1,8 @@
-error[E0454]: `#[link(name = "")]` given with empty name
-  --> $DIR/E0454.rs:1:1
+error[E0454]: link name must not be empty
+  --> $DIR/E0454.rs:1:15
    |
 LL | #[link(name = "")] extern "C" {}
-   | ^^^^^^^^^^^^^^^^^^ empty name given
+   |               ^^ empty link name
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr
index 0f2fec029e7..e641bba541e 100644
--- a/src/test/ui/error-codes/E0458.stderr
+++ b/src/test/ui/error-codes/E0458.stderr
@@ -1,12 +1,10 @@
-error[E0458]: unknown kind: `wonderful_unicorn`
-  --> $DIR/E0458.rs:1:8
+error[E0458]: unknown link kind `wonderful_unicorn`, expected one of: static, dylib, framework, raw-dylib
+  --> $DIR/E0458.rs:1:15
    |
 LL | #[link(kind = "wonderful_unicorn")] extern "C" {}
-   | -------^^^^^^^^^^^^^^^^^^^^^^^^^^--
-   |        |
-   |        unknown kind
+   |               ^^^^^^^^^^^^^^^^^^^ unknown link kind
 
-error[E0459]: `#[link(...)]` specified without `name = "foo"`
+error[E0459]: `#[link]` attribute requires a `name = "string"` argument
   --> $DIR/E0458.rs:1:1
    |
 LL | #[link(kind = "wonderful_unicorn")] extern "C" {}
diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr
index 4e0d51e8753..8f0dd25e030 100644
--- a/src/test/ui/error-codes/E0459.stderr
+++ b/src/test/ui/error-codes/E0459.stderr
@@ -1,4 +1,4 @@
-error[E0459]: `#[link(...)]` specified without `name = "foo"`
+error[E0459]: `#[link]` attribute requires a `name = "string"` argument
   --> $DIR/E0459.rs:1:1
    |
 LL | #[link(kind = "dylib")] extern "C" {}