2023-11-07 22:34:36 +00:00
|
|
|
error: usage of an `Arc` that is not `Send` and `Sync`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/arc_with_non_send_sync.rs:35:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
2023-07-17 08:19:29 +00:00
|
|
|
LL | let _ = Arc::new(RefCell::new(42));
|
2023-07-02 12:35:19 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-04-01 13:18:27 +00:00
|
|
|
= 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`
|
2023-07-02 12:35:19 +00:00
|
|
|
= note: `-D clippy::arc-with-non-send-sync` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::arc_with_non_send_sync)]`
|
2023-07-02 12:35:19 +00:00
|
|
|
|
2023-11-07 22:34:36 +00:00
|
|
|
error: usage of an `Arc` that is not `Send` and `Sync`
|
2024-04-01 13:18:27 +00:00
|
|
|
--> tests/ui/arc_with_non_send_sync.rs:38:13
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Arc::new(mutex.lock().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-04-01 13:18:27 +00:00
|
|
|
= 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`
|
2023-07-17 08:19:29 +00:00
|
|
|
|
2023-11-07 22:34:36 +00:00
|
|
|
error: usage of an `Arc` that is not `Send` and `Sync`
|
2024-04-01 13:18:27 +00:00
|
|
|
--> tests/ui/arc_with_non_send_sync.rs:40:13
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Arc::new(&42 as *const i32);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-04-01 13:18:27 +00:00
|
|
|
= 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`
|
2023-07-17 08:19:29 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2023-07-02 12:35:19 +00:00
|
|
|
|