rust/src/test/run-pass/readalias.rs
2018-12-25 21:08:33 -07:00

11 lines
179 B
Rust

#![allow(dead_code)]
struct Point {x: isize, y: isize, z: isize}
fn f(p: Point) { assert_eq!(p.z, 12); }
pub fn main() { let x: Point = Point {x: 10, y: 11, z: 12}; f(x); }