diff options
| author | Xiretza <xiretza@xiretza.xyz> | 2022-11-08 22:35:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-09 06:35:38 +0900 |
| commit | 0185fe25a9f8faace6fa933d06ece0ff724713f5 (patch) | |
| tree | 3ae3c51bbb480b166703ca61864bba976740af2f /src/doc | |
| parent | 8782e6eabd368888933dc7e042b594ee29a173e2 (diff) | |
| download | rust-0185fe25a9f8faace6fa933d06ece0ff724713f5.tar.gz rust-0185fe25a9f8faace6fa933d06ece0ff724713f5.zip | |
Document multiple alternative suggestions on diagnostic structs (#1486)
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/diagnostics/diagnostic-structs.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-structs.md b/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-structs.md index 81a8db6244b..e26ba5f340e 100644 --- a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-structs.md +++ b/src/doc/rustc-dev-guide/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. |
