rust/src/test/ui/parser/mut-patterns.rs

6 lines
186 B
Rust

// Can't put mut in non-ident pattern
pub fn main() {
struct Foo { x: isize }
let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected one of `:`, `;`, `=`, or `@`, found `{`
}