Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7f0b19d

Browse files
committedJun 1, 2024
stablize const_binary_heap_constructor & create an unstable feature const_binary_heap_new_in for BinaryHeap::new_in
1 parent 5c2e274 commit 7f0b19d

File tree

1 file changed

+5
-2
lines changed
  • alloc/src/collections/binary_heap

1 file changed

+5
-2
lines changed
 

‎alloc/src/collections/binary_heap/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,10 @@ impl<T: Ord> BinaryHeap<T> {
440440
/// heap.push(4);
441441
/// ```
442442
#[stable(feature = "rust1", since = "1.0.0")]
443-
#[rustc_const_unstable(feature = "const_binary_heap_constructor", issue = "112353")]
443+
#[rustc_const_stable(
444+
feature = "const_binary_heap_constructor",
445+
since = "CURRENT_RUSTC_VERSION"
446+
)]
444447
#[must_use]
445448
pub const fn new() -> BinaryHeap<T> {
446449
BinaryHeap { data: vec![] }
@@ -484,7 +487,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
484487
/// heap.push(4);
485488
/// ```
486489
#[unstable(feature = "allocator_api", issue = "32838")]
487-
#[rustc_const_unstable(feature = "const_binary_heap_constructor", issue = "112353")]
490+
#[rustc_const_unstable(feature = "const_binary_heap_new_in", issue = "112353")]
488491
#[must_use]
489492
pub const fn new_in(alloc: A) -> BinaryHeap<T, A> {
490493
BinaryHeap { data: Vec::new_in(alloc) }

0 commit comments

Comments
 (0)
Failed to load comments.