Skip to content

Commit 324286f

Browse files
committed
std: Stabilize feature try_reserve_2
Signed-off-by: Xuanwo <[email protected]>
1 parent b31f9cc commit 324286f

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

library/alloc/src/collections/binary_heap.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,6 @@ impl<T> BinaryHeap<T> {
978978
/// # Examples
979979
///
980980
/// ```
981-
/// #![feature(try_reserve_2)]
982981
/// use std::collections::BinaryHeap;
983982
/// use std::collections::TryReserveError;
984983
///
@@ -995,7 +994,7 @@ impl<T> BinaryHeap<T> {
995994
/// }
996995
/// # find_max_slow(&[1, 2, 3]).expect("why is the test harness OOMing on 12 bytes?");
997996
/// ```
998-
#[unstable(feature = "try_reserve_2", issue = "91789")]
997+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
999998
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
1000999
self.data.try_reserve_exact(additional)
10011000
}
@@ -1014,7 +1013,6 @@ impl<T> BinaryHeap<T> {
10141013
/// # Examples
10151014
///
10161015
/// ```
1017-
/// #![feature(try_reserve_2)]
10181016
/// use std::collections::BinaryHeap;
10191017
/// use std::collections::TryReserveError;
10201018
///
@@ -1031,7 +1029,7 @@ impl<T> BinaryHeap<T> {
10311029
/// }
10321030
/// # find_max_slow(&[1, 2, 3]).expect("why is the test harness OOMing on 12 bytes?");
10331031
/// ```
1034-
#[unstable(feature = "try_reserve_2", issue = "91789")]
1032+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
10351033
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
10361034
self.data.try_reserve(additional)
10371035
}

library/std/src/ffi/os_str.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ impl OsString {
280280
/// # Examples
281281
///
282282
/// ```
283-
/// #![feature(try_reserve_2)]
284283
/// use std::ffi::{OsStr, OsString};
285284
/// use std::collections::TryReserveError;
286285
///
@@ -297,7 +296,7 @@ impl OsString {
297296
/// }
298297
/// # process_data("123").expect("why is the test harness OOMing on 3 bytes?");
299298
/// ```
300-
#[unstable(feature = "try_reserve_2", issue = "91789")]
299+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
301300
#[inline]
302301
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
303302
self.inner.try_reserve(additional)
@@ -348,7 +347,6 @@ impl OsString {
348347
/// # Examples
349348
///
350349
/// ```
351-
/// #![feature(try_reserve_2)]
352350
/// use std::ffi::{OsStr, OsString};
353351
/// use std::collections::TryReserveError;
354352
///
@@ -365,7 +363,7 @@ impl OsString {
365363
/// }
366364
/// # process_data("123").expect("why is the test harness OOMing on 3 bytes?");
367365
/// ```
368-
#[unstable(feature = "try_reserve_2", issue = "91789")]
366+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
369367
#[inline]
370368
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
371369
self.inner.try_reserve_exact(additional)

library/std/src/path.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ impl PathBuf {
15201520
/// Invokes [`try_reserve`] on the underlying instance of [`OsString`].
15211521
///
15221522
/// [`try_reserve`]: OsString::try_reserve
1523-
#[unstable(feature = "try_reserve_2", issue = "91789")]
1523+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
15241524
#[inline]
15251525
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
15261526
self.inner.try_reserve(additional)
@@ -1538,7 +1538,7 @@ impl PathBuf {
15381538
/// Invokes [`try_reserve_exact`] on the underlying instance of [`OsString`].
15391539
///
15401540
/// [`try_reserve_exact`]: OsString::try_reserve_exact
1541-
#[unstable(feature = "try_reserve_2", issue = "91789")]
1541+
#[stable(feature = "try_reserve_2", since = "1.63.0")]
15421542
#[inline]
15431543
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
15441544
self.inner.try_reserve_exact(additional)

0 commit comments

Comments
 (0)