errors: set_arg
takes IntoDiagnosticArg
Manual implementors of translatable diagnostics will need to call `set_arg`, not just the derive, so make this function a bit more ergonomic by taking `IntoDiagnosticArg` rather than `DiagnosticArgValue`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
b5545f1b0c
commit
de3e8ca2f3
6 changed files with 22 additions and 13 deletions
|
@ -113,7 +113,7 @@ impl<'a> SessionDiagnosticDerive<'a> {
|
|||
quote! {
|
||||
#diag.set_arg(
|
||||
stringify!(#ident),
|
||||
#field_binding.into_diagnostic_arg()
|
||||
#field_binding
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -349,7 +349,7 @@ impl<'a> SessionSubdiagnosticDeriveBuilder<'a> {
|
|||
let generated = quote! {
|
||||
#diag.set_arg(
|
||||
stringify!(#ident),
|
||||
#binding.into_diagnostic_arg()
|
||||
#binding
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue