Skip to content

Commit 59fa966

Browse files
authored
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
2 parents 9eeb7d5 + 55f8dde commit 59fa966

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/libcore/ops/function.rs

-8
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,6 @@ pub trait FnMut<Args> : FnOnce<Args> {
185185
///
186186
/// # Examples
187187
///
188-
/// ## Calling a by-value closure
189-
///
190-
/// ```
191-
/// let x = 5;
192-
/// let square_x = move || x * x;
193-
/// assert_eq!(square_x(), 25);
194-
/// ```
195-
///
196188
/// ## Using a `FnOnce` parameter
197189
///
198190
/// ```

0 commit comments

Comments
 (0)