treat-err-as-bug=n means panic on nth error
This commit is contained in:
parent
07c46e7dcf
commit
1b0f87c8dc
|
|
@ -69,11 +69,11 @@ stack backtrace:
|
||||||
## Getting a backtrace for errors
|
## Getting a backtrace for errors
|
||||||
[getting-a-backtrace-for-errors]: #getting-a-backtrace-for-errors
|
[getting-a-backtrace-for-errors]: #getting-a-backtrace-for-errors
|
||||||
|
|
||||||
If you want to get a backtrace to the point where the compiler emits
|
If you want to get a backtrace to the point where the compiler emits an
|
||||||
an error message, you can pass the `-Z treat-err-as-bug=n`, which
|
error message, you can pass the `-Z treat-err-as-bug=n`, which will make
|
||||||
will make the compiler skip `n` errors or `delay_span_bug` calls and then
|
the compiler panic on the `nth` error on `delay_span_bug.` If you leave
|
||||||
panic on the next one. If you leave off `=n`, the compiler will assume `0` for
|
off `=n`, the compiler will assume `1` for `n` and thus panic on the
|
||||||
`n` and thus panic on the first error it encounters.
|
first error it encounters.
|
||||||
|
|
||||||
This can also help when debugging `delay_span_bug` calls - it will make
|
This can also help when debugging `delay_span_bug` calls - it will make
|
||||||
the first `delay_span_bug` call panic, which will give you a useful backtrace.
|
the first `delay_span_bug` call panic, which will give you a useful backtrace.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue