about summary refs log tree commit diff
path: root/tests/ui/macros
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-08-09 20:41:01 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-08-14 18:18:42 +0200
commit4bb7bf64e07fee97439ee6e647aa2b58cbaac54d (patch)
treec90dba79f6e421a1d7d1fd428100ef32b47c0b9b /tests/ui/macros
parent5245c399720cf4f2414c2a4d9b4a5007ad942956 (diff)
downloadrust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.tar.gz
rust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.zip
Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'tests/ui/macros')
-rw-r--r--tests/ui/macros/issue-68060.rs3
-rw-r--r--tests/ui/macros/issue-68060.stderr7
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/ui/macros/issue-68060.rs b/tests/ui/macros/issue-68060.rs
index 4eddb96848c..2edf9861743 100644
--- a/tests/ui/macros/issue-68060.rs
+++ b/tests/ui/macros/issue-68060.rs
@@ -2,13 +2,12 @@ fn main() {
     (0..)
         .map(
             #[target_feature(enable = "")]
-            //~^ ERROR: attribute should be applied to a function
+            //~^ ERROR: attribute cannot be used on
             #[track_caller]
             //~^ ERROR: `#[track_caller]` on closures is currently unstable
             //~| NOTE: see issue #87417
             //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
             |_| (),
-            //~^ NOTE: not a function
         )
         .next();
 }
diff --git a/tests/ui/macros/issue-68060.stderr b/tests/ui/macros/issue-68060.stderr
index ef2246d5bd6..c701e50f054 100644
--- a/tests/ui/macros/issue-68060.stderr
+++ b/tests/ui/macros/issue-68060.stderr
@@ -1,11 +1,10 @@
-error: attribute should be applied to a function definition
+error: `#[target_feature]` attribute cannot be used on closures
   --> $DIR/issue-68060.rs:4:13
    |
 LL |             #[target_feature(enable = "")]
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-...
-LL |             |_| (),
-   |             ------ not a function definition
+   |
+   = help: `#[target_feature]` can be applied to methods, functions
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
   --> $DIR/issue-68060.rs:6:13