rust/tests/ui/structs/struct-fields-shorthand.rs

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

12 lines
173 B
Rust
Raw Normal View History

struct Foo {
x: i32,
y: i32
}
fn main() {
let (x, y, z) = (0, 1, 2);
let foo = Foo {
x, y, z //~ ERROR struct `Foo` has no field named `z`
};
}