Skip to content

Commit 2e256ad

Browse files
committed
document some -Z flags
1 parent 80c3498 commit 2e256ad

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# `eagerly-emit-delayed-bugs`
2+
3+
This feature is perma-unstable and has no tracking issue.
4+
5+
------------------------
6+
7+
This flag converts all [`span_delay_bug()`] calls to [`bug!`] calls, exiting the compiler immediately and allowing you to generate a backtrace of where the delayed bug occurred.
8+
For full documentation, see [the rustc-dev-guide][dev-guide-delayed].
9+
10+
[`bug!`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/macro.bug.html
11+
[`span_delayed_bug`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.DiagCtxtHandle.html#method.span_delayed_bug
12+
[dev-guide-delayed]: https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#debugging-delayed-bugs
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `treat-err-as-bug`
2+
3+
This feature is perma-unstable and has no tracking issue.
4+
5+
------------------------
6+
7+
This flag prints the source code span in the compiler where a diagnostic was generated, respecting [`#[track_caller]`][track_caller].
8+
For full documentation, see [the rustc-dev-guide][dev-guide-track-diagnostics].
9+
10+
[track_caller]: https://doc.rust-lang.org/reference/attributes/codegen.html#the-track_caller-attribute
11+
[dev-guide-track-diagnostics]: https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#getting-the-error-creation-location
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# `treat-err-as-bug`
2+
3+
This feature is perma-unstable and has no tracking issue.
4+
5+
------------------------
6+
7+
This flag converts the selected error to a [`bug!`] call, exiting the compiler immediately and allowing you to generate a backtrace of where the error occurred.
8+
For full documentation, see [the rustc-dev-guide][dev-guide-backtrace].
9+
10+
Note that the compiler automatically sets `RUST_BACKTRACE=1` for itself, and so you do not need to set it yourself when using this flag.
11+
12+
[`bug!`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/macro.bug.html
13+
[dev-guide-backtrace]: https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#getting-a-backtrace-for-errors

0 commit comments

Comments
 (0)