Skip to content

Commit

Permalink
Improve clarity about attribute applicability
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklimmm authored and tshepang committed Aug 8, 2023
1 parent da891f2 commit fb7ec2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/diagnostics/diagnostic-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ following attributes:
- `code = "..."` (_Optional_)
- Specifies the error code.
- `#[note]` or `#[note(slug)]` (_Optional_)
- _Applied to struct or `Span`/`()` fields._
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
- Adds a note subdiagnostic.
- Value is a path to an item in `rustc_errors::fluent` for the note's
message.
- Defaults to equivalent of `.note`.
- If applied to a `Span` field, creates a spanned note.
- `#[help]` or `#[help(slug)]` (_Optional_)
- _Applied to struct or `Span`/`()` fields._
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
- Adds a help subdiagnostic.
- Value is a path to an item in `rustc_errors::fluent` for the note's
message.
Expand All @@ -181,7 +181,7 @@ following attributes:
message.
- Defaults to equivalent of `.label`.
- `#[warning]` or `#[warning(slug)]` (_Optional_)
- _Applied to struct or `Span`/`()` fields._
- _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._
- Adds a warning subdiagnostic.
- Value is a path to an item in `rustc_errors::fluent` for the note's
message.
Expand Down

0 comments on commit fb7ec2c

Please sign in to comment.