about summary refs log tree commit diff
path: root/tests/ui/structs-enums/functional-struct-upd.rs
blob: 4128db0ab9ed7ae53d65ae255d2f93993e061fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ 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);
}