Rollup merge of #26808 - tshepang:closures, r=steveklabnik

This commit is contained in:
Steve Klabnik 2015-07-05 15:12:21 -04:00
commit d1fcb2f502

View file

@ -3529,13 +3529,14 @@ more of the closure traits:
* `FnMut`
: The closure can be called multiple times as mutable. A closure called as
`FnMut` can mutate values from its environment. `FnMut` implies
`FnOnce`.
`FnMut` can mutate values from its environment. `FnMut` inherits from
`FnOnce` (i.e. anything implementing `FnMut` also implements `FnOnce`).
* `Fn`
: The closure can be called multiple times through a shared reference.
A closure called as `Fn` can neither move out from nor mutate values
from its environment. `Fn` implies `FnMut` and `FnOnce`.
from its environment. `Fn` inherits from `FnMut`, which itself
inherits from `FnOnce`.
### Trait objects