rust/src/test/run-pass/alt-ref-binding-in-guard-3256.rs

9 lines
195 B
Rust
Raw Normal View History

fn main() {
let x = Some(private::exclusive(true));
match move x {
Some(ref z) if z.with(|b| *b) => {
do z.with |b| { assert *b; }
},
_ => fail
}
}