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)
commit3d0d90fb1df1ca81700f95d8cac5c1ee83c05463
treeb6ebba20d7a86a1f4288a3428f25dc0f48ea79de
parent40486ce2e2a495a40332e9b1fb5f0113d248727c
parent7f3e86e069191ab552122fdcf6eaba84843a51e8
Auto merge of #5032 - matklad:lazycell, r=alexcrichton

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.