I can't compile the code on Nixos.
I tried it using nix-shell with Rust 1.7.1 and even in Flake. In both cases it produced same errors:
Checking cfg-if v1.0.0
Checking bitflags v1.3.2
Checking smallvec v1.11.0
Checking log v0.4.19
Checking once_cell v1.18.0
Checking libc v0.2.147
Checking lazy_static v1.4.0
Checking pin-utils v0.1.0
Checking scoped-tls v1.0.1
Checking memoffset v0.7.1
Checking memoffset v0.6.5
Checking downcast-rs v1.2.0
Checking libloading v0.8.0
Checking static_assertions v1.1.0
Checking memchr v2.5.0
Checking bitflags v2.3.3
Checking linux-raw-sys v0.4.3
Checking num-traits v0.2.16
Checking encoding_index_tests v0.1.4
Checking minimal-lexical v0.2.1
Checking pin-project-lite v0.2.10
Checking thiserror v1.0.44
Checking bytemuck v1.13.1
Checking dlib v0.5.2
Checking slotmap v1.0.6
Checking drm-fourcc v2.2.0
Checking tracing-core v0.1.31
Checking vec_map v0.8.2
Checking wayland-sys v0.30.1
Checking wayland-sys v0.29.5
Checking regex-syntax v0.7.4
Checking utf8parse v0.2.1
Checking scopeguard v1.2.0
Checking regex-syntax v0.6.29
Compiling mlua-sys v0.3.0
Checking anstyle-parse v0.2.1
Checking serde v1.0.177
Checking anstyle v1.0.1
Checking overload v0.1.1
Checking anstyle-query v1.0.0
Checking nom v7.1.3
Checking ppv-lite86 v0.2.17
Checking tracing v0.1.37
Checking colorchoice v1.0.0
Checking rustix v0.38.4
Checking tracing-log v0.1.3
Checking nu-ansi-term v0.46.0
Checking lock_api v0.4.10
Checking libseat-sys v0.1.7
Checking slog v2.7.0
Checking crossbeam-utils v0.8.16
Checking thread_local v1.1.7
Checking encoding-index-korean v1.20141219.5
Checking ordered-float v2.10.0
Checking approx v0.4.0
Checking encoding-index-simpchinese v1.20141219.5
Checking encoding-index-tradchinese v1.20141219.5
Checking encoding-index-singlebyte v1.20141219.5
Checking encoding-index-japanese v1.20141219.5
Checking sharded-slab v0.1.4
Checking instant v0.1.12
Checking libloading v0.7.4
Checking strsim v0.10.0
Checking percent-encoding v2.3.0
Checking time-core v0.1.1
Checking hashbrown v0.12.3
Checking clap_lex v0.5.0
Checking fastrand v2.0.0
Checking itoa v1.0.9
Checking nix v0.26.2
Checking io-lifetimes v1.0.11
Checking nix v0.24.3
Checking nix v0.25.1
Checking drm-sys v0.4.0
Checking getrandom v0.2.10
Checking rand_core v0.6.4
Checking regex-automata v0.3.3
Checking libudev-sys v0.1.4
Checking memmap2 v0.5.10
Checking mio v0.8.8
Checking udev v0.7.0
Checking rand_chacha v0.3.1
Checking memmap2 v0.7.1
Checking input-sys v1.17.0
Checking x11-dl v2.21.0
Checking xcursor v0.3.4
Checking parking_lot_core v0.9.8
Checking gethostname v0.2.3
Checking regex-automata v0.1.10
Checking errno v0.2.8
Checking gbm-sys v0.2.2
Checking raw-window-handle v0.5.2
Checking libseat v0.1.7
Checking parking_lot v0.12.1
Checking input v0.8.3
Checking rand v0.8.5
Checking xkbcommon v0.5.1
Checking is-terminal v0.4.9
Checking anstream v0.3.2
Checking clap_builder v4.3.19
Checking tempfile v3.7.0
Checking wayland-commons v0.29.5
Checking matchers v0.1.0
Checking indexmap v1.9.3
Checking time v0.3.23
Checking num_cpus v1.16.0
Checking calloop v0.10.6
Checking x11rb-protocol v0.11.1
Checking wayland-client v0.29.5
Checking socket2 v0.4.9
Checking regex v1.9.1
Checking signal-hook-registry v1.4.1
Checking time v0.1.45
Checking encoding v0.2.33
Checking serde-value v0.7.0
Checking erased-serde v0.3.28
Checking tracing-subscriber v0.3.17
Checking ash v0.37.3+1.3.251
Checking crossbeam-channel v0.5.8
Checking cgmath v0.18.0
Checking profiling v1.0.8
Checking bstr v1.6.0
Checking iana-time-zone v0.1.57
Checking appendlist v1.4.0
Checking scan_fmt v0.2.6
Checking bytes v1.4.0
Checking edid-rs v0.1.0
Checking wayland-protocols v0.29.5
Checking wayland-cursor v0.29.5
Checking glow v0.12.3
Checking rustc-hash v1.1.0
Checking chrono v0.4.26
Checking tokio v1.29.1
Checking clap v4.3.19
Checking anyhow v1.0.72
Checking colored v2.0.4
Checking tracing-appender v0.2.2
Checking wayland-backend v0.1.2
Checking drm-ffi v0.5.0
Checking drm v0.9.0
Checking gbm v0.12.0
Checking smithay-drm-extras v0.1.0 (https://github.com/Smithay/smithay.git#4067f083)
Checking wayland-server v0.30.1
Checking wayland-egl v0.30.0
Checking wayland-protocols v0.30.1
Checking smithay-client-toolkit v0.16.0
Checking winit v0.28.6
Checking wayland-protocols-misc v0.1.0
Checking wayland-protocols-wlr v0.1.0
Checking x11rb v0.11.1
Checking mlua v0.9.0-rc.2
Checking smithay v0.3.0 (https://github.com/smithay/smithay?rev=4067f08#4067f083)
Checking stratawm v0.0.1 (~/stratawm)
error[E0106]: missing lifetime specifier
--> src/libs/parse_config.rs:13:63
|
13 | pub fn parse_config() -> Result<(Config, HashMap<Vec<String>, Function>)> {
| ^^^^^^^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime
|
13 | pub fn parse_config() -> Result<(Config, HashMap<Vec<String>, Function<'static>>)> {
| +++++++++
error[E0106]: missing lifetime specifier
--> src/libs/structs/config.rs:71:12
|
71 | pub func: Function,
| ^^^^^^^^ expected named lifetime parameter
|
help: consider introducing a named lifetime parameter
|
69 ~ pub struct Keybinding<'a> {
70 | pub keys: Vec<String>,
71 ~ pub func: Function<'a>,
|
warning: unused import: `serde_derive::Deserialize`
--> src/libs/structs/config.rs:4:5
|
4 | use serde_derive::Deserialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0277]: `*mut mlua::lua_State` cannot be shared between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `*mut mlua::lua_State` cannot be shared between threads safely
|
= help: within `mlua::lua::LuaInner`, the trait `std::marker::Sync` is not implemented for `*mut mlua::lua_State`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `*mut mlua::lua_State` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `*mut mlua::lua_State` cannot be sent between threads safely
|
= help: within `mlua::lua::LuaInner`, the trait `std::marker::Send` is not implemented for `*mut mlua::lua_State`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `std::cell::UnsafeCell<mlua::lua::ExtraData>` cannot be shared between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `std::cell::UnsafeCell<mlua::lua::ExtraData>` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell<mlua::lua::ExtraData>`
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `*const std::ffi::c_void` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `*const std::ffi::c_void` cannot be sent between threads safely
|
= help: within `std::cell::UnsafeCell<mlua::lua::ExtraData>`, the trait `std::marker::Send` is not implemented for `*const std::ffi::c_void`
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `std::ptr::NonNull<mlua::memory::MemoryState>` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `std::ptr::NonNull<mlua::memory::MemoryState>` cannot be sent between threads safely
|
= help: within `std::cell::UnsafeCell<mlua::lua::ExtraData>`, the trait `std::marker::Send` is not implemented for `std::ptr::NonNull<mlua::memory::MemoryState>`
note: required because it appears within the type `Option<NonNull<MemoryState>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/option.rs:563:10
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)` cannot be shared between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)`
= note: required for `std::sync::Arc<(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)>` to implement `std::marker::Send`
note: required because it appears within the type `Option<Arc<dyn Fn(&Lua, Debug<'b>) -> Result<(), Error>>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/option.rs:563:10
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)`
= note: required for `std::sync::Arc<(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, mlua::Debug<'b>) -> std::result::Result<(), mlua::Error> + 'static)>` to implement `std::marker::Send`
note: required because it appears within the type `Option<Arc<dyn Fn(&Lua, Debug<'b>) -> Result<(), Error>>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/option.rs:563:10
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, &'b str, bool) -> std::result::Result<(), mlua::Error> + 'static)` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, &'b str, bool) -> std::result::Result<(), mlua::Error> + 'static)` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, &'b str, bool) -> std::result::Result<(), mlua::Error> + 'static)`
= note: required for `std::ptr::Unique<(dyn for<'a, 'b> std::ops::Fn(&'a mlua::Lua, &'b str, bool) -> std::result::Result<(), mlua::Error> + 'static)>` to implement `std::marker::Send`
note: required because it appears within the type `Box<dyn Fn(&Lua, &str, bool) -> Result<(), Error>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:195:12
note: required because it appears within the type `Option<Box<dyn Fn(&Lua, &str, bool) -> Result<(), Error>>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/option.rs:563:10
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `(dyn std::any::Any + 'static)` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `(dyn std::any::Any + 'static)` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `(dyn std::any::Any + 'static)`
= note: required for `std::ptr::Unique<(dyn std::any::Any + 'static)>` to implement `std::marker::Send`
note: required because it appears within the type `Box<dyn Any>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:195:12
= note: required for `std::cell::RefCell<std::boxed::Box<(dyn std::any::Any + 'static)>>` to implement `std::marker::Send`
= note: required because it appears within the type `(TypeId, RefCell<Box<dyn Any>>)`
= note: required for `hashbrown::raw::RawTable<(std::any::TypeId, std::cell::RefCell<std::boxed::Box<(dyn std::any::Any + 'static)>>)>` to implement `std::marker::Send`
note: required because it appears within the type `HashMap<TypeId, RefCell<Box<dyn Any>>, BuildHasherDefault<FxHasher>>`
--> /cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.13.1/src/map.rs:188:12
note: required because it appears within the type `HashMap<TypeId, RefCell<Box<dyn Any>>, BuildHasherDefault<FxHasher>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/collections/hash/map.rs:214:12
note: required because it appears within the type `UnsafeCell<HashMap<TypeId, RefCell<Box<dyn Any>>, BuildHasherDefault<FxHasher>>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
note: required because it appears within the type `AppData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:382:19
|
382 | pub(crate) struct AppData {
| ^^^^^^^
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
error[E0277]: `*mut std::ffi::c_void` cannot be sent between threads safely
--> src/libs/structs/config.rs:85:20
|
85 | pub static CONFIG: Lazy<Config> = Lazy::new(parse_config);
| ^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be sent between threads safely
|
= help: within `mlua::Value<'static>`, the trait `std::marker::Send` is not implemented for `*mut std::ffi::c_void`
note: required because it appears within the type `LightUserData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:35:12
|
35 | pub struct LightUserData(pub *mut c_void);
| ^^^^^^^^^^^^^
note: required because it appears within the type `Value<'static>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/value.rs:31:10
|
31 | pub enum Value<'lua> {
| ^^^^^
= note: required for `std::ptr::Unique<mlua::Value<'static>>` to implement `std::marker::Send`
note: required because it appears within the type `RawVec<Value<'static>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Value<'static>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `MultiValue<'static>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/value.rs:352:12
|
352 | pub struct MultiValue<'lua>(Vec<Value<'lua>>);
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<mlua::MultiValue<'static>>` to implement `std::marker::Send`
note: required because it appears within the type `RawVec<MultiValue<'static>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<MultiValue<'static>>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `ExtraData`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:81:19
|
81 | pub(crate) struct ExtraData {
| ^^^^^^^^^
note: required because it appears within the type `UnsafeCell<ExtraData>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/cell.rs:1986:12
= note: required for `std::sync::Arc<std::cell::UnsafeCell<mlua::lua::ExtraData>>` to implement `std::marker::Sync`
note: required because it appears within the type `LuaInner`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:73:12
|
73 | pub struct LuaInner {
| ^^^^^^^^
= note: required for `std::sync::Arc<mlua::lua::LuaInner>` to implement `std::marker::Sync`
note: required because it appears within the type `Lua`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/lua.rs:70:12
|
70 | pub struct Lua(Arc<LuaInner>);
| ^^^
= note: required because it appears within the type `&Lua`
note: required because it appears within the type `LuaRef<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/types.rs:272:19
|
272 | pub(crate) struct LuaRef<'lua> {
| ^^^^^^
note: required because it appears within the type `Function<'_>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mlua-0.9.0-rc.2/src/function.rs:26:12
|
26 | pub struct Function<'lua>(pub(crate) LuaRef<'lua>);
| ^^^^^^^^
note: required because it appears within the type `Keybinding`
--> src/libs/structs/config.rs:69:12
|
69 | pub struct Keybinding {
| ^^^^^^^^^^
= note: required for `std::ptr::Unique<libs::structs::config::Keybinding>` to implement `std::marker::Sync`
note: required because it appears within the type `RawVec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/raw_vec.rs:51:19
note: required because it appears within the type `Vec<Keybinding>`
--> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/vec/mod.rs:396:12
note: required because it appears within the type `Config`
--> src/libs/structs/config.rs:75:12
|
75 | pub struct Config {
| ^^^^^^
= note: required for `once_cell::imp::OnceCell<libs::structs::config::Config>` to implement `std::marker::Sync`
note: required because it appears within the type `OnceCell<Config>`
--> /home/halfarne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.18.0/src/lib.rs:903:16
|
903 | pub struct OnceCell<T>(Imp<T>);
| ^^^^^^^^
= note: required for `once_cell::sync::Lazy<libs::structs::config::Config>` to implement `std::marker::Sync`
= note: shared static variables must have a type that implements `Sync`
Some errors have detailed explanations: E0106, E0277.
For more information about an error, try `rustc --explain E0106`.
warning: `stratawm` (bin "stratawm") generated 1 warning
error: could not compile `stratawm` (bin "stratawm") due to 12 previous errors; 1 warning emitted