os-rust/tests/ui/structs-enums/functional-struct-upd.rs

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

16 lines
202 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
2015-01-28 08:34:18 -05:00
#[derive(Debug)]
struct Foo {
x: isize,
y: isize
}
pub fn main() {
let a = Foo { x: 1, y: 2 };
2012-09-18 22:45:24 -07:00
let c = Foo { x: 4, .. a};
println!("{:?}", c);
}