Skip to content

Commit 8ec5060

Browse files
committed
Bump shrink_to stabilization to Rust 1.56
1 parent 4867a21 commit 8ec5060

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

library/alloc/src/collections/binary_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ impl<T> BinaryHeap<T> {
973973
/// assert!(heap.capacity() >= 10);
974974
/// ```
975975
#[inline]
976-
#[stable(feature = "shrink_to", since = "1.55.0")]
976+
#[stable(feature = "shrink_to", since = "1.56.0")]
977977
pub fn shrink_to(&mut self, min_capacity: usize) {
978978
self.data.shrink_to(min_capacity)
979979
}

library/alloc/src/collections/vec_deque/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ impl<T> VecDeque<T> {
776776
/// buf.shrink_to(0);
777777
/// assert!(buf.capacity() >= 4);
778778
/// ```
779-
#[stable(feature = "shrink_to", since = "1.55.0")]
779+
#[stable(feature = "shrink_to", since = "1.56.0")]
780780
pub fn shrink_to(&mut self, min_capacity: usize) {
781781
let min_capacity = cmp::min(min_capacity, self.capacity());
782782
// We don't have to worry about an overflow as neither `self.len()` nor `self.capacity()`

library/alloc/src/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ impl String {
11101110
/// ```
11111111
#[cfg(not(no_global_oom_handling))]
11121112
#[inline]
1113-
#[stable(feature = "shrink_to", since = "1.55.0")]
1113+
#[stable(feature = "shrink_to", since = "1.56.0")]
11141114
pub fn shrink_to(&mut self, min_capacity: usize) {
11151115
self.vec.shrink_to(min_capacity)
11161116
}

library/alloc/src/vec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ impl<T, A: Allocator> Vec<T, A> {
951951
/// assert!(vec.capacity() >= 3);
952952
/// ```
953953
#[cfg(not(no_global_oom_handling))]
954-
#[stable(feature = "shrink_to", since = "1.55.0")]
954+
#[stable(feature = "shrink_to", since = "1.56.0")]
955955
pub fn shrink_to(&mut self, min_capacity: usize) {
956956
if self.capacity() > min_capacity {
957957
self.buf.shrink_to_fit(cmp::max(self.len, min_capacity));

library/std/src/collections/hash/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ where
677677
/// assert!(map.capacity() >= 2);
678678
/// ```
679679
#[inline]
680-
#[stable(feature = "shrink_to", since = "1.55.0")]
680+
#[stable(feature = "shrink_to", since = "1.56.0")]
681681
pub fn shrink_to(&mut self, min_capacity: usize) {
682682
self.base.shrink_to(min_capacity);
683683
}

library/std/src/collections/hash/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ where
478478
/// assert!(set.capacity() >= 2);
479479
/// ```
480480
#[inline]
481-
#[stable(feature = "shrink_to", since = "1.55.0")]
481+
#[stable(feature = "shrink_to", since = "1.56.0")]
482482
pub fn shrink_to(&mut self, min_capacity: usize) {
483483
self.base.shrink_to(min_capacity)
484484
}

library/std/src/ffi/os_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ impl OsString {
332332
/// assert!(s.capacity() >= 3);
333333
/// ```
334334
#[inline]
335-
#[stable(feature = "shrink_to", since = "1.55.0")]
335+
#[stable(feature = "shrink_to", since = "1.56.0")]
336336
pub fn shrink_to(&mut self, min_capacity: usize) {
337337
self.inner.shrink_to(min_capacity)
338338
}

library/std/src/path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ impl PathBuf {
13981398
/// Invokes [`shrink_to`] on the underlying instance of [`OsString`].
13991399
///
14001400
/// [`shrink_to`]: OsString::shrink_to
1401-
#[stable(feature = "shrink_to", since = "1.55.0")]
1401+
#[stable(feature = "shrink_to", since = "1.56.0")]
14021402
#[inline]
14031403
pub fn shrink_to(&mut self, min_capacity: usize) {
14041404
self.inner.shrink_to(min_capacity)

0 commit comments

Comments
 (0)