mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
189f264926
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] | ```
28 lines
720 B
Plaintext
28 lines
720 B
Plaintext
error[E0565]: malformed `deprecated` attribute input
|
|
--> $DIR/E0565-1.rs:2:1
|
|
|
|
|
LL | #[deprecated("since")]
|
|
| ^^^^^^^^^^^^^-------^^
|
|
| |
|
|
| didn't expect a literal here
|
|
|
|
|
help: try changing it to one of the following valid forms of the attribute
|
|
|
|
|
LL - #[deprecated("since")]
|
|
LL + #[deprecated = "reason"]
|
|
|
|
|
LL - #[deprecated("since")]
|
|
LL + #[deprecated(note = "reason")]
|
|
|
|
|
LL - #[deprecated("since")]
|
|
LL + #[deprecated(since = "version")]
|
|
|
|
|
LL - #[deprecated("since")]
|
|
LL + #[deprecated(since = "version", note = "reason")]
|
|
|
|
|
= and 1 other candidate
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0565`.
|