You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modifying a static's initial value from another static's initializer
215
216
216
-
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
217
-
218
-
const_eval_mutable_raw_escaping =
219
-
raw mutable pointers are not allowed in the final value of {const_eval_const_context}s
217
+
const_eval_mutable_borrow_escaping =
218
+
mutable borrows of lifetime-extended temporaries in the top-level scope of a {const_eval_const_context} are not allowed
220
219
.teach_note =
221
-
Pointers that escape into the final value of a constant or static must be immutable.
220
+
This creates a reference to a temporary that has its lifetime extended to last for the entire program.
221
+
Lifetime-extended temporaries in constants and statics must be immutable.
222
222
This is to avoid accidentally creating shared mutable state.
223
223
224
224
225
225
If you really want global mutable state, try using an interior mutable `static` or a `static mut`.
226
226
227
-
const_eval_mutable_ref_escaping =
228
-
mutable references are not allowed in the final value of {const_eval_const_context}s
229
-
.teach_note =
230
-
References that escape into the final value of a constant or static must be immutable.
231
-
This is to avoid accidentally creating shared mutable state.
232
-
233
-
234
-
If you really want global mutable state, try using an interior mutable `static` or a `static mut`.
227
+
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
235
228
236
229
const_eval_nested_static_in_thread_local = #[thread_local] does not support implicit nested statics, please create explicit static items and refer to them instead
0 commit comments