about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/attributes/lint_on_root.rs2
-rw-r--r--tests/ui/attributes/lint_on_root.stderr4
-rw-r--r--tests/ui/attributes/malformed-reprs.stderr20
-rw-r--r--tests/ui/coverage-attr/name-value.stderr4
-rw-r--r--tests/ui/coverage-attr/word-only.stderr10
-rw-r--r--tests/ui/resolve/path-attr-in-const-block.stderr2
6 files changed, 18 insertions, 24 deletions
diff --git a/tests/ui/attributes/lint_on_root.rs b/tests/ui/attributes/lint_on_root.rs
index bafdb46883f..6cec7508560 100644
--- a/tests/ui/attributes/lint_on_root.rs
+++ b/tests/ui/attributes/lint_on_root.rs
@@ -1,7 +1,7 @@
 // NOTE: this used to panic in debug builds (by a sanity assertion)
 // and not emit any lint on release builds. See https://github.com/rust-lang/rust/issues/142891.
 #![inline = ""]
-//~^ ERROR: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` [ill_formed_attribute_input]
+//~^ ERROR: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]` [ill_formed_attribute_input]
 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 //~| ERROR attribute cannot be used on
 
diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr
index 9d8d1495c1b..f6eafc33d69 100644
--- a/tests/ui/attributes/lint_on_root.stderr
+++ b/tests/ui/attributes/lint_on_root.stderr
@@ -6,7 +6,7 @@ LL | #![inline = ""]
    |
    = help: `#[inline]` can only be applied to functions
 
-error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+error: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]`
   --> $DIR/lint_on_root.rs:3:1
    |
 LL | #![inline = ""]
@@ -19,7 +19,7 @@ LL | #![inline = ""]
 error: aborting due to 2 previous errors
 
 Future incompatibility report: Future breakage diagnostic:
-error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+error: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]`
   --> $DIR/lint_on_root.rs:3:1
    |
 LL | #![inline = ""]
diff --git a/tests/ui/attributes/malformed-reprs.stderr b/tests/ui/attributes/malformed-reprs.stderr
index 43085b9c341..3a788999542 100644
--- a/tests/ui/attributes/malformed-reprs.stderr
+++ b/tests/ui/attributes/malformed-reprs.stderr
@@ -7,18 +7,14 @@ LL | #![repr]
    = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
 help: try changing it to one of the following valid forms of the attribute
    |
-LL - #![repr]
-LL + #[repr(<integer type>)]
-   |
-LL - #![repr]
-LL + #[repr(C)]
-   |
-LL - #![repr]
-LL + #[repr(Rust)]
-   |
-LL - #![repr]
-LL + #[repr(align(...))]
-   |
+LL | #![repr(<integer type>)]
+   |        ++++++++++++++++
+LL | #![repr(C)]
+   |        +++
+LL | #![repr(Rust)]
+   |        ++++++
+LL | #![repr(align(...))]
+   |        ++++++++++++
    = and 2 other candidates
 
 error[E0589]: invalid `repr(align)` attribute: not a power of two
diff --git a/tests/ui/coverage-attr/name-value.stderr b/tests/ui/coverage-attr/name-value.stderr
index 2dac2401e3c..d1527ec810c 100644
--- a/tests/ui/coverage-attr/name-value.stderr
+++ b/tests/ui/coverage-attr/name-value.stderr
@@ -22,10 +22,10 @@ LL |     #![coverage = "off"]
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #![coverage = "off"]
-LL +     #[coverage(off)]
+LL +     #![coverage(off)]
    |
 LL -     #![coverage = "off"]
-LL +     #[coverage(on)]
+LL +     #![coverage(on)]
    |
 
 error[E0539]: malformed `coverage` attribute input
diff --git a/tests/ui/coverage-attr/word-only.stderr b/tests/ui/coverage-attr/word-only.stderr
index e916a817e36..880ad080953 100644
--- a/tests/ui/coverage-attr/word-only.stderr
+++ b/tests/ui/coverage-attr/word-only.stderr
@@ -19,12 +19,10 @@ LL |     #![coverage]
    |
 help: try changing it to one of the following valid forms of the attribute
    |
-LL -     #![coverage]
-LL +     #[coverage(off)]
-   |
-LL -     #![coverage]
-LL +     #[coverage(on)]
-   |
+LL |     #![coverage(off)]
+   |                +++++
+LL |     #![coverage(on)]
+   |                ++++
 
 error[E0539]: malformed `coverage` attribute input
   --> $DIR/word-only.rs:21:1
diff --git a/tests/ui/resolve/path-attr-in-const-block.stderr b/tests/ui/resolve/path-attr-in-const-block.stderr
index f3ae5b60c4f..23f4e319c6d 100644
--- a/tests/ui/resolve/path-attr-in-const-block.stderr
+++ b/tests/ui/resolve/path-attr-in-const-block.stderr
@@ -11,7 +11,7 @@ LL |         #![path = foo!()]
    |         ^^^^^^^^^^------^
    |         |         |
    |         |         expected a string literal here
-   |         help: must be of the form: `#[path = "file"]`
+   |         help: must be of the form: `#![path = "file"]`
    |
    = note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>