From 55c3f0b12e383d2b88141919187145ae573e6e60 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 24 May 2017 19:33:40 +0200 Subject: [PATCH] Add missing urls for OsStr docs --- src/libstd/ffi/os_str.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index f497734e249c5..a5a1b5e5f0919 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -247,7 +247,9 @@ impl OsString { self.inner.shrink_to_fit() } - /// Converts this `OsString` into a boxed `OsStr`. + /// Converts this `OsString` into a boxed [`OsStr`]. + /// + /// [`OsStr`]: struct.OsStr.html /// /// # Examples /// @@ -482,12 +484,13 @@ impl OsStr { /// Returns the length of this `OsStr`. /// /// Note that this does **not** return the number of bytes in this string - /// as, for example, OS strings on Windows are encoded as a list of `u16` + /// as, for example, OS strings on Windows are encoded as a list of [`u16`] /// rather than a list of bytes. This number is simply useful for passing to /// other methods like [`OsString::with_capacity`] to avoid reallocations. /// /// See `OsStr` introduction for more information about encoding. /// + /// [`u16`]: ../primitive.u16.html /// [`OsString::with_capacity`]: struct.OsString.html#method.with_capacity /// /// # Examples @@ -506,7 +509,10 @@ impl OsStr { self.inner.inner.len() } - /// Converts a `Box` into an `OsString` without copying or allocating. + /// Converts a [`Box`]`` into an [`OsString`] without copying or allocating. + /// + /// [`Box`]: ../boxed/struct.Box.html + /// [`OsString`]: struct.OsString.html #[unstable(feature = "into_boxed_os_str", issue = "40380")] pub fn into_os_string(self: Box) -> OsString { let inner: Box = unsafe { mem::transmute(self) };