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
calling a function with argument of type {$callee_ty} passing data of type {$caller_ty}
126
126
127
127
const_eval_interior_mutable_borrow_escaping =
128
-
interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a {const_eval_const_context} are not allowed
128
+
interior mutable shared borrows of temporaries in a {const_eval_const_context} that have their lifetime extended until the end of the program are not allowed
129
129
.label = this borrow of an interior mutable value refers to a lifetime-extended temporary
130
130
.help = to fix this, the value can be extracted to a separate `static` item and then referenced
131
131
.teach_note =
@@ -215,7 +215,7 @@ const_eval_modified_global =
215
215
modifying a static's initial value from another static's initializer
216
216
217
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
218
+
mutable borrows of temporaries in a {const_eval_const_context} that have their lifetime extended until the end of the program are not allowed
219
219
.teach_note =
220
220
This creates a reference to a temporary that has its lifetime extended to last for the entire program.
221
221
Lifetime-extended temporaries in constants and statics must be immutable.
Copy file name to clipboardExpand all lines: tests/ui/consts/const-promoted-opaque.atomic.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ LL |
7
7
LL | };
8
8
| - value is dropped here
9
9
10
-
error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed
10
+
error[E0492]: interior mutable shared borrows of temporaries in a constant that have their lifetime extended until the end of the program are not allowed
0 commit comments