Skip to content

Commit fb7ec2c

Browse files
nicklimmmtshepang
authored andcommitted
Improve clarity about attribute applicability
1 parent da891f2 commit fb7ec2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diagnostics/diagnostic-structs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ following attributes:
161161
- `code = "..."` (_Optional_)
162162
- Specifies the error code.
163163
- `#[note]` or `#[note(slug)]` (_Optional_)
164-
- _Applied to struct or `Span`/`()` fields._
164+
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
165165
- Adds a note subdiagnostic.
166166
- Value is a path to an item in `rustc_errors::fluent` for the note's
167167
message.
168168
- Defaults to equivalent of `.note`.
169169
- If applied to a `Span` field, creates a spanned note.
170170
- `#[help]` or `#[help(slug)]` (_Optional_)
171-
- _Applied to struct or `Span`/`()` fields._
171+
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
172172
- Adds a help subdiagnostic.
173173
- Value is a path to an item in `rustc_errors::fluent` for the note's
174174
message.
@@ -181,7 +181,7 @@ following attributes:
181181
message.
182182
- Defaults to equivalent of `.label`.
183183
- `#[warning]` or `#[warning(slug)]` (_Optional_)
184-
- _Applied to struct or `Span`/`()` fields._
184+
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
185185
- Adds a warning subdiagnostic.
186186
- Value is a path to an item in `rustc_errors::fluent` for the note's
187187
message.

0 commit comments

Comments
 (0)