diff options
| author | David Wood <david.wood@huawei.com> | 2022-05-07 07:26:03 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-05-12 07:21:51 +0100 |
| commit | de3e8ca2f3908dc48fddb0d5b4c14c776017b43e (patch) | |
| tree | 73536ec335942051c8bf762c654f0fcf224dcfd8 /compiler/rustc_macros/src/diagnostics/subdiagnostic.rs | |
| parent | b5545f1b0c28a7acba27d1985a934845a013af1b (diff) | |
| download | rust-de3e8ca2f3908dc48fddb0d5b4c14c776017b43e.tar.gz rust-de3e8ca2f3908dc48fddb0d5b4c14c776017b43e.zip | |
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>
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/subdiagnostic.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/subdiagnostic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs index 65b1328682f..ae5b9dbd9ba 100644 --- a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs @@ -349,7 +349,7 @@ impl<'a> SessionSubdiagnosticDeriveBuilder<'a> { let generated = quote! { #diag.set_arg( stringify!(#ident), - #binding.into_diagnostic_arg() + #binding ); }; |
