2 Compiling shared-state v0.1.0 (file:///projects/shared-state)
3 error[E0277]: `Rc<Mutex<i32>>` cannot be sent between threads safely
6 11 | let handle = thread::spawn(move || {
7 | ______________________^^^^^^^^^^^^^_-
9 | | `Rc<Mutex<i32>>` cannot be sent between threads safely
10 12 | | let mut num = counter.lock().unwrap();
14 | |_________- within this `[closure@src/main.rs:11:36: 15:10]`
16 = help: within `[closure@src/main.rs:11:36: 15:10]`, the trait `Send` is not implemented for `Rc<Mutex<i32>>`
17 = note: required because it appears within the type `[closure@src/main.rs:11:36: 15:10]`
19 error: aborting due to previous error
21 For more information about this error, try `rustc --explain E0277`.
22 error: could not compile `shared-state`
24 To learn more, run the command again with --verbose.