Skip to content

Commit 01a51b2

Browse files
authored
Document multiple alternative suggestions on diagnostic structs (#1486)
1 parent d0dc6c9 commit 01a51b2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/diagnostics/diagnostic-structs.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ following attributes:
200200
- See [translation documentation](./translation.md).
201201
- Defaults to `rustc_errors::fluent::_subdiag::suggestion` (or
202202
- `.suggestion` in Fluent).
203-
- `code = "..."` (_Mandatory_)
204-
- Value is a format string indicating the code to be suggested as a
205-
replacement.
203+
- `code = "..."`/`code("...", ...)` (_Mandatory_)
204+
- One or multiple format strings indicating the code to be suggested as a
205+
replacement. Multiple values signify multiple possible replacements.
206206
- `applicability = "..."` (_Optional_)
207207
- String which must be one of `machine-applicable`, `maybe-incorrect`,
208208
`has-placeholders` or `unspecified`.
@@ -359,9 +359,9 @@ diagnostic struct.
359359
- See [translation documentation](./translation.md).
360360
- Defaults to `rustc_errors::fluent::_subdiag::suggestion` (or
361361
- `.suggestion` in Fluent).
362-
- `code = "..."` (_Mandatory_)
363-
- Value is a format string indicating the code to be suggested as a
364-
replacement.
362+
- `code = "..."`/`code("...", ...)` (_Mandatory_)
363+
- One or multiple format strings indicating the code to be suggested as a
364+
replacement. Multiple values signify multiple possible replacements.
365365
- `applicability = "..."` (_Optional_)
366366
- _Mutually exclusive with `#[applicability]` on a field._
367367
- Value is the applicability of the suggestion.

0 commit comments

Comments
 (0)