-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.
Description
The fact that PathBuf
is internally an OsStr
is currently noted as an implementation detail in comments. However, a number of methods clearly indicate (in documentation) that it is stored as such, and one PathBuf::into_os_str()
implicitly requires it, as it would be inefficient to do it otherwise.
Would it make sense to add #[repr(transparent)]
to PathBuf
to externally stabilize this guarantee? It would also allow me (as the maintainer of the standback crate) to use transmute
in a guaranteed manner.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.