Tracking Issue for `path_trailing_sep`
Open
Nobody has claimed this yet.
C-tracking-issue
S-tracking-unimplemented
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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.)
- ACP: rust-lang/libs-team#335
- Implementation: #142506
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Should we offer the
set_trailing_sepAPI orpush_trailing_sep/pop_trailing_sepseparately? Right now, both are offered to see which is preferred. - Is
trim_trailing_sepnecessary? It wasn't in the original ACP. trim_trailing_sepwill leave/as/, buthas_trailing_sepreturns true for/. That seems like a possible bug?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the public API listed in the issue and review the implementation tracked by #142506. Examine the unresolved questions about set_trailing_sep versus push/pop and trim_trailing_sep, including the root-path behavior. Done means resolving those questions, completing the final comment period, and preparing the stabilization PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100