Skip to content

Commit 6cf3f55

Browse files
ojedajfvogel
authored andcommitted
rust: sync: remove unneeded #[allow(clippy::non_send_fields_in_send_ty)]
commit 5e7c9b8 upstream. Rust 1.58.0 (before Rust was merged into the kernel) made Clippy's `non_send_fields_in_send_ty` lint part of the `suspicious` lint group for a brief window of time [1] until the minor version 1.58.1 got released a week after, where the lint was moved back to `nursery`. By that time, we had already upgraded to that Rust version, and thus we had `allow`ed the lint here for `CondVar`. Nowadays, Clippy's `non_send_fields_in_send_ty` would still trigger here if it were enabled. Moreover, if enabled, `Lock<T, B>` and `Task` would also require an `allow`. Therefore, it does not seem like someone is actually enabling it (in, e.g., a custom flags build). Finally, the lint does not appear to have had major improvements since then [2]. Thus remove the `allow` since it is unneeded. Link: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1581-2022-01-20 [1] Link: rust-lang/rust-clippy#8045 [2] Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Tested-by: Gary Guo <[email protected]> Reviewed-by: Gary Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit b212da6fdf04970cadae34a90eafabc3fd419385) Signed-off-by: Jack Vogel <[email protected]>
1 parent f20090d commit 6cf3f55

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

rust/kernel/sync/condvar.rs

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ pub struct CondVar {
9292
_pin: PhantomPinned,
9393
}
9494

95-
#[allow(clippy::non_send_fields_in_send_ty)]
9695
// SAFETY: `CondVar` only uses a `struct wait_queue_head`, which is safe to use on any thread.
9796
unsafe impl Send for CondVar {}
9897

0 commit comments

Comments
 (0)