diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2020-04-24 01:08:58 -0300 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2020-04-24 13:48:01 -0500 |
| commit | 011e66658e9c7048993bf9dbec84ffb48d0c37da (patch) | |
| tree | 765bb51b8f9bd20eb3996ede1929478031389c47 /src/doc/rustc-dev-guide | |
| parent | 8f8568ece331f582a7dc2e7791305211815a524f (diff) | |
| download | rust-011e66658e9c7048993bf9dbec84ffb48d0c37da.tar.gz rust-011e66658e9c7048993bf9dbec84ffb48d0c37da.zip | |
treat-err-as-bug=n means panic on nth error
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/compiler-debugging.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/compiler-debugging.md b/src/doc/rustc-dev-guide/src/compiler-debugging.md index 89a763c41f5..d6d03ab1e8e 100644 --- a/src/doc/rustc-dev-guide/src/compiler-debugging.md +++ b/src/doc/rustc-dev-guide/src/compiler-debugging.md @@ -69,11 +69,11 @@ stack backtrace: ## 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 -an error message, you can pass the `-Z treat-err-as-bug=n`, which -will make the compiler skip `n` errors or `delay_span_bug` calls and then -panic on the next one. If you leave off `=n`, the compiler will assume `0` for -`n` and thus panic on the first error it encounters. +If you want to get a backtrace to the point where the compiler emits an +error message, you can pass the `-Z treat-err-as-bug=n`, which will make +the compiler panic on the `nth` error on `delay_span_bug.` If you leave +off `=n`, the compiler will assume `1` for `n` and thus panic on the +first error it encounters. 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. |
