-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Constification of BinaryHeap construction #112353
Comments
All the other collections already have const constructors (except for the ones for which it's hard, cc #112354). So I think it makes a lot of sense to make this const as well. There was an entire ACP for |
Constification of BinaryHeap constructor will be helpful when a static variable is of the BinaryHeap type. |
Please send a PR. |
I also met this issue and I am trying to address it with #117316 |
…tor, r=dtolnay Mark constructor of `BinaryHeap` as const fn rust-lang#112353
…tor, r=dtolnay Mark constructor of `BinaryHeap` as const fn rust-lang#112353
Rollup merge of rust-lang#117316 - Coekjan:const-binary-heap-constructor, r=dtolnay Mark constructor of `BinaryHeap` as const fn rust-lang#112353
The feature Due to the unstable feature ( |
Nomination for discussion to stabilize. I think it's quite straightforward and has plenty of precedent. |
@rust-lang/libs-api:
impl<T: Ord> BinaryHeap<T> {
#[must_use]
pub const fn new() -> Self;
} |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
Notably, |
Given that #125211 has been merged, and Maybe this should be indicated at the top of the issue? Or should we make a new tracking issue? |
@est31 Is there typically a tracking issue for const-stabilizing something that is itself unstable? I didn't think so, so I would actually recommend closing this. |
If it is ok, let me open a new issue to track |
Update tracking issue for `const_binary_heap_new_in` This PR updates the tracking issue of `const_binary_heap_new_in` feature: - Old issue: rust-lang#112353 - New issue: rust-lang#125961
Rollup merge of rust-lang#125962 - Coekjan:const-binary-heap, r=Amanieu Update tracking issue for `const_binary_heap_new_in` This PR updates the tracking issue of `const_binary_heap_new_in` feature: - Old issue: rust-lang#112353 - New issue: rust-lang#125961
Is there any reason this isn't const yet? This should only depend on vec's construction being const which it is.
The text was updated successfully, but these errors were encountered: