-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-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
Introduced in #57008, the following program
fn main() {
let a, b = x;
}
yields the following message:
error: unexpected `,` in pattern
--> src/main.rs:2:10
|
2 | let a, b = x;
| ^
help: try adding parentheses to match on a tuple..
|
2 | let (a, b) = x;
| ^^^^^^
help: ..or a vertical bar to match on multiple alternatives
|
2 | let a | b = x;
| ^^^^^
However, the suggestion let a | b = x;
is nonsensical.
Metadata
Metadata
Assignees
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-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.