about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-09-12 09:12:40 -0700
committerJoshua Nelson <github@jyn.dev>2021-09-12 11:50:44 -0500
commit8e42e56dd678855ce16dd9add73ce8fa333ce749 (patch)
treed7db643d70ed7299582b93e5843a3aeecbb1afa9 /src/doc/rustc-dev-guide
parent6acf6c00c41c99fb076266c1488abcd6ec0dba82 (diff)
downloadrust-8e42e56dd678855ce16dd9add73ce8fa333ce749.tar.gz
rust-8e42e56dd678855ce16dd9add73ce8fa333ce749.zip
Clarify difference of a help vs note diagnostic.
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md
index ca2ba13ca9e..e35bde093a9 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics.md
+++ b/src/doc/rustc-dev-guide/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: