mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 05:54:33 +00:00
Clean: into() convert to_string() or to_owned()
This commit is contained in:
parent
c100f344ab
commit
dad6fd1996
2 changed files with 62 additions and 61 deletions
|
@ -174,7 +174,7 @@ impl ASTLowerer {
|
|||
"traditional_chinese" => "如果您不想使用該值,請使用discard函數",
|
||||
"english" => "if you don't use the value, use discard function",
|
||||
)
|
||||
.into(),
|
||||
.to_owned(),
|
||||
),
|
||||
))
|
||||
} else {
|
||||
|
@ -231,7 +231,8 @@ impl ASTLowerer {
|
|||
"simplified_chinese" => "数组元素必须全部是相同类型",
|
||||
"traditional_chinese" => "數組元素必須全部是相同類型",
|
||||
"english" => "all elements of an array must be of the same type",
|
||||
),
|
||||
)
|
||||
.to_owned(),
|
||||
Some(
|
||||
switch_lang!(
|
||||
"japanese" => "Int or Strなど明示的に型を指定してください",
|
||||
|
@ -239,7 +240,7 @@ impl ASTLowerer {
|
|||
"traditional_chinese" => "請明確指定類型,例如: Int or Str",
|
||||
"english" => "please specify the type explicitly, e.g. Int or Str",
|
||||
)
|
||||
.into(),
|
||||
.to_owned(),
|
||||
),
|
||||
)));
|
||||
}
|
||||
|
@ -377,7 +378,8 @@ impl ASTLowerer {
|
|||
"simplified_chinese" => "集合元素必须全部是相同类型",
|
||||
"traditional_chinese" => "集合元素必須全部是相同類型",
|
||||
"english" => "all elements of a set must be of the same type",
|
||||
),
|
||||
)
|
||||
.to_owned(),
|
||||
Some(
|
||||
switch_lang!(
|
||||
"japanese" => "Int or Strなど明示的に型を指定してください",
|
||||
|
@ -385,7 +387,7 @@ impl ASTLowerer {
|
|||
"traditional_chinese" => "明確指定類型,例如: Int or Str",
|
||||
"english" => "please specify the type explicitly, e.g. Int or Str",
|
||||
)
|
||||
.into(),
|
||||
.to_owned(),
|
||||
),
|
||||
)));
|
||||
}
|
||||
|
@ -503,7 +505,8 @@ impl ASTLowerer {
|
|||
"simplified_chinese" => "Dict的值必须是同一类型",
|
||||
"traditional_chinese" => "Dict的值必須是同一類型",
|
||||
"english" => "Values of Dict must be the same type",
|
||||
),
|
||||
)
|
||||
.to_owned(),
|
||||
Some(
|
||||
switch_lang!(
|
||||
"japanese" => "Int or Strなど明示的に型を指定してください",
|
||||
|
@ -511,7 +514,7 @@ impl ASTLowerer {
|
|||
"traditional_chinese" => "明確指定類型,例如: Int or Str",
|
||||
"english" => "please specify the type explicitly, e.g. Int or Str",
|
||||
)
|
||||
.into(),
|
||||
.to_owned(),
|
||||
),
|
||||
)));
|
||||
}
|
||||
|
@ -657,7 +660,7 @@ impl ASTLowerer {
|
|||
line!() as usize,
|
||||
call.args.loc(),
|
||||
self.ctx.caused_by(),
|
||||
"invalid assert casting type",
|
||||
"invalid assert casting type".to_owned(),
|
||||
None,
|
||||
)));
|
||||
}
|
||||
|
@ -716,7 +719,7 @@ impl ASTLowerer {
|
|||
line!() as usize,
|
||||
other.loc(),
|
||||
self.ctx.caused_by(),
|
||||
"",
|
||||
"".to_owned(),
|
||||
None,
|
||||
)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue