mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 07:00:47 +00:00
13 lines
282 B
Rust
13 lines
282 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 };
|
|
//~^ ERROR `F` cannot be sent between threads safely
|
|
}
|
|
|
|
fn main() {
|
|
}
|