Skip to content

Built-in derive macros Send and Sync exist #62050

Closed
@petrochenkov

Description

@petrochenkov

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 or use 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 write unsafe impl Send for Foo {} explicitly should be put on that resolution error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions