Skip to content

Tracking Issue for const_binary_heap_new_in #125961

New issue

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

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

Already on GitHub? # to your account

Closed
1 of 3 tasks
Coekjan opened this issue Jun 4, 2024 · 1 comment
Closed
1 of 3 tasks

Tracking Issue for const_binary_heap_new_in #125961

Coekjan opened this issue Jun 4, 2024 · 1 comment
Labels
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

@Coekjan
Copy link
Contributor

Coekjan commented Jun 4, 2024

Feature gate: #![feature(const_binary_heap_new_in)]

This is a tracking issue for constification of BinaryHeap::new_in, which allows user to create a BinaryHeap in compile-time with a specific allocator.

NOTE: This feature depends on the unstable feature allocator_api

Public API

impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
    pub const fn new_in(alloc: A) -> BinaryHeap<T, A> {}
}

Steps / History

Unresolved Questions

  • None yet.
@Coekjan Coekjan added 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. labels Jun 4, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 24, 2024
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
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 24, 2024
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
@RalfJung
Copy link
Member

Given that this function is still unstable, and doesn't do anything that's particularly tricky from a const perspective, I don't think we need a separate feature gate. So closing in favor of #32838 which tracks all the new_in methods. (#133672 removes the feature gate from the code.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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

2 participants