Skip to content

Tracking Issue for const_path_initialization #102619

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?

Activity

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

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