Created
March 25, 2019 14:13
-
-
Save Cynede/c401bd0a256d12bdf905b84ed996e4f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rror[E0277]: `*mut libssh2_sys::LIBSSH2_CHANNEL` cannot be sent between threads safely | |
| --> src/data/mod.rs:43:1 | |
| | | |
| 43 | / lazy_static! { | |
| 44 | | pub static ref SSHSESSION : Mutex<Option<self::rentals::SSHSession>> = { | |
| 45 | | Mutex::new(None) | |
| 46 | | }; | |
| 47 | | } | |
| | |_^ `*mut libssh2_sys::LIBSSH2_CHANNEL` cannot be sent between threads safely | |
| | | |
| = help: within `std::option::Option<data::rentals::SSHSession>`, the trait `std::marker::Send` is not implemented for `*mut libssh2_sys::LIBSSH2_CHANNEL` | |
| = note: required because it appears within the type `ssh2::Channel<'static>` | |
| = note: required because it appears within the type `data::rentals::SSHSession` | |
| = note: required because it appears within the type `std::option::Option<data::rentals::SSHSession>` | |
| = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Mutex<std::option::Option<data::rentals::SSHSession>>` | |
| = note: required by `lazy_static::lazy::Lazy` | |
| = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) | |
| error[E0277]: `*mut libssh2_sys::LIBSSH2_SESSION` cannot be shared between threads safely | |
| --> src/data/mod.rs:43:1 | |
| | | |
| 43 | / lazy_static! { | |
| 44 | | pub static ref SSHSESSION : Mutex<Option<self::rentals::SSHSession>> = { | |
| 45 | | Mutex::new(None) | |
| 46 | | }; | |
| 47 | | } | |
| | |_^ `*mut libssh2_sys::LIBSSH2_SESSION` cannot be shared between threads safely | |
| | | |
| = help: within `ssh2::Session`, the trait `std::marker::Sync` is not implemented for `*mut libssh2_sys::LIBSSH2_SESSION` | |
| = note: required because it appears within the type `ssh2::Session` | |
| = note: required because of the requirements on the impl of `std::marker::Send` for `&'static ssh2::Session` | |
| = note: required because it appears within the type `ssh2::Channel<'static>` | |
| = note: required because it appears within the type `data::rentals::SSHSession` | |
| = note: required because it appears within the type `std::option::Option<data::rentals::SSHSession>` | |
| = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Mutex<std::option::Option<data::rentals::SSHSession>>` | |
| = note: required by `lazy_static::lazy::Lazy` | |
| = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) | |
| error: aborting due to 2 previous errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment