Skip to content
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

new_without_default_derive help is confusing #1579

Closed
wfraser opened this issue Feb 27, 2017 · 2 comments
Closed

new_without_default_derive help is confusing #1579

wfraser opened this issue Feb 27, 2017 · 2 comments

Comments

@wfraser
Copy link

wfraser commented Feb 27, 2017

The current help text implies it's only for trivial cases that can be solved by typing #[derive(Default)], but the lint really fires for any struct that has a pub fn new() -> Self, even ones that have logic inside them (which can't be replaced with a #[derive(Default)]).

Help text should indicate that it means either doing the derive, or implementing Default by hand.

@rail-rain
Copy link
Contributor

This is essentially a duplicate of #3697, which is younger; but got a detailed comment. The proposed change is slightly different form that one though.

@wfraser wfraser closed this as completed Dec 11, 2020
@wfraser
Copy link
Author

wfraser commented Dec 11, 2020

This lint has been long since improved.

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