]> git.lizzy.rs Git - rust.git/blob - tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
Rollup merge of #107740 - oli-obk:lock_tcx, r=petrochenkov
[rust.git] / tests / ui / functions-closures / closure-bounds-can-capture-chan.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 use std::sync::mpsc::channel;
5
6 fn foo<F:FnOnce()+Send>(blk: F) {
7     blk();
8 }
9
10 pub fn main() {
11     let (tx, rx) = channel();
12     foo(move || {
13         tx.send(()).unwrap();
14     });
15     rx.recv().unwrap();
16 }