mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
12 lines
208 B
Rust
12 lines
208 B
Rust
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
|
|
}
|