about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-19 00:05:23 +0200
committerSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-21 11:47:24 +0200
commit0385d64d197c0200ce089d2108ded2d43de91c7a (patch)
treeb58577f7746a1a6f6bccbf2e90504b29740456aa /src/test
parent1301422a6c2e8916560b8cc2f0564f38d8858a75 (diff)
downloadrust-0385d64d197c0200ce089d2108ded2d43de91c7a.tar.gz
rust-0385d64d197c0200ce089d2108ded2d43de91c7a.zip
normalize use of backticks in compiler messages for librustc_lint
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui-fulldeps/plugin-attr-register-deny.stderr2
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr70
-rw-r--r--src/test/ui/invalid/invalid-plugin-attr.stderr2
-rw-r--r--src/test/ui/issues/issue-45562.fixed2
-rw-r--r--src/test/ui/issues/issue-45562.rs2
-rw-r--r--src/test/ui/issues/issue-45562.stderr2
-rw-r--r--src/test/ui/lint/lint-misplaced-attr.stderr2
-rw-r--r--src/test/ui/lint/lint-unexported-no-mangle.rs4
-rw-r--r--src/test/ui/lint/lint-unexported-no-mangle.stderr8
-rw-r--r--src/test/ui/lint/suggestions.rs6
-rw-r--r--src/test/ui/lint/suggestions.stderr6
-rw-r--r--src/test/ui/missing_debug_impls.stderr4
12 files changed, 55 insertions, 55 deletions
diff --git a/src/test/ui-fulldeps/plugin-attr-register-deny.stderr b/src/test/ui-fulldeps/plugin-attr-register-deny.stderr
index 7fea5134d7a..64a67f6e160 100644
--- a/src/test/ui-fulldeps/plugin-attr-register-deny.stderr
+++ b/src/test/ui-fulldeps/plugin-attr-register-deny.stderr
@@ -10,7 +10,7 @@ note: lint level defined here
 LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
-error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/plugin-attr-register-deny.rs:14:5
    |
 LL |     #[bar]
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
index f987cb97d1a..94757c5a35a 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
@@ -632,7 +632,7 @@ warning: unused attribute
 LL |     #[no_std] fn f() { }
    |     ^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5
    |
 LL |     #[no_std] fn f() { }
@@ -644,7 +644,7 @@ warning: unused attribute
 LL |     #[no_std] struct S;
    |     ^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:5
    |
 LL |     #[no_std] struct S;
@@ -656,7 +656,7 @@ warning: unused attribute
 LL |     #[no_std] type T = S;
    |     ^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:491:5
    |
 LL |     #[no_std] type T = S;
@@ -668,7 +668,7 @@ warning: unused attribute
 LL |     #[no_std] impl S { }
    |     ^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:495:5
    |
 LL |     #[no_std] impl S { }
@@ -680,7 +680,7 @@ warning: unused attribute
 LL | #[no_std]
    | ^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:475:1
    |
 LL | #[no_std]
@@ -704,7 +704,7 @@ warning: unused attribute
 LL |     #[crate_name = "0900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:5
    |
 LL |     #[crate_name = "0900"] fn f() { }
@@ -716,7 +716,7 @@ warning: unused attribute
 LL |     #[crate_name = "0900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:642:5
    |
 LL |     #[crate_name = "0900"] struct S;
@@ -728,7 +728,7 @@ warning: unused attribute
 LL |     #[crate_name = "0900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:646:5
    |
 LL |     #[crate_name = "0900"] type T = S;
@@ -740,7 +740,7 @@ warning: unused attribute
 LL |     #[crate_name = "0900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:650:5
    |
 LL |     #[crate_name = "0900"] impl S { }
@@ -752,7 +752,7 @@ warning: unused attribute
 LL | #[crate_name = "0900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:630:1
    |
 LL | #[crate_name = "0900"]
@@ -776,7 +776,7 @@ warning: unused attribute
 LL |     #[crate_type = "0800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5
    |
 LL |     #[crate_type = "0800"] fn f() { }
