diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-09 20:41:01 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-14 18:18:42 +0200 |
| commit | 4bb7bf64e07fee97439ee6e647aa2b58cbaac54d (patch) | |
| tree | c90dba79f6e421a1d7d1fd428100ef32b47c0b9b /tests/ui/coroutine | |
| parent | 5245c399720cf4f2414c2a4d9b4a5007ad942956 (diff) | |
| download | rust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.tar.gz rust-4bb7bf64e07fee97439ee6e647aa2b58cbaac54d.zip | |
Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'tests/ui/coroutine')
| -rw-r--r-- | tests/ui/coroutine/invalid_attr_usage.rs | 4 | ||||
| -rw-r--r-- | tests/ui/coroutine/invalid_attr_usage.stderr | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/ui/coroutine/invalid_attr_usage.rs b/tests/ui/coroutine/invalid_attr_usage.rs index 995a3aa3100..5081c17de4b 100644 --- a/tests/ui/coroutine/invalid_attr_usage.rs +++ b/tests/ui/coroutine/invalid_attr_usage.rs @@ -3,9 +3,9 @@ #![feature(coroutines)] #[coroutine] -//~^ ERROR: attribute should be applied to closures +//~^ ERROR: attribute cannot be used on struct Foo; #[coroutine] -//~^ ERROR: attribute should be applied to closures +//~^ ERROR: attribute cannot be used on fn main() {} diff --git a/tests/ui/coroutine/invalid_attr_usage.stderr b/tests/ui/coroutine/invalid_attr_usage.stderr index 316a0117e5d..46fc80c1bad 100644 --- a/tests/ui/coroutine/invalid_attr_usage.stderr +++ b/tests/ui/coroutine/invalid_attr_usage.stderr @@ -1,14 +1,18 @@ -error: attribute should be applied to closures +error: `#[coroutine]` attribute cannot be used on structs --> $DIR/invalid_attr_usage.rs:5:1 | LL | #[coroutine] | ^^^^^^^^^^^^ + | + = help: `#[coroutine]` can only be applied to closures -error: attribute should be applied to closures +error: `#[coroutine]` attribute cannot be used on functions --> $DIR/invalid_attr_usage.rs:9:1 | LL | #[coroutine] | ^^^^^^^^^^^^ + | + = help: `#[coroutine]` can only be applied to closures error: aborting due to 2 previous errors |
