File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
tests/ui/treat-err-as-bug Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ // compile-flags: -Ztreat-err-as-bug
2+ // dont-check-failure-status
3+ // error-pattern: aborting due to `-Z treat-err-as-bug=1`
4+ // normalize-stderr-test "note: .*\n\n" -> ""
5+ // normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
6+ // rustc-env:RUST_BACKTRACE=0
7+
8+ fn main ( ) {
9+ #[ deny( while_true) ]
10+ while true { }
11+ }
Original file line number Diff line number Diff line change 1+ error: denote infinite loops with `loop { ... }`
2+ --> $DIR/panic-causes-oom-112708.rs:10:5
3+ |
4+ LL | while true {}
5+ | ^^^^^^^^^^ help: use `loop`
6+ |
7+ note: the lint level is defined here
8+ --> $DIR/panic-causes-oom-112708.rs:9:12
9+ |
10+ LL | #[deny(while_true)]
11+ | ^^^^^^^^^^
12+
13+ error: the compiler unexpectedly panicked. this is a bug.
14+
15+ query stack during panic:
16+ thread panicked while processing panic. aborting.
You can’t perform that action at this time.
0 commit comments