Closed
Description
The following code works on beta:
fn foo([a, b]: [i32; 2]) {}
But when used in a trait like so:
trait Foo {
fn foo([a, b]: [i32; 2]) {}
}
rustc reports the following error:
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `,`
--> src/main.rs:2:14
|
2 | fn foo([a, b]: [i32; 2]) {}
| ^ expected one of 7 possible tokens here
error: aborting due to previous error
Metadata
Metadata
Assignees
Labels
Area: The lexing & parsing of Rust source code to an ASTCategory: An issue proposing an enhancement or a PR with one.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Relevant to the compiler team, which will review and decide on the PR/issue.