-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
non_send_fields_in_send_ty seems to be misguided #8045
Copy link
Copy link
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-nurseryLint: Currently in the nursery groupLint: Currently in the nursery group
Description
Activity
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveL-nurseryLint: Currently in the nursery groupLint: Currently in the nursery group
The non_send_fields_in_send_ty lint wrongly states that implementations of
Sendare unsound because some fields are!Send.If the fields were
Send, there would be no need to writeunsafe impl Send for S {}, asSwould be automaticallySend. The only time you need to explicitly implementSendfor a struct is when some fields aren'tSend. That is why the code needs to be markedunsafe.