Commit 0b22443
authored
Rollup merge of #154929 - davidgauch:const-default-lazy, r=jhpratt
Add `const Default` impls for `LazyCell` and `LazyLock`
Follow up to these commits by @estebank rust-lang/rust#134628 and rust-lang/rust#151190.
Tracking issue rust-lang/rust#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.0 file changed
0 commit comments