about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/convert.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs
index 77a87fdf1c6..41eb1eed4e4 100644
--- a/src/libcore/convert.rs
+++ b/src/libcore/convert.rs
@@ -82,12 +82,14 @@ use fmt;
 /// #![feature(convert_id)]
 /// use std::convert::id;
 ///
-/// // Let's pretend we have an interesting condition:
-/// let condition = true;
+/// # let condition = true;
+///
+/// # fn manipulation(x: u32) -> u32 { x + 1 }
 ///
 /// let do_stuff = if condition { manipulation } else { id };
 ///
 /// // do more interesting stuff..
+///
 /// let _results = do_stuff(42);
 /// ```
 ///