blob: 73aaab4183694a190d21c0ac153fb013adb92e83 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
 | //@ run-pass
mod buildings {
    pub struct Tower { pub height: usize }
}
pub fn main() {
    let sears = buildings::Tower { height: 1451 };
    let h: usize = match sears {
        buildings::Tower { height: h } => { h }
    };
    println!("{}", h);
}
 |