Skip to content

Commit ad07f7f

Browse files
oli-obkmark-i-m
authored andcommitted
Explain new powers of the treat-err-as-bug flag
1 parent 92219f2 commit ad07f7f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compiler-debugging.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ stack backtrace:
7070
[getting-a-backtrace-for-errors]: #getting-a-backtrace-for-errors
7171

7272
If you want to get a backtrace to the point where the compiler emits
73-
an error message, you can pass the `-Z treat-err-as-bug`, which
74-
will make the compiler panic on the first error it sees.
73+
an error message, you can pass the `-Z treat-err-as-bug=n`, which
74+
will make the compiler skip `n` errors or `delay_span_bug` calls and then
75+
panic on the next one. If you leave off `=n`, the compiler will assume `0` for
76+
`n` and thus panic on the first error it encounters.
7577

7678
This can also help when debugging `delay_span_bug` calls - it will make
7779
the first `delay_span_bug` call panic, which will give you a useful backtrace.

0 commit comments

Comments
 (0)