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 =
203203const_eval_invalid_vtable_trait =
204204 using vtable for trait `{ $vtable_trait } ` but trait `{ $expected_trait } ` was expected
205205
206+ const_eval_lazy_lock =
207+ consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
208+
206209const_eval_live_drop =
207210 destructor of `{ $dropped_ty } ` cannot be evaluated at compile-time
208211 .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> {
310310 }
311311
312312 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 ) ;
314314 }
315315
316316 err
You can’t perform that action at this time.
0 commit comments