rust/src/test/run-pass/borrowed-ptr-pattern-3.rs

12 lines
146 B
Rust
Raw Normal View History

2012-09-23 07:39:39 -05:00
fn foo(s: &r/uint) -> bool {
2012-09-07 19:07:32 -05:00
match s {
2012-09-23 07:39:39 -05:00
&3 => true,
_ => false
2012-09-07 19:07:32 -05:00
}
}
fn main() {
2012-09-23 07:39:39 -05:00
assert foo(&3);
assert !foo(&4);
}