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

8 lines
196 B
Rust
Raw Normal View History

2013-10-23 03:51:45 +00:00
// 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 `{`
2013-10-23 03:51:45 +00:00
}