@@ -26,7 +26,7 @@ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
2626 | ^^^^^^^^^^^^^
2727 |
2828 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
29- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
29+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
3030 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
3131
3232error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
@@ -36,7 +36,7 @@ LL | field2: SafeEnum::Variant4("str".to_string()),
3636 | ^^^^^^^^^^^
3737 |
3838 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
39- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
39+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
4040help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
4141 |
4242LL + #![feature(const_trait_impl)]
@@ -57,7 +57,7 @@ LL | vec![MyOwned],
5757 | ^^^^^^^^^^^^^
5858 |
5959 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
60- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
60+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
6161 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
6262
6363error[E0010]: allocations are not allowed in statics
@@ -75,7 +75,7 @@ LL | vec![MyOwned],
7575 | ^^^^^^^^^^^^^
7676 |
7777 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
78- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
78+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
7979 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
8080
8181error[E0010]: allocations are not allowed in statics
@@ -93,7 +93,7 @@ LL | &vec![MyOwned],
9393 | ^^^^^^^^^^^^^
9494 |
9595 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
96- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
96+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
9797 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
9898
9999error[E0010]: allocations are not allowed in statics
@@ -111,7 +111,7 @@ LL | &vec![MyOwned],
111111 | ^^^^^^^^^^^^^
112112 |
113113 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
114- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
114+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
115115 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
116116
117117error[E0010]: allocations are not allowed in statics
@@ -129,7 +129,7 @@ LL | static STATIC19: Vec<isize> = vec![3];
129129 | ^^^^^^^
130130 |
131131 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
132- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
132+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
133133 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
134134
135135error[E0010]: allocations are not allowed in statics
@@ -147,7 +147,7 @@ LL | static x: Vec<isize> = vec![3];
147147 | ^^^^^^^
148148 |
149149 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
150- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
150+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
151151 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
152152
153153error[E0507]: cannot move out of static item `x`
0 commit comments