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

Tracking issue for const Ordering methods #76113

Closed
CDirkx opened this issue Aug 30, 2020 · 2 comments
Closed

Tracking issue for const Ordering methods #76113

CDirkx opened this issue Aug 30, 2020 · 2 comments
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@CDirkx
Copy link
Contributor

CDirkx commented Aug 30, 2020

Constify methods of core::cmp::Ordering under feature const_ordering.

Current methods made const:

  • reverse
  • then

Tracking issue for const fn: #57563.

@jonas-schievink jonas-schievink added A-const-fn B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Aug 30, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 31, 2020
Make some Ordering methods const

Constify the following methods of `core::cmp::Ordering`:
 - `reverse`
 - `then`

Possible because of rust-lang#49146 (Allow `if` and `match` in constants).

Tracking issue:  rust-lang#76113
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 31, 2020
Make some Ordering methods const

Constify the following methods of `core::cmp::Ordering`:
 - `reverse`
 - `then`

Possible because of rust-lang#49146 (Allow `if` and `match` in constants).

Tracking issue:  rust-lang#76113
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 15, 2020
Make some Ordering methods const

Resubmission of [PR#75463](rust-lang#75463) as per [PR#76172](rust-lang#76172).

Constify the following methods of `core::cmp::Ordering`:
 - `reverse`
 - `then`

Insta-stabilizes these methods as const under the `const_ordering` feature, as their implementation is a trivial match and the recent stabilization of rust-lang#49146 (Allow `if` and `match` in constants).
Note: the `const_ordering` feature has never actually been used as these methods have not been `#[rustc_const_unstable]`.

Tracking issue:  rust-lang#76113
@pnkfelix pnkfelix added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Oct 14, 2022
@pnkfelix
Copy link
Member

pnkfelix commented Oct 14, 2022

Visiting for T-compiler steering backlog bonanza

Its not totally clear what this issue is meant to be tracking.

The description lists a pair of methods that were already made const in #75463.

We suspect the intent is to track the constification of the remainder of the Ordering methods that can be made const, but there's no clear specification of what the work items there are.

@rustbot label: S-tracking-need-summary

@CDirkx
Copy link
Contributor Author

CDirkx commented Oct 17, 2022

This issue was originally created as a tracking issue for constifying reverse and then under the feature const_ordering. However, these methods were insta-const-stabilized, skipping rustc_const_unstable(feature = "const_ordering", issue = "76113"). This issue has thus never actually been referenced in the Rust codebase.

I agree that constifying the remainder of Ordering is a good idea, but not something I myself can work on right now. I could therefore close this issue for now, and if someone else starts working on further constification a new tracking issue could be opened.

@oli-obk oli-obk closed this as completed Oct 17, 2022
@RalfJung RalfJung added the A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants