mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
Add regression test for OOM issue on EarlyLintPass ICE
This commit is contained in:
parent
95978b302c
commit
5d3377dd67
11
tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs
Normal file
11
tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// compile-flags: -Ztreat-err-as-bug
|
||||
// dont-check-failure-status
|
||||
// error-pattern: aborting due to `-Z treat-err-as-bug=1`
|
||||
// normalize-stderr-test "note: .*\n\n" -> ""
|
||||
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
|
||||
// rustc-env:RUST_BACKTRACE=0
|
||||
|
||||
fn main() {
|
||||
#[deny(while_true)]
|
||||
while true {}
|
||||
}
|
16
tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr
Normal file
16
tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr
Normal file
@ -0,0 +1,16 @@
|
||||
error: denote infinite loops with `loop { ... }`
|
||||
--> $DIR/panic-causes-oom-112708.rs:10:5
|
||||
|
|
||||
LL | while true {}
|
||||
| ^^^^^^^^^^ help: use `loop`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/panic-causes-oom-112708.rs:9:12
|
||||
|
|
||||
LL | #[deny(while_true)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: the compiler unexpectedly panicked. this is a bug.
|
||||
|
||||
query stack during panic:
|
||||
thread panicked while processing panic. aborting.
|
Loading…
Reference in New Issue
Block a user