@@ -788,7 +788,7 @@ warning: unused attribute
 LL |     #[crate_type = "0800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:667:5
    |
 LL |     #[crate_type = "0800"] struct S;
@@ -800,7 +800,7 @@ warning: unused attribute
 LL |     #[crate_type = "0800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:5
    |
 LL |     #[crate_type = "0800"] type T = S;
@@ -812,7 +812,7 @@ warning: unused attribute
 LL |     #[crate_type = "0800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5
    |
 LL |     #[crate_type = "0800"] impl S { }
@@ -824,7 +824,7 @@ warning: unused attribute
 LL | #[crate_type = "0800"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:1
    |
 LL | #[crate_type = "0800"]
@@ -848,7 +848,7 @@ warning: unused attribute
 LL |     #[feature(x0600)] fn f() { }
    |     ^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:5
    |
 LL |     #[feature(x0600)] fn f() { }
@@ -860,7 +860,7 @@ warning: unused attribute
 LL |     #[feature(x0600)] struct S;
    |     ^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:692:5
    |
 LL |     #[feature(x0600)] struct S;
@@ -872,7 +872,7 @@ warning: unused attribute
 LL |     #[feature(x0600)] type T = S;
    |     ^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5
    |
 LL |     #[feature(x0600)] type T = S;
@@ -884,7 +884,7 @@ warning: unused attribute
 LL |     #[feature(x0600)] impl S { }
    |     ^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5
    |
 LL |     #[feature(x0600)] impl S { }
@@ -896,7 +896,7 @@ warning: unused attribute
 LL | #[feature(x0600)]
    | ^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:680:1
    |
 LL | #[feature(x0600)]
@@ -920,7 +920,7 @@ warning: unused attribute
 LL |     #[no_main] fn f() { }
    |     ^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:714:5
    |
 LL |     #[no_main] fn f() { }
@@ -932,7 +932,7 @@ warning: unused attribute
 LL |     #[no_main] struct S;
    |     ^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5
    |
 LL |     #[no_main] struct S;
@@ -944,7 +944,7 @@ warning: unused attribute
 LL |     #[no_main] type T = S;
    |     ^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:722:5
    |
 LL |     #[no_main] type T = S;
@@ -956,7 +956,7 @@ warning: unused attribute
 LL |     #[no_main] impl S { }
    |     ^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:726:5
    |
 LL |     #[no_main] impl S { }
@@ -968,7 +968,7 @@ warning: unused attribute
 LL | #[no_main]
    | ^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:1
    |
 LL | #[no_main]
@@ -992,7 +992,7 @@ warning: unused attribute
 LL |     #[recursion_limit="0200"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
    |
 LL |     #[recursion_limit="0200"] fn f() { }
@@ -1004,7 +1004,7 @@ warning: unused attribute
 LL |     #[recursion_limit="0200"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:756:5
    |
 LL |     #[recursion_limit="0200"] struct S;
@@ -1016,7 +1016,7 @@ warning: unused attribute
 LL |     #[recursion_limit="0200"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:760:5
    |
 LL |     #[recursion_limit="0200"] type T = S;
@@ -1028,7 +1028,7 @@ warning: unused attribute
 LL |     #[recursion_limit="0200"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:5
    |
 LL |     #[recursion_limit="0200"] impl S { }
@@ -1040,7 +1040,7 @@ warning: unused attribute
 LL | #[recursion_limit="0200"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:1
    |
 LL | #[recursion_limit="0200"]
@@ -1064,7 +1064,7 @@ warning: unused attribute
 LL |     #[type_length_limit="0100"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5
    |
 LL |     #[type_length_limit="0100"] fn f() { }
@@ -1076,7 +1076,7 @@ warning: unused attribute
 LL |     #[type_length_limit="0100"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:5
    |
 LL |     #[type_length_limit="0100"] struct S;
@@ -1088,7 +1088,7 @@ warning: unused attribute
 LL |     #[type_length_limit="0100"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:5
    |
 LL |     #[type_length_limit="0100"] type T = S;
@@ -1100,7 +1100,7 @@ warning: unused attribute
 LL |     #[type_length_limit="0100"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5
    |
 LL |     #[type_length_limit="0100"] impl S { }
