@@ -337,7 +337,7 @@ const_eval_too_many_caller_args =
337
337
338
338
const_eval_transient_mut_borrow = mutable references are not allowed in { const_eval_const_context } s
339
339
340
- const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in { const_eval_const_context } s
340
+ const_eval_transient_mut_raw = raw mutable pointers are not allowed in { const_eval_const_context } s
341
341
342
342
const_eval_try_block_from_output_non_const =
343
343
`try` block cannot convert `{ $ty } ` to the result in { const_eval_const_context } s
@@ -351,21 +351,21 @@ const_eval_unallowed_heap_allocations =
351
351
352
352
const_eval_unallowed_inline_asm =
353
353
inline assembly is not allowed in { const_eval_const_context } s
354
- const_eval_unallowed_mutable_refs =
355
- mutable references are not allowed in the final value of { const_eval_const_context } s
354
+ const_eval_unallowed_mutable_raw =
355
+ raw mutable pointers are not allowed in the final value of { const_eval_const_context } s
356
356
.teach_note =
357
+ References in statics and constants may only refer to immutable values.
358
+
359
+
357
360
Statics are shared everywhere, and if they refer to mutable data one might violate memory
358
361
safety since holding multiple mutable references to shared data is not allowed.
359
362
360
363
361
364
If you really want global mutable state, try using static mut or a global UnsafeCell.
362
365
363
- const_eval_unallowed_mutable_refs_raw =
364
- raw mutable references are not allowed in the final value of { const_eval_const_context } s
366
+ const_eval_unallowed_mutable_refs =
367
+ mutable references are not allowed in the final value of { const_eval_const_context } s
365
368
.teach_note =
366
- References in statics and constants may only refer to immutable values.
367
-
368
-
369
369
Statics are shared everywhere, and if they refer to mutable data one might violate memory
370
370
safety since holding multiple mutable references to shared data is not allowed.
371
371
0 commit comments