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
Copy file name to clipboardExpand all lines: compiler/rustc_error_messages/locales/en-US/const_eval.ftl
+13-13
Original file line number
Diff line number
Diff line change
@@ -38,33 +38,33 @@ const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
38
38
39
39
const_eval_unallowed_mutable_refs =
40
40
mutable references are not allowed in the final value of {$kind}s
41
-
.teach_note =
41
+
.teach_note =
42
42
References in statics and constants may only refer to immutable values.\n\n
43
-
Statics are shared everywhere, and if they refer to mutable data one might violate memory
43
+
Statics are shared everywhere, and if they refer to mutable data one might violate memory
44
44
safety since holding multiple mutable references to shared data is not allowed.\n\n
45
45
If you really want global mutable state, try using static mut or a global UnsafeCell.
46
46
47
47
const_eval_unallowed_mutable_refs_raw =
48
48
raw mutable references are not allowed in the final value of {$kind}s
49
-
.teach_note =
49
+
.teach_note =
50
50
References in statics and constants may only refer to immutable values.\n\n
51
-
Statics are shared everywhere, and if they refer to mutable data one might violate memory
51
+
Statics are shared everywhere, and if they refer to mutable data one might violate memory
52
52
safety since holding multiple mutable references to shared data is not allowed.\n\n
53
53
If you really want global mutable state, try using static mut or a global UnsafeCell.
54
54
55
-
const_eval_non_const_fmt_macro_call =
55
+
const_eval_non_const_fmt_macro_call =
56
56
cannot call non-const formatting macro in {$kind}s
57
57
58
-
const_eval_non_const_fn_call =
58
+
const_eval_non_const_fn_call =
59
59
cannot call non-const fn `{$def_path_str}` in {$kind}s
60
60
61
-
const_eval_unallowed_op_in_const_context =
61
+
const_eval_unallowed_op_in_const_context =
62
62
{$msg}
63
63
64
64
const_eval_unallowed_heap_allocations =
65
65
allocations are not allowed in {$kind}s
66
66
.label = allocation not allowed in {$kind}s
67
-
.teach_note =
67
+
.teach_note =
68
68
The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
0 commit comments