about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-06 04:09:12 +0000
committerbors <bors@rust-lang.org>2025-07-06 04:09:12 +0000
commitfebb10d0a2d29278135676783f6a22eb83295981 (patch)
tree42651524f074da3f1974821abbd4885dec6278e3 /tests
parent75d5834a6c571cb0455acb5128ad51118fcbf2be (diff)
parentc3c4fd7c9c0afd71c69026469ce16a1a9d6c6ddc (diff)
downloadrust-febb10d0a2d29278135676783f6a22eb83295981.tar.gz
rust-febb10d0a2d29278135676783f6a22eb83295981.zip
Auto merge of #143507 - matthiaskrgr:rollup-lpg7t12, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143238 (Port `#[ignore]` to the new attribute parsing infrastructure)
 - rust-lang/rust#143441 (Stop using `Key` trait unnecessarily)
 - rust-lang/rust#143478 (Miri subtree update)
 - rust-lang/rust#143486 (remove armv5te-unknown-linux-gnueabi target maintainer)
 - rust-lang/rust#143489 (Complete rustc_ast::mut_visit for spans.)
 - rust-lang/rust#143494 (Remove yields_in_scope from the scope tree.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/attributes/malformed-attrs.rs7
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr29
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr12
-rw-r--r--tests/ui/lint/lint_map_unit_fn.stderr25
-rw-r--r--tests/ui/lint/unused/unused-attr-duplicate.stderr24
-rw-r--r--tests/ui/malformed/malformed-regressions.stderr18
6 files changed, 65 insertions, 50 deletions
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index dbe9c35b0a4..a09fe86557d 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -219,4 +219,11 @@ macro_rules! slump {
     () => {}
 }
 
+#[ignore = 1]
+//~^ ERROR valid forms for the attribute are
+//~| WARN this was previously accepted by the compiler
+fn thing() {
+
+}
+
 fn main() {}
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index 32b0ddf87ba..9fe4f45b3ef 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -309,15 +309,6 @@ LL | #[link]
    = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
 
-error: valid forms for the attribute are `#[ignore]` and `#[ignore = "reason"]`
-  --> $DIR/malformed-attrs.rs:93:1
-   |
-LL | #[ignore()]
-   | ^^^^^^^^^^^
-   |
-   = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
 error: invalid argument
   --> $DIR/malformed-attrs.rs:187:1
    |
@@ -600,6 +591,24 @@ LL | #[inline = 5]
    = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
 
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-attrs.rs:93:1
+   |
+LL | #[ignore()]
+   | ^^^^^^^^^^^
+   |
+   = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
+
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-attrs.rs:222:1
+   |
+LL | #[ignore = 1]
+   | ^^^^^^^^^^^^^
+   |
+   = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
+
 error[E0308]: mismatched types
   --> $DIR/malformed-attrs.rs:110:23
    |
@@ -611,7 +620,7 @@ LL |     #[coroutine = 63] || {}
    = note: expected unit type `()`
               found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
 
-error: aborting due to 73 previous errors; 3 warnings emitted
+error: aborting due to 74 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
 For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
index 9280dfdf92e..5d7d1caeeab 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
@@ -367,12 +367,6 @@ warning: `#[should_panic]` only has an effect on functions
 LL | #![should_panic]
    | ^^^^^^^^^^^^^^^^
 
-warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:1
-   |
-LL | #![ignore]
-   | ^^^^^^^^^^
-
 warning: `#[proc_macro_derive]` only has an effect on functions
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1
    |
@@ -387,6 +381,12 @@ LL | #![link()]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
+warning: `#[ignore]` only has an effect on functions
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:1
+   |
+LL | #![ignore]
+   | ^^^^^^^^^^
+
 warning: attribute should be applied to a foreign function or static
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1
    |
diff --git a/tests/ui/lint/lint_map_unit_fn.stderr b/tests/ui/lint/lint_map_unit_fn.stderr
index 91542af0f6d..930ecd30d1d 100644
--- a/tests/ui/lint/lint_map_unit_fn.stderr
+++ b/tests/ui/lint/lint_map_unit_fn.stderr
@@ -25,19 +25,18 @@ LL +     x.iter_mut().for_each(foo);
 error: `Iterator::map` call that discard the iterator's values
   --> $DIR/lint_map_unit_fn.rs:11:18
    |
-LL |         x.iter_mut().map(|items| {
-   |                      ^   -------
-   |                      |   |
-   |  ____________________|___this function returns `()`, which is likely not what you wanted
-   | |  __________________|
-   | | |
-LL | | |
-LL | | |         items.sort();
-LL | | |     });
-   | | |     -^ after this call to map, the resulting iterator is `impl Iterator<Item = ()>`, which means the only information carried by the iterator is the number of items
-   | | |_____||
-   | |_______|
-   |         called `Iterator::map` with callable that returns `()`
+LL |        x.iter_mut().map(|items| {
+   |                     ^   -------
+   |                     |   |
+   |  ___________________|___this function returns `()`, which is likely not what you wanted
+   | | __________________|
+   | ||
+LL | ||
+LL | ||         items.sort();
+LL | ||     });
+   | ||_____-^ after this call to map, the resulting iterator is `impl Iterator<Item = ()>`, which means the only information carried by the iterator is the number of items
+   | |______|
+   |        called `Iterator::map` with callable that returns `()`
    |
    = note: `Iterator::map`, like many of the methods on `Iterator`, gets executed lazily, meaning that its effects won't be visible until it is iterated
 help: you might have meant to use `Iterator::for_each`
diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr
index eff478d04ae..275eb056305 100644
--- a/tests/ui/lint/unused/unused-attr-duplicate.stderr
+++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr
@@ -41,18 +41,6 @@ LL | #[path = "auxiliary/lint_unused_extern_crate.rs"]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:53:1
-   |
-LL | #[ignore = "some text"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:52:1
-   |
-LL | #[ignore]
-   | ^^^^^^^^^
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:55:1
    |
 LL | #[should_panic(expected = "values don't match")]
@@ -166,6 +154,18 @@ LL |     #[macro_export]
    |     ^^^^^^^^^^^^^^^
 
 error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:53:1
+   |
+LL | #[ignore = "some text"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:52:1
+   |
+LL | #[ignore]
+   | ^^^^^^^^^
+
+error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:60:1
    |
 LL | #[must_use = "some message"]
diff --git a/tests/ui/malformed/malformed-regressions.stderr b/tests/ui/malformed/malformed-regressions.stderr
index 535db55a13d..8c22919a1c2 100644
--- a/tests/ui/malformed/malformed-regressions.stderr
+++ b/tests/ui/malformed/malformed-regressions.stderr
@@ -8,15 +8,6 @@ LL | #[doc]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
    = note: `#[deny(ill_formed_attribute_input)]` on by default
 
-error: valid forms for the attribute are `#[ignore]` and `#[ignore = "reason"]`
-  --> $DIR/malformed-regressions.rs:3:1
-   |
-LL | #[ignore()]
-   | ^^^^^^^^^^^
-   |
-   = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
 error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
   --> $DIR/malformed-regressions.rs:7:1
    |
@@ -35,6 +26,15 @@ LL | #[link = ""]
    = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
 
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-regressions.rs:3:1
+   |
+LL | #[ignore()]
+   | ^^^^^^^^^^^
+   |
+   = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
+
 error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
   --> $DIR/malformed-regressions.rs:5:1
    |