2018-09-07 10:52:49 -05:00
|
|
|
// Adaptation of existing ui test (from way back in
|
|
|
|
// rust-lang/rust#2329), that starts passing with this feature in
|
|
|
|
// place.
|
|
|
|
|
2019-07-27 17:56:36 -05:00
|
|
|
// run-pass
|
2018-09-07 10:52:49 -05:00
|
|
|
|
|
|
|
use std::sync::mpsc::channel;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let (tx, rx) = channel();
|
|
|
|
let x = Some(rx);
|
2019-09-01 16:30:19 -05:00
|
|
|
tx.send(false).unwrap();
|
|
|
|
tx.send(false).unwrap();
|
2018-09-07 10:52:49 -05:00
|
|
|
match x {
|
|
|
|
Some(z) if z.recv().unwrap() => { panic!() },
|
|
|
|
Some(z) => { assert!(!z.recv().unwrap()); },
|
|
|
|
None => panic!()
|
|
|
|
}
|
|
|
|
}
|