]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | use std::sync::mpsc::channel; |
970d7e83 | 2 | |
223e47cc | 3 | fn main() { |
1a4d82fc JJ |
4 | let (tx, rx) = channel(); |
5 | let x = Some(rx); | |
6 | tx.send(false); | |
223e47cc | 7 | match x { |
1a4d82fc JJ |
8 | Some(z) if z.recv().unwrap() => { panic!() }, |
9 | //~^ ERROR cannot bind by-move into a pattern guard | |
10 | Some(z) => { assert!(!z.recv().unwrap()); }, | |
11 | None => panic!() | |
223e47cc LB |
12 | } |
13 | } |