@@ -26,7 +26,7 @@ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
26
26
| ^^^^^^^^^^^^^
27
27
|
28
28
= 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(|| ...)`
30
30
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
31
31
32
32
error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
@@ -36,7 +36,7 @@ LL | field2: SafeEnum::Variant4("str".to_string()),
36
36
| ^^^^^^^^^^^
37
37
|
38
38
= 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(|| ...)`
40
40
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
41
41
|
42
42
LL + #![feature(const_trait_impl)]
@@ -57,7 +57,7 @@ LL | vec![MyOwned],
57
57
| ^^^^^^^^^^^^^
58
58
|
59
59
= 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(|| ...)`
61
61
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
62
62
63
63
error[E0010]: allocations are not allowed in statics
@@ -75,7 +75,7 @@ LL | vec![MyOwned],
75
75
| ^^^^^^^^^^^^^
76
76
|
77
77
= 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(|| ...)`
79
79
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
80
80
81
81
error[E0010]: allocations are not allowed in statics
@@ -93,7 +93,7 @@ LL | &vec![MyOwned],
93
93
| ^^^^^^^^^^^^^
94
94
|
95
95
= 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(|| ...)`
97
97
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
98
98
99
99
error[E0010]: allocations are not allowed in statics
@@ -111,7 +111,7 @@ LL | &vec![MyOwned],
111
111
| ^^^^^^^^^^^^^
112
112
|
113
113
= 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(|| ...)`
115
115
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
116
116
117
117
error[E0010]: allocations are not allowed in statics
@@ -129,7 +129,7 @@ LL | static STATIC19: Vec<isize> = vec![3];
129
129
| ^^^^^^^
130
130
|
131
131
= 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(|| ...)`
133
133
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
134
134
135
135
error[E0010]: allocations are not allowed in statics
@@ -147,7 +147,7 @@ LL | static x: Vec<isize> = vec![3];
147
147
| ^^^^^^^
148
148
|
149
149
= 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(|| ...)`
151
151
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
152
152
153
153
error[E0507]: cannot move out of static item `x`
0 commit comments