Skip to content

Commit 67b417d

Browse files
committed
Ignore buggy clippy::arc_with_non_send_sync lint
``` error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-channel/src/mpsc/mod.rs:348:17 | 348 | let inner = Arc::new(BoundedInner { | _________________^ 349 | | buffer, 350 | | state: AtomicUsize::new(INIT_STATE), 351 | | message_queue: Queue::new(), ... | 354 | | recv_task: AtomicWaker::new(), 355 | | }); | |______^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync = note: `#[deny(clippy::arc_with_non_send_sync)]` on by default error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-channel/src/mpsc/mod.rs:379:17 | 379 | let inner = Arc::new(UnboundedInner { | _________________^ 380 | | state: AtomicUsize::new(INIT_STATE), 381 | | message_queue: Queue::new(), 382 | | num_senders: AtomicUsize::new(1), 383 | | recv_task: AtomicWaker::new(), 384 | | }); | |______^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-channel/src/oneshot.rs:105:17 | 105 | let inner = Arc::new(Inner::new()); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync error: could not compile `futures-channel` (lib) due to 3 previous errors error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-util/src/future/future/shared.rs:101:28 | 101 | Self { inner: Some(Arc::new(inner)), waker_key: NULL_WAKER_KEY } | ^^^^^^^^^^^^^^^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync = note: `#[deny(clippy::arc_with_non_send_sync)]` on by default error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-util/src/stream/futures_unordered/mod.rs:131:34 | 131 | let ready_to_run_queue = Arc::new(ReadyToRunQueue { | __________________________________^ 132 | | waker: AtomicWaker::new(), 133 | | head: AtomicPtr::new(stub_ptr as *mut _), 134 | | tail: UnsafeCell::new(stub_ptr), 135 | | stub, 136 | | }); | |__________^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync error: usage of `Arc<T>` where `T` is not `Send` or `Sync` --> futures-util/src/lock/bilock.rs:64:19 | 64 | let arc = Arc::new(Inner { | ___________________^ 65 | | state: AtomicPtr::new(ptr::null_mut()), 66 | | value: Some(UnsafeCell::new(t)), 67 | | }); | |__________^ | = help: consider using `Rc<T>` instead or wrapping `T` in a std::sync type like `Mutex<T>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync ```
1 parent 6dca436 commit 67b417d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

futures-channel/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
allow(dead_code, unused_assignments, unused_variables)
2727
)
2828
))]
29+
#![allow(clippy::arc_with_non_send_sync)] // false positive https://github.com/rust-lang/rust-clippy/issues/11076
2930

3031
#[cfg(not(futures_no_atomic_cas))]
3132
#[cfg(feature = "alloc")]

futures-util/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
))]
2020
#![cfg_attr(docsrs, feature(doc_cfg))]
2121
#![allow(clippy::needless_borrow)] // https://github.com/rust-lang/futures-rs/pull/2558#issuecomment-1030745203
22+
#![allow(clippy::arc_with_non_send_sync)] // false positive https://github.com/rust-lang/rust-clippy/issues/11076
2223

2324
#[cfg(all(feature = "bilock", not(feature = "unstable")))]
2425
compile_error!("The `bilock` feature requires the `unstable` feature as an explicit opt-in to unstable features");

0 commit comments

Comments
 (0)