about summary refs log tree commit diff
path: root/tests/ui/unstable-feature-bound
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/unstable-feature-bound
parent5245c399720cf4f2414c2a4d9b4a5007ad942956 (diff)
downloadrust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.tar.gz
rust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.zip
Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'tests/ui/unstable-feature-bound')
-rw-r--r--tests/ui/unstable-feature-bound/unstable_inherent_method.rs4
-rw-r--r--tests/ui/unstable-feature-bound/unstable_inherent_method.stderr14
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/ui/unstable-feature-bound/unstable_inherent_method.rs b/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
index 0d6e4ebb408..cdd4178fc87 100644
--- a/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
+++ b/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
@@ -9,14 +9,14 @@
 pub trait Trait {
     #[unstable(feature = "feat", issue = "none" )]
     #[unstable_feature_bound(foo)]
-    //~^ ERROR: attribute should be applied to `impl`, trait or free function
+    //~^ ERROR: attribute cannot be used on
     fn foo();
 }
 
 #[stable(feature = "a", since = "1.1.1" )]
 impl Trait for u8 {
     #[unstable_feature_bound(foo)]
-    //~^ ERROR: attribute should be applied to `impl`, trait or free function
+    //~^ ERROR: attribute cannot be used on
     fn foo() {}
 }
 
diff --git a/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr b/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
index 90cbb32df7c..2a1ae936cfe 100644
--- a/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
+++ b/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
@@ -1,20 +1,18 @@
-error: attribute should be applied to `impl`, trait or free function
+error: `#[unstable_feature_bound]` attribute cannot be used on required trait methods
   --> $DIR/unstable_inherent_method.rs:11:5
    |
 LL |     #[unstable_feature_bound(foo)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-LL |
-LL |     fn foo();
-   |     --------- not an `impl`, trait or free function
+   |
+   = help: `#[unstable_feature_bound]` can be applied to functions, trait impl blocks, traits
 
-error: attribute should be applied to `impl`, trait or free function
+error: `#[unstable_feature_bound]` attribute cannot be used on trait methods in impl blocks
   --> $DIR/unstable_inherent_method.rs:18:5
    |
 LL |     #[unstable_feature_bound(foo)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-LL |
-LL |     fn foo() {}
-   |     ----------- not an `impl`, trait or free function
+   |
+   = help: `#[unstable_feature_bound]` can be applied to functions, trait impl blocks, traits
 
 error: aborting due to 2 previous errors