diff options
| author | Xiretza <xiretza@xiretza.xyz> | 2022-10-17 19:41:49 +0200 |
|---|---|---|
| committer | Xiretza <xiretza@xiretza.xyz> | 2022-10-23 18:59:13 +0200 |
| commit | 8bc43f99e91a94868fe08bb72b7ce66d7656d0b5 (patch) | |
| tree | a22595844fc5ab4f427e44a7735dc8d4cf50587f /compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs | |
| parent | 9be2f35a4c1ed1b04aa4a6945b64763f599259ff (diff) | |
| download | rust-8bc43f99e91a94868fe08bb72b7ce66d7656d0b5.tar.gz rust-8bc43f99e91a94868fe08bb72b7ce66d7656d0b5.zip | |
Allow specifying multiple alternative suggestions
This allows porting uses of span_suggestions() to diagnostic structs. Doesn't work for multipart_suggestions() because the rank would be reversed - the struct would specify multiple spans, each of which has multiple possible replacements, while multipart_suggestions() creates multiple possible replacements, each with multiple spans.
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs index 9f7d2661a3e..3ea83fd09c7 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs @@ -454,7 +454,7 @@ impl<'a> DiagnosticDeriveVariantBuilder<'a> { self.formatting_init.extend(code_init); Ok(quote! { - #diag.span_suggestion_with_style( + #diag.span_suggestions_with_style( #span_field, rustc_errors::fluent::#slug, #code_field, |
