]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-49257.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / issues / issue-49257.rs
1 // Test for #49257:
2 // emits good diagnostics for `..` pattern fragments not in the last position.
3
4 #![allow(unused)]
5
6 struct Point { x: u8, y: u8 }
7
8 fn main() {
9     let p = Point { x: 0, y: 0 };
10     let Point { .., y, } = p; //~ ERROR expected `}`, found `,`
11     let Point { .., y } = p; //~ ERROR expected `}`, found `,`
12     let Point { .., } = p; //~ ERROR expected `}`, found `,`
13     let Point { .. } = p;
14 }