From e69748ba4f48efdc9a1dfcf8c16bc9aba39a86e3 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 16 Apr 2020 15:50:32 +0900 Subject: [PATCH 1/3] Move tests from `test/run-fail` to UI --- src/test/run-fail/bug-811.rs | 24 ------------------ src/test/run-fail/overflowing-lsh-1.rs | 9 ------- src/test/run-fail/overflowing-lsh-2.rs | 9 ------- src/test/run-fail/overflowing-lsh-3.rs | 9 ------- src/test/run-fail/overflowing-rsh-1.rs | 9 ------- src/test/run-fail/overflowing-rsh-2.rs | 9 ------- src/test/run-fail/overflowing-rsh-3.rs | 9 ------- src/test/run-fail/overflowing-rsh-5.rs | 9 ------- src/test/run-fail/overflowing-rsh-6.rs | 10 -------- .../bounds-check-no-overflow.rs | 1 + .../array-slice-vec}/dst-raw-slice.rs | 2 ++ .../{run-fail => ui/binop}/binop-fail-3.rs | 3 ++- .../{run-fail => ui/binop}/binop-panic.rs | 3 +++ .../borrowck}/borrowck-local-borrow.rs | 1 + .../closures}/diverging-closure.rs | 1 + .../consts}/promoted_div_by_zero.rs | 1 + src/test/{run-fail => ui/fn}/expr-fn-panic.rs | 1 + .../generator-resume-after-panic.rs | 1 + .../hashmap}/hashmap-capacity-overflow.rs | 1 + .../hashmap-iter-value-lifetime.nll.stderr | 0 .../hashmap-iter-value-lifetime.rs | 0 .../hashmap-iter-value-lifetime.stderr | 0 .../hashmap-lifetimes.nll.stderr | 0 .../ui/{ => hashmap}/hashmap-lifetimes.rs | 0 .../ui/{ => hashmap}/hashmap-lifetimes.stderr | 0 src/test/ui/{ => hashmap}/hashmap-memory.rs | 0 .../{run-fail => ui/if}/expr-if-panic-fn.rs | 1 + src/test/{run-fail => ui/if}/expr-if-panic.rs | 1 + .../{run-fail => ui/if}/if-check-panic.rs | 2 ++ src/test/{run-fail => ui/if}/if-cond-bot.rs | 3 +++ .../{run-fail => ui/imports}/glob-use-std.rs | 1 + .../{run-fail => ui/issues}/issue-12920.rs | 1 + .../{run-fail => ui/issues}/issue-13202.rs | 1 + .../{run-fail => ui/issues}/issue-18576.rs | 2 ++ .../{run-fail => ui/issues}/issue-20971.rs | 3 ++- .../{run-fail => ui/issues}/issue-23354-2.rs | 1 + .../{run-fail => ui/issues}/issue-23354.rs | 1 + .../{run-fail => ui/issues}/issue-2444.rs | 7 +++--- .../issue-2470-bounds-check-overflow.rs} | 1 + .../{run-fail => ui/issues}/issue-2761.rs | 1 + .../{run-fail => ui/issues}/issue-28934.rs | 1 + .../{run-fail => ui/issues}/issue-29798.rs | 1 + .../{run-fail => ui/issues}/issue-3029.rs | 5 ++-- .../{run-fail => ui/issues}/issue-30380.rs | 1 + .../issues}/issue-44216-add-instant.rs | 1 + .../issues}/issue-44216-add-system-time.rs | 1 + .../issues}/issue-44216-sub-instant.rs | 1 + .../issues}/issue-44216-sub-system-time.rs | 1 + .../issues/issue-51345-2.rs} | 1 + .../{run-fail => ui/issues}/issue-6458-1.rs | 1 + src/test/ui/issues/issue-811.rs | 25 +++++++++++++++++++ src/test/{run-fail => ui/issues}/issue-948.rs | 1 + .../loops}/for-each-loop-panic.rs | 1 + .../macros}/assert-as-macro.rs | 1 + .../macros}/assert-eq-macro-panic.rs | 1 + .../macros}/assert-macro-explicit.rs | 1 + .../macros}/assert-macro-fmt.rs | 1 + .../macros}/assert-macro-owned.rs | 1 + .../macros}/assert-macro-static.rs | 1 + .../macros}/assert-ne-macro-panic.rs | 1 + .../die-macro.rs => ui/macros/die-macro-2.rs} | 1 + .../{run-fail => ui/macros}/die-macro-expr.rs | 1 + .../{run-fail => ui/macros}/die-macro-pure.rs | 1 + .../macros}/unimplemented-macro-panic.rs | 2 ++ .../macros}/unreachable-fmt-msg.rs | 2 ++ .../macros}/unreachable-macro-panic.rs | 2 ++ .../macros}/unreachable-static-msg.rs | 2 ++ .../{run-fail => ui/macros}/unreachable.rs | 2 ++ .../match}/expr-match-panic-fn.rs | 1 + .../match}/expr-match-panic.rs | 1 + .../{run-fail => ui/match}/match-bot-panic.rs | 1 + .../{run-fail => ui/match}/match-disc-bot.rs | 2 ++ .../{run-fail => ui/match}/match-wildcards.rs | 2 ++ .../{run-fail => ui}/meta-revision-bad.rs | 1 + src/test/{run-fail => ui}/meta-revision-ok.rs | 1 + .../mir_codegen_calls_converging_drops.rs | 1 + .../mir_codegen_calls_converging_drops_2.rs | 1 + .../mir}/mir_codegen_calls_diverging.rs | 1 + .../mir}/mir_codegen_calls_diverging_drops.rs | 1 + .../{run-fail => ui/mir}/mir_drop_panics.rs | 1 + .../mir}/mir_dynamic_drops_1.rs | 1 + .../mir}/mir_dynamic_drops_2.rs | 1 + .../mir}/mir_dynamic_drops_3.rs | 1 + .../mir}/mir_indexing_oob_1.rs | 1 + .../mir}/mir_indexing_oob_2.rs | 1 + .../mir}/mir_indexing_oob_3.rs | 1 + .../never_type}/return-never-coerce.rs | 1 + .../numbers-arithmetic}/divide-by-zero.rs | 1 + .../numbers-arithmetic}/mod-zero.rs | 1 + .../numbers-arithmetic}/overflowing-add.rs | 1 + .../numbers-arithmetic/overflowing-lsh-1.rs | 9 +++++++ .../overflowing-lsh-1.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-lsh-2.rs | 9 +++++++ .../overflowing-lsh-2.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-lsh-3.rs | 9 +++++++ .../overflowing-lsh-3.stderr | 14 +++++++++++ .../numbers-arithmetic}/overflowing-lsh-4.rs | 6 ++--- .../overflowing-lsh-4.stderr | 14 +++++++++++ .../numbers-arithmetic}/overflowing-mul.rs | 1 + .../numbers-arithmetic}/overflowing-neg.rs | 1 + .../overflowing-pow-signed.rs | 1 + .../overflowing-pow-unsigned.rs | 1 + .../numbers-arithmetic/overflowing-rsh-1.rs | 9 +++++++ .../overflowing-rsh-1.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-rsh-2.rs | 9 +++++++ .../overflowing-rsh-2.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-rsh-3.rs | 9 +++++++ .../overflowing-rsh-3.stderr | 14 +++++++++++ .../numbers-arithmetic}/overflowing-rsh-4.rs | 6 ++--- .../overflowing-rsh-4.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-rsh-5.rs | 9 +++++++ .../overflowing-rsh-5.stderr | 14 +++++++++++ .../numbers-arithmetic/overflowing-rsh-6.rs | 9 +++++++ .../overflowing-rsh-6.stderr | 14 +++++++++++ .../numbers-arithmetic}/overflowing-sub.rs | 1 + .../numbers-arithmetic}/promoted_overflow.rs | 1 + .../panic-runtime}/unwind-interleaved.rs | 3 ++- .../panic-runtime}/unwind-rec.rs | 4 +-- .../panic-runtime}/unwind-rec2.rs | 4 +-- .../panic-runtime}/unwind-unique.rs | 3 ++- .../{run-fail => ui/panics}/args-panic.rs | 1 + .../{run-fail => ui/panics}/doublepanic.rs | 2 ++ .../panics}/explicit-panic-msg.rs | 2 ++ .../{run-fail => ui/panics}/explicit-panic.rs | 2 ++ src/test/{run-fail => ui/panics}/fmt-panic.rs | 1 + .../{run-fail => ui/panics}/main-panic.rs | 1 + src/test/{run-fail => ui/panics}/panic-arg.rs | 2 ++ .../panics}/panic-macro-any-wrapped.rs | 1 + .../panics}/panic-macro-any.rs | 3 ++- .../panics}/panic-macro-explicit.rs | 1 + .../panics}/panic-macro-fmt.rs | 1 + .../panics}/panic-macro-owned.rs | 1 + .../panics}/panic-macro-static.rs | 1 + .../{run-fail => ui/panics}/panic-main.rs | 2 ++ .../{run-fail => ui/panics}/panic-parens.rs | 1 + .../panics}/panic-set-handler.rs | 1 + .../panics}/panic-set-unset-handler.rs | 1 + .../panics}/panic-take-handler-nop.rs | 1 + .../panics}/panic-task-name-none.rs | 1 + .../panics}/panic-task-name-owned.rs | 1 + src/test/{run-fail => ui/panics}/panic.rs | 2 ++ .../panics}/result-get-panic.rs | 1 + .../{run-fail => ui/panics}/test-panic.rs | 2 +- .../panics}/test-should-fail-bad-message.rs | 2 +- .../panics}/test-should-panic-bad-message.rs | 4 +-- .../panics}/test-should-panic-no-message.rs | 4 +-- .../{run-fail => ui/panics}/unique-panic.rs | 1 + .../panics}/while-body-panics.rs | 2 ++ .../{run-fail => ui/panics}/while-panic.rs | 2 ++ .../process}/tls-exit-status.rs | 1 + .../termination-trait-for-box-dyn-error.rs | 1 + .../termination-trait-for-never.rs | 1 + ...mination-trait-for-result-box-error_err.rs | 1 + .../termination-trait-for-str.rs | 1 + src/test/{run-fail => ui/str}/str-overrun.rs | 2 ++ src/test/{run-fail => ui/structs}/rhs-type.rs | 2 ++ .../test-attrs}/run-unexported-tests.rs | 2 +- .../threads-sendsync}/task-spawn-barefn.rs | 1 + .../test-tasks-invalid-value.rs | 1 + src/test/{run-fail => ui/vec}/vec-overrun.rs | 2 +- 160 files changed, 404 insertions(+), 125 deletions(-) delete mode 100644 src/test/run-fail/bug-811.rs delete mode 100644 src/test/run-fail/overflowing-lsh-1.rs delete mode 100644 src/test/run-fail/overflowing-lsh-2.rs delete mode 100644 src/test/run-fail/overflowing-lsh-3.rs delete mode 100644 src/test/run-fail/overflowing-rsh-1.rs delete mode 100644 src/test/run-fail/overflowing-rsh-2.rs delete mode 100644 src/test/run-fail/overflowing-rsh-3.rs delete mode 100644 src/test/run-fail/overflowing-rsh-5.rs delete mode 100644 src/test/run-fail/overflowing-rsh-6.rs rename src/test/{run-fail => ui/array-slice-vec}/bounds-check-no-overflow.rs (93%) rename src/test/{run-fail => ui/array-slice-vec}/dst-raw-slice.rs (94%) rename src/test/{run-fail => ui/binop}/binop-fail-3.rs (76%) rename src/test/{run-fail => ui/binop}/binop-panic.rs (91%) rename src/test/{run-fail => ui/borrowck}/borrowck-local-borrow.rs (92%) rename src/test/{run-fail => ui/closures}/diverging-closure.rs (89%) rename src/test/{run-fail => ui/consts}/promoted_div_by_zero.rs (91%) rename src/test/{run-fail => ui/fn}/expr-fn-panic.rs (87%) rename src/test/{run-fail => ui/generator}/generator-resume-after-panic.rs (97%) rename src/test/{run-fail => ui/hashmap}/hashmap-capacity-overflow.rs (95%) rename src/test/ui/{ => hashmap}/hashmap-iter-value-lifetime.nll.stderr (100%) rename src/test/ui/{ => hashmap}/hashmap-iter-value-lifetime.rs (100%) rename src/test/ui/{ => hashmap}/hashmap-iter-value-lifetime.stderr (100%) rename src/test/ui/{ => hashmap}/hashmap-lifetimes.nll.stderr (100%) rename src/test/ui/{ => hashmap}/hashmap-lifetimes.rs (100%) rename src/test/ui/{ => hashmap}/hashmap-lifetimes.stderr (100%) rename src/test/ui/{ => hashmap}/hashmap-memory.rs (100%) rename src/test/{run-fail => ui/if}/expr-if-panic-fn.rs (93%) rename src/test/{run-fail => ui/if}/expr-if-panic.rs (92%) rename src/test/{run-fail => ui/if}/if-check-panic.rs (96%) rename src/test/{run-fail => ui/if}/if-cond-bot.rs (91%) rename src/test/{run-fail => ui/imports}/glob-use-std.rs (89%) rename src/test/{run-fail => ui/issues}/issue-12920.rs (88%) rename src/test/{run-fail => ui/issues}/issue-13202.rs (89%) rename src/test/{run-fail => ui/issues}/issue-18576.rs (95%) rename src/test/{run-fail => ui/issues}/issue-20971.rs (78%) rename src/test/{run-fail => ui/issues}/issue-23354-2.rs (93%) rename src/test/{run-fail => ui/issues}/issue-23354.rs (90%) rename src/test/{run-fail => ui/issues}/issue-2444.rs (61%) rename src/test/{run-fail/bug-2470-bounds-check-overflow.rs => ui/issues/issue-2470-bounds-check-overflow.rs} (98%) rename src/test/{run-fail => ui/issues}/issue-2761.rs (87%) rename src/test/{run-fail => ui/issues}/issue-28934.rs (98%) rename src/test/{run-fail => ui/issues}/issue-29798.rs (92%) rename src/test/{run-fail => ui/issues}/issue-3029.rs (94%) rename src/test/{run-fail => ui/issues}/issue-30380.rs (98%) rename src/test/{run-fail => ui/issues}/issue-44216-add-instant.rs (93%) rename src/test/{run-fail => ui/issues}/issue-44216-add-system-time.rs (93%) rename src/test/{run-fail => ui/issues}/issue-44216-sub-instant.rs (93%) rename src/test/{run-fail => ui/issues}/issue-44216-sub-system-time.rs (93%) rename src/test/{run-fail/issue-51345.rs => ui/issues/issue-51345-2.rs} (92%) rename src/test/{run-fail => ui/issues}/issue-6458-1.rs (87%) create mode 100644 src/test/ui/issues/issue-811.rs rename src/test/{run-fail => ui/issues}/issue-948.rs (94%) rename src/test/{run-fail => ui/loops}/for-each-loop-panic.rs (89%) rename src/test/{run-fail => ui/macros}/assert-as-macro.rs (86%) rename src/test/{run-fail => ui/macros}/assert-eq-macro-panic.rs (92%) rename src/test/{run-fail => ui/macros}/assert-macro-explicit.rs (88%) rename src/test/{run-fail => ui/macros}/assert-macro-fmt.rs (91%) rename src/test/{run-fail => ui/macros}/assert-macro-owned.rs (90%) rename src/test/{run-fail => ui/macros}/assert-macro-static.rs (89%) rename src/test/{run-fail => ui/macros}/assert-ne-macro-panic.rs (92%) rename src/test/{run-fail/die-macro.rs => ui/macros/die-macro-2.rs} (82%) rename src/test/{run-fail => ui/macros}/die-macro-expr.rs (86%) rename src/test/{run-fail => ui/macros}/die-macro-pure.rs (86%) rename src/test/{run-fail => ui/macros}/unimplemented-macro-panic.rs (83%) rename src/test/{run-fail => ui/macros}/unreachable-fmt-msg.rs (91%) rename src/test/{run-fail => ui/macros}/unreachable-macro-panic.rs (87%) rename src/test/{run-fail => ui/macros}/unreachable-static-msg.rs (88%) rename src/test/{run-fail => ui/macros}/unreachable.rs (87%) rename src/test/{run-fail => ui/match}/expr-match-panic-fn.rs (94%) rename src/test/{run-fail => ui/match}/expr-match-panic.rs (91%) rename src/test/{run-fail => ui/match}/match-bot-panic.rs (95%) rename src/test/{run-fail => ui/match}/match-disc-bot.rs (92%) rename src/test/{run-fail => ui/match}/match-wildcards.rs (96%) rename src/test/{run-fail => ui}/meta-revision-bad.rs (96%) rename src/test/{run-fail => ui}/meta-revision-ok.rs (96%) rename src/test/{run-fail => ui/mir}/mir_codegen_calls_converging_drops.rs (97%) rename src/test/{run-fail => ui/mir}/mir_codegen_calls_converging_drops_2.rs (97%) rename src/test/{run-fail => ui/mir}/mir_codegen_calls_diverging.rs (92%) rename src/test/{run-fail => ui/mir}/mir_codegen_calls_diverging_drops.rs (96%) rename src/test/{run-fail => ui/mir}/mir_drop_panics.rs (96%) rename src/test/{run-fail => ui/mir}/mir_dynamic_drops_1.rs (98%) rename src/test/{run-fail => ui/mir}/mir_dynamic_drops_2.rs (97%) rename src/test/{run-fail => ui/mir}/mir_dynamic_drops_3.rs (98%) rename src/test/{run-fail => ui/mir}/mir_indexing_oob_1.rs (94%) rename src/test/{run-fail => ui/mir}/mir_indexing_oob_2.rs (94%) rename src/test/{run-fail => ui/mir}/mir_indexing_oob_3.rs (94%) rename src/test/{run-fail => ui/never_type}/return-never-coerce.rs (95%) rename src/test/{run-fail => ui/numbers-arithmetic}/divide-by-zero.rs (91%) rename src/test/{run-fail => ui/numbers-arithmetic}/mod-zero.rs (92%) rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-add.rs (94%) create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-1.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-1.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-2.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-2.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-3.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-3.stderr rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-lsh-4.rs (85%) create mode 100644 src/test/ui/numbers-arithmetic/overflowing-lsh-4.stderr rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-mul.rs (93%) rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-neg.rs (94%) rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-pow-signed.rs (93%) rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-pow-unsigned.rs (93%) create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-1.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-1.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-2.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-2.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-3.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-3.stderr rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-rsh-4.rs (85%) create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-4.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-5.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-5.stderr create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-6.rs create mode 100644 src/test/ui/numbers-arithmetic/overflowing-rsh-6.stderr rename src/test/{run-fail => ui/numbers-arithmetic}/overflowing-sub.rs (94%) rename src/test/{run-fail => ui/numbers-arithmetic}/promoted_overflow.rs (92%) rename src/test/{run-fail => ui/panic-runtime}/unwind-interleaved.rs (72%) rename src/test/{run-fail => ui/panic-runtime}/unwind-rec.rs (75%) rename src/test/{run-fail => ui/panic-runtime}/unwind-rec2.rs (85%) rename src/test/{run-fail => ui/panic-runtime}/unwind-unique.rs (63%) rename src/test/{run-fail => ui/panics}/args-panic.rs (93%) rename src/test/{run-fail => ui/panics}/doublepanic.rs (88%) rename src/test/{run-fail => ui/panics}/explicit-panic-msg.rs (93%) rename src/test/{run-fail => ui/panics}/explicit-panic.rs (80%) rename src/test/{run-fail => ui/panics}/fmt-panic.rs (90%) rename src/test/{run-fail => ui/panics}/main-panic.rs (85%) rename src/test/{run-fail => ui/panics}/panic-arg.rs (88%) rename src/test/{run-fail => ui/panics}/panic-macro-any-wrapped.rs (87%) rename src/test/{run-fail => ui/panics}/panic-macro-any.rs (54%) rename src/test/{run-fail => ui/panics}/panic-macro-explicit.rs (86%) rename src/test/{run-fail => ui/panics}/panic-macro-fmt.rs (90%) rename src/test/{run-fail => ui/panics}/panic-macro-owned.rs (88%) rename src/test/{run-fail => ui/panics}/panic-macro-static.rs (88%) rename src/test/{run-fail => ui/panics}/panic-main.rs (81%) rename src/test/{run-fail => ui/panics}/panic-parens.rs (96%) rename src/test/{run-fail => ui/panics}/panic-set-handler.rs (94%) rename src/test/{run-fail => ui/panics}/panic-set-unset-handler.rs (94%) rename src/test/{run-fail => ui/panics}/panic-take-handler-nop.rs (91%) rename src/test/{run-fail => ui/panics}/panic-task-name-none.rs (96%) rename src/test/{run-fail => ui/panics}/panic-task-name-owned.rs (97%) rename src/test/{run-fail => ui/panics}/panic.rs (81%) rename src/test/{run-fail => ui/panics}/result-get-panic.rs (93%) rename src/test/{run-fail => ui/panics}/test-panic.rs (68%) rename src/test/{run-fail => ui/panics}/test-should-fail-bad-message.rs (75%) rename src/test/{run-fail => ui/panics}/test-should-panic-bad-message.rs (77%) rename src/test/{run-fail => ui/panics}/test-should-panic-no-message.rs (72%) rename src/test/{run-fail => ui/panics}/unique-panic.rs (84%) rename src/test/{run-fail => ui/panics}/while-body-panics.rs (92%) rename src/test/{run-fail => ui/panics}/while-panic.rs (92%) rename src/test/{run-fail => ui/process}/tls-exit-status.rs (93%) rename src/test/{run-fail => ui}/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs (95%) rename src/test/{run-fail => ui}/rfc-1937-termination-trait/termination-trait-for-never.rs (85%) rename src/test/{run-fail => ui}/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs (95%) rename src/test/{run-fail => ui}/rfc-1937-termination-trait/termination-trait-for-str.rs (92%) rename src/test/{run-fail => ui/str}/str-overrun.rs (93%) rename src/test/{run-fail => ui/structs}/rhs-type.rs (95%) rename src/test/{run-fail => ui/test-attrs}/run-unexported-tests.rs (79%) rename src/test/{run-fail => ui/threads-sendsync}/task-spawn-barefn.rs (97%) rename src/test/{run-fail => ui/threads-sendsync}/test-tasks-invalid-value.rs (95%) rename src/test/{run-fail => ui/vec}/vec-overrun.rs (94%) diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs deleted file mode 100644 index e36ec0f59010b..0000000000000 --- a/src/test/run-fail/bug-811.rs +++ /dev/null @@ -1,24 +0,0 @@ -// error-pattern:quux - -use std::marker::PhantomData; - -fn test00_start(ch: chan_t, message: isize) { - send(ch, message); -} - -type task_id = isize; -type port_id = isize; - -struct chan_t { - task: task_id, - port: port_id, - marker: PhantomData<*mut T>, -} - -fn send(_ch: chan_t, _data: T) { - panic!(); -} - -fn main() { - panic!("quux"); -} diff --git a/src/test/run-fail/overflowing-lsh-1.rs b/src/test/run-fail/overflowing-lsh-1.rs deleted file mode 100644 index 977cfea0fe05d..0000000000000 --- a/src/test/run-fail/overflowing-lsh-1.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = 1_i32 << 32; -} diff --git a/src/test/run-fail/overflowing-lsh-2.rs b/src/test/run-fail/overflowing-lsh-2.rs deleted file mode 100644 index 3517dacde3aa3..0000000000000 --- a/src/test/run-fail/overflowing-lsh-2.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = 1 << -1; -} diff --git a/src/test/run-fail/overflowing-lsh-3.rs b/src/test/run-fail/overflowing-lsh-3.rs deleted file mode 100644 index 4a575c3fa7f6a..0000000000000 --- a/src/test/run-fail/overflowing-lsh-3.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = 1_u64 << 64; -} diff --git a/src/test/run-fail/overflowing-rsh-1.rs b/src/test/run-fail/overflowing-rsh-1.rs deleted file mode 100644 index 4592b2b6260bd..0000000000000 --- a/src/test/run-fail/overflowing-rsh-1.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = -1_i32 >> 32; -} diff --git a/src/test/run-fail/overflowing-rsh-2.rs b/src/test/run-fail/overflowing-rsh-2.rs deleted file mode 100644 index 066267b770db2..0000000000000 --- a/src/test/run-fail/overflowing-rsh-2.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = -1_i32 >> -1; -} diff --git a/src/test/run-fail/overflowing-rsh-3.rs b/src/test/run-fail/overflowing-rsh-3.rs deleted file mode 100644 index 67e78482866cb..0000000000000 --- a/src/test/run-fail/overflowing-rsh-3.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _x = -1_i64 >> 64; -} diff --git a/src/test/run-fail/overflowing-rsh-5.rs b/src/test/run-fail/overflowing-rsh-5.rs deleted file mode 100644 index 20ef324a82aeb..0000000000000 --- a/src/test/run-fail/overflowing-rsh-5.rs +++ /dev/null @@ -1,9 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] - -fn main() { - let _n = 1i64 >> [64][0]; -} diff --git a/src/test/run-fail/overflowing-rsh-6.rs b/src/test/run-fail/overflowing-rsh-6.rs deleted file mode 100644 index 589a98bab0401..0000000000000 --- a/src/test/run-fail/overflowing-rsh-6.rs +++ /dev/null @@ -1,10 +0,0 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' -// compile-flags: -C debug-assertions - -#![warn(arithmetic_overflow)] -#![warn(const_err)] -#![feature(const_indexing)] - -fn main() { - let _n = 1i64 >> [64][0]; -} diff --git a/src/test/run-fail/bounds-check-no-overflow.rs b/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs similarity index 93% rename from src/test/run-fail/bounds-check-no-overflow.rs rename to src/test/ui/array-slice-vec/bounds-check-no-overflow.rs index 3943f87f7fe0c..70cbb0672544f 100644 --- a/src/test/run-fail/bounds-check-no-overflow.rs +++ b/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds use std::usize; diff --git a/src/test/run-fail/dst-raw-slice.rs b/src/test/ui/array-slice-vec/dst-raw-slice.rs similarity index 94% rename from src/test/run-fail/dst-raw-slice.rs rename to src/test/ui/array-slice-vec/dst-raw-slice.rs index 2575de7cc5833..33db126944da4 100644 --- a/src/test/run-fail/dst-raw-slice.rs +++ b/src/test/ui/array-slice-vec/dst-raw-slice.rs @@ -1,4 +1,6 @@ // Test bounds checking for DST raw slices + +// run-fail // error-pattern:index out of bounds #[allow(unconditional_panic)] fn main() { diff --git a/src/test/run-fail/binop-fail-3.rs b/src/test/ui/binop/binop-fail-3.rs similarity index 76% rename from src/test/run-fail/binop-fail-3.rs rename to src/test/ui/binop/binop-fail-3.rs index a7696fffda0c2..7120a5c1f191e 100644 --- a/src/test/run-fail/binop-fail-3.rs +++ b/src/test/ui/binop/binop-fail-3.rs @@ -1,9 +1,10 @@ +// run-fail // error-pattern:quux + fn foo() -> ! { panic!("quux"); } -#[allow(resolve_trait_on_defaulted_unit)] fn main() { foo() == foo(); // these types wind up being defaulted to () } diff --git a/src/test/run-fail/binop-panic.rs b/src/test/ui/binop/binop-panic.rs similarity index 91% rename from src/test/run-fail/binop-panic.rs rename to src/test/ui/binop/binop-panic.rs index dba5cecc67e11..6927b96c1b37e 100644 --- a/src/test/run-fail/binop-panic.rs +++ b/src/test/ui/binop/binop-panic.rs @@ -1,8 +1,11 @@ +// run-fail // error-pattern:quux + fn my_err(s: String) -> ! { println!("{}", s); panic!("quux"); } + fn main() { 3_usize == my_err("bye".to_string()); } diff --git a/src/test/run-fail/borrowck-local-borrow.rs b/src/test/ui/borrowck/borrowck-local-borrow.rs similarity index 92% rename from src/test/run-fail/borrowck-local-borrow.rs rename to src/test/ui/borrowck/borrowck-local-borrow.rs index d07f76b6252dc..c2b59ecce8674 100644 --- a/src/test/run-fail/borrowck-local-borrow.rs +++ b/src/test/ui/borrowck/borrowck-local-borrow.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panic 1 // revisions: migrate mir diff --git a/src/test/run-fail/diverging-closure.rs b/src/test/ui/closures/diverging-closure.rs similarity index 89% rename from src/test/run-fail/diverging-closure.rs rename to src/test/ui/closures/diverging-closure.rs index a92e07a21fe4f..de7b68ef68495 100644 --- a/src/test/run-fail/diverging-closure.rs +++ b/src/test/ui/closures/diverging-closure.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:oops fn main() { diff --git a/src/test/run-fail/promoted_div_by_zero.rs b/src/test/ui/consts/promoted_div_by_zero.rs similarity index 91% rename from src/test/run-fail/promoted_div_by_zero.rs rename to src/test/ui/consts/promoted_div_by_zero.rs index dc6719ce025f2..582c186b4e46d 100644 --- a/src/test/run-fail/promoted_div_by_zero.rs +++ b/src/test/ui/consts/promoted_div_by_zero.rs @@ -1,5 +1,6 @@ #![allow(unconditional_panic, const_err)] +// run-fail // error-pattern: attempt to divide by zero fn main() { diff --git a/src/test/run-fail/expr-fn-panic.rs b/src/test/ui/fn/expr-fn-panic.rs similarity index 87% rename from src/test/run-fail/expr-fn-panic.rs rename to src/test/ui/fn/expr-fn-panic.rs index 0532c32ec7028..e93439a1d17f9 100644 --- a/src/test/run-fail/expr-fn-panic.rs +++ b/src/test/ui/fn/expr-fn-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn f() -> ! { diff --git a/src/test/run-fail/generator-resume-after-panic.rs b/src/test/ui/generator/generator-resume-after-panic.rs similarity index 97% rename from src/test/run-fail/generator-resume-after-panic.rs rename to src/test/ui/generator/generator-resume-after-panic.rs index 1a7c2e8062901..1e9a7ed1e94ca 100644 --- a/src/test/run-fail/generator-resume-after-panic.rs +++ b/src/test/ui/generator/generator-resume-after-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:generator resumed after panicking // Test that we get the correct message for resuming a panicked generator. diff --git a/src/test/run-fail/hashmap-capacity-overflow.rs b/src/test/ui/hashmap/hashmap-capacity-overflow.rs similarity index 95% rename from src/test/run-fail/hashmap-capacity-overflow.rs rename to src/test/ui/hashmap/hashmap-capacity-overflow.rs index 038f2756ff322..0e904b7b6a470 100644 --- a/src/test/run-fail/hashmap-capacity-overflow.rs +++ b/src/test/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:capacity overflow use std::collections::hash_map::HashMap; diff --git a/src/test/ui/hashmap-iter-value-lifetime.nll.stderr b/src/test/ui/hashmap/hashmap-iter-value-lifetime.nll.stderr similarity index 100% rename from src/test/ui/hashmap-iter-value-lifetime.nll.stderr rename to src/test/ui/hashmap/hashmap-iter-value-lifetime.nll.stderr diff --git a/src/test/ui/hashmap-iter-value-lifetime.rs b/src/test/ui/hashmap/hashmap-iter-value-lifetime.rs similarity index 100% rename from src/test/ui/hashmap-iter-value-lifetime.rs rename to src/test/ui/hashmap/hashmap-iter-value-lifetime.rs diff --git a/src/test/ui/hashmap-iter-value-lifetime.stderr b/src/test/ui/hashmap/hashmap-iter-value-lifetime.stderr similarity index 100% rename from src/test/ui/hashmap-iter-value-lifetime.stderr rename to src/test/ui/hashmap/hashmap-iter-value-lifetime.stderr diff --git a/src/test/ui/hashmap-lifetimes.nll.stderr b/src/test/ui/hashmap/hashmap-lifetimes.nll.stderr similarity index 100% rename from src/test/ui/hashmap-lifetimes.nll.stderr rename to src/test/ui/hashmap/hashmap-lifetimes.nll.stderr diff --git a/src/test/ui/hashmap-lifetimes.rs b/src/test/ui/hashmap/hashmap-lifetimes.rs similarity index 100% rename from src/test/ui/hashmap-lifetimes.rs rename to src/test/ui/hashmap/hashmap-lifetimes.rs diff --git a/src/test/ui/hashmap-lifetimes.stderr b/src/test/ui/hashmap/hashmap-lifetimes.stderr similarity index 100% rename from src/test/ui/hashmap-lifetimes.stderr rename to src/test/ui/hashmap/hashmap-lifetimes.stderr diff --git a/src/test/ui/hashmap-memory.rs b/src/test/ui/hashmap/hashmap-memory.rs similarity index 100% rename from src/test/ui/hashmap-memory.rs rename to src/test/ui/hashmap/hashmap-memory.rs diff --git a/src/test/run-fail/expr-if-panic-fn.rs b/src/test/ui/if/expr-if-panic-fn.rs similarity index 93% rename from src/test/run-fail/expr-if-panic-fn.rs rename to src/test/ui/if/expr-if-panic-fn.rs index 660b1396e38a9..7ddd4bc5e0f45 100644 --- a/src/test/run-fail/expr-if-panic-fn.rs +++ b/src/test/ui/if/expr-if-panic-fn.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn f() -> ! { diff --git a/src/test/run-fail/expr-if-panic.rs b/src/test/ui/if/expr-if-panic.rs similarity index 92% rename from src/test/run-fail/expr-if-panic.rs rename to src/test/ui/if/expr-if-panic.rs index 36aaf459a56ee..4ab73dc736a3a 100644 --- a/src/test/run-fail/expr-if-panic.rs +++ b/src/test/ui/if/expr-if-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn main() { diff --git a/src/test/run-fail/if-check-panic.rs b/src/test/ui/if/if-check-panic.rs similarity index 96% rename from src/test/run-fail/if-check-panic.rs rename to src/test/ui/if/if-check-panic.rs index f9a4b8fcb38a5..d768cf10c8bf4 100644 --- a/src/test/run-fail/if-check-panic.rs +++ b/src/test/ui/if/if-check-panic.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:Number is odd + fn even(x: usize) -> bool { if x < 2 { return false; diff --git a/src/test/run-fail/if-cond-bot.rs b/src/test/ui/if/if-cond-bot.rs similarity index 91% rename from src/test/run-fail/if-cond-bot.rs rename to src/test/ui/if/if-cond-bot.rs index c680cad258f24..3bbea45844607 100644 --- a/src/test/run-fail/if-cond-bot.rs +++ b/src/test/ui/if/if-cond-bot.rs @@ -1,8 +1,11 @@ +// run-fail // error-pattern:quux + fn my_err(s: String) -> ! { println!("{}", s); panic!("quux"); } + fn main() { if my_err("bye".to_string()) { } diff --git a/src/test/run-fail/glob-use-std.rs b/src/test/ui/imports/glob-use-std.rs similarity index 89% rename from src/test/run-fail/glob-use-std.rs rename to src/test/ui/imports/glob-use-std.rs index d19a782986b16..3cd6a380ed227 100644 --- a/src/test/run-fail/glob-use-std.rs +++ b/src/test/ui/imports/glob-use-std.rs @@ -1,5 +1,6 @@ // Issue #7580 +// run-fail // error-pattern:panic works use std::*; diff --git a/src/test/run-fail/issue-12920.rs b/src/test/ui/issues/issue-12920.rs similarity index 88% rename from src/test/run-fail/issue-12920.rs rename to src/test/ui/issues/issue-12920.rs index 0819e992d1378..85d199f6d82d6 100644 --- a/src/test/run-fail/issue-12920.rs +++ b/src/test/ui/issues/issue-12920.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic pub fn main() { diff --git a/src/test/run-fail/issue-13202.rs b/src/test/ui/issues/issue-13202.rs similarity index 89% rename from src/test/run-fail/issue-13202.rs rename to src/test/ui/issues/issue-13202.rs index cf3a6b3d986f5..511273bae9de5 100644 --- a/src/test/run-fail/issue-13202.rs +++ b/src/test/ui/issues/issue-13202.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:bad input fn main() { diff --git a/src/test/run-fail/issue-18576.rs b/src/test/ui/issues/issue-18576.rs similarity index 95% rename from src/test/run-fail/issue-18576.rs rename to src/test/ui/issues/issue-18576.rs index ca9d1e5f5e7de..946d2d47369f2 100644 --- a/src/test/run-fail/issue-18576.rs +++ b/src/test/ui/issues/issue-18576.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:stop // #18576 @@ -10,4 +11,5 @@ fn main() { let pointer = other; pointer(); } + extern "C" fn other() {} diff --git a/src/test/run-fail/issue-20971.rs b/src/test/ui/issues/issue-20971.rs similarity index 78% rename from src/test/run-fail/issue-20971.rs rename to src/test/ui/issues/issue-20971.rs index 6c2de783c0166..4fb901e2272c9 100644 --- a/src/test/run-fail/issue-20971.rs +++ b/src/test/ui/issues/issue-20971.rs @@ -1,5 +1,6 @@ // Regression test for Issue #20971. +// run-fail // error-pattern:Hello, world! pub trait Parser { @@ -12,7 +13,7 @@ impl Parser for () { fn parse(&mut self, input: ()) {} } -pub fn many() -> Box::Input> + 'static> { +pub fn many() -> Box::Input> + 'static> { panic!("Hello, world!") } diff --git a/src/test/run-fail/issue-23354-2.rs b/src/test/ui/issues/issue-23354-2.rs similarity index 93% rename from src/test/run-fail/issue-23354-2.rs rename to src/test/ui/issues/issue-23354-2.rs index 8f7baff56dc55..1a3ed10306072 100644 --- a/src/test/run-fail/issue-23354-2.rs +++ b/src/test/ui/issues/issue-23354-2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panic evaluated #[allow(unused_variables)] diff --git a/src/test/run-fail/issue-23354.rs b/src/test/ui/issues/issue-23354.rs similarity index 90% rename from src/test/run-fail/issue-23354.rs rename to src/test/ui/issues/issue-23354.rs index 4c2fb022a6bf6..77b7dbf99dac1 100644 --- a/src/test/run-fail/issue-23354.rs +++ b/src/test/ui/issues/issue-23354.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panic evaluated #[allow(unused_variables)] diff --git a/src/test/run-fail/issue-2444.rs b/src/test/ui/issues/issue-2444.rs similarity index 61% rename from src/test/run-fail/issue-2444.rs rename to src/test/ui/issues/issue-2444.rs index 17f89e4d20d3e..35d8eabcd6000 100644 --- a/src/test/run-fail/issue-2444.rs +++ b/src/test/ui/issues/issue-2444.rs @@ -1,12 +1,13 @@ +// run-fail // error-pattern:explicit panic use std::sync::Arc; -enum e { - ee(Arc), +enum Err { + Errr(Arc), } -fn foo() -> e { +fn foo() -> Err { panic!(); } diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow.rs b/src/test/ui/issues/issue-2470-bounds-check-overflow.rs similarity index 98% rename from src/test/run-fail/bug-2470-bounds-check-overflow.rs rename to src/test/ui/issues/issue-2470-bounds-check-overflow.rs index b4e3f24699118..86558c228c5ba 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/ui/issues/issue-2470-bounds-check-overflow.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds use std::mem; diff --git a/src/test/run-fail/issue-2761.rs b/src/test/ui/issues/issue-2761.rs similarity index 87% rename from src/test/run-fail/issue-2761.rs rename to src/test/ui/issues/issue-2761.rs index 84d90930d2d23..437566459250f 100644 --- a/src/test/run-fail/issue-2761.rs +++ b/src/test/ui/issues/issue-2761.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:custom message fn main() { diff --git a/src/test/run-fail/issue-28934.rs b/src/test/ui/issues/issue-28934.rs similarity index 98% rename from src/test/run-fail/issue-28934.rs rename to src/test/ui/issues/issue-28934.rs index 5915372b6920f..fcf91d74fbe57 100644 --- a/src/test/run-fail/issue-28934.rs +++ b/src/test/ui/issues/issue-28934.rs @@ -1,6 +1,7 @@ // Regression test: issue had to do with "givens" in region inference, // which were not being considered during the contraction phase. +// run-fail // error-pattern:explicit panic struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/src/test/run-fail/issue-29798.rs b/src/test/ui/issues/issue-29798.rs similarity index 92% rename from src/test/run-fail/issue-29798.rs rename to src/test/ui/issues/issue-29798.rs index b06aa5fc728d9..31b08f2164a4a 100644 --- a/src/test/run-fail/issue-29798.rs +++ b/src/test/ui/issues/issue-29798.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds: the len is 5 but the index is 5 const fn test(x: usize) -> i32 { diff --git a/src/test/run-fail/issue-3029.rs b/src/test/ui/issues/issue-3029.rs similarity index 94% rename from src/test/run-fail/issue-3029.rs rename to src/test/ui/issues/issue-3029.rs index face808b68ff3..aea2368a211a8 100644 --- a/src/test/run-fail/issue-3029.rs +++ b/src/test/ui/issues/issue-3029.rs @@ -1,9 +1,10 @@ +// run-fail +// error-pattern:so long + #![allow(unused_allocation)] #![allow(unreachable_code)] #![allow(unused_variables)] - -// error-pattern:so long fn main() { let mut x = Vec::new(); let y = vec![3]; diff --git a/src/test/run-fail/issue-30380.rs b/src/test/ui/issues/issue-30380.rs similarity index 98% rename from src/test/run-fail/issue-30380.rs rename to src/test/ui/issues/issue-30380.rs index 036071a89c7a4..34bd6c1b0e561 100644 --- a/src/test/run-fail/issue-30380.rs +++ b/src/test/ui/issues/issue-30380.rs @@ -1,6 +1,7 @@ // check that panics in destructors during assignment do not leave // destroyed values lying around for other destructors to observe. +// run-fail // error-pattern:panicking destructors ftw! struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/src/test/run-fail/issue-44216-add-instant.rs b/src/test/ui/issues/issue-44216-add-instant.rs similarity index 93% rename from src/test/run-fail/issue-44216-add-instant.rs rename to src/test/ui/issues/issue-44216-add-instant.rs index 76ad0a3d41bf8..b5f48e8cedc56 100644 --- a/src/test/run-fail/issue-44216-add-instant.rs +++ b/src/test/ui/issues/issue-44216-add-instant.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:overflow use std::time::{Instant, Duration}; diff --git a/src/test/run-fail/issue-44216-add-system-time.rs b/src/test/ui/issues/issue-44216-add-system-time.rs similarity index 93% rename from src/test/run-fail/issue-44216-add-system-time.rs rename to src/test/ui/issues/issue-44216-add-system-time.rs index aa861f7d5993e..da28433dde9a1 100644 --- a/src/test/run-fail/issue-44216-add-system-time.rs +++ b/src/test/ui/issues/issue-44216-add-system-time.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:overflow use std::time::{Duration, SystemTime}; diff --git a/src/test/run-fail/issue-44216-sub-instant.rs b/src/test/ui/issues/issue-44216-sub-instant.rs similarity index 93% rename from src/test/run-fail/issue-44216-sub-instant.rs rename to src/test/ui/issues/issue-44216-sub-instant.rs index 8bc1f47ae2d96..954cf45591f03 100644 --- a/src/test/run-fail/issue-44216-sub-instant.rs +++ b/src/test/ui/issues/issue-44216-sub-instant.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:overflow use std::time::{Instant, Duration}; diff --git a/src/test/run-fail/issue-44216-sub-system-time.rs b/src/test/ui/issues/issue-44216-sub-system-time.rs similarity index 93% rename from src/test/run-fail/issue-44216-sub-system-time.rs rename to src/test/ui/issues/issue-44216-sub-system-time.rs index 37ab0e7c3f99f..e024e231565b4 100644 --- a/src/test/run-fail/issue-44216-sub-system-time.rs +++ b/src/test/ui/issues/issue-44216-sub-system-time.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:overflow use std::time::{Duration, SystemTime}; diff --git a/src/test/run-fail/issue-51345.rs b/src/test/ui/issues/issue-51345-2.rs similarity index 92% rename from src/test/run-fail/issue-51345.rs rename to src/test/ui/issues/issue-51345-2.rs index c62f98ea78d1e..4abdba6176a2b 100644 --- a/src/test/run-fail/issue-51345.rs +++ b/src/test/ui/issues/issue-51345-2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern: thread 'main' panicked at 'explicit panic' fn main() { diff --git a/src/test/run-fail/issue-6458-1.rs b/src/test/ui/issues/issue-6458-1.rs similarity index 87% rename from src/test/run-fail/issue-6458-1.rs rename to src/test/ui/issues/issue-6458-1.rs index 550bb2b832f44..16c479a6a5cb5 100644 --- a/src/test/run-fail/issue-6458-1.rs +++ b/src/test/ui/issues/issue-6458-1.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn foo(t: T) {} diff --git a/src/test/ui/issues/issue-811.rs b/src/test/ui/issues/issue-811.rs new file mode 100644 index 0000000000000..d16467e4b51e5 --- /dev/null +++ b/src/test/ui/issues/issue-811.rs @@ -0,0 +1,25 @@ +// run-fail +// error-pattern:quux + +use std::marker::PhantomData; + +fn test00_start(ch: Chan, message: isize) { + send(ch, message); +} + +type TaskId = isize; +type PortId = isize; + +struct Chan { + task: TaskId, + port: PortId, + marker: PhantomData<*mut T>, +} + +fn send(_ch: Chan, _data: T) { + panic!(); +} + +fn main() { + panic!("quux"); +} diff --git a/src/test/run-fail/issue-948.rs b/src/test/ui/issues/issue-948.rs similarity index 94% rename from src/test/run-fail/issue-948.rs rename to src/test/ui/issues/issue-948.rs index 8f1c6587f030a..ab0cee71929f4 100644 --- a/src/test/run-fail/issue-948.rs +++ b/src/test/ui/issues/issue-948.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:beep boop #![allow(unused_variables)] diff --git a/src/test/run-fail/for-each-loop-panic.rs b/src/test/ui/loops/for-each-loop-panic.rs similarity index 89% rename from src/test/run-fail/for-each-loop-panic.rs rename to src/test/ui/loops/for-each-loop-panic.rs index d24e81e152c3c..1d0dbe176aef8 100644 --- a/src/test/run-fail/for-each-loop-panic.rs +++ b/src/test/ui/loops/for-each-loop-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:moop fn main() { diff --git a/src/test/run-fail/assert-as-macro.rs b/src/test/ui/macros/assert-as-macro.rs similarity index 86% rename from src/test/run-fail/assert-as-macro.rs rename to src/test/ui/macros/assert-as-macro.rs index f715e21f781bd..bc51b673606e5 100644 --- a/src/test/run-fail/assert-as-macro.rs +++ b/src/test/ui/macros/assert-as-macro.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:assertion failed: 1 == 2 fn main() { diff --git a/src/test/run-fail/assert-eq-macro-panic.rs b/src/test/ui/macros/assert-eq-macro-panic.rs similarity index 92% rename from src/test/run-fail/assert-eq-macro-panic.rs rename to src/test/ui/macros/assert-eq-macro-panic.rs index 863fec12d7475..bd4eb78de9fc1 100644 --- a/src/test/run-fail/assert-eq-macro-panic.rs +++ b/src/test/ui/macros/assert-eq-macro-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:assertion failed: `(left == right)` // error-pattern: left: `14` // error-pattern:right: `15` diff --git a/src/test/run-fail/assert-macro-explicit.rs b/src/test/ui/macros/assert-macro-explicit.rs similarity index 88% rename from src/test/run-fail/assert-macro-explicit.rs rename to src/test/ui/macros/assert-macro-explicit.rs index 3689323c999d6..da13c06d575e7 100644 --- a/src/test/run-fail/assert-macro-explicit.rs +++ b/src/test/ui/macros/assert-macro-explicit.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'assertion failed: false' fn main() { diff --git a/src/test/run-fail/assert-macro-fmt.rs b/src/test/ui/macros/assert-macro-fmt.rs similarity index 91% rename from src/test/run-fail/assert-macro-fmt.rs rename to src/test/ui/macros/assert-macro-fmt.rs index 9fbfb085c2fa5..3b173156d7a49 100644 --- a/src/test/run-fail/assert-macro-fmt.rs +++ b/src/test/ui/macros/assert-macro-fmt.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-assert-fmt 42 rust' fn main() { diff --git a/src/test/run-fail/assert-macro-owned.rs b/src/test/ui/macros/assert-macro-owned.rs similarity index 90% rename from src/test/run-fail/assert-macro-owned.rs rename to src/test/ui/macros/assert-macro-owned.rs index bd58d35eb719f..c231ceb46e91c 100644 --- a/src/test/run-fail/assert-macro-owned.rs +++ b/src/test/ui/macros/assert-macro-owned.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-assert-owned' fn main() { diff --git a/src/test/run-fail/assert-macro-static.rs b/src/test/ui/macros/assert-macro-static.rs similarity index 89% rename from src/test/run-fail/assert-macro-static.rs rename to src/test/ui/macros/assert-macro-static.rs index 650aaeab4f66f..3c988ba4469ba 100644 --- a/src/test/run-fail/assert-macro-static.rs +++ b/src/test/ui/macros/assert-macro-static.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-assert-static' fn main() { diff --git a/src/test/run-fail/assert-ne-macro-panic.rs b/src/test/ui/macros/assert-ne-macro-panic.rs similarity index 92% rename from src/test/run-fail/assert-ne-macro-panic.rs rename to src/test/ui/macros/assert-ne-macro-panic.rs index f55ef2b3ff5ca..0e505e58e2b58 100644 --- a/src/test/run-fail/assert-ne-macro-panic.rs +++ b/src/test/ui/macros/assert-ne-macro-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:assertion failed: `(left != right)` // error-pattern: left: `14` // error-pattern:right: `14` diff --git a/src/test/run-fail/die-macro.rs b/src/test/ui/macros/die-macro-2.rs similarity index 82% rename from src/test/run-fail/die-macro.rs rename to src/test/ui/macros/die-macro-2.rs index 846b9ea24d3b7..11a3222440df1 100644 --- a/src/test/run-fail/die-macro.rs +++ b/src/test/ui/macros/die-macro-2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:test fn main() { diff --git a/src/test/run-fail/die-macro-expr.rs b/src/test/ui/macros/die-macro-expr.rs similarity index 86% rename from src/test/run-fail/die-macro-expr.rs rename to src/test/ui/macros/die-macro-expr.rs index 70413f978969c..05f821acdf569 100644 --- a/src/test/run-fail/die-macro-expr.rs +++ b/src/test/ui/macros/die-macro-expr.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:test fn main() { diff --git a/src/test/run-fail/die-macro-pure.rs b/src/test/ui/macros/die-macro-pure.rs similarity index 86% rename from src/test/run-fail/die-macro-pure.rs rename to src/test/ui/macros/die-macro-pure.rs index cec0742d5035b..1a86a7c22cc55 100644 --- a/src/test/run-fail/die-macro-pure.rs +++ b/src/test/ui/macros/die-macro-pure.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:test fn f() { diff --git a/src/test/run-fail/unimplemented-macro-panic.rs b/src/test/ui/macros/unimplemented-macro-panic.rs similarity index 83% rename from src/test/run-fail/unimplemented-macro-panic.rs rename to src/test/ui/macros/unimplemented-macro-panic.rs index 4d9cb740fc609..37932ca7670c4 100644 --- a/src/test/run-fail/unimplemented-macro-panic.rs +++ b/src/test/ui/macros/unimplemented-macro-panic.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:not implemented + fn main() { unimplemented!() } diff --git a/src/test/run-fail/unreachable-fmt-msg.rs b/src/test/ui/macros/unreachable-fmt-msg.rs similarity index 91% rename from src/test/run-fail/unreachable-fmt-msg.rs rename to src/test/ui/macros/unreachable-fmt-msg.rs index ac2a52163b4de..b2df8f8250015 100644 --- a/src/test/run-fail/unreachable-fmt-msg.rs +++ b/src/test/ui/macros/unreachable-fmt-msg.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:internal error: entered unreachable code: 6 is not prime + fn main() { unreachable!("{} is not {}", 6u32, "prime"); } diff --git a/src/test/run-fail/unreachable-macro-panic.rs b/src/test/ui/macros/unreachable-macro-panic.rs similarity index 87% rename from src/test/run-fail/unreachable-macro-panic.rs rename to src/test/ui/macros/unreachable-macro-panic.rs index 597a01447228d..ad0d82feeaff8 100644 --- a/src/test/run-fail/unreachable-macro-panic.rs +++ b/src/test/ui/macros/unreachable-macro-panic.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:internal error: entered unreachable code + fn main() { unreachable!() } diff --git a/src/test/run-fail/unreachable-static-msg.rs b/src/test/ui/macros/unreachable-static-msg.rs similarity index 88% rename from src/test/run-fail/unreachable-static-msg.rs rename to src/test/ui/macros/unreachable-static-msg.rs index 40a2881cc5714..b59d1960511f9 100644 --- a/src/test/run-fail/unreachable-static-msg.rs +++ b/src/test/ui/macros/unreachable-static-msg.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:internal error: entered unreachable code: uhoh + fn main() { unreachable!("uhoh") } diff --git a/src/test/run-fail/unreachable.rs b/src/test/ui/macros/unreachable.rs similarity index 87% rename from src/test/run-fail/unreachable.rs rename to src/test/ui/macros/unreachable.rs index 597a01447228d..ad0d82feeaff8 100644 --- a/src/test/run-fail/unreachable.rs +++ b/src/test/ui/macros/unreachable.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:internal error: entered unreachable code + fn main() { unreachable!() } diff --git a/src/test/run-fail/expr-match-panic-fn.rs b/src/test/ui/match/expr-match-panic-fn.rs similarity index 94% rename from src/test/run-fail/expr-match-panic-fn.rs rename to src/test/ui/match/expr-match-panic-fn.rs index 120df61b4bfe6..c5bd7382f9f21 100644 --- a/src/test/run-fail/expr-match-panic-fn.rs +++ b/src/test/ui/match/expr-match-panic-fn.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn f() -> ! { diff --git a/src/test/run-fail/expr-match-panic.rs b/src/test/ui/match/expr-match-panic.rs similarity index 91% rename from src/test/run-fail/expr-match-panic.rs rename to src/test/ui/match/expr-match-panic.rs index b2f0179a08323..76144314fad21 100644 --- a/src/test/run-fail/expr-match-panic.rs +++ b/src/test/ui/match/expr-match-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic fn main() { diff --git a/src/test/run-fail/match-bot-panic.rs b/src/test/ui/match/match-bot-panic.rs similarity index 95% rename from src/test/run-fail/match-bot-panic.rs rename to src/test/ui/match/match-bot-panic.rs index f4da8c4e43fb6..8b147cb5ab688 100644 --- a/src/test/run-fail/match-bot-panic.rs +++ b/src/test/ui/match/match-bot-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:explicit panic #![allow(unreachable_code)] diff --git a/src/test/run-fail/match-disc-bot.rs b/src/test/ui/match/match-disc-bot.rs similarity index 92% rename from src/test/run-fail/match-disc-bot.rs rename to src/test/ui/match/match-disc-bot.rs index a9312fbb1fb35..785237b34af35 100644 --- a/src/test/run-fail/match-disc-bot.rs +++ b/src/test/ui/match/match-disc-bot.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:quux + fn f() -> ! { panic!("quux") } diff --git a/src/test/run-fail/match-wildcards.rs b/src/test/ui/match/match-wildcards.rs similarity index 96% rename from src/test/run-fail/match-wildcards.rs rename to src/test/ui/match/match-wildcards.rs index 7a65ad5255896..b79fd03c1333d 100644 --- a/src/test/run-fail/match-wildcards.rs +++ b/src/test/ui/match/match-wildcards.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:squirrelcupcake + fn cmp() -> isize { match (Some('a'), None::) { (Some(_), _) => { diff --git a/src/test/run-fail/meta-revision-bad.rs b/src/test/ui/meta-revision-bad.rs similarity index 96% rename from src/test/run-fail/meta-revision-bad.rs rename to src/test/ui/meta-revision-bad.rs index 17f6398b73554..01f1518c1c6ed 100644 --- a/src/test/run-fail/meta-revision-bad.rs +++ b/src/test/ui/meta-revision-bad.rs @@ -1,6 +1,7 @@ // Meta test for compiletest: check that when we give the wrong error // patterns, the test fails. +// run-fail // revisions: foo bar // should-fail //[foo] error-pattern:bar diff --git a/src/test/run-fail/meta-revision-ok.rs b/src/test/ui/meta-revision-ok.rs similarity index 96% rename from src/test/run-fail/meta-revision-ok.rs rename to src/test/ui/meta-revision-ok.rs index 8693ee5f4ef96..c77ce084a5c57 100644 --- a/src/test/run-fail/meta-revision-ok.rs +++ b/src/test/ui/meta-revision-ok.rs @@ -1,6 +1,7 @@ // Meta test for compiletest: check that when we give the right error // patterns, the test passes. See all `meta-revision-bad.rs`. +// run-fail // revisions: foo bar //[foo] error-pattern:foo //[bar] error-pattern:bar diff --git a/src/test/run-fail/mir_codegen_calls_converging_drops.rs b/src/test/ui/mir/mir_codegen_calls_converging_drops.rs similarity index 97% rename from src/test/run-fail/mir_codegen_calls_converging_drops.rs rename to src/test/ui/mir/mir_codegen_calls_converging_drops.rs index ee0dc98ce6819..7b31c1aa12e3f 100644 --- a/src/test/run-fail/mir_codegen_calls_converging_drops.rs +++ b/src/test/ui/mir/mir_codegen_calls_converging_drops.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:converging_fn called // error-pattern:0 dropped // error-pattern:exit diff --git a/src/test/run-fail/mir_codegen_calls_converging_drops_2.rs b/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs similarity index 97% rename from src/test/run-fail/mir_codegen_calls_converging_drops_2.rs rename to src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs index ee2c25ce8565e..f8117887c9038 100644 --- a/src/test/run-fail/mir_codegen_calls_converging_drops_2.rs +++ b/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:complex called // error-pattern:dropped // error-pattern:exit diff --git a/src/test/run-fail/mir_codegen_calls_diverging.rs b/src/test/ui/mir/mir_codegen_calls_diverging.rs similarity index 92% rename from src/test/run-fail/mir_codegen_calls_diverging.rs rename to src/test/ui/mir/mir_codegen_calls_diverging.rs index dceae0a4e4a03..96630da4d49a7 100644 --- a/src/test/run-fail/mir_codegen_calls_diverging.rs +++ b/src/test/ui/mir/mir_codegen_calls_diverging.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:diverging_fn called fn diverging_fn() -> ! { diff --git a/src/test/run-fail/mir_codegen_calls_diverging_drops.rs b/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs similarity index 96% rename from src/test/run-fail/mir_codegen_calls_diverging_drops.rs rename to src/test/ui/mir/mir_codegen_calls_diverging_drops.rs index 187e526f7c092..96a03a0d6a711 100644 --- a/src/test/run-fail/mir_codegen_calls_diverging_drops.rs +++ b/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:diverging_fn called // error-pattern:0 dropped diff --git a/src/test/run-fail/mir_drop_panics.rs b/src/test/ui/mir/mir_drop_panics.rs similarity index 96% rename from src/test/run-fail/mir_drop_panics.rs rename to src/test/ui/mir/mir_drop_panics.rs index bda555b926288..da6d0b6a346ac 100644 --- a/src/test/run-fail/mir_drop_panics.rs +++ b/src/test/ui/mir/mir_drop_panics.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panic 1 // error-pattern:drop 2 diff --git a/src/test/run-fail/mir_dynamic_drops_1.rs b/src/test/ui/mir/mir_dynamic_drops_1.rs similarity index 98% rename from src/test/run-fail/mir_dynamic_drops_1.rs rename to src/test/ui/mir/mir_dynamic_drops_1.rs index db8d0af29db2c..524f13d754dfa 100644 --- a/src/test/run-fail/mir_dynamic_drops_1.rs +++ b/src/test/ui/mir/mir_dynamic_drops_1.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:drop 1 // error-pattern:drop 2 // ignore-cloudabi no std::process diff --git a/src/test/run-fail/mir_dynamic_drops_2.rs b/src/test/ui/mir/mir_dynamic_drops_2.rs similarity index 97% rename from src/test/run-fail/mir_dynamic_drops_2.rs rename to src/test/ui/mir/mir_dynamic_drops_2.rs index 21d3a042b1e31..8415b99bcf946 100644 --- a/src/test/run-fail/mir_dynamic_drops_2.rs +++ b/src/test/ui/mir/mir_dynamic_drops_2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:drop 1 // ignore-cloudabi no std::process diff --git a/src/test/run-fail/mir_dynamic_drops_3.rs b/src/test/ui/mir/mir_dynamic_drops_3.rs similarity index 98% rename from src/test/run-fail/mir_dynamic_drops_3.rs rename to src/test/ui/mir/mir_dynamic_drops_3.rs index b90499686823a..18914fdb03d7e 100644 --- a/src/test/run-fail/mir_dynamic_drops_3.rs +++ b/src/test/ui/mir/mir_dynamic_drops_3.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:unwind happens // error-pattern:drop 3 // error-pattern:drop 2 diff --git a/src/test/run-fail/mir_indexing_oob_1.rs b/src/test/ui/mir/mir_indexing_oob_1.rs similarity index 94% rename from src/test/run-fail/mir_indexing_oob_1.rs rename to src/test/ui/mir/mir_indexing_oob_1.rs index 1cd53e309ebf9..d46d3704779cd 100644 --- a/src/test/run-fail/mir_indexing_oob_1.rs +++ b/src/test/ui/mir/mir_indexing_oob_1.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 const C: [u32; 5] = [0; 5]; diff --git a/src/test/run-fail/mir_indexing_oob_2.rs b/src/test/ui/mir/mir_indexing_oob_2.rs similarity index 94% rename from src/test/run-fail/mir_indexing_oob_2.rs rename to src/test/ui/mir/mir_indexing_oob_2.rs index 64b260993c994..03b3ea01d6b43 100644 --- a/src/test/run-fail/mir_indexing_oob_2.rs +++ b/src/test/ui/mir/mir_indexing_oob_2.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 const C: &'static [u8; 5] = b"hello"; diff --git a/src/test/run-fail/mir_indexing_oob_3.rs b/src/test/ui/mir/mir_indexing_oob_3.rs similarity index 94% rename from src/test/run-fail/mir_indexing_oob_3.rs rename to src/test/ui/mir/mir_indexing_oob_3.rs index 3688088439bbf..023d65c4bd0e8 100644 --- a/src/test/run-fail/mir_indexing_oob_3.rs +++ b/src/test/ui/mir/mir_indexing_oob_3.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 const C: &'static [u8; 5] = b"hello"; diff --git a/src/test/run-fail/return-never-coerce.rs b/src/test/ui/never_type/return-never-coerce.rs similarity index 95% rename from src/test/run-fail/return-never-coerce.rs rename to src/test/ui/never_type/return-never-coerce.rs index 18182ff0f9d47..fa0c78c2cf3f0 100644 --- a/src/test/run-fail/return-never-coerce.rs +++ b/src/test/ui/never_type/return-never-coerce.rs @@ -1,5 +1,6 @@ // Test that ! coerces to other types. +// run-fail // error-pattern:aah! fn call_another_fn T>(f: F) -> T { diff --git a/src/test/run-fail/divide-by-zero.rs b/src/test/ui/numbers-arithmetic/divide-by-zero.rs similarity index 91% rename from src/test/run-fail/divide-by-zero.rs rename to src/test/ui/numbers-arithmetic/divide-by-zero.rs index ba93563154a3b..fcbc23b836729 100644 --- a/src/test/run-fail/divide-by-zero.rs +++ b/src/test/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:attempt to divide by zero #[allow(unconditional_panic)] fn main() { diff --git a/src/test/run-fail/mod-zero.rs b/src/test/ui/numbers-arithmetic/mod-zero.rs similarity index 92% rename from src/test/run-fail/mod-zero.rs rename to src/test/ui/numbers-arithmetic/mod-zero.rs index f70b3ac920c61..a2798175d68e4 100644 --- a/src/test/run-fail/mod-zero.rs +++ b/src/test/ui/numbers-arithmetic/mod-zero.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:attempt to calculate the remainder with a divisor of zero #[allow(unconditional_panic)] fn main() { diff --git a/src/test/run-fail/overflowing-add.rs b/src/test/ui/numbers-arithmetic/overflowing-add.rs similarity index 94% rename from src/test/run-fail/overflowing-add.rs rename to src/test/ui/numbers-arithmetic/overflowing-add.rs index 5ca91314d95a2..7d63fe3d20b6b 100644 --- a/src/test/run-fail/overflowing-add.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-add.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to add with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-1.rs b/src/test/ui/numbers-arithmetic/overflowing-lsh-1.rs new file mode 100644 index 0000000000000..e5ce80336397d --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-1.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = 1_i32 << 32; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-1.stderr b/src/test/ui/numbers-arithmetic/overflowing-lsh-1.stderr new file mode 100644 index 0000000000000..54008d33968bc --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-1.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-lsh-1.rs:7:14 + | +LL | let _x = 1_i32 << 32; + | ^^^^^^^^^^^ attempt to shift left with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-lsh-1.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-2.rs b/src/test/ui/numbers-arithmetic/overflowing-lsh-2.rs new file mode 100644 index 0000000000000..7fd3407a056ef --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-2.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = 1 << -1; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-2.stderr b/src/test/ui/numbers-arithmetic/overflowing-lsh-2.stderr new file mode 100644 index 0000000000000..872e71bb73796 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-2.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-lsh-2.rs:7:14 + | +LL | let _x = 1 << -1; + | ^^^^^^^ attempt to shift left with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-lsh-2.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-3.rs b/src/test/ui/numbers-arithmetic/overflowing-lsh-3.rs new file mode 100644 index 0000000000000..e007eb4a2e2f7 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-3.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = 1_u64 << 64; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-3.stderr b/src/test/ui/numbers-arithmetic/overflowing-lsh-3.stderr new file mode 100644 index 0000000000000..d55ed4a046c9d --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-3.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-lsh-3.rs:7:14 + | +LL | let _x = 1_u64 << 64; + | ^^^^^^^^^^^ attempt to shift left with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-lsh-3.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/run-fail/overflowing-lsh-4.rs b/src/test/ui/numbers-arithmetic/overflowing-lsh-4.rs similarity index 85% rename from src/test/run-fail/overflowing-lsh-4.rs rename to src/test/ui/numbers-arithmetic/overflowing-lsh-4.rs index 0d3912ce13f81..738d013391579 100644 --- a/src/test/run-fail/overflowing-lsh-4.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-4.rs @@ -1,15 +1,15 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow' +// build-fail // compile-flags: -C debug-assertions // This function is checking that our automatic truncation does not // sidestep the overflow checking. -#![warn(arithmetic_overflow)] -#![warn(const_err)] +#![deny(arithmetic_overflow, const_err)] fn main() { // this signals overflow when checking is on let x = 1_i8 << 17; + //~^ ERROR: this arithmetic operation will overflow // ... but when checking is off, the fallback will truncate the // input to its lower three bits (= 1). Note that this is *not* diff --git a/src/test/ui/numbers-arithmetic/overflowing-lsh-4.stderr b/src/test/ui/numbers-arithmetic/overflowing-lsh-4.stderr new file mode 100644 index 0000000000000..1ef8dd3466c0a --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-lsh-4.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-lsh-4.rs:11:13 + | +LL | let x = 1_i8 << 17; + | ^^^^^^^^^^ attempt to shift left with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-lsh-4.rs:7:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/run-fail/overflowing-mul.rs b/src/test/ui/numbers-arithmetic/overflowing-mul.rs similarity index 93% rename from src/test/run-fail/overflowing-mul.rs rename to src/test/ui/numbers-arithmetic/overflowing-mul.rs index 2dfc9bb5ae472..6e17aeb6761dc 100644 --- a/src/test/run-fail/overflowing-mul.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/run-fail/overflowing-neg.rs b/src/test/ui/numbers-arithmetic/overflowing-neg.rs similarity index 94% rename from src/test/run-fail/overflowing-neg.rs rename to src/test/ui/numbers-arithmetic/overflowing-neg.rs index f512aa35beda6..f77bc132e766f 100644 --- a/src/test/run-fail/overflowing-neg.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-neg.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to negate with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/run-fail/overflowing-pow-signed.rs b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs similarity index 93% rename from src/test/run-fail/overflowing-pow-signed.rs rename to src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs index c539c685faf9e..a855ef0ec0663 100644 --- a/src/test/run-fail/overflowing-pow-signed.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/run-fail/overflowing-pow-unsigned.rs b/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs similarity index 93% rename from src/test/run-fail/overflowing-pow-unsigned.rs rename to src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index 1d4fa3b5c7eb8..26a2b2c4b8a42 100644 --- a/src/test/run-fail/overflowing-pow-unsigned.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-1.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-1.rs new file mode 100644 index 0000000000000..f1488cf8559a2 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-1.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = -1_i32 >> 32; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-1.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-1.stderr new file mode 100644 index 0000000000000..236303e2e9aa3 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-1.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-1.rs:7:14 + | +LL | let _x = -1_i32 >> 32; + | ^^^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-1.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-2.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-2.rs new file mode 100644 index 0000000000000..39127b9703b6b --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-2.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = -1_i32 >> -1; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-2.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-2.stderr new file mode 100644 index 0000000000000..981c8986f76b9 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-2.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-2.rs:7:14 + | +LL | let _x = -1_i32 >> -1; + | ^^^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-2.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-3.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-3.rs new file mode 100644 index 0000000000000..8ee6dde93eafe --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-3.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _x = -1_i64 >> 64; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-3.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-3.stderr new file mode 100644 index 0000000000000..c2994503f0efc --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-3.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-3.rs:7:14 + | +LL | let _x = -1_i64 >> 64; + | ^^^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-3.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/run-fail/overflowing-rsh-4.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-4.rs similarity index 85% rename from src/test/run-fail/overflowing-rsh-4.rs rename to src/test/ui/numbers-arithmetic/overflowing-rsh-4.rs index 1877d5c968526..ce7f818e330b9 100644 --- a/src/test/run-fail/overflowing-rsh-4.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-4.rs @@ -1,15 +1,15 @@ -// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow' +// build-fail // compile-flags: -C debug-assertions // This function is checking that our (type-based) automatic // truncation does not sidestep the overflow checking. -#![warn(arithmetic_overflow)] -#![warn(const_err)] +#![deny(arithmetic_overflow, const_err)] fn main() { // this signals overflow when checking is on let x = 2_i8 >> 17; + //~^ ERROR: this arithmetic operation will overflow // ... but when checking is off, the fallback will truncate the // input to its lower three bits (= 1). Note that this is *not* diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-4.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-4.stderr new file mode 100644 index 0000000000000..3db1da06dbed8 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-4.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-4.rs:11:13 + | +LL | let x = 2_i8 >> 17; + | ^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-4.rs:7:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-5.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-5.rs new file mode 100644 index 0000000000000..88928c9959666 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-5.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _n = 1i64 >> [64][0]; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-5.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-5.stderr new file mode 100644 index 0000000000000..bd3eae82977e3 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-5.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-5.rs:7:14 + | +LL | let _n = 1i64 >> [64][0]; + | ^^^^^^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-5.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-6.rs b/src/test/ui/numbers-arithmetic/overflowing-rsh-6.rs new file mode 100644 index 0000000000000..88928c9959666 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-6.rs @@ -0,0 +1,9 @@ +// build-fail +// compile-flags: -C debug-assertions + +#![deny(arithmetic_overflow, const_err)] + +fn main() { + let _n = 1i64 >> [64][0]; + //~^ ERROR: this arithmetic operation will overflow +} diff --git a/src/test/ui/numbers-arithmetic/overflowing-rsh-6.stderr b/src/test/ui/numbers-arithmetic/overflowing-rsh-6.stderr new file mode 100644 index 0000000000000..5d76639fb50f3 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/overflowing-rsh-6.stderr @@ -0,0 +1,14 @@ +error: this arithmetic operation will overflow + --> $DIR/overflowing-rsh-6.rs:7:14 + | +LL | let _n = 1i64 >> [64][0]; + | ^^^^^^^^^^^^^^^ attempt to shift right with overflow + | +note: the lint level is defined here + --> $DIR/overflowing-rsh-6.rs:4:9 + | +LL | #![deny(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/run-fail/overflowing-sub.rs b/src/test/ui/numbers-arithmetic/overflowing-sub.rs similarity index 94% rename from src/test/run-fail/overflowing-sub.rs rename to src/test/ui/numbers-arithmetic/overflowing-sub.rs index fb096c31957ee..2e2ee52124768 100644 --- a/src/test/run-fail/overflowing-sub.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'attempt to subtract with overflow' // compile-flags: -C debug-assertions diff --git a/src/test/run-fail/promoted_overflow.rs b/src/test/ui/numbers-arithmetic/promoted_overflow.rs similarity index 92% rename from src/test/run-fail/promoted_overflow.rs rename to src/test/ui/numbers-arithmetic/promoted_overflow.rs index 3c42da4b1d8ed..da59e81ed6bf7 100644 --- a/src/test/run-fail/promoted_overflow.rs +++ b/src/test/ui/numbers-arithmetic/promoted_overflow.rs @@ -1,5 +1,6 @@ #![allow(arithmetic_overflow)] +// run-fail // error-pattern: overflow // compile-flags: -C overflow-checks=yes diff --git a/src/test/run-fail/unwind-interleaved.rs b/src/test/ui/panic-runtime/unwind-interleaved.rs similarity index 72% rename from src/test/run-fail/unwind-interleaved.rs rename to src/test/ui/panic-runtime/unwind-interleaved.rs index c163678ae9873..3d2b8a694806c 100644 --- a/src/test/run-fail/unwind-interleaved.rs +++ b/src/test/ui/panic-runtime/unwind-interleaved.rs @@ -1,4 +1,5 @@ -// error-pattern:fail +// run-fail +// error-pattern:explicit panic fn a() {} diff --git a/src/test/run-fail/unwind-rec.rs b/src/test/ui/panic-runtime/unwind-rec.rs similarity index 75% rename from src/test/run-fail/unwind-rec.rs rename to src/test/ui/panic-runtime/unwind-rec.rs index 83ac19ff4a533..88aa6a577e621 100644 --- a/src/test/run-fail/unwind-rec.rs +++ b/src/test/ui/panic-runtime/unwind-rec.rs @@ -1,5 +1,5 @@ -// error-pattern:fail - +// run-fail +// error-pattern:explicit panic fn build() -> Vec { panic!(); diff --git a/src/test/run-fail/unwind-rec2.rs b/src/test/ui/panic-runtime/unwind-rec2.rs similarity index 85% rename from src/test/run-fail/unwind-rec2.rs rename to src/test/ui/panic-runtime/unwind-rec2.rs index 4dfc282b6c0f5..b3cac5141bbcf 100644 --- a/src/test/run-fail/unwind-rec2.rs +++ b/src/test/ui/panic-runtime/unwind-rec2.rs @@ -1,5 +1,5 @@ -// error-pattern:fail - +// run-fail +// error-pattern:explicit panic fn build1() -> Vec { vec![0, 0, 0, 0, 0, 0, 0] diff --git a/src/test/run-fail/unwind-unique.rs b/src/test/ui/panic-runtime/unwind-unique.rs similarity index 63% rename from src/test/run-fail/unwind-unique.rs rename to src/test/ui/panic-runtime/unwind-unique.rs index 7b761faad9534..fabd28ac4f918 100644 --- a/src/test/run-fail/unwind-unique.rs +++ b/src/test/ui/panic-runtime/unwind-unique.rs @@ -1,4 +1,5 @@ -// error-pattern:fail +// run-fail +// error-pattern:explicit panic fn failfn() { panic!(); diff --git a/src/test/run-fail/args-panic.rs b/src/test/ui/panics/args-panic.rs similarity index 93% rename from src/test/run-fail/args-panic.rs rename to src/test/ui/panics/args-panic.rs index 9a62652dde1e1..cdf1ef447521e 100644 --- a/src/test/run-fail/args-panic.rs +++ b/src/test/ui/panics/args-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:meep #![feature(box_syntax)] diff --git a/src/test/run-fail/doublepanic.rs b/src/test/ui/panics/doublepanic.rs similarity index 88% rename from src/test/run-fail/doublepanic.rs rename to src/test/ui/panics/doublepanic.rs index 10d303e491e44..0b6ac6fe41000 100644 --- a/src/test/run-fail/doublepanic.rs +++ b/src/test/ui/panics/doublepanic.rs @@ -1,6 +1,8 @@ #![allow(unreachable_code)] +// run-fail // error-pattern:One + fn main() { panic!("One"); panic!("Two"); diff --git a/src/test/run-fail/explicit-panic-msg.rs b/src/test/ui/panics/explicit-panic-msg.rs similarity index 93% rename from src/test/run-fail/explicit-panic-msg.rs rename to src/test/ui/panics/explicit-panic-msg.rs index 35e0518b9be57..d27fc3e06f1bf 100644 --- a/src/test/run-fail/explicit-panic-msg.rs +++ b/src/test/ui/panics/explicit-panic-msg.rs @@ -1,7 +1,9 @@ #![allow(unused_assignments)] #![allow(unused_variables)] +// run-fail // error-pattern:wooooo + fn main() { let mut a = 1; if 1 == 1 { diff --git a/src/test/run-fail/explicit-panic.rs b/src/test/ui/panics/explicit-panic.rs similarity index 80% rename from src/test/run-fail/explicit-panic.rs rename to src/test/ui/panics/explicit-panic.rs index 11ea6b4122128..ddd5f00be6e76 100644 --- a/src/test/run-fail/explicit-panic.rs +++ b/src/test/ui/panics/explicit-panic.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:explicit + fn main() { panic!(); } diff --git a/src/test/run-fail/fmt-panic.rs b/src/test/ui/panics/fmt-panic.rs similarity index 90% rename from src/test/run-fail/fmt-panic.rs rename to src/test/ui/panics/fmt-panic.rs index 5749991914c02..8024f7b6166d6 100644 --- a/src/test/run-fail/fmt-panic.rs +++ b/src/test/ui/panics/fmt-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:meh fn main() { diff --git a/src/test/run-fail/main-panic.rs b/src/test/ui/panics/main-panic.rs similarity index 85% rename from src/test/run-fail/main-panic.rs rename to src/test/ui/panics/main-panic.rs index 3a9409562db6a..34bd9f8e0c6f1 100644 --- a/src/test/run-fail/main-panic.rs +++ b/src/test/ui/panics/main-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at fn main() { diff --git a/src/test/run-fail/panic-arg.rs b/src/test/ui/panics/panic-arg.rs similarity index 88% rename from src/test/run-fail/panic-arg.rs rename to src/test/ui/panics/panic-arg.rs index c164ff94630b1..b73487d083c18 100644 --- a/src/test/run-fail/panic-arg.rs +++ b/src/test/ui/panics/panic-arg.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:woe + fn f(a: isize) { println!("{}", a); } diff --git a/src/test/run-fail/panic-macro-any-wrapped.rs b/src/test/ui/panics/panic-macro-any-wrapped.rs similarity index 87% rename from src/test/run-fail/panic-macro-any-wrapped.rs rename to src/test/ui/panics/panic-macro-any-wrapped.rs index 83eb39a538f16..85737e947a17d 100644 --- a/src/test/run-fail/panic-macro-any-wrapped.rs +++ b/src/test/ui/panics/panic-macro-any-wrapped.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'Box' fn main() { diff --git a/src/test/run-fail/panic-macro-any.rs b/src/test/ui/panics/panic-macro-any.rs similarity index 54% rename from src/test/run-fail/panic-macro-any.rs rename to src/test/ui/panics/panic-macro-any.rs index 72d42e5b799cd..0d9eec17eb765 100644 --- a/src/test/run-fail/panic-macro-any.rs +++ b/src/test/ui/panics/panic-macro-any.rs @@ -1,7 +1,8 @@ +// run-fail // error-pattern:panicked at 'Box' #![feature(box_syntax)] fn main() { - panic!(box 413 as Box<::std::any::Any + Send>); + panic!(box 413 as Box); } diff --git a/src/test/run-fail/panic-macro-explicit.rs b/src/test/ui/panics/panic-macro-explicit.rs similarity index 86% rename from src/test/run-fail/panic-macro-explicit.rs rename to src/test/ui/panics/panic-macro-explicit.rs index f632034807cd4..f27bdda3f321f 100644 --- a/src/test/run-fail/panic-macro-explicit.rs +++ b/src/test/ui/panics/panic-macro-explicit.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'explicit panic' fn main() { diff --git a/src/test/run-fail/panic-macro-fmt.rs b/src/test/ui/panics/panic-macro-fmt.rs similarity index 90% rename from src/test/run-fail/panic-macro-fmt.rs rename to src/test/ui/panics/panic-macro-fmt.rs index 658ae56e7e49f..c18d7830d0646 100644 --- a/src/test/run-fail/panic-macro-fmt.rs +++ b/src/test/ui/panics/panic-macro-fmt.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-fail-fmt 42 rust' fn main() { diff --git a/src/test/run-fail/panic-macro-owned.rs b/src/test/ui/panics/panic-macro-owned.rs similarity index 88% rename from src/test/run-fail/panic-macro-owned.rs rename to src/test/ui/panics/panic-macro-owned.rs index 9b935717638bc..fd56cfa3bb8a8 100644 --- a/src/test/run-fail/panic-macro-owned.rs +++ b/src/test/ui/panics/panic-macro-owned.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-fail-owned' fn main() { diff --git a/src/test/run-fail/panic-macro-static.rs b/src/test/ui/panics/panic-macro-static.rs similarity index 88% rename from src/test/run-fail/panic-macro-static.rs rename to src/test/ui/panics/panic-macro-static.rs index 31ac488beb234..a78732ed39840 100644 --- a/src/test/run-fail/panic-macro-static.rs +++ b/src/test/ui/panics/panic-macro-static.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:panicked at 'test-fail-static' fn main() { diff --git a/src/test/run-fail/panic-main.rs b/src/test/ui/panics/panic-main.rs similarity index 81% rename from src/test/run-fail/panic-main.rs rename to src/test/ui/panics/panic-main.rs index 881eb7b5823b7..17ad25e368685 100644 --- a/src/test/run-fail/panic-main.rs +++ b/src/test/ui/panics/panic-main.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:moop + fn main() { panic!("moop"); } diff --git a/src/test/run-fail/panic-parens.rs b/src/test/ui/panics/panic-parens.rs similarity index 96% rename from src/test/run-fail/panic-parens.rs rename to src/test/ui/panics/panic-parens.rs index e7f98e58c4f39..8052c78cc6320 100644 --- a/src/test/run-fail/panic-parens.rs +++ b/src/test/ui/panics/panic-parens.rs @@ -1,5 +1,6 @@ // Fail macros without arguments need to be disambiguated in // certain positions +// run-fail // error-pattern:oops fn bigpanic() { diff --git a/src/test/run-fail/panic-set-handler.rs b/src/test/ui/panics/panic-set-handler.rs similarity index 94% rename from src/test/run-fail/panic-set-handler.rs rename to src/test/ui/panics/panic-set-handler.rs index ea2b152c6c45a..55542e58433c6 100644 --- a/src/test/run-fail/panic-set-handler.rs +++ b/src/test/ui/panics/panic-set-handler.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:greetings from the panic handler use std::panic; diff --git a/src/test/run-fail/panic-set-unset-handler.rs b/src/test/ui/panics/panic-set-unset-handler.rs similarity index 94% rename from src/test/run-fail/panic-set-unset-handler.rs rename to src/test/ui/panics/panic-set-unset-handler.rs index f8809c2f3889e..6b4c047eaf2de 100644 --- a/src/test/run-fail/panic-set-unset-handler.rs +++ b/src/test/ui/panics/panic-set-unset-handler.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'foobar' use std::panic; diff --git a/src/test/run-fail/panic-take-handler-nop.rs b/src/test/ui/panics/panic-take-handler-nop.rs similarity index 91% rename from src/test/run-fail/panic-take-handler-nop.rs rename to src/test/ui/panics/panic-take-handler-nop.rs index bb191a38f8473..e519209a5a6d0 100644 --- a/src/test/run-fail/panic-take-handler-nop.rs +++ b/src/test/ui/panics/panic-take-handler-nop.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'main' panicked at 'foobar' use std::panic; diff --git a/src/test/run-fail/panic-task-name-none.rs b/src/test/ui/panics/panic-task-name-none.rs similarity index 96% rename from src/test/run-fail/panic-task-name-none.rs rename to src/test/ui/panics/panic-task-name-none.rs index c7f504046baed..4e95fb5bdb803 100644 --- a/src/test/run-fail/panic-task-name-none.rs +++ b/src/test/ui/panics/panic-task-name-none.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread '' panicked at 'test' // ignore-emscripten Needs threads diff --git a/src/test/run-fail/panic-task-name-owned.rs b/src/test/ui/panics/panic-task-name-owned.rs similarity index 97% rename from src/test/run-fail/panic-task-name-owned.rs rename to src/test/ui/panics/panic-task-name-owned.rs index 58f76ff787f9f..f85be7bb8e299 100644 --- a/src/test/run-fail/panic-task-name-owned.rs +++ b/src/test/ui/panics/panic-task-name-owned.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:thread 'owned name' panicked at 'test' // ignore-emscripten Needs threads. diff --git a/src/test/run-fail/panic.rs b/src/test/ui/panics/panic.rs similarity index 81% rename from src/test/run-fail/panic.rs rename to src/test/ui/panics/panic.rs index 95f20dedad26c..7e8ea8b817534 100644 --- a/src/test/run-fail/panic.rs +++ b/src/test/ui/panics/panic.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:1 == 2 + fn main() { assert!(1 == 2); } diff --git a/src/test/run-fail/result-get-panic.rs b/src/test/ui/panics/result-get-panic.rs similarity index 93% rename from src/test/run-fail/result-get-panic.rs rename to src/test/ui/panics/result-get-panic.rs index cddf20ee49df3..41bc13bf085b4 100644 --- a/src/test/run-fail/result-get-panic.rs +++ b/src/test/ui/panics/result-get-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:called `Result::unwrap()` on an `Err` value use std::result::Result::Err; diff --git a/src/test/run-fail/test-panic.rs b/src/test/ui/panics/test-panic.rs similarity index 68% rename from src/test/run-fail/test-panic.rs rename to src/test/ui/panics/test-panic.rs index 92f5146b710f2..85c9279cdf27b 100644 --- a/src/test/run-fail/test-panic.rs +++ b/src/test/ui/panics/test-panic.rs @@ -1,5 +1,5 @@ +// run-fail // check-stdout -// error-pattern:thread 'test_foo' panicked at // compile-flags: --test // ignore-emscripten diff --git a/src/test/run-fail/test-should-fail-bad-message.rs b/src/test/ui/panics/test-should-fail-bad-message.rs similarity index 75% rename from src/test/run-fail/test-should-fail-bad-message.rs rename to src/test/ui/panics/test-should-fail-bad-message.rs index 3c69bb07d3b18..701f267764858 100644 --- a/src/test/run-fail/test-should-fail-bad-message.rs +++ b/src/test/ui/panics/test-should-fail-bad-message.rs @@ -1,5 +1,5 @@ +// run-fail // check-stdout -// error-pattern:thread 'test_foo' panicked at // compile-flags: --test // ignore-emscripten diff --git a/src/test/run-fail/test-should-panic-bad-message.rs b/src/test/ui/panics/test-should-panic-bad-message.rs similarity index 77% rename from src/test/run-fail/test-should-panic-bad-message.rs rename to src/test/ui/panics/test-should-panic-bad-message.rs index b73d4d7377a34..a90d67a7d6bd3 100644 --- a/src/test/run-fail/test-should-panic-bad-message.rs +++ b/src/test/ui/panics/test-should-panic-bad-message.rs @@ -1,7 +1,7 @@ +// run-fail // compile-flags: --test - -// error-pattern:panicked at 'bar' // check-stdout + #[test] #[should_panic(expected = "foo")] pub fn test_bar() { diff --git a/src/test/run-fail/test-should-panic-no-message.rs b/src/test/ui/panics/test-should-panic-no-message.rs similarity index 72% rename from src/test/run-fail/test-should-panic-no-message.rs rename to src/test/ui/panics/test-should-panic-no-message.rs index b18389ec7440e..217267d2d75ec 100644 --- a/src/test/run-fail/test-should-panic-no-message.rs +++ b/src/test/ui/panics/test-should-panic-no-message.rs @@ -1,7 +1,7 @@ +// run-fail // compile-flags: --test - -// error-pattern:panicked at 'explicit panic' // check-stdout + #[test] #[should_panic(expected = "foo")] pub fn test_explicit() { diff --git a/src/test/run-fail/unique-panic.rs b/src/test/ui/panics/unique-panic.rs similarity index 84% rename from src/test/run-fail/unique-panic.rs rename to src/test/ui/panics/unique-panic.rs index adefd796af492..22e0d63d5946f 100644 --- a/src/test/run-fail/unique-panic.rs +++ b/src/test/ui/panics/unique-panic.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern: panic fn main() { diff --git a/src/test/run-fail/while-body-panics.rs b/src/test/ui/panics/while-body-panics.rs similarity index 92% rename from src/test/run-fail/while-body-panics.rs rename to src/test/ui/panics/while-body-panics.rs index 76acb4ba42de4..b335c90a0732f 100644 --- a/src/test/run-fail/while-body-panics.rs +++ b/src/test/ui/panics/while-body-panics.rs @@ -1,6 +1,8 @@ #![allow(while_true)] +// run-fail // error-pattern:quux + fn main() { let _x: isize = { while true { diff --git a/src/test/run-fail/while-panic.rs b/src/test/ui/panics/while-panic.rs similarity index 92% rename from src/test/run-fail/while-panic.rs rename to src/test/ui/panics/while-panic.rs index a0827591729f7..45be38418e0a1 100644 --- a/src/test/run-fail/while-panic.rs +++ b/src/test/ui/panics/while-panic.rs @@ -1,6 +1,8 @@ #![allow(while_true)] +// run-fail // error-pattern:giraffe + fn main() { panic!({ while true { diff --git a/src/test/run-fail/tls-exit-status.rs b/src/test/ui/process/tls-exit-status.rs similarity index 93% rename from src/test/run-fail/tls-exit-status.rs rename to src/test/ui/process/tls-exit-status.rs index f15fd4f6894f7..973bb9c4f0c6f 100644 --- a/src/test/run-fail/tls-exit-status.rs +++ b/src/test/ui/process/tls-exit-status.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:nonzero // exec-env:RUST_NEWRT=1 // ignore-cloudabi no std::env diff --git a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs similarity index 95% rename from src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs rename to src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs index 796729ac4cc28..724ce50904182 100644 --- a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:returned Box from main() // failure-status: 1 diff --git a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-never.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs similarity index 85% rename from src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-never.rs rename to src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs index cb37b8e067090..d5b6b5016d4c6 100644 --- a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:oh, dear fn main() -> ! { diff --git a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs similarity index 95% rename from src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs rename to src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index 2f3a73a30ad95..a99480e57abde 100644 --- a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:returned Box from main() // failure-status: 1 diff --git a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-str.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs similarity index 92% rename from src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-str.rs rename to src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs index bd6fa8af93513..c78477e4eee2d 100644 --- a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-str.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern: An error message for you // failure-status: 1 diff --git a/src/test/run-fail/str-overrun.rs b/src/test/ui/str/str-overrun.rs similarity index 93% rename from src/test/run-fail/str-overrun.rs rename to src/test/ui/str/str-overrun.rs index e566308a08767..78bbf0cfdb9ba 100644 --- a/src/test/run-fail/str-overrun.rs +++ b/src/test/ui/str/str-overrun.rs @@ -1,4 +1,6 @@ +// run-fail // error-pattern:index out of bounds: the len is 5 but the index is 5 + fn main() { let s: String = "hello".to_string(); diff --git a/src/test/run-fail/rhs-type.rs b/src/test/ui/structs/rhs-type.rs similarity index 95% rename from src/test/run-fail/rhs-type.rs rename to src/test/ui/structs/rhs-type.rs index 6efbeadd70421..dd227a7f0a028 100644 --- a/src/test/run-fail/rhs-type.rs +++ b/src/test/ui/structs/rhs-type.rs @@ -1,5 +1,7 @@ // Tests that codegen treats the rhs of pth's decl // as a _|_-typed thing, not a str-typed thing + +// run-fail // error-pattern:bye #![allow(unreachable_code)] diff --git a/src/test/run-fail/run-unexported-tests.rs b/src/test/ui/test-attrs/run-unexported-tests.rs similarity index 79% rename from src/test/run-fail/run-unexported-tests.rs rename to src/test/ui/test-attrs/run-unexported-tests.rs index 11e100e716eb4..f533a3ef885d6 100644 --- a/src/test/run-fail/run-unexported-tests.rs +++ b/src/test/ui/test-attrs/run-unexported-tests.rs @@ -1,4 +1,4 @@ -// error-pattern:ran an unexported test +// run-fail // compile-flags:--test // check-stdout diff --git a/src/test/run-fail/task-spawn-barefn.rs b/src/test/ui/threads-sendsync/task-spawn-barefn.rs similarity index 97% rename from src/test/run-fail/task-spawn-barefn.rs rename to src/test/ui/threads-sendsync/task-spawn-barefn.rs index 497c5ea71804f..e5b899e0af967 100644 --- a/src/test/run-fail/task-spawn-barefn.rs +++ b/src/test/ui/threads-sendsync/task-spawn-barefn.rs @@ -1,3 +1,4 @@ +// run-fail // error-pattern:Ensure that the child thread runs by panicking // ignore-emscripten Needs threads. diff --git a/src/test/run-fail/test-tasks-invalid-value.rs b/src/test/ui/threads-sendsync/test-tasks-invalid-value.rs similarity index 95% rename from src/test/run-fail/test-tasks-invalid-value.rs rename to src/test/ui/threads-sendsync/test-tasks-invalid-value.rs index 2dae1b4592c0f..6411421429c4c 100644 --- a/src/test/run-fail/test-tasks-invalid-value.rs +++ b/src/test/ui/threads-sendsync/test-tasks-invalid-value.rs @@ -1,6 +1,7 @@ // This checks that RUST_TEST_THREADS not being 1, 2, ... is detected // properly. +// run-fail // error-pattern:should be a positive integer // compile-flags: --test // exec-env:RUST_TEST_THREADS=foo diff --git a/src/test/run-fail/vec-overrun.rs b/src/test/ui/vec/vec-overrun.rs similarity index 94% rename from src/test/run-fail/vec-overrun.rs rename to src/test/ui/vec/vec-overrun.rs index 2be945f736cb7..4f6aec7773fa3 100644 --- a/src/test/run-fail/vec-overrun.rs +++ b/src/test/ui/vec/vec-overrun.rs @@ -1,6 +1,6 @@ +// run-fail // error-pattern:index out of bounds: the len is 1 but the index is 2 - fn main() { let v: Vec = vec![10]; let x: usize = 0; From 82cb88b7777f370eb0afd84459f53ded6627061b Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 16 Apr 2020 16:18:51 +0900 Subject: [PATCH 2/3] Remove code related to `test/run-fail` --- src/bootstrap/builder.rs | 2 -- src/bootstrap/mk/Makefile.in | 1 - src/bootstrap/test.rs | 9 --------- 3 files changed, 12 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 028623aa7aa9c..b0e06731330a1 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -359,7 +359,6 @@ impl<'a> Builder<'a> { test::Tidy, test::Ui, test::CompileFail, - test::RunFail, test::RunPassValgrind, test::MirOpt, test::Codegen, @@ -370,7 +369,6 @@ impl<'a> Builder<'a> { test::UiFullDeps, test::Rustdoc, test::Pretty, - test::RunFailPretty, test::RunPassValgrindPretty, test::Crate, test::CrateLibrustc, diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index e0a1f46078d32..d8c97fc741478 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -48,7 +48,6 @@ check: $(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS) check-aux: $(Q)$(BOOTSTRAP) test \ - src/test/run-fail/pretty \ src/test/run-pass-valgrind/pretty \ $(AUX_ARGS) \ $(BOOTSTRAP_ARGS) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 0cf47d20ead06..ad3fd0d64a307 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -898,8 +898,6 @@ default_test!(CompileFail { suite: "compile-fail" }); -default_test!(RunFail { path: "src/test/run-fail", mode: "run-fail", suite: "run-fail" }); - default_test!(RunPassValgrind { path: "src/test/run-pass-valgrind", mode: "run-pass-valgrind", @@ -929,13 +927,6 @@ host_test!(UiFullDeps { path: "src/test/ui-fulldeps", mode: "ui", suite: "ui-ful host_test!(Rustdoc { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" }); host_test!(Pretty { path: "src/test/pretty", mode: "pretty", suite: "pretty" }); -test!(RunFailPretty { - path: "src/test/run-fail/pretty", - mode: "pretty", - suite: "run-fail", - default: false, - host: true -}); test!(RunPassValgrindPretty { path: "src/test/run-pass-valgrind/pretty", mode: "pretty", From 9a164ff4c59e19afbbc13072676d06aa2f70942e Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Fri, 8 May 2020 00:39:02 +0900 Subject: [PATCH 3/3] Skip tests on emscripten --- src/test/ui/array-slice-vec/bounds-check-no-overflow.rs | 1 + src/test/ui/array-slice-vec/dst-raw-slice.rs | 2 ++ src/test/ui/binop/binop-fail-3.rs | 1 + src/test/ui/binop/binop-panic.rs | 1 + src/test/ui/borrowck/borrowck-local-borrow.rs | 1 + src/test/ui/closures/diverging-closure.rs | 1 + src/test/ui/consts/promoted_div_by_zero.rs | 1 + src/test/ui/fn/expr-fn-panic.rs | 1 + src/test/ui/generator/generator-resume-after-panic.rs | 1 + src/test/ui/hashmap/hashmap-capacity-overflow.rs | 1 + src/test/ui/if/expr-if-panic-fn.rs | 1 + src/test/ui/if/expr-if-panic.rs | 1 + src/test/ui/if/if-check-panic.rs | 1 + src/test/ui/if/if-cond-bot.rs | 1 + src/test/ui/imports/glob-use-std.rs | 1 + src/test/ui/issues/issue-12920.rs | 1 + src/test/ui/issues/issue-13202.rs | 1 + src/test/ui/issues/issue-18576.rs | 1 + src/test/ui/issues/issue-20971.rs | 1 + src/test/ui/issues/issue-23354-2.rs | 1 + src/test/ui/issues/issue-23354.rs | 1 + src/test/ui/issues/issue-2444.rs | 1 + src/test/ui/issues/issue-2470-bounds-check-overflow.rs | 1 + src/test/ui/issues/issue-2761.rs | 1 + src/test/ui/issues/issue-28934.rs | 1 + src/test/ui/issues/issue-29798.rs | 1 + src/test/ui/issues/issue-3029.rs | 1 + src/test/ui/issues/issue-30380.rs | 1 + src/test/ui/issues/issue-44216-add-instant.rs | 1 + src/test/ui/issues/issue-44216-add-system-time.rs | 1 + src/test/ui/issues/issue-44216-sub-instant.rs | 1 + src/test/ui/issues/issue-44216-sub-system-time.rs | 1 + src/test/ui/issues/issue-51345-2.rs | 1 + src/test/ui/issues/issue-6458-1.rs | 1 + src/test/ui/issues/issue-811.rs | 1 + src/test/ui/issues/issue-948.rs | 1 + src/test/ui/loops/for-each-loop-panic.rs | 1 + src/test/ui/macros/assert-as-macro.rs | 1 + src/test/ui/macros/assert-eq-macro-panic.rs | 1 + src/test/ui/macros/assert-macro-explicit.rs | 1 + src/test/ui/macros/assert-macro-fmt.rs | 1 + src/test/ui/macros/assert-macro-owned.rs | 1 + src/test/ui/macros/assert-macro-static.rs | 1 + src/test/ui/macros/assert-ne-macro-panic.rs | 1 + src/test/ui/macros/die-macro-2.rs | 1 + src/test/ui/macros/die-macro-expr.rs | 1 + src/test/ui/macros/die-macro-pure.rs | 1 + src/test/ui/macros/unimplemented-macro-panic.rs | 1 + src/test/ui/macros/unreachable-fmt-msg.rs | 1 + src/test/ui/macros/unreachable-macro-panic.rs | 1 + src/test/ui/macros/unreachable-static-msg.rs | 1 + src/test/ui/macros/unreachable.rs | 1 + src/test/ui/match/expr-match-panic-fn.rs | 1 + src/test/ui/match/expr-match-panic.rs | 1 + src/test/ui/match/match-bot-panic.rs | 1 + src/test/ui/match/match-disc-bot.rs | 1 + src/test/ui/match/match-wildcards.rs | 1 + src/test/ui/meta-revision-ok.rs | 1 + src/test/ui/mir/mir_codegen_calls_converging_drops.rs | 1 + src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs | 1 + src/test/ui/mir/mir_codegen_calls_diverging.rs | 1 + src/test/ui/mir/mir_codegen_calls_diverging_drops.rs | 1 + src/test/ui/mir/mir_drop_panics.rs | 1 + src/test/ui/mir/mir_dynamic_drops_1.rs | 1 + src/test/ui/mir/mir_dynamic_drops_2.rs | 1 + src/test/ui/mir/mir_dynamic_drops_3.rs | 1 + src/test/ui/mir/mir_indexing_oob_1.rs | 1 + src/test/ui/mir/mir_indexing_oob_2.rs | 1 + src/test/ui/mir/mir_indexing_oob_3.rs | 1 + src/test/ui/never_type/return-never-coerce.rs | 1 + src/test/ui/numbers-arithmetic/divide-by-zero.rs | 2 ++ src/test/ui/numbers-arithmetic/mod-zero.rs | 2 ++ src/test/ui/numbers-arithmetic/overflowing-add.rs | 1 + src/test/ui/numbers-arithmetic/overflowing-mul.rs | 1 + src/test/ui/numbers-arithmetic/overflowing-neg.rs | 1 + src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs | 1 + src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs | 1 + src/test/ui/numbers-arithmetic/overflowing-sub.rs | 1 + src/test/ui/panic-runtime/unwind-interleaved.rs | 1 + src/test/ui/panic-runtime/unwind-rec.rs | 1 + src/test/ui/panic-runtime/unwind-rec2.rs | 1 + src/test/ui/panic-runtime/unwind-unique.rs | 1 + src/test/ui/panics/args-panic.rs | 1 + src/test/ui/panics/doublepanic.rs | 1 + src/test/ui/panics/explicit-panic-msg.rs | 1 + src/test/ui/panics/explicit-panic.rs | 1 + src/test/ui/panics/fmt-panic.rs | 1 + src/test/ui/panics/main-panic.rs | 1 + src/test/ui/panics/panic-arg.rs | 1 + src/test/ui/panics/panic-macro-any-wrapped.rs | 1 + src/test/ui/panics/panic-macro-any.rs | 1 + src/test/ui/panics/panic-macro-explicit.rs | 1 + src/test/ui/panics/panic-macro-fmt.rs | 1 + src/test/ui/panics/panic-macro-owned.rs | 1 + src/test/ui/panics/panic-macro-static.rs | 1 + src/test/ui/panics/panic-main.rs | 1 + src/test/ui/panics/panic-parens.rs | 2 ++ src/test/ui/panics/panic-set-handler.rs | 1 + src/test/ui/panics/panic-set-unset-handler.rs | 1 + src/test/ui/panics/panic-take-handler-nop.rs | 1 + src/test/ui/panics/panic.rs | 1 + src/test/ui/panics/result-get-panic.rs | 1 + src/test/ui/panics/test-should-panic-bad-message.rs | 1 + src/test/ui/panics/test-should-panic-no-message.rs | 1 + src/test/ui/panics/while-body-panics.rs | 1 + src/test/ui/panics/while-panic.rs | 1 + src/test/ui/process/tls-exit-status.rs | 1 + .../termination-trait-for-box-dyn-error.rs | 1 + .../rfc-1937-termination-trait/termination-trait-for-never.rs | 1 + .../termination-trait-for-result-box-error_err.rs | 1 + .../ui/rfc-1937-termination-trait/termination-trait-for-str.rs | 1 + src/test/ui/str/str-overrun.rs | 1 + src/test/ui/structs/rhs-type.rs | 1 + src/test/ui/vec/vec-overrun.rs | 1 + 114 files changed, 118 insertions(+) diff --git a/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs b/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs index 70cbb0672544f..3caf5f4499522 100644 --- a/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs +++ b/src/test/ui/array-slice-vec/bounds-check-no-overflow.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds +// ignore-emscripten no processes use std::usize; use std::mem::size_of; diff --git a/src/test/ui/array-slice-vec/dst-raw-slice.rs b/src/test/ui/array-slice-vec/dst-raw-slice.rs index 33db126944da4..371d16f093a74 100644 --- a/src/test/ui/array-slice-vec/dst-raw-slice.rs +++ b/src/test/ui/array-slice-vec/dst-raw-slice.rs @@ -2,6 +2,8 @@ // run-fail // error-pattern:index out of bounds +// ignore-emscripten no processes + #[allow(unconditional_panic)] fn main() { let a: *const [_] = &[1, 2, 3]; diff --git a/src/test/ui/binop/binop-fail-3.rs b/src/test/ui/binop/binop-fail-3.rs index 7120a5c1f191e..49f635e0c11d6 100644 --- a/src/test/ui/binop/binop-fail-3.rs +++ b/src/test/ui/binop/binop-fail-3.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes fn foo() -> ! { panic!("quux"); diff --git a/src/test/ui/binop/binop-panic.rs b/src/test/ui/binop/binop-panic.rs index 6927b96c1b37e..44cdfffeeb7a7 100644 --- a/src/test/ui/binop/binop-panic.rs +++ b/src/test/ui/binop/binop-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/src/test/ui/borrowck/borrowck-local-borrow.rs b/src/test/ui/borrowck/borrowck-local-borrow.rs index c2b59ecce8674..ea4589338c46f 100644 --- a/src/test/ui/borrowck/borrowck-local-borrow.rs +++ b/src/test/ui/borrowck/borrowck-local-borrow.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panic 1 +// ignore-emscripten no processes // revisions: migrate mir //[mir]compile-flags: -Z borrowck=mir diff --git a/src/test/ui/closures/diverging-closure.rs b/src/test/ui/closures/diverging-closure.rs index de7b68ef68495..1213a883ef0a3 100644 --- a/src/test/ui/closures/diverging-closure.rs +++ b/src/test/ui/closures/diverging-closure.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:oops +// ignore-emscripten no processes fn main() { let func = || -> ! { diff --git a/src/test/ui/consts/promoted_div_by_zero.rs b/src/test/ui/consts/promoted_div_by_zero.rs index 582c186b4e46d..b4503f691ffd9 100644 --- a/src/test/ui/consts/promoted_div_by_zero.rs +++ b/src/test/ui/consts/promoted_div_by_zero.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern: attempt to divide by zero +// ignore-emscripten no processes fn main() { let x = &(1 / (1 - 1)); diff --git a/src/test/ui/fn/expr-fn-panic.rs b/src/test/ui/fn/expr-fn-panic.rs index e93439a1d17f9..123b57f97a4ec 100644 --- a/src/test/ui/fn/expr-fn-panic.rs +++ b/src/test/ui/fn/expr-fn-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/src/test/ui/generator/generator-resume-after-panic.rs b/src/test/ui/generator/generator-resume-after-panic.rs index 1e9a7ed1e94ca..55704f40e9f2b 100644 --- a/src/test/ui/generator/generator-resume-after-panic.rs +++ b/src/test/ui/generator/generator-resume-after-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:generator resumed after panicking +// ignore-emscripten no processes // Test that we get the correct message for resuming a panicked generator. diff --git a/src/test/ui/hashmap/hashmap-capacity-overflow.rs b/src/test/ui/hashmap/hashmap-capacity-overflow.rs index 0e904b7b6a470..5f88683f4adfc 100644 --- a/src/test/ui/hashmap/hashmap-capacity-overflow.rs +++ b/src/test/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:capacity overflow +// ignore-emscripten no processes use std::collections::hash_map::HashMap; use std::usize; diff --git a/src/test/ui/if/expr-if-panic-fn.rs b/src/test/ui/if/expr-if-panic-fn.rs index 7ddd4bc5e0f45..36e49785a49d0 100644 --- a/src/test/ui/if/expr-if-panic-fn.rs +++ b/src/test/ui/if/expr-if-panic-fn.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/src/test/ui/if/expr-if-panic.rs b/src/test/ui/if/expr-if-panic.rs index 4ab73dc736a3a..520ee0870ee15 100644 --- a/src/test/ui/if/expr-if-panic.rs +++ b/src/test/ui/if/expr-if-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn main() { let _x = if false { diff --git a/src/test/ui/if/if-check-panic.rs b/src/test/ui/if/if-check-panic.rs index d768cf10c8bf4..037cd427ccf36 100644 --- a/src/test/ui/if/if-check-panic.rs +++ b/src/test/ui/if/if-check-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:Number is odd +// ignore-emscripten no processes fn even(x: usize) -> bool { if x < 2 { diff --git a/src/test/ui/if/if-cond-bot.rs b/src/test/ui/if/if-cond-bot.rs index 3bbea45844607..bcd114678528c 100644 --- a/src/test/ui/if/if-cond-bot.rs +++ b/src/test/ui/if/if-cond-bot.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/src/test/ui/imports/glob-use-std.rs b/src/test/ui/imports/glob-use-std.rs index 3cd6a380ed227..ef06cc570d557 100644 --- a/src/test/ui/imports/glob-use-std.rs +++ b/src/test/ui/imports/glob-use-std.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:panic works +// ignore-emscripten no processes use std::*; diff --git a/src/test/ui/issues/issue-12920.rs b/src/test/ui/issues/issue-12920.rs index 85d199f6d82d6..a0cfea055be2b 100644 --- a/src/test/ui/issues/issue-12920.rs +++ b/src/test/ui/issues/issue-12920.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes pub fn main() { panic!(); diff --git a/src/test/ui/issues/issue-13202.rs b/src/test/ui/issues/issue-13202.rs index 511273bae9de5..16debb5b6c4a6 100644 --- a/src/test/ui/issues/issue-13202.rs +++ b/src/test/ui/issues/issue-13202.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:bad input +// ignore-emscripten no processes fn main() { Some("foo").unwrap_or(panic!("bad input")).to_string(); diff --git a/src/test/ui/issues/issue-18576.rs b/src/test/ui/issues/issue-18576.rs index 946d2d47369f2..389cf108b05ee 100644 --- a/src/test/ui/issues/issue-18576.rs +++ b/src/test/ui/issues/issue-18576.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:stop +// ignore-emscripten no processes // #18576 // Make sure that calling an extern function pointer in an unreachable diff --git a/src/test/ui/issues/issue-20971.rs b/src/test/ui/issues/issue-20971.rs index 4fb901e2272c9..2e10418178c42 100644 --- a/src/test/ui/issues/issue-20971.rs +++ b/src/test/ui/issues/issue-20971.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:Hello, world! +// ignore-emscripten no processes pub trait Parser { type Input; diff --git a/src/test/ui/issues/issue-23354-2.rs b/src/test/ui/issues/issue-23354-2.rs index 1a3ed10306072..c291d8a5eaf3d 100644 --- a/src/test/ui/issues/issue-23354-2.rs +++ b/src/test/ui/issues/issue-23354-2.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panic evaluated +// ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/src/test/ui/issues/issue-23354.rs b/src/test/ui/issues/issue-23354.rs index 77b7dbf99dac1..8b7c2eef2fc1b 100644 --- a/src/test/ui/issues/issue-23354.rs +++ b/src/test/ui/issues/issue-23354.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panic evaluated +// ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/src/test/ui/issues/issue-2444.rs b/src/test/ui/issues/issue-2444.rs index 35d8eabcd6000..ac0d0506a342d 100644 --- a/src/test/ui/issues/issue-2444.rs +++ b/src/test/ui/issues/issue-2444.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes use std::sync::Arc; diff --git a/src/test/ui/issues/issue-2470-bounds-check-overflow.rs b/src/test/ui/issues/issue-2470-bounds-check-overflow.rs index 86558c228c5ba..f0e8e185e5633 100644 --- a/src/test/ui/issues/issue-2470-bounds-check-overflow.rs +++ b/src/test/ui/issues/issue-2470-bounds-check-overflow.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds +// ignore-emscripten no processes use std::mem; diff --git a/src/test/ui/issues/issue-2761.rs b/src/test/ui/issues/issue-2761.rs index 437566459250f..3ba098abbe65a 100644 --- a/src/test/ui/issues/issue-2761.rs +++ b/src/test/ui/issues/issue-2761.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:custom message +// ignore-emscripten no processes fn main() { assert!(false, "custom message"); diff --git a/src/test/ui/issues/issue-28934.rs b/src/test/ui/issues/issue-28934.rs index fcf91d74fbe57..1e48878f632e5 100644 --- a/src/test/ui/issues/issue-28934.rs +++ b/src/test/ui/issues/issue-28934.rs @@ -3,6 +3,7 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/src/test/ui/issues/issue-29798.rs b/src/test/ui/issues/issue-29798.rs index 31b08f2164a4a..5eff5d1915bad 100644 --- a/src/test/ui/issues/issue-29798.rs +++ b/src/test/ui/issues/issue-29798.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 5 but the index is 5 +// ignore-emscripten no processes const fn test(x: usize) -> i32 { [42;5][x] diff --git a/src/test/ui/issues/issue-3029.rs b/src/test/ui/issues/issue-3029.rs index aea2368a211a8..a5d30960a4cdb 100644 --- a/src/test/ui/issues/issue-3029.rs +++ b/src/test/ui/issues/issue-3029.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:so long +// ignore-emscripten no processes #![allow(unused_allocation)] #![allow(unreachable_code)] diff --git a/src/test/ui/issues/issue-30380.rs b/src/test/ui/issues/issue-30380.rs index 34bd6c1b0e561..48b329c5de148 100644 --- a/src/test/ui/issues/issue-30380.rs +++ b/src/test/ui/issues/issue-30380.rs @@ -3,6 +3,7 @@ // run-fail // error-pattern:panicking destructors ftw! +// ignore-emscripten no processes struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/src/test/ui/issues/issue-44216-add-instant.rs b/src/test/ui/issues/issue-44216-add-instant.rs index b5f48e8cedc56..c2f3598f645bb 100644 --- a/src/test/ui/issues/issue-44216-add-instant.rs +++ b/src/test/ui/issues/issue-44216-add-instant.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:overflow +// ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/src/test/ui/issues/issue-44216-add-system-time.rs b/src/test/ui/issues/issue-44216-add-system-time.rs index da28433dde9a1..9a88cb7c18916 100644 --- a/src/test/ui/issues/issue-44216-add-system-time.rs +++ b/src/test/ui/issues/issue-44216-add-system-time.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:overflow +// ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/src/test/ui/issues/issue-44216-sub-instant.rs b/src/test/ui/issues/issue-44216-sub-instant.rs index 954cf45591f03..2decd88bbc06b 100644 --- a/src/test/ui/issues/issue-44216-sub-instant.rs +++ b/src/test/ui/issues/issue-44216-sub-instant.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:overflow +// ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/src/test/ui/issues/issue-44216-sub-system-time.rs b/src/test/ui/issues/issue-44216-sub-system-time.rs index e024e231565b4..e58a31a41a5e9 100644 --- a/src/test/ui/issues/issue-44216-sub-system-time.rs +++ b/src/test/ui/issues/issue-44216-sub-system-time.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:overflow +// ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/src/test/ui/issues/issue-51345-2.rs b/src/test/ui/issues/issue-51345-2.rs index 4abdba6176a2b..52f342a85005e 100644 --- a/src/test/ui/issues/issue-51345-2.rs +++ b/src/test/ui/issues/issue-51345-2.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern: thread 'main' panicked at 'explicit panic' +// ignore-emscripten no processes fn main() { let mut vec = vec![]; diff --git a/src/test/ui/issues/issue-6458-1.rs b/src/test/ui/issues/issue-6458-1.rs index 16c479a6a5cb5..184e4832b90b0 100644 --- a/src/test/ui/issues/issue-6458-1.rs +++ b/src/test/ui/issues/issue-6458-1.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn foo(t: T) {} fn main() { diff --git a/src/test/ui/issues/issue-811.rs b/src/test/ui/issues/issue-811.rs index d16467e4b51e5..f929d388819a9 100644 --- a/src/test/ui/issues/issue-811.rs +++ b/src/test/ui/issues/issue-811.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes use std::marker::PhantomData; diff --git a/src/test/ui/issues/issue-948.rs b/src/test/ui/issues/issue-948.rs index ab0cee71929f4..b9bbeb3951e47 100644 --- a/src/test/ui/issues/issue-948.rs +++ b/src/test/ui/issues/issue-948.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:beep boop +// ignore-emscripten no processes #![allow(unused_variables)] diff --git a/src/test/ui/loops/for-each-loop-panic.rs b/src/test/ui/loops/for-each-loop-panic.rs index 1d0dbe176aef8..5156999f4db9c 100644 --- a/src/test/ui/loops/for-each-loop-panic.rs +++ b/src/test/ui/loops/for-each-loop-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:moop +// ignore-emscripten no processes fn main() { for _ in 0_usize..10_usize { diff --git a/src/test/ui/macros/assert-as-macro.rs b/src/test/ui/macros/assert-as-macro.rs index bc51b673606e5..23c0548081333 100644 --- a/src/test/ui/macros/assert-as-macro.rs +++ b/src/test/ui/macros/assert-as-macro.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:assertion failed: 1 == 2 +// ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/src/test/ui/macros/assert-eq-macro-panic.rs b/src/test/ui/macros/assert-eq-macro-panic.rs index bd4eb78de9fc1..5e505c30b3503 100644 --- a/src/test/ui/macros/assert-eq-macro-panic.rs +++ b/src/test/ui/macros/assert-eq-macro-panic.rs @@ -2,6 +2,7 @@ // error-pattern:assertion failed: `(left == right)` // error-pattern: left: `14` // error-pattern:right: `15` +// ignore-emscripten no processes fn main() { assert_eq!(14, 15); diff --git a/src/test/ui/macros/assert-macro-explicit.rs b/src/test/ui/macros/assert-macro-explicit.rs index da13c06d575e7..578ef5632780f 100644 --- a/src/test/ui/macros/assert-macro-explicit.rs +++ b/src/test/ui/macros/assert-macro-explicit.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'assertion failed: false' +// ignore-emscripten no processes fn main() { assert!(false); diff --git a/src/test/ui/macros/assert-macro-fmt.rs b/src/test/ui/macros/assert-macro-fmt.rs index 3b173156d7a49..b8d319d85f404 100644 --- a/src/test/ui/macros/assert-macro-fmt.rs +++ b/src/test/ui/macros/assert-macro-fmt.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-assert-fmt 42 rust' +// ignore-emscripten no processes fn main() { assert!(false, "test-assert-fmt {} {}", 42, "rust"); diff --git a/src/test/ui/macros/assert-macro-owned.rs b/src/test/ui/macros/assert-macro-owned.rs index c231ceb46e91c..b50fe65c0150f 100644 --- a/src/test/ui/macros/assert-macro-owned.rs +++ b/src/test/ui/macros/assert-macro-owned.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-assert-owned' +// ignore-emscripten no processes fn main() { assert!(false, "test-assert-owned".to_string()); diff --git a/src/test/ui/macros/assert-macro-static.rs b/src/test/ui/macros/assert-macro-static.rs index 3c988ba4469ba..dc5274a7e8880 100644 --- a/src/test/ui/macros/assert-macro-static.rs +++ b/src/test/ui/macros/assert-macro-static.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-assert-static' +// ignore-emscripten no processes fn main() { assert!(false, "test-assert-static"); diff --git a/src/test/ui/macros/assert-ne-macro-panic.rs b/src/test/ui/macros/assert-ne-macro-panic.rs index 0e505e58e2b58..4f507d7b54d99 100644 --- a/src/test/ui/macros/assert-ne-macro-panic.rs +++ b/src/test/ui/macros/assert-ne-macro-panic.rs @@ -2,6 +2,7 @@ // error-pattern:assertion failed: `(left != right)` // error-pattern: left: `14` // error-pattern:right: `14` +// ignore-emscripten no processes fn main() { assert_ne!(14, 14); diff --git a/src/test/ui/macros/die-macro-2.rs b/src/test/ui/macros/die-macro-2.rs index 11a3222440df1..ebbce528a18fa 100644 --- a/src/test/ui/macros/die-macro-2.rs +++ b/src/test/ui/macros/die-macro-2.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:test +// ignore-emscripten no processes fn main() { panic!("test"); diff --git a/src/test/ui/macros/die-macro-expr.rs b/src/test/ui/macros/die-macro-expr.rs index 05f821acdf569..c4b5f68ddf9ff 100644 --- a/src/test/ui/macros/die-macro-expr.rs +++ b/src/test/ui/macros/die-macro-expr.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:test +// ignore-emscripten no processes fn main() { let __isize: isize = panic!("test"); diff --git a/src/test/ui/macros/die-macro-pure.rs b/src/test/ui/macros/die-macro-pure.rs index 1a86a7c22cc55..588fbe61b0e76 100644 --- a/src/test/ui/macros/die-macro-pure.rs +++ b/src/test/ui/macros/die-macro-pure.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:test +// ignore-emscripten no processes fn f() { panic!("test"); diff --git a/src/test/ui/macros/unimplemented-macro-panic.rs b/src/test/ui/macros/unimplemented-macro-panic.rs index 37932ca7670c4..e7169903f8ea5 100644 --- a/src/test/ui/macros/unimplemented-macro-panic.rs +++ b/src/test/ui/macros/unimplemented-macro-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:not implemented +// ignore-emscripten no processes fn main() { unimplemented!() diff --git a/src/test/ui/macros/unreachable-fmt-msg.rs b/src/test/ui/macros/unreachable-fmt-msg.rs index b2df8f8250015..eb17ed92711c9 100644 --- a/src/test/ui/macros/unreachable-fmt-msg.rs +++ b/src/test/ui/macros/unreachable-fmt-msg.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:internal error: entered unreachable code: 6 is not prime +// ignore-emscripten no processes fn main() { unreachable!("{} is not {}", 6u32, "prime"); diff --git a/src/test/ui/macros/unreachable-macro-panic.rs b/src/test/ui/macros/unreachable-macro-panic.rs index ad0d82feeaff8..55e2102e2cc6f 100644 --- a/src/test/ui/macros/unreachable-macro-panic.rs +++ b/src/test/ui/macros/unreachable-macro-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:internal error: entered unreachable code +// ignore-emscripten no processes fn main() { unreachable!() diff --git a/src/test/ui/macros/unreachable-static-msg.rs b/src/test/ui/macros/unreachable-static-msg.rs index b59d1960511f9..55edf3af7d9e5 100644 --- a/src/test/ui/macros/unreachable-static-msg.rs +++ b/src/test/ui/macros/unreachable-static-msg.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:internal error: entered unreachable code: uhoh +// ignore-emscripten no processes fn main() { unreachable!("uhoh") diff --git a/src/test/ui/macros/unreachable.rs b/src/test/ui/macros/unreachable.rs index ad0d82feeaff8..55e2102e2cc6f 100644 --- a/src/test/ui/macros/unreachable.rs +++ b/src/test/ui/macros/unreachable.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:internal error: entered unreachable code +// ignore-emscripten no processes fn main() { unreachable!() diff --git a/src/test/ui/match/expr-match-panic-fn.rs b/src/test/ui/match/expr-match-panic-fn.rs index c5bd7382f9f21..ea471717e883a 100644 --- a/src/test/ui/match/expr-match-panic-fn.rs +++ b/src/test/ui/match/expr-match-panic-fn.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/src/test/ui/match/expr-match-panic.rs b/src/test/ui/match/expr-match-panic.rs index 76144314fad21..53f8a8bd30ddb 100644 --- a/src/test/ui/match/expr-match-panic.rs +++ b/src/test/ui/match/expr-match-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn main() { let _x = match true { diff --git a/src/test/ui/match/match-bot-panic.rs b/src/test/ui/match/match-bot-panic.rs index 8b147cb5ab688..e4a6f6d6fe44a 100644 --- a/src/test/ui/match/match-bot-panic.rs +++ b/src/test/ui/match/match-bot-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/src/test/ui/match/match-disc-bot.rs b/src/test/ui/match/match-disc-bot.rs index 785237b34af35..18cfd5e23950b 100644 --- a/src/test/ui/match/match-disc-bot.rs +++ b/src/test/ui/match/match-disc-bot.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes fn f() -> ! { panic!("quux") diff --git a/src/test/ui/match/match-wildcards.rs b/src/test/ui/match/match-wildcards.rs index b79fd03c1333d..43f6e4913ac76 100644 --- a/src/test/ui/match/match-wildcards.rs +++ b/src/test/ui/match/match-wildcards.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:squirrelcupcake +// ignore-emscripten no processes fn cmp() -> isize { match (Some('a'), None::) { diff --git a/src/test/ui/meta-revision-ok.rs b/src/test/ui/meta-revision-ok.rs index c77ce084a5c57..7df9a6ea48fae 100644 --- a/src/test/ui/meta-revision-ok.rs +++ b/src/test/ui/meta-revision-ok.rs @@ -5,6 +5,7 @@ // revisions: foo bar //[foo] error-pattern:foo //[bar] error-pattern:bar +// ignore-emscripten no processes #[cfg(foo)] fn die() { diff --git a/src/test/ui/mir/mir_codegen_calls_converging_drops.rs b/src/test/ui/mir/mir_codegen_calls_converging_drops.rs index 7b31c1aa12e3f..b562f93081419 100644 --- a/src/test/ui/mir/mir_codegen_calls_converging_drops.rs +++ b/src/test/ui/mir/mir_codegen_calls_converging_drops.rs @@ -2,6 +2,7 @@ // error-pattern:converging_fn called // error-pattern:0 dropped // error-pattern:exit +// ignore-emscripten no processes struct Droppable(u8); impl Drop for Droppable { diff --git a/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs b/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs index f8117887c9038..e9446da9e3911 100644 --- a/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs +++ b/src/test/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -2,6 +2,7 @@ // error-pattern:complex called // error-pattern:dropped // error-pattern:exit +// ignore-emscripten no processes struct Droppable; impl Drop for Droppable { diff --git a/src/test/ui/mir/mir_codegen_calls_diverging.rs b/src/test/ui/mir/mir_codegen_calls_diverging.rs index 96630da4d49a7..736d580e2da18 100644 --- a/src/test/ui/mir/mir_codegen_calls_diverging.rs +++ b/src/test/ui/mir/mir_codegen_calls_diverging.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:diverging_fn called +// ignore-emscripten no processes fn diverging_fn() -> ! { panic!("diverging_fn called") diff --git a/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs b/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs index 96a03a0d6a711..796d744779391 100644 --- a/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs +++ b/src/test/ui/mir/mir_codegen_calls_diverging_drops.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:diverging_fn called // error-pattern:0 dropped +// ignore-emscripten no processes struct Droppable(u8); impl Drop for Droppable { diff --git a/src/test/ui/mir/mir_drop_panics.rs b/src/test/ui/mir/mir_drop_panics.rs index da6d0b6a346ac..bf269ee901b93 100644 --- a/src/test/ui/mir/mir_drop_panics.rs +++ b/src/test/ui/mir/mir_drop_panics.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:panic 1 // error-pattern:drop 2 +// ignore-emscripten no processes struct Droppable(u32); impl Drop for Droppable { diff --git a/src/test/ui/mir/mir_dynamic_drops_1.rs b/src/test/ui/mir/mir_dynamic_drops_1.rs index 524f13d754dfa..a77b2368d3baa 100644 --- a/src/test/ui/mir/mir_dynamic_drops_1.rs +++ b/src/test/ui/mir/mir_dynamic_drops_1.rs @@ -2,6 +2,7 @@ // error-pattern:drop 1 // error-pattern:drop 2 // ignore-cloudabi no std::process +// ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/src/test/ui/mir/mir_dynamic_drops_2.rs b/src/test/ui/mir/mir_dynamic_drops_2.rs index 8415b99bcf946..088a16d338787 100644 --- a/src/test/ui/mir/mir_dynamic_drops_2.rs +++ b/src/test/ui/mir/mir_dynamic_drops_2.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:drop 1 // ignore-cloudabi no std::process +// ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/src/test/ui/mir/mir_dynamic_drops_3.rs b/src/test/ui/mir/mir_dynamic_drops_3.rs index 18914fdb03d7e..029bdcd9a1590 100644 --- a/src/test/ui/mir/mir_dynamic_drops_3.rs +++ b/src/test/ui/mir/mir_dynamic_drops_3.rs @@ -4,6 +4,7 @@ // error-pattern:drop 2 // error-pattern:drop 1 // ignore-cloudabi no std::process +// ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/src/test/ui/mir/mir_indexing_oob_1.rs b/src/test/ui/mir/mir_indexing_oob_1.rs index d46d3704779cd..6d769b6b23a84 100644 --- a/src/test/ui/mir/mir_indexing_oob_1.rs +++ b/src/test/ui/mir/mir_indexing_oob_1.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 +// ignore-emscripten no processes const C: [u32; 5] = [0; 5]; diff --git a/src/test/ui/mir/mir_indexing_oob_2.rs b/src/test/ui/mir/mir_indexing_oob_2.rs index 03b3ea01d6b43..a9e8505701536 100644 --- a/src/test/ui/mir/mir_indexing_oob_2.rs +++ b/src/test/ui/mir/mir_indexing_oob_2.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 +// ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/src/test/ui/mir/mir_indexing_oob_3.rs b/src/test/ui/mir/mir_indexing_oob_3.rs index 023d65c4bd0e8..4f5cab59bfc67 100644 --- a/src/test/ui/mir/mir_indexing_oob_3.rs +++ b/src/test/ui/mir/mir_indexing_oob_3.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 5 but the index is 10 +// ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/src/test/ui/never_type/return-never-coerce.rs b/src/test/ui/never_type/return-never-coerce.rs index fa0c78c2cf3f0..d615940eff1f0 100644 --- a/src/test/ui/never_type/return-never-coerce.rs +++ b/src/test/ui/never_type/return-never-coerce.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:aah! +// ignore-emscripten no processes fn call_another_fn T>(f: F) -> T { f() diff --git a/src/test/ui/numbers-arithmetic/divide-by-zero.rs b/src/test/ui/numbers-arithmetic/divide-by-zero.rs index fcbc23b836729..30e0e6c1bdd4c 100644 --- a/src/test/ui/numbers-arithmetic/divide-by-zero.rs +++ b/src/test/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,5 +1,7 @@ // run-fail // error-pattern:attempt to divide by zero +// ignore-emscripten no processes + #[allow(unconditional_panic)] fn main() { let y = 0; diff --git a/src/test/ui/numbers-arithmetic/mod-zero.rs b/src/test/ui/numbers-arithmetic/mod-zero.rs index a2798175d68e4..083716394124a 100644 --- a/src/test/ui/numbers-arithmetic/mod-zero.rs +++ b/src/test/ui/numbers-arithmetic/mod-zero.rs @@ -1,5 +1,7 @@ // run-fail // error-pattern:attempt to calculate the remainder with a divisor of zero +// ignore-emscripten no processes + #[allow(unconditional_panic)] fn main() { let y = 0; diff --git a/src/test/ui/numbers-arithmetic/overflowing-add.rs b/src/test/ui/numbers-arithmetic/overflowing-add.rs index 7d63fe3d20b6b..b0f22a74b4a8f 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-add.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-add.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to add with overflow' // compile-flags: -C debug-assertions +// ignore-emscripten no processes #![allow(arithmetic_overflow)] diff --git a/src/test/ui/numbers-arithmetic/overflowing-mul.rs b/src/test/ui/numbers-arithmetic/overflowing-mul.rs index 6e17aeb6761dc..34ab5d8fad5e6 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-mul.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' +// ignore-emscripten no processes // compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/src/test/ui/numbers-arithmetic/overflowing-neg.rs b/src/test/ui/numbers-arithmetic/overflowing-neg.rs index f77bc132e766f..fe77544641cc1 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-neg.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-neg.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to negate with overflow' +// ignore-emscripten no processes // compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs index a855ef0ec0663..b59efe6f21278 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' +// ignore-emscripten no processes // compile-flags: -C debug-assertions fn main() { diff --git a/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index 26a2b2c4b8a42..f2643c1646316 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' +// ignore-emscripten no processes // compile-flags: -C debug-assertions fn main() { diff --git a/src/test/ui/numbers-arithmetic/overflowing-sub.rs b/src/test/ui/numbers-arithmetic/overflowing-sub.rs index 2e2ee52124768..66685ac961a17 100644 --- a/src/test/ui/numbers-arithmetic/overflowing-sub.rs +++ b/src/test/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'attempt to subtract with overflow' +// ignore-emscripten no processes // compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/src/test/ui/panic-runtime/unwind-interleaved.rs b/src/test/ui/panic-runtime/unwind-interleaved.rs index 3d2b8a694806c..a8b3f3493097c 100644 --- a/src/test/ui/panic-runtime/unwind-interleaved.rs +++ b/src/test/ui/panic-runtime/unwind-interleaved.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn a() {} diff --git a/src/test/ui/panic-runtime/unwind-rec.rs b/src/test/ui/panic-runtime/unwind-rec.rs index 88aa6a577e621..a9b7ee8ec7d4a 100644 --- a/src/test/ui/panic-runtime/unwind-rec.rs +++ b/src/test/ui/panic-runtime/unwind-rec.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn build() -> Vec { panic!(); diff --git a/src/test/ui/panic-runtime/unwind-rec2.rs b/src/test/ui/panic-runtime/unwind-rec2.rs index b3cac5141bbcf..a130f9e879f2d 100644 --- a/src/test/ui/panic-runtime/unwind-rec2.rs +++ b/src/test/ui/panic-runtime/unwind-rec2.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn build1() -> Vec { vec![0, 0, 0, 0, 0, 0, 0] diff --git a/src/test/ui/panic-runtime/unwind-unique.rs b/src/test/ui/panic-runtime/unwind-unique.rs index fabd28ac4f918..d66e39110eaca 100644 --- a/src/test/ui/panic-runtime/unwind-unique.rs +++ b/src/test/ui/panic-runtime/unwind-unique.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit panic +// ignore-emscripten no processes fn failfn() { panic!(); diff --git a/src/test/ui/panics/args-panic.rs b/src/test/ui/panics/args-panic.rs index cdf1ef447521e..322054caf1161 100644 --- a/src/test/ui/panics/args-panic.rs +++ b/src/test/ui/panics/args-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:meep +// ignore-emscripten no processes #![feature(box_syntax)] diff --git a/src/test/ui/panics/doublepanic.rs b/src/test/ui/panics/doublepanic.rs index 0b6ac6fe41000..c1fcc875c3613 100644 --- a/src/test/ui/panics/doublepanic.rs +++ b/src/test/ui/panics/doublepanic.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:One +// ignore-emscripten no processes fn main() { panic!("One"); diff --git a/src/test/ui/panics/explicit-panic-msg.rs b/src/test/ui/panics/explicit-panic-msg.rs index d27fc3e06f1bf..1789e2e62c8b2 100644 --- a/src/test/ui/panics/explicit-panic-msg.rs +++ b/src/test/ui/panics/explicit-panic-msg.rs @@ -3,6 +3,7 @@ // run-fail // error-pattern:wooooo +// ignore-emscripten no processes fn main() { let mut a = 1; diff --git a/src/test/ui/panics/explicit-panic.rs b/src/test/ui/panics/explicit-panic.rs index ddd5f00be6e76..27c73d3493cb8 100644 --- a/src/test/ui/panics/explicit-panic.rs +++ b/src/test/ui/panics/explicit-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:explicit +// ignore-emscripten no processes fn main() { panic!(); diff --git a/src/test/ui/panics/fmt-panic.rs b/src/test/ui/panics/fmt-panic.rs index 8024f7b6166d6..87fb2e6dd54b9 100644 --- a/src/test/ui/panics/fmt-panic.rs +++ b/src/test/ui/panics/fmt-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:meh +// ignore-emscripten no processes fn main() { let str_var: String = "meh".to_string(); diff --git a/src/test/ui/panics/main-panic.rs b/src/test/ui/panics/main-panic.rs index 34bd9f8e0c6f1..023ab47012596 100644 --- a/src/test/ui/panics/main-panic.rs +++ b/src/test/ui/panics/main-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at +// ignore-emscripten no processes fn main() { panic!() diff --git a/src/test/ui/panics/panic-arg.rs b/src/test/ui/panics/panic-arg.rs index b73487d083c18..f7c2dbb096f29 100644 --- a/src/test/ui/panics/panic-arg.rs +++ b/src/test/ui/panics/panic-arg.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:woe +// ignore-emscripten no processes fn f(a: isize) { println!("{}", a); diff --git a/src/test/ui/panics/panic-macro-any-wrapped.rs b/src/test/ui/panics/panic-macro-any-wrapped.rs index 85737e947a17d..80c87c6f32c4b 100644 --- a/src/test/ui/panics/panic-macro-any-wrapped.rs +++ b/src/test/ui/panics/panic-macro-any-wrapped.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'Box' +// ignore-emscripten no processes fn main() { panic!(Box::new(612_i64)); diff --git a/src/test/ui/panics/panic-macro-any.rs b/src/test/ui/panics/panic-macro-any.rs index 0d9eec17eb765..ffc7114c1f5f2 100644 --- a/src/test/ui/panics/panic-macro-any.rs +++ b/src/test/ui/panics/panic-macro-any.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'Box' +// ignore-emscripten no processes #![feature(box_syntax)] diff --git a/src/test/ui/panics/panic-macro-explicit.rs b/src/test/ui/panics/panic-macro-explicit.rs index f27bdda3f321f..ac4d6f8128b87 100644 --- a/src/test/ui/panics/panic-macro-explicit.rs +++ b/src/test/ui/panics/panic-macro-explicit.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'explicit panic' +// ignore-emscripten no processes fn main() { panic!(); diff --git a/src/test/ui/panics/panic-macro-fmt.rs b/src/test/ui/panics/panic-macro-fmt.rs index c18d7830d0646..a755ebc0f4e3a 100644 --- a/src/test/ui/panics/panic-macro-fmt.rs +++ b/src/test/ui/panics/panic-macro-fmt.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-fail-fmt 42 rust' +// ignore-emscripten no processes fn main() { panic!("test-fail-fmt {} {}", 42, "rust"); diff --git a/src/test/ui/panics/panic-macro-owned.rs b/src/test/ui/panics/panic-macro-owned.rs index fd56cfa3bb8a8..b898fde77a3b6 100644 --- a/src/test/ui/panics/panic-macro-owned.rs +++ b/src/test/ui/panics/panic-macro-owned.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-fail-owned' +// ignore-emscripten no processes fn main() { panic!("test-fail-owned"); diff --git a/src/test/ui/panics/panic-macro-static.rs b/src/test/ui/panics/panic-macro-static.rs index a78732ed39840..a1d467cbfb524 100644 --- a/src/test/ui/panics/panic-macro-static.rs +++ b/src/test/ui/panics/panic-macro-static.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:panicked at 'test-fail-static' +// ignore-emscripten no processes fn main() { panic!("test-fail-static"); diff --git a/src/test/ui/panics/panic-main.rs b/src/test/ui/panics/panic-main.rs index 17ad25e368685..87df7688f0b40 100644 --- a/src/test/ui/panics/panic-main.rs +++ b/src/test/ui/panics/panic-main.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:moop +// ignore-emscripten no processes fn main() { panic!("moop"); diff --git a/src/test/ui/panics/panic-parens.rs b/src/test/ui/panics/panic-parens.rs index 8052c78cc6320..59ab544464967 100644 --- a/src/test/ui/panics/panic-parens.rs +++ b/src/test/ui/panics/panic-parens.rs @@ -1,7 +1,9 @@ // Fail macros without arguments need to be disambiguated in // certain positions + // run-fail // error-pattern:oops +// ignore-emscripten no processes fn bigpanic() { while (panic!("oops")) { diff --git a/src/test/ui/panics/panic-set-handler.rs b/src/test/ui/panics/panic-set-handler.rs index 55542e58433c6..3c00183e253d7 100644 --- a/src/test/ui/panics/panic-set-handler.rs +++ b/src/test/ui/panics/panic-set-handler.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:greetings from the panic handler +// ignore-emscripten no processes use std::panic; diff --git a/src/test/ui/panics/panic-set-unset-handler.rs b/src/test/ui/panics/panic-set-unset-handler.rs index 6b4c047eaf2de..dde0c72f76550 100644 --- a/src/test/ui/panics/panic-set-unset-handler.rs +++ b/src/test/ui/panics/panic-set-unset-handler.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'foobar' +// ignore-emscripten no processes use std::panic; diff --git a/src/test/ui/panics/panic-take-handler-nop.rs b/src/test/ui/panics/panic-take-handler-nop.rs index e519209a5a6d0..41cbac97c443f 100644 --- a/src/test/ui/panics/panic-take-handler-nop.rs +++ b/src/test/ui/panics/panic-take-handler-nop.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:thread 'main' panicked at 'foobar' +// ignore-emscripten no processes use std::panic; diff --git a/src/test/ui/panics/panic.rs b/src/test/ui/panics/panic.rs index 7e8ea8b817534..b6227a582ce0b 100644 --- a/src/test/ui/panics/panic.rs +++ b/src/test/ui/panics/panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:1 == 2 +// ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/src/test/ui/panics/result-get-panic.rs b/src/test/ui/panics/result-get-panic.rs index 41bc13bf085b4..461f30b9134b0 100644 --- a/src/test/ui/panics/result-get-panic.rs +++ b/src/test/ui/panics/result-get-panic.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:called `Result::unwrap()` on an `Err` value +// ignore-emscripten no processes use std::result::Result::Err; diff --git a/src/test/ui/panics/test-should-panic-bad-message.rs b/src/test/ui/panics/test-should-panic-bad-message.rs index a90d67a7d6bd3..a82c4e1440aae 100644 --- a/src/test/ui/panics/test-should-panic-bad-message.rs +++ b/src/test/ui/panics/test-should-panic-bad-message.rs @@ -1,6 +1,7 @@ // run-fail // compile-flags: --test // check-stdout +// ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/src/test/ui/panics/test-should-panic-no-message.rs b/src/test/ui/panics/test-should-panic-no-message.rs index 217267d2d75ec..13f67a41cdd53 100644 --- a/src/test/ui/panics/test-should-panic-no-message.rs +++ b/src/test/ui/panics/test-should-panic-no-message.rs @@ -1,6 +1,7 @@ // run-fail // compile-flags: --test // check-stdout +// ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/src/test/ui/panics/while-body-panics.rs b/src/test/ui/panics/while-body-panics.rs index b335c90a0732f..2c05eb389ccfe 100644 --- a/src/test/ui/panics/while-body-panics.rs +++ b/src/test/ui/panics/while-body-panics.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:quux +// ignore-emscripten no processes fn main() { let _x: isize = { diff --git a/src/test/ui/panics/while-panic.rs b/src/test/ui/panics/while-panic.rs index 45be38418e0a1..857f65a225228 100644 --- a/src/test/ui/panics/while-panic.rs +++ b/src/test/ui/panics/while-panic.rs @@ -2,6 +2,7 @@ // run-fail // error-pattern:giraffe +// ignore-emscripten no processes fn main() { panic!({ diff --git a/src/test/ui/process/tls-exit-status.rs b/src/test/ui/process/tls-exit-status.rs index 973bb9c4f0c6f..36d6aff9e7730 100644 --- a/src/test/ui/process/tls-exit-status.rs +++ b/src/test/ui/process/tls-exit-status.rs @@ -2,6 +2,7 @@ // error-pattern:nonzero // exec-env:RUST_NEWRT=1 // ignore-cloudabi no std::env +// ignore-emscripten no processes use std::env; diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs index 724ce50904182..10dc6115dcb20 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:returned Box from main() // failure-status: 1 +// ignore-emscripten no processes use std::error::Error; use std::io; diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs index d5b6b5016d4c6..faf2526c8d8fd 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:oh, dear +// ignore-emscripten no processes fn main() -> ! { panic!("oh, dear"); diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index a99480e57abde..6a625fb05e8f8 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern:returned Box from main() // failure-status: 1 +// ignore-emscripten no processes use std::io::{Error, ErrorKind}; diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs index c78477e4eee2d..94f16c6fd0212 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-for-str.rs @@ -1,6 +1,7 @@ // run-fail // error-pattern: An error message for you // failure-status: 1 +// ignore-emscripten no processes fn main() -> Result<(), &'static str> { Err("An error message for you") diff --git a/src/test/ui/str/str-overrun.rs b/src/test/ui/str/str-overrun.rs index 78bbf0cfdb9ba..a3ec8941322d5 100644 --- a/src/test/ui/str/str-overrun.rs +++ b/src/test/ui/str/str-overrun.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 5 but the index is 5 +// ignore-emscripten no processes fn main() { let s: String = "hello".to_string(); diff --git a/src/test/ui/structs/rhs-type.rs b/src/test/ui/structs/rhs-type.rs index dd227a7f0a028..c48e7c08ed2da 100644 --- a/src/test/ui/structs/rhs-type.rs +++ b/src/test/ui/structs/rhs-type.rs @@ -3,6 +3,7 @@ // run-fail // error-pattern:bye +// ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/src/test/ui/vec/vec-overrun.rs b/src/test/ui/vec/vec-overrun.rs index 4f6aec7773fa3..bdc7d507d5305 100644 --- a/src/test/ui/vec/vec-overrun.rs +++ b/src/test/ui/vec/vec-overrun.rs @@ -1,5 +1,6 @@ // run-fail // error-pattern:index out of bounds: the len is 1 but the index is 2 +// ignore-emscripten no processes fn main() { let v: Vec = vec![10];