@@ -22,14 +22,19 @@ error[E0277]: `Cell<RefOrInt<'_>>` cannot be shared between threads safely
22
22
| |_________^ `Cell<RefOrInt<'_>>` cannot be shared between threads safely
23
23
|
24
24
= help: within `&HashableCell<RefOrInt<'_>>`, the trait `Sync` is not implemented for `Cell<RefOrInt<'_>>`
25
+ = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock`
25
26
note: required because it appears within the type `HashableCell<RefOrInt<'_>>`
26
27
--> tests/try_build/issue_1.rs:18:8
27
28
|
28
29
18 | struct HashableCell<T: Eq + PartialEq + Copy> {
29
30
| ^^^^^^^^^^^^
30
31
= note: required because it appears within the type `&HashableCell<RefOrInt<'_>>`
31
32
= note: required for `Arc<&HashableCell<RefOrInt<'_>>>` to implement `Send`
32
- = note: required because it appears within the type `HConsed<&HashableCell<RefOrInt<'_>>>`
33
+ note: required because it appears within the type `HConsed<&HashableCell<RefOrInt<'_>>>`
34
+ --> src/lib.rs
35
+ |
36
+ | pub struct HConsed<T> {
37
+ | ^^^^^^^
33
38
note: required because it's used within this closure
34
39
--> tests/try_build/issue_1.rs:37:17
35
40
|
@@ -38,5 +43,8 @@ note: required because it's used within this closure
38
43
note: required by a bound in `crossbeam_utils::thread::Scope::<'env>::spawn`
39
44
--> $CARGO/crossbeam-utils-0.8.15/src/thread.rs
40
45
|
46
+ | pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
47
+ | ----- required by a bound in this associated function
48
+ ...
41
49
| F: Send + 'env,
42
50
| ^^^^ required by this bound in `Scope::<'env>::spawn`
0 commit comments