2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn foo<'r>(s: &'r usize) -> bool {
|
2012-09-07 17:07:32 -07:00
|
|
|
match s {
|
2012-09-23 05:39:39 -07:00
|
|
|
&3 => true,
|
|
|
|
_ => false
|
2012-09-07 17:07:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-03-28 18:39:09 -07:00
|
|
|
assert!(foo(&3));
|
|
|
|
assert!(!foo(&4));
|
2012-09-23 05:39:39 -07:00
|
|
|
}
|