diff options
| author | Matthew Piziak <matthew.piziak@gmail.com> | 2016-08-18 17:46:34 -0400 |
|---|---|---|
| committer | Matthew Piziak <matthew.piziak@gmail.com> | 2016-08-23 11:05:24 -0400 |
| commit | 67b9cd3fe136247e928d11daa12749d0488464c9 (patch) | |
| tree | 710acd43c73b07a8e87bb553b724e9796f46537f /src/test/incremental/thinlto | |
| parent | 490189634b656dcca9e41e6b52093569c03bd4df (diff) | |
| download | rust-67b9cd3fe136247e928d11daa12749d0488464c9.tar.gz rust-67b9cd3fe136247e928d11daa12749d0488464c9.zip | |
improve documentation for `Fn*` traits
I can think of a few things we may want to accomplish with the documentation of the `Fn`, `FnMut`, and `FnOnce` traits: - the relationship between these traits and the closures that implement them - examples of non-closure implementations - the relationship between these traits and Rust's ownership semantics add module-level documentation for `Fn*` traits Describe how `Fn*` traits, closure types, and ownership semantics are linked, and provide examples of higher-level functions that take `Fn*`s. more examples for `Fn*` traits create correct (though not yet elegant) examples for `FnMut` and `FnOnce` add trait links to module-level documentation third time's a charm! argument -> capture for trait documentation This wording will need to be supported with better examples for capturing eventually. correct `FnOnce` example I also fixed some of the trait wording here to make the concept of capturing clearer; though that still needs more work. replace `x + x` with `x * 2` for `fn double`
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
