about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2022-06-21 11:45:30 +0200
committerGitHub <noreply@github.com>2022-06-21 18:45:30 +0900
commit852dc6381dd3ec53a9b82cc09aba96d32ceef8c1 (patch)
tree1ee65b618e669ae478b29f0fc18ed63fa330e165 /src/doc/rustc-dev-guide
parent3252a2c0e73da824cae9a456514fcabc89b3f8da (diff)
downloadrust-852dc6381dd3ec53a9b82cc09aba96d32ceef8c1.tar.gz
rust-852dc6381dd3ec53a9b82cc09aba96d32ceef8c1.zip
small improves (#1371)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics.md19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md
index dbf5cf99eb9..0f0bfd895a4 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics.md
+++ b/src/doc/rustc-dev-guide/src/diagnostics.md
@@ -273,19 +273,20 @@ There are two main ways to find where a given error is emitted:
 
 - `grep` for either a sub-part of the error message/label or error code. This
   usually works well and is straightforward, but there are some cases where
-  the error emitting code is removed from the code where the error is
+  the code emitting the error is removed from the code where the error is
   constructed behind a relatively deep call-stack. Even then, it is a good way
   to get your bearings.
-- Invoking `rustc` with the nightly-only flag `-Z treat-err-as-bug=1`, which
+- Invoking `rustc` with the nightly-only flag `-Z treat-err-as-bug=1`
   will treat the first error being emitted as an Internal Compiler Error, which
-  allows you to use the environment variable `RUST_BACKTRACE=full` to get a
+  allows you to get a
   stack trace at the point the error has been emitted. Change the `1` to
-  something else if you whish to trigger on a later error. Some limitations
-  with this approach is that some calls get elided from the stack trace because
-  they get inlined in the compiled `rustc`, and the same problem we faced with
-  the prior approach, where the _construction_ of the error is far away from
-  where it is _emitted_. In some cases we buffer multiple errors in order to
-  emit them in order.
+  something else if you wish to trigger on a later error.
+
+  There are limitations with this approach:
+  - Some calls get elided from the stack trace because they get inlined in the compiled `rustc`.
+  - The _construction_ of the error is far away from where it is _emitted_,
+    a problem similar to the one we faced with the `grep` approach.
+    In some cases, we buffer multiple errors in order to emit them in order.
 
 The regular development practices apply: judicious use of `debug!()` statements
 and use of a debugger to trigger break points in order to figure out in what