]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs-enums/functional-struct-upd.rs
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
[rust.git] / src / test / ui / structs-enums / functional-struct-upd.rs
1 // run-pass
2
3 #![allow(dead_code)]
4
5 #[derive(Debug)]
6 struct Foo {
7     x: isize,
8     y: isize
9 }
10
11 pub fn main() {
12     let a = Foo { x: 1, y: 2 };
13     let c = Foo { x: 4, .. a};
14     println!("{:?}", c);
15 }