Skip to content

std::num::Wrapping does not implement std::fmt::Display #33006

Closed
@Thiez

Description

@Thiez
Contributor

I would expect this to work, and print '1': println!("{}", std::num::Wrapping(1u8));. Instead the compiler informs me:

error: the trait core::fmt::Display is not implemented for the type core::num::Wrapping<u8>

Perhaps Wrapping should implement Display?

Activity

alexcrichton

alexcrichton commented on Apr 15, 2016

@alexcrichton
Member

Sounds like a good idea to me!

added a commit that references this issue on Apr 16, 2016
79e68a6
added a commit that references this issue on Apr 17, 2016

Rollup merge of rust-lang#33023 - tbu-:pr_wrapping_traits, r=alexcric…

5fc8065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alexcrichton@Thiez

        Issue actions

          `std::num::Wrapping` does not implement `std::fmt::Display` · Issue #33006 · rust-lang/rust