Skip to content

Commit

Permalink
Rollup merge of rust-lang#63845 - DevQps:47091-remove-bad-example, r=…
Browse files Browse the repository at this point in the history
…nikomatsakis

Removed a confusing FnOnce example

# Description
See rust-lang#47091 for a discussion.

## Changes
- Removed an example that might suggest readers that square_x is (only) FnOnce.

closes rust-lang#47091
  • Loading branch information
Centril authored Aug 26, 2019
2 parents 9eeb7d5 + 55f8dde commit 59fa966
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/libcore/ops/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
/// ```
Expand Down

0 comments on commit 59fa966

Please sign in to comment.