-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement Debug for ptr::Shared and ptr::Unique. #46792
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think wrapping these in Unique(...)
and Shared(...)
adds value, but adds a lot of noise if you have Vec<Shared<T>>
for example. I would prefer to print them as just the pointer value, Debug::fmt(&self.as_ptr(), f)
. @bluss flagged this as well in #32054 (expand the outdated comments on src/libcore/ptr.rs).
Printing just the pointer sounds good to me. |
👍 to just printing the pointer. |
4625fcd
to
bc2f094
Compare
you all have spoken |
☔ The latest upstream changes (presumably #46749) made this pull request unmergeable. Please resolve the merge conflicts. |
bc2f094
to
82e83c7
Compare
merge conflicts addressed |
This is going to conflict with #46952 which removed Unique and renamed Shared to NonNull. |
I can merge this in #46952, if that helps. |
closing in favor of #46952 |
Fixes #46755.