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 08:17:02 -05:00
struct Foo {
a: u8,
b: u8,
}
fn main() {
let x = Foo { a:1, b:2 };
2016-09-26 15:00:37 -05:00
let Foo { a: x, a: y, b: 0 } = x;
//~^ ERROR field `a` bound multiple times in the pattern
2016-05-12 08:17:02 -05:00
}