@@ -1112,7 +1112,7 @@ warning: unused attribute
 LL | #[type_length_limit="0100"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:1
    |
 LL | #[type_length_limit="0100"]
diff --git a/src/test/ui/invalid/invalid-plugin-attr.stderr b/src/test/ui/invalid/invalid-plugin-attr.stderr
index c7b2ce47489..36714c39b31 100644
--- a/src/test/ui/invalid/invalid-plugin-attr.stderr
+++ b/src/test/ui/invalid/invalid-plugin-attr.stderr
@@ -10,7 +10,7 @@ note: lint level defined here
 LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
-error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/invalid-plugin-attr.rs:4:1
    |
 LL | #[plugin(bla)]
diff --git a/src/test/ui/issues/issue-45562.fixed b/src/test/ui/issues/issue-45562.fixed
index c23f5909bbe..ac700fbd046 100644
--- a/src/test/ui/issues/issue-45562.fixed
+++ b/src/test/ui/issues/issue-45562.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 
 #[no_mangle] pub static RAH: usize = 5;
-//~^ ERROR const items should never be #[no_mangle]
+//~^ ERROR const items should never be `#[no_mangle]`
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-45562.rs b/src/test/ui/issues/issue-45562.rs
index 8ac4f6794f6..eabb5a5cecf 100644
--- a/src/test/ui/issues/issue-45562.rs
+++ b/src/test/ui/issues/issue-45562.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 
 #[no_mangle] pub const RAH: usize = 5;
-//~^ ERROR const items should never be #[no_mangle]
+//~^ ERROR const items should never be `#[no_mangle]`
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-45562.stderr b/src/test/ui/issues/issue-45562.stderr
index e6e33aa85c3..be259d3f8a4 100644
--- a/src/test/ui/issues/issue-45562.stderr
+++ b/src/test/ui/issues/issue-45562.stderr
@@ -1,4 +1,4 @@
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/issue-45562.rs:3:14
    |
 LL | #[no_mangle] pub const RAH: usize = 5;
diff --git a/src/test/ui/lint/lint-misplaced-attr.stderr b/src/test/ui/lint/lint-misplaced-attr.stderr
index 1419f858f8e..cd4a89f91c4 100644
--- a/src/test/ui/lint/lint-misplaced-attr.stderr
+++ b/src/test/ui/lint/lint-misplaced-attr.stderr
@@ -22,7 +22,7 @@ error: unused attribute
 LL | #[crate_type = "bin"] fn main() {}
    | ^^^^^^^^^^^^^^^^^^^^^
 
-error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
   --> $DIR/lint-misplaced-attr.rs:11:1
    |
 LL | #[crate_type = "bin"] fn main() {}
diff --git a/src/test/ui/lint/lint-unexported-no-mangle.rs b/src/test/ui/lint/lint-unexported-no-mangle.rs
index 5945c90023c..f260fc32303 100644
--- a/src/test/ui/lint/lint-unexported-no-mangle.rs
+++ b/src/test/ui/lint/lint-unexported-no-mangle.rs
@@ -6,10 +6,10 @@ fn foo() {
 
 #[allow(dead_code)]
 #[no_mangle]
-const FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle]
+const FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
 
 #[no_mangle]
-pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle]
+pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
 
 #[no_mangle]
 pub fn bar()  {
diff --git a/src/test/ui/lint/lint-unexported-no-mangle.stderr b/src/test/ui/lint/lint-unexported-no-mangle.stderr
index 586ee8ed411..c2cbf5feaad 100644
--- a/src/test/ui/lint/lint-unexported-no-mangle.stderr
+++ b/src/test/ui/lint/lint-unexported-no-mangle.stderr
@@ -1,12 +1,12 @@
-warning: lint `private_no_mangle_fns` has been removed: `no longer a warning, #[no_mangle] functions always exported`
+warning: lint `private_no_mangle_fns` has been removed: `no longer a warning, `#[no_mangle]` functions always exported`
    |
    = note: requested on the command line with `-F private_no_mangle_fns`
 
-warning: lint `private_no_mangle_statics` has been removed: `no longer a warning, #[no_mangle] statics always exported`
+warning: lint `private_no_mangle_statics` has been removed: `no longer a warning, `#[no_mangle]` statics always exported`
    |
    = note: requested on the command line with `-F private_no_mangle_statics`
 
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/lint-unexported-no-mangle.rs:9:1
    |
 LL | const FOO: u64 = 1;
@@ -16,7 +16,7 @@ LL | const FOO: u64 = 1;
    |
    = note: requested on the command line with `-F no-mangle-const-items`
 
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/lint-unexported-no-mangle.rs:12:1
    |
 LL | pub const PUB_FOO: u64 = 1;
diff --git a/src/test/ui/lint/suggestions.rs b/src/test/ui/lint/suggestions.rs
index 67bd6dd501b..aa5518d1a7a 100644
--- a/src/test/ui/lint/suggestions.rs
+++ b/src/test/ui/lint/suggestions.rs
@@ -4,7 +4,7 @@
 #![feature(no_debug)]
 
 #[no_mangle] const DISCOVERY: usize = 1;
-//~^ ERROR const items should never be #[no_mangle]
+//~^ ERROR const items should never be `#[no_mangle]`
 //~| HELP try a static value
 
 #[no_mangle]
@@ -20,7 +20,7 @@ mod badlands {
     // item is already `pub` (but triggered the lint because, e.g., it's in a
     // private module). (Issue #47383)
     #[no_mangle] pub const DAUNTLESS: bool = true;
-    //~^ ERROR const items should never be #[no_mangle]
+    //~^ ERROR const items should never be `#[no_mangle]`
     //~| HELP try a static value
     #[no_mangle] pub fn val_jean<T>() {}
     //~^ WARN functions generic over types or consts must be mangled
@@ -28,7 +28,7 @@ mod badlands {
 
     // ... but we can suggest just-`pub` instead of restricted
     #[no_mangle] pub(crate) const VETAR: bool = true;
-    //~^ ERROR const items should never be #[no_mangle]
+    //~^ ERROR const items should never be `#[no_mangle]`
     //~| HELP try a static value
     #[no_mangle] pub(crate) fn crossfield<T>() {}
     //~^ WARN functions generic over types or consts must be mangled
diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr
index eb1e95dcdc5..2042ed75537 100644
--- a/src/test/ui/lint/suggestions.stderr
+++ b/src/test/ui/lint/suggestions.stderr
@@ -52,7 +52,7 @@ LL | ||             b = 1;
    |  |____________|
    |               help: remove this `mut`
 
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/suggestions.rs:6:14
    |
 LL | #[no_mangle] const DISCOVERY: usize = 1;
@@ -83,7 +83,7 @@ LL |             Equinox { warp_factor: warp_factor } => {}
    |
    = note: `#[warn(non_shorthand_field_patterns)]` on by default
 
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/suggestions.rs:22:18
    |
 LL |     #[no_mangle] pub const DAUNTLESS: bool = true;
@@ -99,7 +99,7 @@ LL |     #[no_mangle] pub fn val_jean<T>() {}
    |     |
    |     help: remove this attribute
 
-error: const items should never be #[no_mangle]
+error: const items should never be `#[no_mangle]`
   --> $DIR/suggestions.rs:30:18
    |
 LL |     #[no_mangle] pub(crate) const VETAR: bool = true;
diff --git a/src/test/ui/missing_debug_impls.stderr b/src/test/ui/missing_debug_impls.stderr
index bb8390a8f31..b9530587787 100644
--- a/src/test/ui/missing_debug_impls.stderr
+++ b/src/test/ui/missing_debug_impls.stderr
@@ -1,4 +1,4 @@
-error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation
+error: type does not implement `fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation
   --> $DIR/missing_debug_impls.rs:7:1
    |
 LL | pub enum A {}
@@ -10,7 +10,7 @@ note: lint level defined here
 LL | #![deny(missing_debug_implementations)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation
+error: type does not implement `fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation
   --> $DIR/missing_debug_impls.rs:20:1
    |
 LL | pub struct Foo;