Closed as not planned
Description
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
- Implementation: const Path initialisation #92930
Unresolved Questions
from_str
conflicts withFromStr::from_str
, what alternative name should we choose?- Should we provide a direct
&str -> &Path
conversion, instead of requiring to go throughOsStr
?