summaryrefslogtreecommitdiffstats
path: root/tests/ui/binding/borrowed-ptr-pattern-3.rs
blob: f2607eee8158dff706dd9119b9caede318b09739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

fn foo<'r>(s: &'r usize) -> bool {
    match s {
        &3 => true,
        _ => false
    }
}

pub fn main() {
    assert!(foo(&3));
    assert!(!foo(&4));
}