Skip to content

Add a blanket impl for core::fmt::Write if there is an impl for std::io::Write #77733

Open
@camelid

Description

@camelid

Advantages

Types which implement std::io::Write get an implementation of core::fmt::Write for free. core::fmt::Write is useful if you only want to accept UTF-8 data.

Disadvantages

Could it hurt type inference? If so, is there some way of allowing impl core::fmt::Write for Foo {} (i.e., empty impl body) if there is an impl for std::io::Write?


Cc pulldown-cmark/pulldown-cmark#492

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-fmtArea: `core::fmt`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions