Skip to content

Instantly share code, notes, and snippets.

@shterrett
Created January 31, 2017 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shterrett/30f2f307750efc309f88e4f8b597de4d to your computer and use it in GitHub Desktop.
Save shterrett/30f2f307750efc309f88e4f8b597de4d to your computer and use it in GitHub Desktop.
Compiling cache-server v0.1.0 (file:///Users/stuart/coding/cLRUd/cache-server)
error[E0277]: the trait bound `std::rc::Rc<std::cell::RefCell<lru_cache::list::Node<std::string::String>>>: std::marker::Send` is not satisfied
--> src/main.rs:24:12
|
24 | server.serve(|| Ok(
| ^^^^^ the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::RefCell<lru_cache::list::Node<std::string::String>>>`
|
= note: `std::rc::Rc<std::cell::RefCell<lru_cache::list::Node<std::string::String>>>` cannot be sent between threads safely
= note: required because of the requirements on the impl of `std::marker::Send` for `std::collections::hash::table::RawTable<std::string::String, std::rc::Rc<std::cell::RefCell<lru_cache::list::Node<std::string::String>>>>`
= note: required because it appears within the type `std::collections::HashMap<std::string::String, std::rc::Rc<std::cell::RefCell<lru_cache::list::Node<std::string::String>>>>`
= note: required because it appears within the type `lru_cache::cache::LruCache<std::string::String>`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Mutex<lru_cache::cache::LruCache<std::string::String>>`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Arc<std::sync::Mutex<lru_cache::cache::LruCache<std::string::String>>>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::Arc<std::sync::Mutex<lru_cache::cache::LruCache<std::string::String>>>`
= note: required because it appears within the type `[closure@src/main.rs:24:18: 27:11 cache:&std::sync::Arc<std::sync::Mutex<lru_cache::cache::LruCache<std::string::String>>>]`
error: aborting due to previous error
error: Could not compile `cache-server`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment