diff options
| author | David <david.dk.ko@gmail.com> | 2016-07-11 14:43:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-11 14:43:56 -0700 |
| commit | 81386cf277d29b347bf4506571b9f0bcd3326523 (patch) | |
| tree | a705a90fed74d1d921f278a4e2c06409297c7390 | |
| parent | 3ab8054ac182fc170099135304a0c1c6760da57a (diff) | |
| download | rust-81386cf277d29b347bf4506571b9f0bcd3326523.tar.gz rust-81386cf277d29b347bf4506571b9f0bcd3326523.zip | |
Fixed some typos
| -rw-r--r-- | src/doc/book/closures.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/book/closures.md b/src/doc/book/closures.md index e8c88b7db06..666d0946ecc 100644 --- a/src/doc/book/closures.md +++ b/src/doc/book/closures.md @@ -336,7 +336,7 @@ could annotate it on the function declaration: ```rust,ignore fn call_with_ref<'a, F>(some_closure:F) -> i32 - where F: Fn(&'a 32) -> i32 { + where F: Fn(&'a i32) -> i32 { ``` However this presents a problem with in our case. When you specify the explicit @@ -350,7 +350,7 @@ of the closure we can use Higher-Ranked Trait Bounds with the `for<...>` syntax: ```ignore fn call_with_ref<F>(some_closure:F) -> i32 - where F: for<'a> Fn(&'a 32) -> i32 { + where F: for<'a> Fn(&'a i32) -> i32 { ``` This lets the Rust compiler find the minimum lifetime to invoke our closure and |
