Skip to content

Commit

Permalink
Clarify rules for on_unimplemented warnings
Browse files Browse the repository at this point in the history
When adding test annotations for this, this section was a bit difficult
to attach the correct rules. The sentence about what happens with
repetition belongs with `on_unimplemented.repetition`, and the
`warnings` key should be more explicit about what it is for.
  • Loading branch information
ehuss committed Nov 22, 2024
1 parent 41ccb0e commit cf9b734
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/attributes/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,10 @@ r[attributes.diagnostic.on_unimplemented.note-repetition]
The `note` option can appear several times, which results in several note messages being emitted.
r[attributes.diagnostic.on_unimplemented.repetition]
If any of the other options appears several times the first occurrence of the relevant option specifies the actually used value.
If any of the other options appears several times the first occurrence of the relevant option specifies the actually used value. Subsequent occurrences generates a warning.
r[attributes.diagnostic.on_unimplemented.warnings]
Any other occurrence generates an lint warning.
For any other non-existing option a lint-warning is generated.
r[attributes.diagnostic.on_unimplemented.unknown-keys]
A warning is generated for any unknown keys.
r[attributes.diagnostic.on_unimplemented.format-string]
All three options accept a string as an argument, interpreted using the same formatting as a [`std::fmt`] string.
Expand Down

0 comments on commit cf9b734

Please sign in to comment.