From d5d56d00e7b940e7abc997e9c4abbf00dd3198a9 Mon Sep 17 00:00:00 2001 From: Slanterns Date: Tue, 16 Apr 2024 20:58:45 +0800 Subject: [PATCH] Stabilize `BinaryHeap::as_slice` --- library/alloc/src/collections/binary_heap/mod.rs | 3 +-- library/alloc/tests/lib.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 83b2678f7f5..3c024649d3f 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -1207,7 +1207,6 @@ pub fn shrink_to(&mut self, min_capacity: usize) { /// Basic usage: /// /// ``` - /// #![feature(binary_heap_as_slice)] /// use std::collections::BinaryHeap; /// use std::io::{self, Write}; /// @@ -1216,7 +1215,7 @@ pub fn shrink_to(&mut self, min_capacity: usize) { /// 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() } diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index a34bce66496..37a02828901 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -26,7 +26,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)]