mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
8d8dcf142a
Add `const Default` impls for `LazyCell` and `LazyLock` Follow up to these commits by @estebank https://github.com/rust-lang/rust/pull/134628 and https://github.com/rust-lang/rust/pull/151190. Tracking issue https://github.com/rust-lang/rust/issues/143894. cc @fmease @fee1-dead @oli-obk This enables `static L: LazyLock<D> = Default::default()` for any type `D: Default` which is safe as `D::default()` is only evaluated at runtime.