-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy patharc_with_non_send_sync.stderr
34 lines (30 loc) · 1.62 KB
/
arc_with_non_send_sync.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
error: usage of an `Arc` that is not `Send` and `Sync`
--> tests/ui/arc_with_non_send_sync.rs:35:13
|
LL | let _ = Arc::new(RefCell::new(42));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Arc<RefCell<i32>>` is not `Send` and `Sync` as `RefCell<i32>` is not `Sync`
= help: if the `Arc` will not used be across threads replace it with an `Rc`
= help: otherwise make `RefCell<i32>` `Send` and `Sync` or consider a wrapper type such as `Mutex`
= note: `-D clippy::arc-with-non-send-sync` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::arc_with_non_send_sync)]`
error: usage of an `Arc` that is not `Send` and `Sync`
--> tests/ui/arc_with_non_send_sync.rs:39:13
|
LL | let _ = Arc::new(mutex.lock().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Arc<MutexGuard<'_, i32>>` is not `Send` and `Sync` as `MutexGuard<'_, i32>` is not `Send`
= help: if the `Arc` will not used be across threads replace it with an `Rc`
= help: otherwise make `MutexGuard<'_, i32>` `Send` and `Sync` or consider a wrapper type such as `Mutex`
error: usage of an `Arc` that is not `Send` and `Sync`
--> tests/ui/arc_with_non_send_sync.rs:42:13
|
LL | let _ = Arc::new(&42 as *const i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Arc<*const i32>` is not `Send` and `Sync` as `*const i32` is neither `Send` nor `Sync`
= help: if the `Arc` will not used be across threads replace it with an `Rc`
= help: otherwise make `*const i32` `Send` and `Sync` or consider a wrapper type such as `Mutex`
error: aborting due to 3 previous errors