Skip to content

Instantly share code, notes, and snippets.

@benwilber
Created October 10, 2021 23:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save benwilber/c649a0b240cf299d3dbbe018c24cbcdc to your computer and use it in GitHub Desktop.
gist
$ cargo build
Compiling temple v0.3.1 (/Users/benw/Projects/temple)
error[E0277]: `*mut rlua::ffi::lua_State` cannot be shared between threads safely
--> src/main.rs:145:13
|
145 | env.add_filter(
| ^^^^^^^^^^ `*mut rlua::ffi::lua_State` cannot be shared between threads safely
|
= help: within `LuaFunction<'_>`, the trait `Sync` is not implemented for `*mut rlua::ffi::lua_State`
= note: required because it appears within the type `LuaContext<'_>`
= note: required because it appears within the type `rlua::types::LuaRef<'_>`
= note: required because it appears within the type `LuaFunction<'_>`
= note: required because of the requirements on the impl of `Send` for `&LuaFunction<'_>`
= note: required because it appears within the type `[closure@src/main.rs:147:13: 153:14]`
= note: required because of the requirements on the impl of `minijinja::filters::Filter<std::string::String, std::string::String, (std::string::String,)>` for `[closure@src/main.rs:147:13: 153:14]`
error[E0277]: `Cell<&()>` cannot be shared between threads safely
--> src/main.rs:145:13
|
145 | env.add_filter(
| ^^^^^^^^^^ `Cell<&()>` cannot be shared between threads safely
|
= help: within `LuaFunction<'_>`, the trait `Sync` is not implemented for `Cell<&()>`
= note: required because it appears within the type `PhantomData<Cell<&()>>`
= note: required because it appears within the type `LuaContext<'_>`
= note: required because it appears within the type `rlua::types::LuaRef<'_>`
= note: required because it appears within the type `LuaFunction<'_>`
= note: required because of the requirements on the impl of `Send` for `&LuaFunction<'_>`
= note: required because it appears within the type `[closure@src/main.rs:147:13: 153:14]`
= note: required because of the requirements on the impl of `minijinja::filters::Filter<std::string::String, std::string::String, (std::string::String,)>` for `[closure@src/main.rs:147:13: 153:14]`
error[E0277]: `*mut PhantomData<UnsafeCell<()>>` cannot be shared between threads safely
--> src/main.rs:145:13
|
145 | env.add_filter(
| ^^^^^^^^^^ `*mut PhantomData<UnsafeCell<()>>` cannot be shared between threads safely
|
= help: within `LuaFunction<'_>`, the trait `Sync` is not implemented for `*mut PhantomData<UnsafeCell<()>>`
= note: required because it appears within the type `PhantomData<*mut PhantomData<UnsafeCell<()>>>`
= note: required because it appears within the type `LuaContext<'_>`
= note: required because it appears within the type `rlua::types::LuaRef<'_>`
= note: required because it appears within the type `LuaFunction<'_>`
= note: required because of the requirements on the impl of `Send` for `&LuaFunction<'_>`
= note: required because it appears within the type `[closure@src/main.rs:147:13: 153:14]`
= note: required because of the requirements on the impl of `minijinja::filters::Filter<std::string::String, std::string::String, (std::string::String,)>` for `[closure@src/main.rs:147:13: 153:14]`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `temple` due to 3 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment