Closed
Description
Trait functions with destructured arguments do not parse successfully. Some examples:
struct S { a: usize, b: usize }
struct NewType(usize);
trait T {
// Syntax Error: expected COMMA/expected type
fn f1((a, b): (usize, usize)) {}
// Syntax Error: expected COMMA/expected value parameter/expected R_PAREN...
fn f2(S { a, b }: S) {}
// Syntax Error: expected COMMA
fn f4(NewType(a): NewType) {}
// Syntax Error: expected COMMA
fn f3(&&a: &&usize) {}
}
These all parse okay as free-standing functions, or in a type impl-block.
The double-deref example is mentioned here, so apologies if this is a known issue.
Running in VS Code, built from commit ea0ee8e.
Metadata
Metadata
Assignees
Labels
No labels