]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/borrowed-ptr-pattern-3.rs
Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27
[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 }