diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-11 01:46:34 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-11 16:00:49 +0000 |
| commit | 189f264926ff70b58c8907473de60766477e7dd6 (patch) | |
| tree | 39ec2fed72b9826301c68bbc3ca4529e93e8aa14 /tests/ui/span | |
| parent | 577166503aee7290e09374da21f4045c455acfd5 (diff) | |
| download | rust-189f264926ff70b58c8907473de60766477e7dd6.tar.gz rust-189f264926ff70b58c8907473de60766477e7dd6.zip | |
Allow attr entries to declare list of alternatives for `List` and `NamedValueStr`
Modify `AttributeTemplate` to support list of alternatives for list and name value attribute styles. Suggestions now provide more correct suggested code: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler)] | LL - #[used(compiler, linker)] LL + #[used(linker)] | LL - #[used(compiler, linker)] LL + #[used] | ``` instead of the prior "masking" of the lack of this feature by suggesting pipe-separated lists: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler|linker)] | LL - #[used(compiler, linker)] LL + #[used] | ```
Diffstat (limited to 'tests/ui/span')
| -rw-r--r-- | tests/ui/span/E0539.stderr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ui/span/E0539.stderr b/tests/ui/span/E0539.stderr index 01f091a2676..89f710156f3 100644 --- a/tests/ui/span/E0539.stderr +++ b/tests/ui/span/E0539.stderr @@ -9,7 +9,10 @@ LL | #[inline(unknown)] help: try changing it to one of the following valid forms of the attribute | LL - #[inline(unknown)] -LL + #[inline(always|never)] +LL + #[inline(always)] + | +LL - #[inline(unknown)] +LL + #[inline(never)] | LL - #[inline(unknown)] LL + #[inline] |
