File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
compiler/rustc_const_eval Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,9 @@ const_eval_invalid_vtable_pointer =
203
203
const_eval_invalid_vtable_trait =
204
204
using vtable for trait `{ $vtable_trait } ` but trait `{ $expected_trait } ` was expected
205
205
206
+ const_eval_lazy_lock =
207
+ consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
208
+
206
209
const_eval_live_drop =
207
210
destructor of `{ $dropped_ty } ` cannot be evaluated at compile-time
208
211
.label = the destructor for this type cannot be evaluated in { const_eval_const_context } s
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
310
310
}
311
311
312
312
if let ConstContext :: Static ( _) = ccx. const_kind ( ) {
313
- err. note ( "consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`" ) ;
313
+ err. note ( fluent_generated :: const_eval_lazy_lock ) ;
314
314
}
315
315
316
316
err
You can’t perform that action at this time.
0 commit comments