]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/borrowed-ptr-pattern-3.rs
Rollup merge of #104793 - nicholasbishop:bishop-add-efiapi, r=JohnTitor
[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 }