From 9198465b6ca8bed669df0cbb67c0e6d0b140803c Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 12 Sep 2021 09:12:40 -0700 Subject: [PATCH] Clarify difference of a help vs note diagnostic. --- src/diagnostics.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/diagnostics.md b/src/diagnostics.md index ca2ba13ca9ecf..e35bde093a963 100644 --- a/src/diagnostics.md +++ b/src/diagnostics.md @@ -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: