]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-15260.rs
Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkov
[rust.git] / src / test / ui / issues / issue-15260.rs
1 struct Foo {
2     a: usize,
3 }
4
5 fn main() {
6     let Foo {
7         a: _,
8         a: _
9         //~^ ERROR field `a` bound multiple times in the pattern
10     } = Foo { a: 29 };
11
12     let Foo {
13         a,
14         a: _
15         //~^ ERROR field `a` bound multiple times in the pattern
16     } = Foo { a: 29 };
17
18     let Foo {
19         a,
20         a: _,
21         //~^ ERROR field `a` bound multiple times in the pattern
22         a: x
23         //~^ ERROR field `a` bound multiple times in the pattern
24     } = Foo { a: 29 };
25 }