rust/tests/ui/parser/issues/issue-112188.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
330 B
Rust
Raw Permalink Normal View History

//@ run-rustfix
#![allow(unused)]
struct Foo { x: i32 }
fn main() {
let f = Foo { x: 0 };
let Foo { .. } = f;
let Foo { .. } = f; //~ ERROR expected `}`, found `,`
let Foo { x, .. } = f;
let Foo { x, .. } = f; //~ ERROR expected `}`, found `,`
let Foo { x, .. } = f; //~ ERROR expected `}`, found `,`
}