summaryrefslogtreecommitdiffstats
path: root/examples/04_point.rs
blob: a5b191096d05474492a93abc4e0335d6da6752ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
struct Point {
    x: int,
    y: int,
}

fn main () {
    let p1 = Point { x: 1, y: 2 };
    println!("({}, {})", p1.x, p1.y);
}