rust/tests/ui/issues/issue-3847.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
256 B
Rust
Raw Normal View History

//@ run-pass
2013-01-10 21:44:27 +00:00
mod buildings {
pub struct Tower { pub height: usize }
2013-01-10 21:44:27 +00:00
}
pub fn main() {
2013-01-10 21:44:27 +00:00
let sears = buildings::Tower { height: 1451 };
let h: usize = match sears {
2013-01-10 21:44:27 +00:00
buildings::Tower { height: h } => { h }
};
println!("{}", h);
2013-01-10 21:44:27 +00:00
}