Spurious warning in #[allow(clippy::non_send_fields_in_send_ty)] for complex thread-safe wrapper #8275
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
L-nursery
Lint: Currently in the nursery group
Summary
Our unsafe implementation of
Send
for a wrapper type that deliberately strips out all of the!Send
components of our complex collection tripped the new clippy lint. This was, in fact the entire point of the type, and why we used anunsafe impl
block.Ping @DJMcNab, the author of that PR.
Lint Name
#[allow(clippy::non_send_fields_in_send_ty)]
Reproducer
See bevyengine/bevy#3519 for the case where this lint triggered spuriously.
The existing warning on
World
was correct: this impl was in fact unsound, and this PR was an attempt to solve that problem.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: