Skip to content

Implement additional formatting traits for [T] #1916

Closed
@abonander

Description

@abonander

Bringing rust-lang/rust#33127 back from the dead because I came across a desire for this feature today.

However, I would like to extend this proposal to include all the following traits and implement them for<T> [T] where T: <trait> (and presumably Vec<T> as well):

  • Binary
  • LowerExp
  • UpperExp
  • LowerHex
  • UpperHex
  • Octal
  • Pointer

Finally, I would like to echo @retep998's proposal to just copy the Debug impl and use the above traits to format the elements. It fits considering that the main use for these formatting styles would be in debug or logging output anyway.

It may also be desirable to extend these impls to other collections types as well, using their Debug impls as a basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions