Skip to content

Commit 040d88d

Browse files
committed
Remove leading :: from paths in doc examples
1 parent 857a55b commit 040d88d

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/libcore/iter/traits/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub trait FromIterator<A>: Sized {
167167
/// // and we'll implement IntoIterator
168168
/// impl IntoIterator for MyCollection {
169169
/// type Item = i32;
170-
/// type IntoIter = ::std::vec::IntoIter<Self::Item>;
170+
/// type IntoIter = std::vec::IntoIter<Self::Item>;
171171
///
172172
/// fn into_iter(self) -> Self::IntoIter {
173173
/// self.0.into_iter()

src/libcore/ops/unsize.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
7676
/// ```
7777
/// # #![feature(dispatch_from_dyn, unsize)]
7878
/// # use std::{ops::DispatchFromDyn, marker::Unsize};
79-
/// # struct Rc<T: ?Sized>(::std::rc::Rc<T>);
79+
/// # struct Rc<T: ?Sized>(std::rc::Rc<T>);
8080
/// impl<T: ?Sized, U: ?Sized> DispatchFromDyn<Rc<U>> for Rc<T>
8181
/// where
8282
/// T: Unsize<U>,

src/libcore/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ Section: Creating a string
176176
/// ```
177177
/// fn from_utf8_lossy<F>(mut input: &[u8], mut push: F) where F: FnMut(&str) {
178178
/// loop {
179-
/// match ::std::str::from_utf8(input) {
179+
/// match std::str::from_utf8(input) {
180180
/// Ok(valid) => {
181181
/// push(valid);
182182
/// break
183183
/// }
184184
/// Err(error) => {
185185
/// let (valid, after_valid) = input.split_at(error.valid_up_to());
186186
/// unsafe {
187-
/// push(::std::str::from_utf8_unchecked(valid))
187+
/// push(std::str::from_utf8_unchecked(valid))
188188
/// }
189189
/// push("\u{FFFD}");
190190
///

src/libstd/net/udp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl UdpSocket {
202202
///
203203
/// let socket = UdpSocket::bind("127.0.0.1:34254").expect("couldn't bind to address");
204204
/// assert_eq!(socket.peer_addr().unwrap_err().kind(),
205-
/// ::std::io::ErrorKind::NotConnected);
205+
/// std::io::ErrorKind::NotConnected);
206206
/// ```
207207
#[stable(feature = "udp_peer_addr", since = "1.40.0")]
208208
pub fn peer_addr(&self) -> io::Result<SocketAddr> {

src/libstd/process.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1488,12 +1488,12 @@ impl Child {
14881488
/// }
14891489
///
14901490
/// fn main() {
1491-
/// ::std::process::exit(match run_app() {
1492-
/// Ok(_) => 0,
1493-
/// Err(err) => {
1494-
/// eprintln!("error: {:?}", err);
1495-
/// 1
1496-
/// }
1491+
/// std::process::exit(match run_app() {
1492+
/// Ok(_) => 0,
1493+
/// Err(err) => {
1494+
/// eprintln!("error: {:?}", err);
1495+
/// 1
1496+
/// }
14971497
/// });
14981498
/// }
14991499
/// ```

0 commit comments

Comments
 (0)