From f541555701d1e01c5e1f7a66033e8c1cc7066f7f Mon Sep 17 00:00:00 2001 From: Xiretza Date: Tue, 8 Nov 2022 22:35:38 +0100 Subject: [PATCH] Document multiple alternative suggestions on diagnostic structs (#1486) --- src/diagnostics/diagnostic-structs.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/diagnostics/diagnostic-structs.md b/src/diagnostics/diagnostic-structs.md index 81a8db62..e26ba5f3 100644 --- a/src/diagnostics/diagnostic-structs.md +++ b/src/diagnostics/diagnostic-structs.md @@ -200,9 +200,9 @@ following attributes: - See [translation documentation](./translation.md). - Defaults to `rustc_errors::fluent::_subdiag::suggestion` (or - `.suggestion` in Fluent). - - `code = "..."` (_Mandatory_) - - Value is a format string indicating the code to be suggested as a - replacement. + - `code = "..."`/`code("...", ...)` (_Mandatory_) + - One or multiple format strings indicating the code to be suggested as a + replacement. Multiple values signify multiple possible replacements. - `applicability = "..."` (_Optional_) - String which must be one of `machine-applicable`, `maybe-incorrect`, `has-placeholders` or `unspecified`. @@ -359,9 +359,9 @@ diagnostic struct. - See [translation documentation](./translation.md). - Defaults to `rustc_errors::fluent::_subdiag::suggestion` (or - `.suggestion` in Fluent). - - `code = "..."` (_Mandatory_) - - Value is a format string indicating the code to be suggested as a - replacement. + - `code = "..."`/`code("...", ...)` (_Mandatory_) + - One or multiple format strings indicating the code to be suggested as a + replacement. Multiple values signify multiple possible replacements. - `applicability = "..."` (_Optional_) - _Mutually exclusive with `#[applicability]` on a field._ - Value is the applicability of the suggestion.