mirror of
https://github.com/rust-lang/rust
synced 2024-10-01 22:34:35 +00:00
rustc_const_eval: make LazyLock suggestion translatable
This commit is contained in:
parent
3a18c6b55f
commit
a11922d568
|
@ -203,6 +203,9 @@ const_eval_invalid_vtable_pointer =
|
|||
const_eval_invalid_vtable_trait =
|
||||
using vtable for trait `{$vtable_trait}` but trait `{$expected_trait}` was expected
|
||||
|
||||
const_eval_lazy_lock =
|
||||
consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
||||
|
||||
const_eval_live_drop =
|
||||
destructor of `{$dropped_ty}` cannot be evaluated at compile-time
|
||||
.label = the destructor for this type cannot be evaluated in {const_eval_const_context}s
|
||||
|
|
|
@ -310,7 +310,7 @@ macro_rules! error {
|
|||
}
|
||||
|
||||
if let ConstContext::Static(_) = ccx.const_kind() {
|
||||
err.note("consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`");
|
||||
err.note(fluent_generated::const_eval_lazy_lock);
|
||||
}
|
||||
|
||||
err
|
||||
|
|
Loading…
Reference in a new issue