@@ -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
@@ -37,7 +37,7 @@ LL | field2: SafeEnum::Variant4("str".to_string()),
37
37
|
38
38
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
39
39
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
40
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
40
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
41
41
42
42
error[E0010]: allocations are not allowed in statics
43
43
--> $DIR/check-static-values-constraints.rs:96:5
@@ -54,7 +54,7 @@ LL | vec![MyOwned],
54
54
| ^^^^^^^^^^^^^
55
55
|
56
56
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
57
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
57
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
58
58
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
59
59
60
60
error[E0010]: allocations are not allowed in statics
@@ -72,7 +72,7 @@ LL | vec![MyOwned],
72
72
| ^^^^^^^^^^^^^
73
73
|
74
74
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
75
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
75
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
76
76
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
77
77
78
78
error[E0010]: allocations are not allowed in statics
@@ -90,7 +90,7 @@ LL | &vec![MyOwned],
90
90
| ^^^^^^^^^^^^^
91
91
|
92
92
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
93
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
93
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
94
94
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
95
95
96
96
error[E0010]: allocations are not allowed in statics
@@ -108,7 +108,7 @@ LL | &vec![MyOwned],
108
108
| ^^^^^^^^^^^^^
109
109
|
110
110
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
111
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
111
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
112
112
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
113
113
114
114
error[E0010]: allocations are not allowed in statics
@@ -126,7 +126,7 @@ LL | static STATIC19: Vec<isize> = vec![3];
126
126
| ^^^^^^^
127
127
|
128
128
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
129
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
129
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
130
130
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
131
131
132
132
error[E0010]: allocations are not allowed in statics
@@ -144,7 +144,7 @@ LL | static x: Vec<isize> = vec![3];
144
144
| ^^^^^^^
145
145
|
146
146
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
147
- = note: consider wrapping this expression in `Lazy:: new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
147
+ = note: consider wrapping this expression in `std::sync::LazyLock:: new(|| ...)`
148
148
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
149
149
150
150
error[E0507]: cannot move out of static item `x`
0 commit comments