Clarify difference of a help vs note diagnostic.

This commit is contained in:
Eric Huss 2021-09-12 09:12:40 -07:00 committed by Joshua Nelson
parent 6b747c6cf2
commit 428670ca01
1 changed files with 7 additions and 3 deletions

View File

@ -222,9 +222,13 @@ Guidelines for different diagnostic levels:
The error or warning portion should *not* suggest how to fix the problem, The error or warning portion should *not* suggest how to fix the problem,
only the "help" sub-diagnostic should. only the "help" sub-diagnostic should.
- `note`: emitted to identify additional circumstances and parts of the code - `note`: emitted to given more context and identify additional circumstances
that caused the warning or error. For example, the borrow checker will note and parts of the code that caused the warning or error. For example, the
any previous conflicting borrows. 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: Not to be confused with *lint levels*, whose guidelines are: