-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following code:
#[doc(alias = ["foo"])]
fn t() {}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected unsuffixed literal or identifier, found `[`
--> src/lib.rs:1:15
|
1 | #[doc(alias = ["foo"])]
| ^
error: aborting due to previous error
error: could not compile `playground`
Ideally the output should look like:
Compiling playground v0.0.1 (/playground)
error: expected unsuffixed literal or identifier, found `[`
--> src/lib.rs:1:15
|
1 | #[doc(alias("foo"))]
| ^
error: aborting due to previous error
help: list syntax is not supported for `alias` attribute
suggestion: use `alias("foo")` instead of `alias = ["foo"]`
error: could not compile `playground`
Follow up of #82846
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.