]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-49257.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[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 }