Skip to content

Commit 23d5f56

Browse files
Rollup merge of #34770 - davidko:patch-1, r=steveklabnik
Fixed some typos I believe these are typos?
2 parents 1958e39 + 81386cf commit 23d5f56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/closures.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ could annotate it on the function declaration:
336336

337337
```rust,ignore
338338
fn call_with_ref<'a, F>(some_closure:F) -> i32
339-
where F: Fn(&'a 32) -> i32 {
339+
where F: Fn(&'a i32) -> i32 {
340340
```
341341

342342
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:
350350

351351
```ignore
352352
fn call_with_ref<F>(some_closure:F) -> i32
353-
where F: for<'a> Fn(&'a 32) -> i32 {
353+
where F: for<'a> Fn(&'a i32) -> i32 {
354354
```
355355

356356
This lets the Rust compiler find the minimum lifetime to invoke our closure and

0 commit comments

Comments
 (0)