Add section on closure types to manual
rustdoc: Tell rustc we're building a library

This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.
auto merge of #10773 : jvns/rust/patch-1, r=cmr

The section on closure types was missing, so I added one. I'm new to Rust, so there are probably important things to say about closure types that I'm missing here.

I tested the example with the latest Rust nightly.
auto merge of #10782 : alexcrichton/rust/rustdoc-lib, r=thestinger

This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.