Skip to content

Commit

Permalink
Clarify difference of a help vs note diagnostic.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored and jyn514 committed Sep 12, 2021
1 parent 295922e commit 9198465
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,13 @@ Guidelines for different diagnostic levels:
The error or warning portion should *not* suggest how to fix the problem,
only the "help" sub-diagnostic should.

- `note`: emitted to identify additional circumstances and parts of the code
that caused the warning or error. For example, the borrow checker will note
any previous conflicting borrows.
- `note`: emitted to given more context and identify additional circumstances
and parts of the code that caused the warning or error. For example, the
borrow checker will note any previous conflicting borrows.

`help` vs `note`: `help` should be used to show changes the user can
possibly make to fix the problem. `note` should be used for everything else,
such as other context, information and facts, online resources to read, etc.

Not to be confused with *lint levels*, whose guidelines are:

Expand Down

0 comments on commit 9198465

Please sign in to comment.