Skip to content

Tracking Issue for path_trailing_sep #142503

Open
@clarfonthey

Description

@clarfonthey

Feature gate: #![feature(path_trailing_sep)]

This is a tracking issue for the Path::has_trailing_sep and related methods, which enforce whether a Path or PathBuf ends in a trailing separator.

Public API

impl Path {
    fn has_trailing_sep(&self) -> bool;
    fn with_trailing_sep(&self) -> Cow<'_, Path>;
    fn trim_trailing_sep(&self) -> &Path;
}
impl PathBuf {
    fn set_trailing_sep(&mut self, suffix: bool);
    fn push_trailing_sep(&mut self);
    fn pop_trailing_sep(&mut self);
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • Should we offer the set_trailing_sep API or push_trailing_sep/pop_trailing_sep separately? Right now, both are offered to see which is preferred.
  • Is trim_trailing_sep necessary? It wasn't in the original ACP.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.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