-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-grammarArea: The grammar of RustArea: The grammar of Rust
Description
fn main() {
let &mut _ok = &1;
let &(mut _error) = &1;
}
paren-pat.rs:3:20: 3:21 error: expected `,` but found `)`
paren-pat.rs:3 let &(mut _error) = &1;
^
This is a very minor papercut for when one wish to clarify exactly what a pattern is doing; the example above is the main situation in which I've wanted parens, making it clear that it's a &
pattern + a mutable ident binding, rather than a (hypothetical) &mut
pattern.
Metadata
Metadata
Assignees
Labels
A-grammarArea: The grammar of RustArea: The grammar of Rust