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

12 lines
164 B
Rust

fn foo(s: &~str) -> bool {
match s {
&~"kitty" => true,
_ => false
}
}
fn main() {
assert foo(&~"kitty");
assert !foo(&~"gata");
}