Sign in
chromium
/
external
/
github.com
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
traits
/
closure-rc-not-send.rs
blob: 78ef834afabdb28558fcb12961a1b58d8e17afb9 [
file
]
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
}