// deriving Copy makes a small struct behave like a primitive
#[derive(Clone, Copy, Debug)]
struct Point {
x: i32,
y: i32,
}
fn show(p: Point) {
println!("{:?}", p);
}
fn main() {
let p = Point { x: 1, y: 2 };
show(p);
// p is still usable because Point is Copy
show(p);
}derive Copy so it passes by value