about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2022-05-07 07:26:03 +0100
committerDavid Wood <david.wood@huawei.com>2022-05-12 07:21:51 +0100
commitde3e8ca2f3908dc48fddb0d5b4c14c776017b43e (patch)
tree73536ec335942051c8bf762c654f0fcf224dcfd8 /compiler/rustc_macros/src/diagnostics/subdiagnostic.rs
parentb5545f1b0c28a7acba27d1985a934845a013af1b (diff)
downloadrust-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.rs2
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
             );
         };