rust/tests/ui/error-codes/E0025.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
181 B
Rust
Raw Normal View History

2016-05-12 21:17:02 +08:00
struct Foo {
a: u8,
b: u8,
}
fn main() {
let x = Foo { a:1, b:2 };
2016-09-27 04:00:37 +08:00
let Foo { a: x, a: y, b: 0 } = x;
//~^ ERROR field `a` bound multiple times in the pattern
2016-05-12 21:17:02 +08:00
}