mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
|
|
--> tests/compile/non_send.rs:11:25
|
|
|
|
|
11 | lua.create_function(move |_, ()| Ok(data.get()))?
|
|
| --------------- ------------^^^^^^^^^^^^^^^
|
|
| | |
|
|
| | `Rc<Cell<i32>>` cannot be sent between threads safely
|
|
| | within this `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}`
|
|
| required by a bound introduced by this call
|
|
|
|
|
= help: within `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}`, 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 |_, ()| Ok(data.get()))?
|
|
| ^^^^^^^^^^^^
|
|
= note: required for `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}` to implement `MaybeSend`
|
|
note: required by a bound in `Lua::create_function`
|
|
--> src/state.rs
|
|
|
|
|
| pub fn create_function<F, A, R>(&self, func: F) -> Result<Function>
|
|
| --------------- required by a bound in this associated function
|
|
| where
|
|
| F: Fn(&Lua, A) -> Result<R> + MaybeSend + 'static,
|
|
| ^^^^^^^^^ required by this bound in `Lua::create_function`
|