]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize PathBuf capacity methods
authorMark Rousskov <mark.simulacrum@gmail.com>
Sun, 19 Apr 2020 15:59:19 +0000 (11:59 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Mon, 20 Apr 2020 01:49:27 +0000 (21:49 -0400)
src/libstd/path.rs

index b8361d3e8259951991972a224af6ee23826e3564..173d6d1cfa7efbd17e7daabb14755e325aaa3753 100644 (file)
@@ -1116,7 +1116,6 @@ pub fn new() -> PathBuf {
     /// # Examples
     ///
     /// ```
-    /// #![feature(path_buf_capacity)]
     /// use std::path::PathBuf;
     ///
     /// let mut path = PathBuf::with_capacity(10);
@@ -1130,7 +1129,7 @@ pub fn new() -> PathBuf {
     ///
     /// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn with_capacity(capacity: usize) -> PathBuf {
         PathBuf { inner: OsString::with_capacity(capacity) }
     }
@@ -1374,7 +1373,7 @@ pub fn into_boxed_path(self) -> Box<Path> {
     ///
     /// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn capacity(&self) -> usize {
         self.inner.capacity()
     }
@@ -1383,7 +1382,7 @@ pub fn capacity(&self) -> usize {
     ///
     /// [`clear`]: ../ffi/struct.OsString.html#method.clear
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn clear(&mut self) {
         self.inner.clear()
     }
@@ -1392,7 +1391,7 @@ pub fn clear(&mut self) {
     ///
     /// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn reserve(&mut self, additional: usize) {
         self.inner.reserve(additional)
     }
@@ -1401,7 +1400,7 @@ pub fn reserve(&mut self, additional: usize) {
     ///
     /// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn reserve_exact(&mut self, additional: usize) {
         self.inner.reserve_exact(additional)
     }
@@ -1410,7 +1409,7 @@ pub fn reserve_exact(&mut self, additional: usize) {
     ///
     /// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[stable(feature = "path_buf_capacity", since = "1.44.0")]
     pub fn shrink_to_fit(&mut self) {
         self.inner.shrink_to_fit()
     }
@@ -1419,7 +1418,7 @@ pub fn shrink_to_fit(&mut self) {
     ///
     /// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
     /// [`OsString`]: ../ffi/struct.OsString.html
-    #[unstable(feature = "path_buf_capacity", issue = "58234")]
+    #[unstable(feature = "shrink_to", issue = "56431")]
     pub fn shrink_to(&mut self, min_capacity: usize) {
         self.inner.shrink_to(min_capacity)
     }