Skip to content

Extend C-DEREF guideline to say smart pointers should always be transparent in Debug representation #168

Open
@dtolnay

Description

@dtolnay

The canonical Debug implementation for any type that implements Deref is:

Debug::fmt(&**self, formatter)

This principle came up during libs team discussion of rust-lang/rust#48553.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libsRelevant to the libraries subteam, which will review and decide on the PR/issue.amendmentAmendments to existing guidelinesdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.needs-fcpThis change is insta-stable, so needs a completed FCP to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions