Skip to content

Commit 9198465

Browse files
ehussjyn514
authored andcommitted
Clarify difference of a help vs note diagnostic.
1 parent 295922e commit 9198465

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/diagnostics.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ Guidelines for different diagnostic levels:
222222
The error or warning portion should *not* suggest how to fix the problem,
223223
only the "help" sub-diagnostic should.
224224

225-
- `note`: emitted to identify additional circumstances and parts of the code
226-
that caused the warning or error. For example, the borrow checker will note
227-
any previous conflicting borrows.
225+
- `note`: emitted to given more context and identify additional circumstances
226+
and parts of the code that caused the warning or error. For example, the
227+
borrow checker will note any previous conflicting borrows.
228+
229+
`help` vs `note`: `help` should be used to show changes the user can
230+
possibly make to fix the problem. `note` should be used for everything else,
231+
such as other context, information and facts, online resources to read, etc.
228232

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

0 commit comments

Comments
 (0)