summaryrefslogtreecommitdiffstats
path: root/tests/ui/binding/match-ref-binding-in-guard-3256.rs
blob: 9075a34d41089a4d7380dd1dd0be0cfc6539ca2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

use std::sync::Mutex;

pub fn main() {
    let x = Some(Mutex::new(true));
    match x {
        Some(ref z) if *z.lock().unwrap() => {
            assert!(*z.lock().unwrap());
        },
        _ => panic!()
    }
}