Skip to content

Commit f28bf53

Browse files
committed
Update issue_1 error message
1 parent 62f15fd commit f28bf53

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

hashconsing/tests/try_build/issue_1.stderr

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ error[E0277]: `Cell<RefOrInt<'_>>` cannot be shared between threads safely
2222
| |_________^ `Cell<RefOrInt<'_>>` cannot be shared between threads safely
2323
|
2424
= 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`
2526
note: required because it appears within the type `HashableCell<RefOrInt<'_>>`
2627
--> tests/try_build/issue_1.rs:18:8
2728
|
2829
18 | struct HashableCell<T: Eq + PartialEq + Copy> {
2930
| ^^^^^^^^^^^^
3031
= note: required because it appears within the type `&HashableCell<RefOrInt<'_>>`
3132
= 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+
| ^^^^^^^
3338
note: required because it's used within this closure
3439
--> tests/try_build/issue_1.rs:37:17
3540
|
@@ -38,5 +43,8 @@ note: required because it's used within this closure
3843
note: required by a bound in `crossbeam_utils::thread::Scope::<'env>::spawn`
3944
--> $CARGO/crossbeam-utils-0.8.15/src/thread.rs
4045
|
46+
| pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
47+
| ----- required by a bound in this associated function
48+
...
4149
| F: Send + 'env,
4250
| ^^^^ required by this bound in `Scope::<'env>::spawn`

0 commit comments

Comments
 (0)