mozilla/rust — pull request #13797 by lifthrasiir (2014-04-27 13:39:57+00:00)
Title: std: Add more doc on `std::mem::replace`.

Inspired by @steveklabnik's [comment](http://www.reddit.com/r/rust/comments/240p9s/eli5_stdmemreplace/ch2gxw8), this PR adds the practical use cases to the documentation of `std::mem::replace`.

Caveat: We need a `compile-fail` equivalent for doctest. :p