summaryrefslogtreecommitdiffstats
path: root/tests/ui/cross-crate/auxiliary/cci_capture_clause.rs
blob: 4cd001ecc9e607d92d35434a263cdfa942cdf8d4 (plain)
1
2
3
4
5
6
7
8
9
10
use std::thread;
use std::sync::mpsc::{Receiver, channel};

pub fn foo<T:'static + Send + Clone>(x: T) -> Receiver<T> {
    let (tx, rx) = channel();
    thread::spawn(move|| {
        tx.send(x.clone());
    });
    rx
}