diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-07 20:14:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 20:14:27 +0200 |
| commit | 0acb5b8513e727ebb4f63d8d8ee8cfa285342a89 (patch) | |
| tree | 061d3d0cf66eb93df6d681bd091b6cd3572909fe /library/alloc/src | |
| parent | e3c3ce62d7a8328120aa2abf60a34576f3862fde (diff) | |
| parent | d5d56d00e7b940e7abc997e9c4abbf00dd3198a9 (diff) | |
| download | rust-0acb5b8513e727ebb4f63d8d8ee8cfa285342a89.tar.gz rust-0acb5b8513e727ebb4f63d8d8ee8cfa285342a89.zip | |
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
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/binary_heap/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 0b04fb4a274..a391141827e 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -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() } |
