Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
async-await
/
async-fn
/
suggest-constrain.rs
blob: 319dcc0084a7c655d5330b19707d572899cd6041 [
file
] [
log
] [
blame
]
// Ensure that we don't suggest constraining `CallRefFuture` here,
// since that isn't stable.
fn
spawn
<
F
:
AsyncFn
()
+
Send
>(
f
:
F
)
{
check_send
(
f
());
//~^ ERROR cannot be sent between threads safely
}
fn
check_send
<
T
:
Send
>(
_
:
T
)
{}
fn
main
()
{}