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 8a4b11a

Browse files
authoredJun 7, 2024
Rollup merge of rust-lang#124012 - slanterns:as_slice_stabilize, r=BurntSushi
Stabilize `binary_heap_as_slice` This PR stabilizes `binary_heap_as_slice`: ```rust // std::collections::BinaryHeap impl BinaryHeap<T> { pub fn as_slice(&self) -> &[T] } ``` <br> Tracking issue: rust-lang#83659. Implementation PR: rust-lang#82331. FCPs already completed in the tracking issue. Closes rust-lang#83659. r? libs-api
2 parents 05a92c2 + dbd03d4 commit 8a4b11a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,6 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
12161216
/// Basic usage:
12171217
///
12181218
/// ```
1219-
/// #![feature(binary_heap_as_slice)]
12201219
/// use std::collections::BinaryHeap;
12211220
/// use std::io::{self, Write};
12221221
///
@@ -1225,7 +1224,7 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
12251224
/// io::sink().write(heap.as_slice()).unwrap();
12261225
/// ```
12271226
#[must_use]
1228-
#[unstable(feature = "binary_heap_as_slice", issue = "83659")]
1227+
#[stable(feature = "binary_heap_as_slice", since = "CURRENT_RUSTC_VERSION")]
12291228
pub fn as_slice(&self) -> &[T] {
12301229
self.data.as_slice()
12311230
}

‎alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![feature(binary_heap_into_iter_sorted)]
2525
#![feature(binary_heap_drain_sorted)]
2626
#![feature(slice_ptr_get)]
27-
#![feature(binary_heap_as_slice)]
2827
#![feature(inplace_iteration)]
2928
#![feature(iter_advance_by)]
3029
#![feature(iter_next_chunk)]

0 commit comments

Comments
 (0)
Failed to load comments.