2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2021-05-21 19:35:49 +02:00
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
2015-01-28 08:34:18 -05:00
|
|
|
#[derive(Debug)]
|
2012-08-06 13:15:40 -07:00
|
|
|
struct Foo {
|
2015-03-25 17:06:52 -07:00
|
|
|
x: isize,
|
|
|
|
y: isize
|
2012-08-06 13:15:40 -07:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-08-06 13:15:40 -07:00
|
|
|
let a = Foo { x: 1, y: 2 };
|
2012-09-18 22:45:24 -07:00
|
|
|
let c = Foo { x: 4, .. a};
|
2014-12-20 00:09:35 -08:00
|
|
|
println!("{:?}", c);
|
2012-08-06 13:15:40 -07:00
|
|
|
}
|