diff --git a/library/alloc/src/io/buffered/mod.rs b/library/alloc/src/io/buffered/mod.rs index 1bddcfb801932..795a918b88533 100644 --- a/library/alloc/src/io/buffered/mod.rs +++ b/library/alloc/src/io/buffered/mod.rs @@ -132,6 +132,7 @@ impl IntoInnerError { /// obtain ownership of the underlying error. /// /// # Example + /// /// ``` /// use std::io::{BufWriter, ErrorKind, Write}; /// @@ -154,6 +155,7 @@ impl IntoInnerError { /// advanced error recovery. /// /// # Example + /// /// ``` /// use std::io::{BufWriter, ErrorKind, Write}; /// diff --git a/library/alloc/src/io/prelude.rs b/library/alloc/src/io/prelude.rs index 86ae040d1d6f6..d3ebc373e6284 100644 --- a/library/alloc/src/io/prelude.rs +++ b/library/alloc/src/io/prelude.rs @@ -4,8 +4,9 @@ //! by adding a glob import to the top of I/O heavy modules: //! //! ``` +//! # #![feature(alloc_io)] //! # #![allow(unused_imports)] -//! use std::io::prelude::*; +//! use alloc::io::prelude::*; //! ``` #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/io/error.rs b/library/core/src/io/error.rs index 61abdb16d07da..60b798e69ae6e 100644 --- a/library/core/src/io/error.rs +++ b/library/core/src/io/error.rs @@ -1115,6 +1115,7 @@ impl fmt::Display for ErrorKind { /// This is similar to `impl Display for Error`, but doesn't require first converting to Error. /// /// # Examples + /// /// ``` /// use core::io::ErrorKind; /// assert_eq!("entity not found", ErrorKind::NotFound.to_string()); diff --git a/library/core/src/io/prelude.rs b/library/core/src/io/prelude.rs index 15dacaa3a4fa0..3ff5833fb6331 100644 --- a/library/core/src/io/prelude.rs +++ b/library/core/src/io/prelude.rs @@ -4,8 +4,9 @@ //! by adding a glob import to the top of I/O heavy modules: //! //! ``` +//! # #![feature(core_io)] //! # #![allow(unused_imports)] -//! use std::io::prelude::*; +//! use core::io::prelude::*; //! ``` #[stable(feature = "rust1", since = "1.0.0")]