rust/tests/ui/binding/borrowed-ptr-pattern-3.rs
2023-01-11 09:32:08 +00:00

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));
}