diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-01-14 19:12:29 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-01-14 19:12:29 +0530 |
| commit | 92aa3269203976cc01ee9d2ec8bc686076d37b48 (patch) | |
| tree | 62ead784280833d75242cce7dc3d14357bfa7ec7 /src/libcollections/string.rs | |
| parent | f28a43102b078c5dee78ba5cbbcbb0350cd92330 (diff) | |
| parent | 01cbdf4481915948773a8abfb67bcc1a44571dab (diff) | |
| download | rust-92aa3269203976cc01ee9d2ec8bc686076d37b48.tar.gz rust-92aa3269203976cc01ee9d2ec8bc686076d37b48.zip | |
Rollup merge of #30886 - ollie27:docs_links, r=steveklabnik
r? @steveklabnik
Diffstat (limited to 'src/libcollections/string.rs')
| -rw-r--r-- | src/libcollections/string.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index d9cafd53a85..eb9628d6e39 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -98,6 +98,7 @@ use boxed::Box; /// hello.push_str("orld!"); /// ``` /// +/// [`char`]: ../primitive.char.html /// [`push()`]: #method.push /// [`push_str()`]: #method.push_str /// @@ -199,8 +200,8 @@ use boxed::Box; /// ``` /// /// [`as_ptr()`]: #method.as_ptr -/// [`len()`]: # method.len -/// [`capacity()`]: # method.capacity +/// [`len()`]: #method.len +/// [`capacity()`]: #method.capacity /// /// If a `String` has enough capacity, adding elements to it will not /// re-allocate. For example, consider this program: @@ -480,7 +481,7 @@ impl String { /// Converts a slice of bytes to a `String`, including invalid characters. /// /// A string slice ([`&str`]) is made of bytes ([`u8`]), and a slice of - /// bytes ([`&[u8]`]) is made of bytes, so this function converts between + /// bytes ([`&[u8]`][byteslice]) is made of bytes, so this function converts between /// the two. Not all byte slices are valid string slices, however: [`&str`] /// requires that it is valid UTF-8. During this conversion, /// `from_utf8_lossy()` will replace any invalid UTF-8 sequences with @@ -488,7 +489,7 @@ impl String { /// /// [`&str`]: ../primitive.str.html /// [`u8`]: ../primitive.u8.html - /// [`&[u8]`]: ../primitive.slice.html + /// [byteslice]: ../primitive.slice.html /// /// If you are sure that the byte slice is valid UTF-8, and you don't want /// to incur the overhead of the conversion, there is an unsafe version @@ -1347,6 +1348,8 @@ impl FromUtf8Error { /// /// [`Utf8Error`]: ../str/struct.Utf8Error.html /// [`std::str`]: ../str/index.html + /// [`u8`]: ../primitive.u8.html + /// [`&str`]: ../primitive.str.html /// /// # Examples /// |
