From d35fa1e98b244773129f18b0e8bcc81fa099ae68 Mon Sep 17 00:00:00 2001 From: Dylan Maccora Date: Fri, 7 Apr 2017 18:26:36 +1000 Subject: Removing broken examples --- src/libcore/convert.rs | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index 0bc05506413..abab4bb0f63 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -86,19 +86,6 @@ use str::FromStr; /// `&mut Foo` or `&&mut Foo`) /// /// # Examples -/// An example implementation of the trait is [`Path`]. -/// -/// [`Path`]: ../../std/path/struct.Path.html -/// -/// ``` -/// use std::path::Path; -/// -/// impl AsRef for str { -/// fn as_ref(&self) -> &Path { -/// Path::new(self) -/// } -/// } -/// ``` /// /// Both [`String`] and `&str` implement `AsRef`: /// @@ -156,15 +143,6 @@ pub trait AsRef { /// assert_eq!(*boxed_num, 1); /// ``` /// -/// `Vec` implements `AsMut` for converting between itself and a primitive array: -/// -/// ``` -/// impl AsMut<[T]> for Vec { -/// fn as_mut(&mut self) -> &mut [T] { -/// self -/// } -/// } -/// ``` /// #[stable(feature = "rust1", since = "1.0.0")] pub trait AsMut { @@ -275,11 +253,12 @@ pub trait Into: Sized { /// } /// } /// -/// fn open_and_parse_file(file_name: &str) -> Result { -/// let file = std::fs::File::open("test")?; +/// fn open_and_parse_file(file_name: &str) -> Result { +/// let mut file = std::fs::File::open("test")?; /// let mut contents = String::new(); /// file.read_to_string(&mut contents)?; /// let num: i32 = contents.trim().parse()?; +/// Ok(num) /// } /// ``` /// -- cgit 1.4.1-3-g733a5