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:
Mazdak Farrokhzad 2019-08-26 23:55:47 +02:00 committed by GitHub
commit 59fa966a4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
///
/// ```