Rollup merge of #63845 - DevQps:47091-remove-bad-example, r=nikomatsakis
Removed a confusing FnOnce example # Description See #47091 for a discussion. ## Changes - Removed an example that might suggest readers that square_x is (only) FnOnce. closes #47091
This commit is contained in:
commit
59fa966a4d
1 changed files with 0 additions and 8 deletions
|
|
@ -185,14 +185,6 @@ pub trait FnMut<Args> : FnOnce<Args> {
|
|||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ## Calling a by-value closure
|
||||
///
|
||||
/// ```
|
||||
/// let x = 5;
|
||||
/// let square_x = move || x * x;
|
||||
/// assert_eq!(square_x(), 25);
|
||||
/// ```
|
||||
///
|
||||
/// ## Using a `FnOnce` parameter
|
||||
///
|
||||
/// ```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue