diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
commit | a0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch) | |
tree | fc451898ccaf445814e26b46664d78702178101d /tests/ui/treat-err-as-bug | |
parent | Adding debian version 1.71.1+dfsg1-2. (diff) | |
download | rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/treat-err-as-bug')
-rw-r--r-- | tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs | 10 | ||||
-rw-r--r-- | tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr | 32 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs new file mode 100644 index 000000000..c7d480a77 --- /dev/null +++ b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs @@ -0,0 +1,10 @@ +// compile-flags: -Ztreat-err-as-bug +// dont-check-failure-status +// error-pattern: aborting due to `-Z treat-err-as-bug=1` +// dont-check-compiler-stderr +// rustc-env:RUST_BACKTRACE=0 + +fn main() { + #[deny(while_true)] + while true {} +} diff --git a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr new file mode 100644 index 000000000..2d49071ac --- /dev/null +++ b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr @@ -0,0 +1,32 @@ +error: denote infinite loops with `loop { ... }` + --> $DIR/panic-causes-oom-112708.rs:13:5 + | +LL | while true {} + | ^^^^^^^^^^ help: use `loop` + | +note: the lint level is defined here + --> $DIR/panic-causes-oom-112708.rs:12:12 + | +LL | #[deny(while_true)] + | ^^^^^^^^^^ + + +query stack during panic: +#0 [early_lint_checks] perform lints prior to macro expansion +#1 [hir_crate] getting the crate HIR +end of query stack + +error: the compiler unexpectedly panicked. this is a bug. + +query stack during panic: +#0 [early_lint_checks] perform lints prior to macro expansion +#1 [hir_crate] getting the crate HIR +end of query stack + +error: the compiler unexpectedly panicked. this is a bug. + +query stack during panic: +#0 [early_lint_checks] perform lints prior to macro expansion +#1 [hir_crate] getting the crate HIR +end of query stack +thread caused non-unwinding panic. aborting. |