2014-06-29 22:29:33 -07:00
|
|
|
struct Foo {
|
2015-01-08 22:02:42 +11:00
|
|
|
a: usize,
|
2014-06-29 22:29:33 -07:00
|
|
|
}
|
|
|
|
|
2014-10-21 03:40:15 +02:00
|
|
|
fn main() {
|
|
|
|
let Foo {
|
2017-12-10 23:29:24 +03:00
|
|
|
a: _,
|
2016-09-26 13:00:37 -07:00
|
|
|
a: _
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
2014-10-21 03:40:15 +02:00
|
|
|
} = Foo { a: 29 };
|
|
|
|
|
|
|
|
let Foo {
|
2017-12-10 23:29:24 +03:00
|
|
|
a,
|
2016-09-26 13:00:37 -07:00
|
|
|
a: _
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
2014-10-21 03:40:15 +02:00
|
|
|
} = Foo { a: 29 };
|
2014-06-29 22:29:33 -07:00
|
|
|
|
2014-10-21 03:40:15 +02:00
|
|
|
let Foo {
|
2016-09-26 13:00:37 -07:00
|
|
|
a,
|
|
|
|
a: _,
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
|
|
|
a: x
|
|
|
|
//~^ ERROR field `a` bound multiple times in the pattern
|
2014-10-21 03:40:15 +02:00
|
|
|
} = Foo { a: 29 };
|
|
|
|
}
|