lint: port overflowing literals diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
7ef610c003
commit
7a9bef4d83
3 changed files with 79 additions and 41 deletions
|
@ -49,6 +49,18 @@ impl IntoDiagnosticArg for bool {
|
|||
}
|
||||
}
|
||||
|
||||
impl IntoDiagnosticArg for i128 {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDiagnosticArg for u128 {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDiagnosticArg for String {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue