mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
14 lines
173 B
Rust
14 lines
173 B
Rust
// run-pass
|
|
|
|
fn foo<'r>(s: &'r usize) -> bool {
|
|
match s {
|
|
&3 => true,
|
|
_ => false
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
assert!(foo(&3));
|
|
assert!(!foo(&4));
|
|
}
|