Skip to content

The error message for trying to derive an unsafe trait impl doesn't mention the trait name #33571

Closed
@dotdash

Description

@dotdash

I tried to derive every possible trait on an enum and received this error:

enum-derive.rs:3:1: 3:112 note: in this expansion of #[derive] (defined in enum-derive.rs)
enum-derive.rs:3:1: 3:112 error: this unsafe trait should be implemented explicitly
enum-derive.rs:3 #[derive(PartialEq, PartialOrd, Clone, Copy, Hash, RustcEncodable, RustcDecodable, Eq, Ord, Debug, Send, Sync)]
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

which isn't as helpful as it could be because it doesn't tell me which of the traits is the one it's complaining about.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions