about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorMatthew Piziak <matthew.piziak@gmail.com>2016-08-18 17:46:34 -0400
committerMatthew Piziak <matthew.piziak@gmail.com>2016-08-23 11:05:24 -0400
commit67b9cd3fe136247e928d11daa12749d0488464c9 (patch)
tree710acd43c73b07a8e87bb553b724e9796f46537f /src/test/incremental/thinlto
parent490189634b656dcca9e41e6b52093569c03bd4df (diff)
downloadrust-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