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