]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/borrowed-ptr-pattern-3.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / binding / borrowed-ptr-pattern-3.rs
1 // run-pass
2
3 fn foo<'r>(s: &'r usize) -> bool {
4     match s {
5         &3 => true,
6         _ => false
7     }
8 }
9
10 pub fn main() {
11     assert!(foo(&3));
12     assert!(!foo(&4));
13 }