about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWim Looman <git@nemo157.com>2020-06-20 13:31:24 +0200
committerWim Looman <git@nemo157.com>2020-08-30 20:16:23 +0200
commit79b0ab5195f0b7f9e05881e775219eea9cc410f6 (patch)
tree4fb89ff2682b41c5a89269b8fc959c99c67443a0 /src
parent66b2f9acfcb6203090ca2321ce37bb7ae6c07210 (diff)
downloadrust-79b0ab5195f0b7f9e05881e775219eea9cc410f6.tar.gz
rust-79b0ab5195f0b7f9e05881e775219eea9cc410f6.zip
Scope no_mangle and export_name warnings to the declarations name
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/lint/lint-unsafe-code.stderr32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/test/ui/lint/lint-unsafe-code.stderr b/src/test/ui/lint/lint-unsafe-code.stderr
index aadd02277ef..b97c78aef2f 100644
--- a/src/test/ui/lint/lint-unsafe-code.stderr
+++ b/src/test/ui/lint/lint-unsafe-code.stderr
@@ -1,8 +1,8 @@
 error: declaration of a `no_mangle` function
-  --> $DIR/lint-unsafe-code.rs:31:14
+  --> $DIR/lint-unsafe-code.rs:31:17
    |
 LL | #[no_mangle] fn foo() {}
-   |              ^^^^^^^^^^^
+   |                 ^^^
    |
 note: the lint level is defined here
   --> $DIR/lint-unsafe-code.rs:3:9
@@ -11,22 +11,22 @@ LL | #![deny(unsafe_code)]
    |         ^^^^^^^^^^^
 
 error: declaration of a `no_mangle` static
-  --> $DIR/lint-unsafe-code.rs:32:14
+  --> $DIR/lint-unsafe-code.rs:32:21
    |
 LL | #[no_mangle] static FOO: u32 = 5;
-   |              ^^^^^^^^^^^^^^^^^^^^
+   |                     ^^^
 
 error: declaration of a function with `export_name`
-  --> $DIR/lint-unsafe-code.rs:34:24
+  --> $DIR/lint-unsafe-code.rs:34:27
    |
 LL | #[export_name = "bar"] fn bar() {}
-   |                        ^^^^^^^^^^^
+   |                           ^^^
 
 error: declaration of a static with `export_name`
-  --> $DIR/lint-unsafe-code.rs:35:24
+  --> $DIR/lint-unsafe-code.rs:35:31
    |
 LL | #[export_name = "BAR"] static BAR: u32 = 5;
-   |                        ^^^^^^^^^^^^^^^^^^^^
+   |                               ^^^
 
 error: declaration of an `unsafe` function
   --> $DIR/lint-unsafe-code.rs:37:1
@@ -107,10 +107,10 @@ LL |     unsafe {}
    |     ^^^^^^^^^
 
 error: declaration of a `no_mangle` function
-  --> $DIR/lint-unsafe-code.rs:21:22
+  --> $DIR/lint-unsafe-code.rs:21:25
    |
 LL |         #[no_mangle] fn foo() {}
-   |                      ^^^^^^^^^^^
+   |                         ^^^
 ...
 LL |     unsafe_in_macro!()
    |     ------------------ in this macro invocation
@@ -118,10 +118,10 @@ LL |     unsafe_in_macro!()
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: declaration of a `no_mangle` static
-  --> $DIR/lint-unsafe-code.rs:22:22
+  --> $DIR/lint-unsafe-code.rs:22:29
    |
 LL |         #[no_mangle] static FOO: u32 = 5;
-   |                      ^^^^^^^^^^^^^^^^^^^^
+   |                             ^^^
 ...
 LL |     unsafe_in_macro!()
    |     ------------------ in this macro invocation
@@ -129,10 +129,10 @@ LL |     unsafe_in_macro!()
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: declaration of a function with `export_name`
-  --> $DIR/lint-unsafe-code.rs:23:32
+  --> $DIR/lint-unsafe-code.rs:23:35
    |
 LL |         #[export_name = "bar"] fn bar() {}
-   |                                ^^^^^^^^^^^
+   |                                   ^^^
 ...
 LL |     unsafe_in_macro!()
    |     ------------------ in this macro invocation
@@ -140,10 +140,10 @@ LL |     unsafe_in_macro!()
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: declaration of a static with `export_name`
-  --> $DIR/lint-unsafe-code.rs:25:32
+  --> $DIR/lint-unsafe-code.rs:25:39
    |
 LL |         #[export_name = "BAR"] static BAR: u32 = 5;
-   |                                ^^^^^^^^^^^^^^^^^^^^
+   |                                       ^^^
 ...
 LL |     unsafe_in_macro!()
    |     ------------------ in this macro invocation