2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2014-12-14 02:05:32 -06:00
|
|
|
use std::sync::Mutex;
|
2014-11-14 18:30:16 -06:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2014-12-08 22:20:03 -06:00
|
|
|
let x = Some(Mutex::new(true));
|
|
|
|
match x {
|
|
|
|
Some(ref z) if *z.lock().unwrap() => {
|
|
|
|
assert!(*z.lock().unwrap());
|
|
|
|
},
|
|
|
|
_ => panic!()
|
2012-09-12 19:06:36 -05:00
|
|
|
}
|
2013-01-31 19:51:01 -06:00
|
|
|
}
|