Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for const_path_initialization #102619

Closed
1 task
conradludgate opened this issue Oct 3, 2022 · 0 comments
Closed
1 task

Tracking Issue for const_path_initialization #102619

conradludgate opened this issue Oct 3, 2022 · 0 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@conradludgate
Copy link
Contributor

Feature gate: #![feature(const_path_initialization)]

This is a tracking issue for initializing &Path from a &str in a const context.

Public API

impl Path {
    pub const fn from_os_str(s: &OsStr) -> &Path;
}
impl OsStr {
    pub const fn from_str(s: &str) -> &OsStr;
}

Steps / History

Unresolved Questions

  • from_str conflicts with FromStr::from_str, what alternative name should we choose?
  • Should we provide a direct &str -> &Path conversion, instead of requiring to go through OsStr?
@conradludgate conradludgate added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 3, 2022
@conradludgate conradludgate closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant