mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-19 13:10:24 +00:00
Rollup merge of #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: https://github.com/rust-lang/rust/issues/83659.
Implementation PR: https://github.com/rust-lang/rust/pull/82331.
FCPs already completed in the tracking issue.
Closes https://github.com/rust-lang/rust/issues/83659.
r? libs-api
This commit is contained in:
@@ -1216,7 +1216,6 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(binary_heap_as_slice)]
|
||||
/// use std::collections::BinaryHeap;
|
||||
/// use std::io::{self, Write};
|
||||
///
|
||||
@@ -1225,7 +1224,7 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
|
||||
/// io::sink().write(heap.as_slice()).unwrap();
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[unstable(feature = "binary_heap_as_slice", issue = "83659")]
|
||||
#[stable(feature = "binary_heap_as_slice", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub fn as_slice(&self) -> &[T] {
|
||||
self.data.as_slice()
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#![feature(binary_heap_into_iter_sorted)]
|
||||
#![feature(binary_heap_drain_sorted)]
|
||||
#![feature(slice_ptr_get)]
|
||||
#![feature(binary_heap_as_slice)]
|
||||
#![feature(inplace_iteration)]
|
||||
#![feature(iter_advance_by)]
|
||||
#![feature(iter_next_chunk)]
|
||||
|
||||
Reference in New Issue
Block a user