Skip to content

Derive assist #9792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JMS55 opened this issue Aug 5, 2021 · 2 comments
Closed

Derive assist #9792

JMS55 opened this issue Aug 5, 2021 · 2 comments

Comments

@JMS55
Copy link

JMS55 commented Aug 5, 2021

For instance, if you try to use == on an enum that doesn't implement PartialEq/Eq, RA will tell you that you need to implement it.

It would be nice if RA provided an assist add the #[derive()] for us, for types defined in our workspace.

@jonas-schievink
Copy link
Contributor

We just display rustc's diagnostic, which does not include that sort of suggestion. Closing as a duplicate of rust-lang/rust#85845.

@jonas-schievink
Copy link
Contributor

Also I should probably note that there already is an "Add #[derive]" assist that helps a bit with this. We also have auto-completion for PartialEq in the derive list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants