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

why not derive(Debug) by default #28185

Closed
clouds56 opened this Issue Sep 3, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@clouds56
Copy link

clouds56 commented Sep 3, 2015

and use attribute #[nodebug] to specific others?

in the document, it says

Format trait for the :? format. Useful for debugging, all types should implement this.
Generally speaking, you should just derive a Debug implementation.

but sometimes missing it, and I could only manually add it package by package.

@abonander

This comment has been minimized.

Copy link
Contributor

abonander commented Sep 3, 2015

At this point it'd be too widespread of a breaking change to auto-derive Debug by default, because basically all crates would have to be updated.

This would work great as a note or warning lint, though. CC @Manishearth about the viability of this as an idea for clippy.

@Manishearth

This comment has been minimized.

Copy link
Member

Manishearth commented Sep 3, 2015

It's possible as a lint (if all children derive trait Foo, lint that you should too), but perhaps should be Allow. derive ing everything isn't always necessary.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Sep 3, 2015

making a change like this, as @cybergeek94 mentions, would require an RFC. Please pursue one if you're interested in making this, but yeah, there are backwards compatibility challenges here.

@omega-tree

This comment has been minimized.

Copy link

omega-tree commented Sep 19, 2017

Now that we have epochs, Please revisit this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.