Skip to content

Commit ac64ef3

Browse files
committed
fix doctests for convert::id
1 parent 93debaa commit ac64ef3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libcore/convert.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ use fmt;
8282
/// #![feature(convert_id)]
8383
/// use std::convert::id;
8484
///
85-
/// // Let's pretend we have an interesting condition:
86-
/// let condition = true;
85+
/// # let condition = true;
86+
///
87+
/// # fn manipulation(x: u32) -> u32 { x + 1 }
8788
///
8889
/// let do_stuff = if condition { manipulation } else { id };
8990
///
9091
/// // do more interesting stuff..
92+
///
9193
/// let _results = do_stuff(42);
9294
/// ```
9395
///

0 commit comments

Comments
 (0)