File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ impl str {
234
234
#[stable(feature = "str_box_extras", since = "1.20.0")]
235
235
#[must_use = "`self` will be dropped if the result is not used"]
236
236
#[inline]
237
- pub fn into_boxed_bytes(self: Box<str >) -> Box<[u8]> {
237
+ pub fn into_boxed_bytes(self: Box<Self >) -> Box<[u8]> {
238
238
self.into()
239
239
}
240
240
@@ -501,7 +501,7 @@ impl str {
501
501
#[rustc_allow_incoherent_impl]
502
502
#[must_use = "`self` will be dropped if the result is not used"]
503
503
#[inline]
504
- pub fn into_string(self: Box<str >) -> String {
504
+ pub fn into_string(self: Box<Self >) -> String {
505
505
let slice = Box::<[u8]>::from(self);
506
506
unsafe { String::from_utf8_unchecked(slice.into_vec()) }
507
507
}
Original file line number Diff line number Diff line change @@ -1422,7 +1422,7 @@ impl<Ptr: DerefMut> Pin<Ptr> {
1422
1422
#[stable(feature = "pin_deref_mut", since = "1.84.0")]
1423
1423
#[must_use = "`self` will be dropped if the result is not used"]
1424
1424
#[inline(always)]
1425
- pub fn as_deref_mut(self: Pin<&mut Pin<Ptr> >) -> Pin<&mut Ptr::Target> {
1425
+ pub fn as_deref_mut(self: Pin<&mut Self >) -> Pin<&mut Ptr::Target> {
1426
1426
// SAFETY: What we're asserting here is that going from
1427
1427
//
1428
1428
// Pin<&mut Pin<Ptr>>
Original file line number Diff line number Diff line change @@ -1040,7 +1040,7 @@ impl OsStr {
1040
1040
/// Converts a <code>[Box]<[OsStr]></code> into an [`OsString`] without copying or allocating.
1041
1041
#[stable(feature = "into_boxed_os_str", since = "1.20.0")]
1042
1042
#[must_use = "`self` will be dropped if the result is not used"]
1043
- pub fn into_os_string(self: Box<OsStr >) -> OsString {
1043
+ pub fn into_os_string(self: Box<Self >) -> OsString {
1044
1044
let boxed = unsafe { Box::from_raw(Box::into_raw(self) as *mut Slice) };
1045
1045
OsString { inner: Buf::from_box(boxed) }
1046
1046
}
Original file line number Diff line number Diff line change @@ -3163,7 +3163,7 @@ impl Path {
3163
3163
/// allocating.
3164
3164
#[stable(feature = "into_boxed_path", since = "1.20.0")]
3165
3165
#[must_use = "`self` will be dropped if the result is not used"]
3166
- pub fn into_path_buf(self: Box<Path >) -> PathBuf {
3166
+ pub fn into_path_buf(self: Box<Self >) -> PathBuf {
3167
3167
let rw = Box::into_raw(self) as *mut OsStr;
3168
3168
let inner = unsafe { Box::from_raw(rw) };
3169
3169
PathBuf { inner: OsString::from(inner) }
You can’t perform that action at this time.
0 commit comments