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

Include tests from rust-lang/rust for Debug derive #292

Closed
JelteF opened this issue Aug 13, 2023 · 1 comment
Closed

Include tests from rust-lang/rust for Debug derive #292

JelteF opened this issue Aug 13, 2023 · 1 comment
Labels
Milestone

Comments

@JelteF
Copy link
Owner

JelteF commented Aug 13, 2023

Our Debug derive is intended to be a strict superset of the one provided by std. Otherwise it's not safe for people to do use derive_more::Debug, because their resulting derives might change.

To make sure we actually adhere to this intention we should run the tests from the rust-lang/rust repo. This directory contains the tests for derive(Debug) afaict, but also for some other derives: https://github.com/rust-lang/rust/tree/master/tests/ui/derives We should copy the relevant ones from that directory and add use derive_more::Debug to the top and ensure that they still pass.

Related to #289

@JelteF JelteF added this to the 1.0.0 milestone Aug 13, 2023
@JelteF
Copy link
Owner Author

JelteF commented Jan 24, 2024

I took a look at the std tests, and they seem very basic and very specific to the exact errors that std creates for derives. So I don't really see a reason to include them in our library. Our own Debug tests are much more comprehensive. So I'm closing this.

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

No branches or pull requests

2 participants