]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/borrowed-ptr-pattern-3.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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 }