mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
12 lines
225 B
Rust
12 lines
225 B
Rust
struct X<F> where F: FnOnce() + 'static + Send {
|
|
field: F,
|
|
}
|
|
|
|
fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
|
//~^ ERROR `F` cannot be sent between threads safely
|
|
return X { field: blk };
|
|
}
|
|
|
|
fn main() {
|
|
}
|