Handle allocate/reallocate errors in ring_buf
Use is_some() in clear to simplify the clear loop.
Added some extra debug_asserts to ring_buf.
Manually reset the ringbuffer before or after the ringbuffer push/pop tests.
Added population count assertion in reserve. Cleaned up wrap_index.
Add `Show` and `Clone` trait to arrays

Due to not being able to parametrize over array sizes, `Clone` is only
implemented for element types that are `Copy`able.
auto merge of #18891 : erickt/rust/deprecate-as-ref, r=alexcrichton

It seems odd that the `AsRefReader`/`AsRefWriter` have the single method `by_ref()`. This creates the new traits `ByRefReader`/`ByRefWriter` and deprecates the old traits.
Improve examples for syntax::ext::deriving::encodable

The examples in the documentation for syntax::ext::deriving::encodable
are outdated, and do not work. To fix this, the following changes are
applied:

- emit_field() -> emit_struct_field()
- read_field() -> read_struct_field()
- Use Result to report errors
- Add the mut keyword to Encoder/Decoder
- Prefer Encodable::encode() to emit_uint
auto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton

This was a simple case of substitutions being applied inconsistently.  I haven't investigated why type parameters are actually showing up in the closure type here, but trans needs to handle them correctly in any case.
auto merge of #18880 : barosl/rust/doc-fail-to-panic, r=alexcrichton

I found some occurrences of "failure" and "fails" in the documentation. I changed them to "panics" if it means a task panic. Otherwise I left it as is, or changed it to "errors" to clearly distinguish them.

Also, I made a minor fix that is breaking the layout of a module page. "Example" is shown in an irrelevant place from the following page: http://doc.rust-lang.org/std/os/index.html
impl Default for Cell and RefCell

It is necessary to have #[deriving(Default)] for struct containing
cells like Cell<u32>.
auto merge of #18894 : ArtemGr/rust/patch-1, r=pnkfelix

A typo about Results being panics crawled in. Fixing it.
Hide interactive elements when printing rustdoc

Hide the search form and expand/collapse buttons, since they aren't useful when printed.
librustc: use type parameters less vigorously when giving the IR type names
libstd: improve os::args() doc
Guide: add a pointer to play.rust-lang.org and explain how to run the code examples.
libs: fix #[stable] inheritance fallout

A recent change turned off inheritance for the #[stable] by default, but
failed to catch all the cases where this was being used in std. This
patch fixes that problem.
rustdoc: tweak stability summary counting

This commit slightly tweaks the counting of impl blocks and structs for
the stability summary (so that the block itself isn't counted for
inherent impls, and the fields aren't counted for structs).
auto merge of #18901 : steveklabnik/rust/quickfix, r=alexcrichton

Small copy/paste error from the crates guide.
auto merge of #18922 : japaric/rust/for, r=jakub-

r? @alexcrichton
auto merge of #18924 : cakebaker/rust/fix_list, r=steveklabnik