27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
|
|
--> tests/compile/non_send.rs:11:9
|
|
|
|
|
11 | lua.create_function(move |_, ()| {
|
|
| _________^^^^^^^^^^^^^^^_-
|
|
| | |
|
|
| | `Rc<Cell<i32>>` cannot be sent between threads safely
|
|
12 | | Ok(data.get())
|
|
13 | | })?
|
|
| |_____- within this `[closure@$DIR/tests/compile/non_send.rs:11:25: 13:6]`
|
|
|
|
|
= help: within `[closure@$DIR/tests/compile/non_send.rs:11:25: 13:6]`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
|
|
note: required because it's used within this closure
|
|
--> tests/compile/non_send.rs:11:25
|
|
|
|
|
11 | lua.create_function(move |_, ()| {
|
|
| _________________________^
|
|
12 | | Ok(data.get())
|
|
13 | | })?
|
|
| |_____^
|
|
= note: required because of the requirements on the impl of `mlua::types::MaybeSend` for `[closure@$DIR/tests/compile/non_send.rs:11:25: 13:6]`
|
|
note: required by a bound in `Lua::create_function`
|
|
--> src/lua.rs
|
|
|
|
|
| F: 'static + MaybeSend + Fn(&'lua Lua, A) -> Result<R>,
|
|
| ^^^^^^^^^ required by this bound in `Lua::create_function`
|