Remove leading :: from paths in doc examples

This commit is contained in:
Mikko Rantanen
2019-10-20 21:13:47 +03:00
parent 857a55b8f0
commit 040d88dda1
5 changed files with 11 additions and 11 deletions

View File

@@ -167,7 +167,7 @@ pub trait FromIterator<A>: Sized {
/// // and we'll implement IntoIterator
/// impl IntoIterator for MyCollection {
/// type Item = i32;
/// type IntoIter = ::std::vec::IntoIter<Self::Item>;
/// type IntoIter = std::vec::IntoIter<Self::Item>;
///
/// fn into_iter(self) -> Self::IntoIter {
/// self.0.into_iter()

View File

@@ -76,7 +76,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
/// ```
/// # #![feature(dispatch_from_dyn, unsize)]
/// # use std::{ops::DispatchFromDyn, marker::Unsize};
/// # struct Rc<T: ?Sized>(::std::rc::Rc<T>);
/// # struct Rc<T: ?Sized>(std::rc::Rc<T>);
/// impl<T: ?Sized, U: ?Sized> DispatchFromDyn<Rc<U>> for Rc<T>
/// where
/// T: Unsize<U>,

View File

@@ -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}");
///