Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize std::path::Prefix::is_verbatim as const #76232

Closed
wants to merge 3 commits into from

Conversation

CDirkx
Copy link
Contributor

@CDirkx CDirkx commented Sep 2, 2020

Insta-stabilize the method std::path::Prefix::is_verbatim as const, in the same way as PR#76198.
Also make private methods is_drive and has_implicit_root const.

Possible because of the recent stabilization of const control flow.

Part of #76225.

Insta-stabilize the method `std::path::Prefix::is_verbatim` as const.
Also make private methods `is_drive` and `has_implicit_root` const.

Possible because of the recent stabilization of const control flow.

Also adds a test for `is_verbatim` in a const context.
@rust-highfive
Copy link
Collaborator

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2020
@CDirkx
Copy link
Contributor Author

CDirkx commented Sep 2, 2020

Of all the stabilizations tracked by #76225, this one has the weakest motivation; std::path::Prefix is itself a pretty obscure type and currently hardly usable in a const context because of Path and OsString etc.

However, I also see no reason not to make this method const.

@jonas-schievink jonas-schievink added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 2, 2020
@jonas-schievink jonas-schievink added this to the 1.48 milestone Sep 2, 2020
@jyn514 jyn514 added the A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. label Sep 3, 2020
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 25, 2020
@Dylan-DPC-zz
Copy link

r? @Amanieu

@rust-highfive rust-highfive assigned Amanieu and unassigned sfackler Sep 25, 2020
@LeSeulArtichaut LeSeulArtichaut added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 16, 2020
@crlf0710 crlf0710 added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Nov 6, 2020
@CDirkx
Copy link
Contributor Author

CDirkx commented Nov 24, 2020

Closing this as there is not enough motivation to const-stabilize this method on it's own.

@CDirkx CDirkx closed this Nov 24, 2020
@CDirkx CDirkx deleted the const-path-prefix branch April 21, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants