rust/src/test/run-pass/borrowed-ptr-pattern-3.rs
2012-09-23 13:30:20 -05:00

12 lines
146 B
Rust

fn foo(s: &r/uint) -> bool {
match s {
&3 => true,
_ => false
}
}
fn main() {
assert foo(&3);
assert !foo(&4);
}