about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-24 19:50:10 -0600
committerGitHub <noreply@github.com>2017-05-24 19:50:10 -0600
commit2bca4fa47d2db220186f32acad4d70bcb4331054 (patch)
treea0aebe95a194007f70b2c0c8a6ef42f357bd2b24 /src
parenta78a0dbe5f00cd740b0f1fc23dd40d9b677188a8 (diff)
parent55c3f0b12e383d2b88141919187145ae573e6e60 (diff)
downloadrust-2bca4fa47d2db220186f32acad4d70bcb4331054.tar.gz
rust-2bca4fa47d2db220186f32acad4d70bcb4331054.zip
Rollup merge of #42198 - GuillaumeGomez:os-str-doc, r=QuietMisdreavus
Add missing urls for OsStr docs

r? @rust-lang/docs
Diffstat (limited to 'src')
-rw-r--r--src/libstd/ffi/os_str.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index f497734e249..a5a1b5e5f09 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<OsStr>` into an `OsString` without copying or allocating.
+    /// Converts a [`Box`]`<OsStr>` 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<OsStr>) -> OsString {
         let inner: Box<Slice> = unsafe { mem::transmute(self) };