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