]> git.lizzy.rs Git - rust.git/blob - tests/ui/kindck/kindck-nonsendable-1.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / ui / kindck / kindck-nonsendable-1.rs
1 use std::rc::Rc;
2
3 fn foo(_x: Rc<usize>) {}
4
5 fn bar<F:FnOnce() + Send>(_: F) { }
6
7 fn main() {
8     let x = Rc::new(3);
9     bar(move|| foo(x));
10     //~^ ERROR `Rc<usize>` cannot be sent between threads safely
11 }