Skip to content

Commit 441f98c

Browse files
author
mejrs
committed
Apply feedback
1 parent 08f632f commit 441f98c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/compiler-debugging.md

+9
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ fn main() {
130130

131131
```bash
132132
$ rustc +stage1 error.rs
133+
```
134+
135+
```text
133136
error[E0277]: cannot add `()` to `{integer}`
134137
--> error.rs:2:7
135138
|
@@ -145,6 +148,9 @@ Now, where does the error above come from?
145148

146149
```bash
147150
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
151+
```
152+
153+
```text
148154
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
149155
--> error.rs:2:7
150156
|
@@ -192,6 +198,9 @@ for this and prints its location alongside the error:
192198

193199
```bash
194200
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
201+
```
202+
203+
```text
195204
error[E0277]: cannot add `()` to `{integer}`
196205
--> src\error.rs:2:7
197206
|

src/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ There are three main ways to find where a given error is emitted:
287287
- The _construction_ of the error is far away from where it is _emitted_,
288288
a problem similar to the one we faced with the `grep` approach.
289289
In some cases, we buffer multiple errors in order to emit them in order.
290-
- Invoking `rustc` with the nightly-only flag `-Z track-diagnostics` will print error creation
290+
- Invoking `rustc` with `-Z track-diagnostics` will print error creation
291291
locations alongside the error.
292292

293293
The regular development practices apply: judicious use of `debug!()` statements

0 commit comments

Comments
 (0)