Update error.rs

This commit is contained in:
Shunsuke Shibayama 2022-11-28 21:59:03 +09:00
parent 043ee544e6
commit a57d5f6dfd

View file

@ -1465,13 +1465,13 @@ impl LowerError {
"traditional_chinese" => format!("表達式評估結果(: {})未使用", expr.ref_t()),
"english" => format!("the evaluation result of the expression (: {}) is not used", expr.ref_t()),
);
let discard = StyledString::new("discard", Some(HINT), Some(ATTR));
let hint = switch_lang!(
"japanese" => "値を使わない場合は、discard関数を使用してください",
"simplified_chinese" => "如果您不想使用该值请使用discard函数",
"traditional_chinese" => "如果您不想使用該值請使用discard函數",
"english" => "if you don't use the value, use discard function",
)
.to_owned();
"japanese" => format!("値を使わない場合は、{discard}関数を使用してください"),
"simplified_chinese" => format!("如果您不想使用该值,请使用{discard}函数"),
"traditional_chinese" => format!("如果您不想使用該值,請使用{discard}函數"),
"english" => format!("if you don't use the value, use {discard} function"),
);
Self::new(
ErrorCore::new(
vec![SubMessage::ambiguous_new(expr.loc(), vec![], Some(hint))],