summaryrefslogtreecommitdiffstats
path: root/tests/ui/kindck/kindck-nonsendable-1.rs
blob: b32fd78624b8ea6d135d088027fac70bc3ecadd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
use std::rc::Rc;

fn foo(_x: Rc<usize>) {}

fn bar<F:FnOnce() + Send>(_: F) { }

fn main() {
    let x = Rc::new(3);
    bar(move|| foo(x));
    //~^ ERROR `Rc<usize>` cannot be sent between threads safely
}