Rollup merge of #35103 - brettcannon:patch-1, r=Manishearth
Try to clear up some awkward wording
This commit is contained in:
commit
5f5fdf64f1
1 changed files with 3 additions and 3 deletions
|
@ -291,9 +291,9 @@ isn’t interesting. The next part is:
|
||||||
# some_closure(1) }
|
# some_closure(1) }
|
||||||
```
|
```
|
||||||
|
|
||||||
Because `Fn` is a trait, we can bound our generic with it. In this case, our
|
Because `Fn` is a trait, we can use it as a bound for our generic type. In
|
||||||
closure takes a `i32` as an argument and returns an `i32`, and so the generic
|
this case, our closure takes a `i32` as an argument and returns an `i32`, and
|
||||||
bound we use is `Fn(i32) -> i32`.
|
so the generic bound we use is `Fn(i32) -> i32`.
|
||||||
|
|
||||||
There’s one other key point here: because we’re bounding a generic with a
|
There’s one other key point here: because we’re bounding a generic with a
|
||||||
trait, this will get monomorphized, and therefore, we’ll be doing static
|
trait, this will get monomorphized, and therefore, we’ll be doing static
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue