@@ -1137,34 +1137,34 @@ impl PathBuf {
1137
1137
///
1138
1138
/// ```
1139
1139
/// use std::path::PathBuf;
1140
- ///
1140
+ ///
1141
1141
/// let path = PathBuf::new();
1142
1142
/// ```
1143
1143
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1144
1144
pub fn new ( ) -> PathBuf {
1145
1145
PathBuf { inner : OsString :: new ( ) }
1146
1146
}
1147
1147
1148
- /// Creates a new `PathBuf` with a given capacity used to create the
1148
+ /// Creates a new `PathBuf` with a given capacity used to create the
1149
1149
/// internal [`OsString`]. See [`with_capacity`] defined on [`OsString`].
1150
1150
///
1151
1151
/// # Examples
1152
- ///
1152
+ ///
1153
1153
/// ```
1154
1154
/// use std::path::PathBuf;
1155
- ///
1155
+ ///
1156
1156
/// let path = PathBuf::with_capacity(10);
1157
1157
/// let capacity = path.capacity();
1158
- ///
1158
+ ///
1159
1159
/// // This push is done without reallocating
1160
1160
/// path.push(r"C:\");
1161
1161
///
1162
1162
/// assert_eq!(capacity, path.capacity());
1163
1163
/// ```
1164
- ///
1164
+ ///
1165
1165
/// [`with_capacity`]: ../ffi/struct.OsString.html#method.with_capacity
1166
1166
/// [`OsString`]: ../ffi/struct.OsString.html
1167
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1167
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1168
1168
pub fn with_capacity ( capacity : usize ) -> PathBuf {
1169
1169
PathBuf {
1170
1170
inner : OsString :: with_capacity ( capacity)
@@ -1404,53 +1404,53 @@ impl PathBuf {
1404
1404
///
1405
1405
/// [`capacity`]: ../ffi/struct.OsString.html#method.capacity
1406
1406
/// [`OsString`]: ../ffi/struct.OsString.html
1407
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1408
- pub fn capacity ( self ) -> usize {
1407
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1408
+ pub fn capacity ( & self ) -> usize {
1409
1409
self . inner . capacity ( )
1410
1410
}
1411
1411
1412
1412
/// Invokes [`clear`] on the underlying instance of [`OsString`].
1413
1413
///
1414
1414
/// [`clear`]: ../ffi/struct.OsString.html#method.clear
1415
1415
/// [`OsString`]: ../ffi/struct.OsString.html
1416
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1417
- pub fn clear ( mut self ) {
1416
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1417
+ pub fn clear ( & mut self ) {
1418
1418
self . inner . clear ( )
1419
1419
}
1420
1420
1421
1421
/// Invokes [`reserve`] on the underlying instance of [`OsString`].
1422
1422
///
1423
1423
/// [`reserve`]: ../ffi/struct.OsString.html#method.reserve
1424
1424
/// [`OsString`]: ../ffi/struct.OsString.html
1425
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1426
- pub fn reserve ( mut self , additional : usize ) {
1425
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1426
+ pub fn reserve ( & mut self , additional : usize ) {
1427
1427
self . inner . reserve ( additional)
1428
1428
}
1429
1429
1430
1430
/// Invokes [`reserve_exact`] on the underlying instance of [`OsString`].
1431
1431
///
1432
1432
/// [`reserve_exact`]: ../ffi/struct.OsString.html#method.reserve_exact
1433
1433
/// [`OsString`]: ../ffi/struct.OsString.html
1434
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1435
- pub fn reserve_exact ( mut self , additional : usize ) {
1434
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1435
+ pub fn reserve_exact ( & mut self , additional : usize ) {
1436
1436
self . inner . reserve_exact ( additional)
1437
1437
}
1438
1438
1439
1439
/// Invokes [`shrink_to_fit`] on the underlying instance of [`OsString`].
1440
1440
///
1441
1441
/// [`shrink_to_fit`]: ../ffi/struct.OsString.html#method.shrink_to_fit
1442
1442
/// [`OsString`]: ../ffi/struct.OsString.html
1443
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1444
- pub fn shrink_to_fit ( mut self ) {
1443
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1444
+ pub fn shrink_to_fit ( & mut self ) {
1445
1445
self . inner . shrink_to_fit ( )
1446
1446
}
1447
1447
1448
1448
/// Invokes [`shrink_to`] on the underlying instance of [`OsString`].
1449
1449
///
1450
1450
/// [`shrink_to`]: ../ffi/struct.OsString.html#method.shrink_to
1451
1451
/// [`OsString`]: ../ffi/struct.OsString.html
1452
- #[ stable ( feature = "path_buf_os_string_methods " , since = "1.33.0 " ) ]
1453
- pub fn shrink_to ( mut self , min_capacity : usize ) {
1452
+ #[ unstable ( feature = "path_buf_alias_os_string_methods " , issue = "58234 " ) ]
1453
+ pub fn shrink_to ( & mut self , min_capacity : usize ) {
1454
1454
self . inner . shrink_to ( min_capacity)
1455
1455
}
1456
1456
}
0 commit comments