rust/tests/ui/structs-enums/functional-struct-upd.rs
2024-02-16 20:02:50 +00:00

16 lines
202 B
Rust

//@ run-pass
#![allow(dead_code)]
#[derive(Debug)]
struct Foo {
x: isize,
y: isize
}
pub fn main() {
let a = Foo { x: 1, y: 2 };
let c = Foo { x: 4, .. a};
println!("{:?}", c);
}