error[E0277]: `Cell>` cannot be shared between threads safely --> tests/try_build/issue_1.rs:37:17 | 37 | s.spawn(move |_| { | ___________-----_^ | | | | | required by a bound introduced by this call 38 | | let smuggled_cell = &hcons_cell_ref.get().cell; 39 | | 40 | | loop { ... | 44 | | } 45 | | }); | |_________^ `Cell>` cannot be shared between threads safely | = help: within `&HashableCell>`, the trait `Sync` is not implemented for `Cell>` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` note: required because it appears within the type `HashableCell>` --> tests/try_build/issue_1.rs:18:8 | 18 | struct HashableCell { | ^^^^^^^^^^^^ = note: required because it appears within the type `&HashableCell>` = note: required for `Arc<&HashableCell>>` to implement `Send` note: required because it appears within the type `HConsed<&HashableCell>>` --> src/lib.rs | | pub struct HConsed { | ^^^^^^^ note: required because it's used within this closure --> tests/try_build/issue_1.rs:37:17 | 37 | s.spawn(move |_| { | ^^^^^^^^ note: required by a bound in `crossbeam_utils::thread::Scope::<'env>::spawn` --> $CARGO/crossbeam-utils-0.8.16/src/thread.rs | | pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T> | ----- required by a bound in this associated function ... | F: Send + 'env, | ^^^^ required by this bound in `Scope::<'env>::spawn`