-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Path & PathBuf missing FromStr trait #44431
Copy link
Copy link
Closed
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Both
std::path::Pathandstd::path::PathBufimplementstd::convert::From<String>but neither one implements thestd::str::FromStrtrait. Since bothPathandPathBufhave infallible conversions from string types, they should implementstd::str::FromStr(esp. so that they can be used as generic "convertible from str" types).Note that if something is done about rust-lang/rfcs#2143, this would be a moot discussion.