about summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorMikko Rantanen <jubjub@jubjubnest.net>2019-10-20 21:13:47 +0300
committerMikko Rantanen <jubjub@jubjubnest.net>2019-10-20 21:13:47 +0300
commit040d88dda1c65d6cb3cd5df5e81075a281f90da4 (patch)
tree7da9f5eebe4845c2a827e85f117cdbc5d1cb10bf /src/libcore/str
parent857a55b8f0a692cb2304ab7c062d9cc74122e516 (diff)
downloadrust-040d88dda1c65d6cb3cd5df5e81075a281f90da4.tar.gz
rust-040d88dda1c65d6cb3cd5df5e81075a281f90da4.zip
Remove leading :: from paths in doc examples
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 885696e5acf..f67012d8f2f 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -176,7 +176,7 @@ Section: Creating a string
 /// ```
 /// fn from_utf8_lossy<F>(mut input: &[u8], mut push: F) where F: FnMut(&str) {
 ///     loop {
-///         match ::std::str::from_utf8(input) {
+///         match std::str::from_utf8(input) {
 ///             Ok(valid) => {
 ///                 push(valid);
 ///                 break
@@ -184,7 +184,7 @@ Section: Creating a string
 ///             Err(error) => {
 ///                 let (valid, after_valid) = input.split_at(error.valid_up_to());
 ///                 unsafe {
-///                     push(::std::str::from_utf8_unchecked(valid))
+///                     push(std::str::from_utf8_unchecked(valid))
 ///                 }
 ///                 push("\u{FFFD}");
 ///