Auto merge of #5032 - matklad:lazycell, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 12 Feb 2018 22:02:00 +0000 (22:02 +0000)
committerbors <bors@rust-lang.org>
Mon, 12 Feb 2018 22:02:00 +0000 (22:02 +0000)
Switch to lazycell from crate.io

This switches from a home-grown implementation of `lazycell` to the one from crates.io.

There are no particularly large improvements here, but our own lazy cell is definitely unsafe in theory, because of potential reentrancy in `get_or_try_init`, and the one from crates.io does not have at least this hole :-)

Note that `rustc` already has `lazycell` in its Cargo.lock (because of clippy I guess?), albeit with a lower version, 0.5.


Trivial merge