mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
fix doctests for convert::id
This commit is contained in:
@@ -82,12 +82,14 @@
|
||||
/// #![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);
|
||||
/// ```
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user