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

Support using = self.inner for Debug #12

Closed
dhardy opened this issue May 27, 2022 · 1 comment
Closed

Support using = self.inner for Debug #12

dhardy opened this issue May 27, 2022 · 1 comment

Comments

@dhardy
Copy link
Contributor

dhardy commented May 27, 2022

There are instances in the std library where a Debug implementation forwards to a single field, e.g. the impl for File. We don't currently support forwarding for Debug, but I think we could support this, e.g.:

# use impl_tools::autoimpl;
#[autoimpl(Debug using self.0)]
struct Thing<T: std::fmt::Debug>(T);
@dhardy
Copy link
Contributor Author

dhardy commented Dec 5, 2022

This impl would print the wrong type name.

@dhardy dhardy closed this as completed Dec 5, 2022
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

1 participant