Skip to content

Commit 592d614

Browse files
author
mejrs
committed
Apply more feedback
1 parent 441f98c commit 592d614

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/compiler-debugging.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,9 @@ fn main() {
128128
}
129129
```
130130

131-
```bash
132-
$ rustc +stage1 error.rs
133131
```
132+
$ rustc +stage1 error.rs
134133
135-
```text
136134
error[E0277]: cannot add `()` to `{integer}`
137135
--> error.rs:2:7
138136
|
@@ -146,11 +144,10 @@ error: aborting due to previous error
146144

147145
Now, where does the error above come from?
148146

149-
```bash
150-
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
151147
```
148+
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
149+
152150
153-
```text
154151
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
155152
--> error.rs:2:7
156153
|
@@ -196,11 +193,9 @@ Cool, now I have a backtrace for the error!
196193
`-Z track-diagnostics` can help figure out where errors are emitted. It uses `#[track_caller]`
197194
for this and prints its location alongside the error:
198195

199-
```bash
200-
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
201196
```
197+
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
202198
203-
```text
204199
error[E0277]: cannot add `()` to `{integer}`
205200
--> src\error.rs:2:7
206201
|

0 commit comments

Comments
 (0)