summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-3847.rs
blob: 16e0b00b39a85403ecfc2fd3bd534d8e72ac6d65 (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);
}