summaryrefslogtreecommitdiffstats
path: root/tests/ui/treat-err-as-bug
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/treat-err-as-bug')
-rw-r--r--tests/ui/treat-err-as-bug/err.rs2
-rw-r--r--tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs10
-rw-r--r--tests/ui/treat-err-as-bug/panic-causes-oom-112708.stderr32
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.rs (renamed from tests/ui/treat-err-as-bug/delay_span_bug.rs)6
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.stderr (renamed from tests/ui/treat-err-as-bug/delay_span_bug.stderr)6
5 files changed, 49 insertions, 7 deletions
diff --git a/tests/ui/treat-err-as-bug/err.rs b/tests/ui/treat-err-as-bug/err.rs
index de3e9ed6c..4090a706f 100644
--- a/tests/ui/treat-err-as-bug/err.rs
+++ b/tests/ui/treat-err-as-bug/err.rs
@@ -3,7 +3,7 @@
// error-pattern: aborting due to `-Z treat-err-as-bug=1`
// error-pattern: [eval_to_allocation_raw] const-evaluating + checking `C`
// normalize-stderr-test "note: .*\n\n" -> ""
-// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
+// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> ""
// rustc-env:RUST_BACKTRACE=0
#![crate_type = "rlib"]
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.
diff --git a/tests/ui/treat-err-as-bug/delay_span_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
index 832afddf8..dda35b9b9 100644
--- a/tests/ui/treat-err-as-bug/delay_span_bug.rs
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
@@ -1,12 +1,12 @@
// compile-flags: -Ztreat-err-as-bug
// failure-status: 101
// error-pattern: aborting due to `-Z treat-err-as-bug=1`
-// error-pattern: [trigger_delay_span_bug] triggering a delay span bug
+// error-pattern: [trigger_span_delayed_bug] triggering a span delayed bug for testing incremental
// normalize-stderr-test "note: .*\n\n" -> ""
-// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
+// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> ""
// rustc-env:RUST_BACKTRACE=0
#![feature(rustc_attrs)]
-#[rustc_error(delay_span_bug_from_inside_query)]
+#[rustc_error(span_delayed_bug_from_inside_query)]
fn main() {}
diff --git a/tests/ui/treat-err-as-bug/delay_span_bug.stderr b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr
index 22c617504..a61ffaea8 100644
--- a/tests/ui/treat-err-as-bug/delay_span_bug.stderr
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr
@@ -1,5 +1,5 @@
-error: internal compiler error: delayed span bug triggered by #[rustc_error(delay_span_bug_from_inside_query)]
- --> $DIR/delay_span_bug.rs:12:1
+error: internal compiler error: delayed span bug triggered by #[rustc_error(span_delayed_bug_from_inside_query)]
+ --> $DIR/span_delayed_bug.rs:12:1
|
LL | fn main() {}
| ^^^^^^^^^
@@ -7,5 +7,5 @@ LL | fn main() {}
error: the compiler unexpectedly panicked. this is a bug.
query stack during panic:
-#0 [trigger_delay_span_bug] triggering a delay span bug
+#0 [trigger_span_delayed_bug] triggering a span delayed bug for testing incremental
end of query stack