Skip to content

Commit 179b6d7

Browse files
committed
Auto merge of rust-lang#125211 - Coekjan:const-binary-heap, r=jhpratt,dtolnay
Stablize `const_binary_heap_constructor` This pr aims to stablize `const_binary_heap_constructor`. `BinaryHeap::new` is able to be stablized, but `BinaryHeap::new_in` is not. Because the latter depends on `Vec::new_in` which is unstable. The `const_binary_heap_constructor` feature contains the two functions, and I want to split this feature now. This pr creates `const_binary_heap_new_in` feature for `BinaryHeap::new_in` and stablizes `const_binary_heap_constructor` (now this original feature only contains one function).
2 parents ada5e2c + ef23a5b commit 179b6d7

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ 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(feature = "const_binary_heap_constructor", since = "CURRENT_RUSTC_VERSION")]
444444
#[must_use]
445445
pub const fn new() -> BinaryHeap<T> {
446446
BinaryHeap { data: vec![] }
@@ -484,7 +484,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
484484
/// heap.push(4);
485485
/// ```
486486
#[unstable(feature = "allocator_api", issue = "32838")]
487-
#[rustc_const_unstable(feature = "const_binary_heap_constructor", issue = "112353")]
487+
#[rustc_const_unstable(feature = "const_binary_heap_new_in", issue = "112353")]
488488
#[must_use]
489489
pub const fn new_in(alloc: A) -> BinaryHeap<T, A> {
490490
BinaryHeap { data: Vec::new_in(alloc) }

0 commit comments

Comments
 (0)