Skip to content

Support all formatting flags in std::path::Display #44048

Description

@alexcrichton

This regression was initially noted in #43765 which was caused in #42613 where this struct in the standard library no longer respects all formatting flags. This is a tracking issue for supporting all formatting flags all the time, not just when it's conveniently already a &str.

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    P-lowLow priority
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 22, 2017
  2. added
    A-fmtArea: `core::fmt`
    I-libs-radarLibs issues that are tracked on the team's radar.
    on Jul 31, 2020
  3. bstrie commented on Jul 3, 2021

    @bstrie
    Contributor

    I'd like to make a test case here but I'm unclear on what the issue is. The PR (#43830) that closed #43765 added tests for the width/fill/alignment formatting flags, and I can't think of what other flags would apply to Path. I'm also not sure what "it" refers to in the sentence "not just when it's conveniently already a &str". However, given that Alex made this issue while discussing the PR, I assume he had something in mind here, so I'm hesitant to close this outright.

  4. added
    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
    and removed
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Jul 28, 2021
  5. added
    E-help-wantedCall for participation: Help is requested to fix this issue.
    on Jul 28, 2021
  6. m-ou-se commented on Jul 28, 2021

    @m-ou-se
    Member

    Relabeling this as a feature request rather than a regression, considering four years have passed without any comments here requesting for it.

    @alexcrichton Can you clarify which flags you are talking about here? See the above comment.

  7. alexcrichton commented on Jul 28, 2021

    @alexcrichton
    MemberAuthor

    Not that I remember 2017 off the top of my head, but rereading here I believe that the issue is that Paths which are valid utf-8 follow formatting flags correctly, but paths which are not valid utf-8 may not. I suspect at the time I was sure that invalid utf-8 paths did not follow formatting flags, but I'm not sure if that's the case still.

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

    A-fmtArea: `core::fmt`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-help-wantedCall for participation: Help is requested to fix this issue.I-libs-radarLibs issues that are tracked on the team's radar.P-lowLow priorityT-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions