Skip to content

Tracking Issue for const_path_initialization #102619

Closed as not planned
Closed as not planned
@conradludgate

Description

@conradludgate

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-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