Built-in derive macros Send
and Sync
exist
#62050
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Their single purpose is improving diagnostics.
When those macros expand they always produce an error saying that
unsafe impl Send for Foo {}
should be written explicitly rather than derived.So, when #61877 is implemented you'll be able to write
use Send
oruse std::Send
without an error, but that's not an intent.The macros should be removed, and
derive(Send)
should result in a resolution error, and the suggestion to writeunsafe impl Send for Foo {}
explicitly should be put on that resolution error.The text was updated successfully, but these errors were encountered: