Skip to content

Add suggestions for potentially misspelled #[derive] traits #39323

Closed
@elliotekj

Description

@elliotekj

I ran into an error when compiling a program a couple of days ago that turned out to be due to a spelling mistake. It was suggested by @carols10cents that I create an issue here to discuss adding a “Did you mean X?” hint when compiling fails because of a trait's name.

For clarity's sake, the screenshot below was the error I got and this is the sort of thing I'm suggesting:

error: Custom traits have been depreciated.
 --> src/main.rs:1:10
  |
1 | #[derive(debug)]
  |          ^^^^^
note: Did you mean `#[derive(Debug)]`?

screen shot 2017-01-24 at 21 30 21

I expect this hinges somewhat on whether or not #29644 goes through.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions