diff options
| author | David Tolnay <dtolnay@gmail.com> | 2021-08-08 11:36:53 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2021-08-08 11:36:53 -0700 |
| commit | 8ec5060cdd16c772fa9474540ccda3f95996a653 (patch) | |
| tree | 4b19bff7f5cd1df38f591af01f3813bccce44dd4 | |
| parent | 4867a2122599ef376280622ad9dfa9d8e730041f (diff) | |
| download | rust-8ec5060cdd16c772fa9474540ccda3f95996a653.tar.gz rust-8ec5060cdd16c772fa9474540ccda3f95996a653.zip | |
Bump shrink_to stabilization to Rust 1.56
| -rw-r--r-- | library/alloc/src/collections/binary_heap.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/string.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | library/std/src/collections/hash/set.rs | 2 | ||||
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 2 | ||||
| -rw-r--r-- | library/std/src/path.rs | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs index 956e3455093..23c2c82f29d 100644 --- a/library/alloc/src/collections/binary_heap.rs +++ b/library/alloc/src/collections/binary_heap.rs @@ -973,7 +973,7 @@ impl<T> BinaryHeap<T> { /// assert!(heap.capacity() >= 10); /// ``` #[inline] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { self.data.shrink_to(min_capacity) } diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index a540a3b40a6..3bfbe66d2b0 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -776,7 +776,7 @@ impl<T> VecDeque<T> { /// buf.shrink_to(0); /// assert!(buf.capacity() >= 4); /// ``` - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { let min_capacity = cmp::min(min_capacity, self.capacity()); // We don't have to worry about an overflow as neither `self.len()` nor `self.capacity()` diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index f3f589a433a..1b7edf65c82 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1110,7 +1110,7 @@ impl String { /// ``` #[cfg(not(no_global_oom_handling))] #[inline] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { self.vec.shrink_to(min_capacity) } diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 0e16a46fa2c..a660dc87cd4 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -951,7 +951,7 @@ impl<T, A: Allocator> Vec<T, A> { /// assert!(vec.capacity() >= 3); /// ``` #[cfg(not(no_global_oom_handling))] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { if self.capacity() > min_capacity { self.buf.shrink_to_fit(cmp::max(self.len, min_capacity)); diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index bc1a4862c7a..4995646f91e 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -677,7 +677,7 @@ where /// assert!(map.capacity() >= 2); /// ``` #[inline] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { self.base.shrink_to(min_capacity); } diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index d65a7e90dcf..99ae639f3ee 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -478,7 +478,7 @@ where /// assert!(set.capacity() >= 2); /// ``` #[inline] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { self.base.shrink_to(min_capacity) } diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 00fe055198d..46a1ff3f49e 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -332,7 +332,7 @@ impl OsString { /// assert!(s.capacity() >= 3); /// ``` #[inline] - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] pub fn shrink_to(&mut self, min_capacity: usize) { self.inner.shrink_to(min_capacity) } diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 7d554c47702..69419145b1b 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1398,7 +1398,7 @@ impl PathBuf { /// Invokes [`shrink_to`] on the underlying instance of [`OsString`]. /// /// [`shrink_to`]: OsString::shrink_to - #[stable(feature = "shrink_to", since = "1.55.0")] + #[stable(feature = "shrink_to", since = "1.56.0")] #[inline] pub fn shrink_to(&mut self, min_capacity: usize) { self.inner.shrink_to(min_capacity) |
