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/proc-macro | |
| 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/proc-macro')
| -rw-r--r-- | tests/ui/proc-macro/illegal-proc-macro-derive-use.rs | 2 | ||||
| -rw-r--r-- | tests/ui/proc-macro/illegal-proc-macro-derive-use.stderr | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/proc-macro/illegal-proc-macro-derive-use.rs b/tests/ui/proc-macro/illegal-proc-macro-derive-use.rs index 4efd9e952fc..19473fb2caf 100644 --- a/tests/ui/proc-macro/illegal-proc-macro-derive-use.rs +++ b/tests/ui/proc-macro/illegal-proc-macro-derive-use.rs @@ -8,7 +8,7 @@ pub fn foo(a: proc_macro::TokenStream) -> proc_macro::TokenStream { // Issue #37590 #[proc_macro_derive(Foo)] -//~^ ERROR: the `#[proc_macro_derive]` attribute may only be used on bare functions +//~^ ERROR: attribute cannot be used on pub struct Foo { } diff --git a/tests/ui/proc-macro/illegal-proc-macro-derive-use.stderr b/tests/ui/proc-macro/illegal-proc-macro-derive-use.stderr index c0930ab7102..f01619b9195 100644 --- a/tests/ui/proc-macro/illegal-proc-macro-derive-use.stderr +++ b/tests/ui/proc-macro/illegal-proc-macro-derive-use.stderr @@ -4,11 +4,13 @@ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `p LL | #[proc_macro_derive(Foo)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: the `#[proc_macro_derive]` attribute may only be used on bare functions +error: `#[proc_macro_derive]` attribute cannot be used on structs --> $DIR/illegal-proc-macro-derive-use.rs:10:1 | LL | #[proc_macro_derive(Foo)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: `#[proc_macro_derive]` can only be applied to functions error: aborting due to 2 previous errors |
