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.
This commit is contained in:
parent
9be2f35a4c
commit
8bc43f99e9
8 changed files with 263 additions and 26 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue