Skip to content

Commit 0ddc256

Browse files
authored
Apply suggestions from code review
1 parent 441f98c commit 0ddc256

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/compiler-debugging.md

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

131-
```bash
132-
$ rustc +stage1 error.rs
133-
```
134-
135-
```text
136131
error[E0277]: cannot add `()` to `{integer}`
137132
--> error.rs:2:7
138133
|
@@ -146,11 +141,6 @@ error: aborting due to previous error
146141
147142
Now, where does the error above come from?
148143
149-
```bash
150-
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
151-
```
152-
153-
```text
154144
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
155145
--> error.rs:2:7
156146
|
@@ -196,11 +186,6 @@ Cool, now I have a backtrace for the error!
196186
`-Z track-diagnostics` can help figure out where errors are emitted. It uses `#[track_caller]`
197187
for this and prints its location alongside the error:
198188

199-
```bash
200-
$ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
201-
```
202-
203-
```text
204189
error[E0277]: cannot add `()` to `{integer}`
205190
--> src\error.rs:2:7
206191
|

0 commit comments

Comments
 (0)