File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,9 @@ fn main() {
128
128
}
129
129
```
130
130
131
- ``` bash
132
- $ rustc +stage1 error.rs
133
131
```
132
+ $ rustc +stage1 error.rs
134
133
135
- ``` text
136
134
error[E0277]: cannot add `()` to `{integer}`
137
135
--> error.rs:2:7
138
136
|
@@ -146,11 +144,10 @@ error: aborting due to previous error
146
144
147
145
Now, where does the error above come from?
148
146
149
- ``` bash
150
- $ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
151
147
```
148
+ $ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z treat-err-as-bug
149
+
152
150
153
- ``` text
154
151
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
155
152
--> error.rs:2:7
156
153
|
@@ -196,11 +193,9 @@ Cool, now I have a backtrace for the error!
196
193
` -Z track-diagnostics ` can help figure out where errors are emitted. It uses ` #[track_caller] `
197
194
for this and prints its location alongside the error:
198
195
199
- ``` bash
200
- $ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
201
196
```
197
+ $ RUST_BACKTRACE=1 rustc +stage1 error.rs -Z track-diagnostics
202
198
203
- ``` text
204
199
error[E0277]: cannot add `()` to `{integer}`
205
200
--> src\error.rs:2:7
206
201
|
You can’t perform that action at this time.
0 commit comments