api-guidelines
api-guidelines copied to clipboard
Extend C-DEREF guideline to say smart pointers should always be transparent in Debug representation
The canonical Debug implementation for any type that implements Deref is:
Debug::fmt(&**self, formatter)
This principle came up during libs team discussion of https://github.com/rust-lang/rust/pull/48553.
Seems reasonable to me!
@rfcbot fcp merge
@rfcbot fcp merge
This suggests a guideline that smart pointers inherit the Debug
implementation of their pointee.
Team member @KodrAus has proposed to merge this. The next step is review by the rest of the tagged team members:
- [x] @Amanieu
- [x] @BurntSushi
- [x] @KodrAus
- [x] @dtolnay
- [ ] @m-ou-se
- [x] @sfackler
- [ ] @withoutboats
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.
:bell: This is now entering its final comment period, as per the review above. :bell:
psst @KodrAus, I wasn't able to add the final-comment-period
label, please do so.
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.
psst @KodrAus, I wasn't able to add the finished-final-comment-period
label, please do so.
Given this passed FCP, should the change be made?