2023-07-17 03:19:29 -05:00
|
|
|
error: usage of an `Arc` that is not `Send` or `Sync`
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/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
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-07-17 03:19:29 -05:00
|
|
|
= note: the trait `Sync` is not implemented for `RefCell<i32>`
|
|
|
|
= note: required for `Arc<RefCell<i32>>` to implement `Send` and `Sync`
|
|
|
|
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
|
2023-07-02 07:35:19 -05:00
|
|
|
= note: `-D clippy::arc-with-non-send-sync` implied by `-D warnings`
|
|
|
|
|
2023-07-17 03:19:29 -05:00
|
|
|
error: usage of an `Arc` that is not `Send` or `Sync`
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/arc_with_non_send_sync.rs:40:13
|
2023-07-17 03:19:29 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Arc::new(mutex.lock().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: the trait `Send` is not implemented for `MutexGuard<'_, i32>`
|
|
|
|
= note: required for `Arc<MutexGuard<'_, i32>>` to implement `Send` and `Sync`
|
|
|
|
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
|
|
|
|
|
|
|
|
error: usage of an `Arc` that is not `Send` or `Sync`
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/arc_with_non_send_sync.rs:44:13
|
2023-07-17 03:19:29 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Arc::new(&42 as *const i32);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: the trait `Send` is not implemented for `*const i32`
|
|
|
|
= note: the trait `Sync` is not implemented for `*const i32`
|
|
|
|
= note: required for `Arc<*const i32>` to implement `Send` and `Sync`
|
|
|
|
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2023-07-02 07:35:19 -05:00
|
|
|
|