-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove T: Debug
bound on UnsafeCell Debug impl
#83707
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Assigned to a random member of the libs team as highfive didn't respond. |
Not a member of the libs team :) cc @rust-lang/libs, do we want to do a full FCP here? It seems clear we can't print the value in a safe way, so there's not much we can do with the Debug bound I think, even if we have it. |
It doesn't hurt to be sure. I can't see any reason why this would cause any issues though. @rfcbot merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
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 agree -- we can't possibly go from &UnsafeCell<T>
to &T
in order to invoke T
's Debug impl, so the T: Debug
bound is not useful.
Conceivably Debug
could grow a defaulted method which takes an argument of type &UnsafeCell<Self>
, which this PR rules out, but I am comfortable ruling that out because there isn't a type which could meaningfully format an arbitrary &UnsafeCell<Self>
.
This seems reasonable to me as well. Because of the rules regarding trait impls, nobody could have an @rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
@bors r+ rolllup |
📌 Commit 58218f6 has been approved by |
@bors rollup |
Remove `T: Debug` bound on UnsafeCell Debug impl Prior art: rust-lang#65013
Rollup of 6 pull requests Successful merges: - rust-lang#83438 (Update RELEASES.md) - rust-lang#83707 (Remove `T: Debug` bound on UnsafeCell Debug impl) - rust-lang#84084 (Stabilize duration_zero.) - rust-lang#84121 (Stabilize BTree{Map,Set}::retain) - rust-lang#84140 (Don't call bump in check_mistyped_turbofish_with_multiple_type_params) - rust-lang#84141 (Fix typo in error message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Prior art: #65013