Skip to content

Commit ea68758

Browse files
committed
Add needs-unwind to tests that depend on panicking
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
1 parent 0b42dea commit ea68758

File tree

62 files changed

+63
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+63
-2
lines changed

src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(overflowing_literals)]
34

45
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a

src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(overflowing_literals)]
34

45
// Test that we cleanup dynamic sized Box<[D]> properly when D has a

src/test/ui/array-slice-vec/nested-vec-3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(overflowing_literals)]
34

45
// ignore-emscripten no threads support

src/test/ui/array-slice-vec/slice-panic-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
// ignore-emscripten no threads support
45

src/test/ui/array-slice-vec/slice-panic-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
// ignore-emscripten no threads support
45

src/test/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// be talking about `async fn`s instead. Should also test what happens when it panics.
33

44
// run-fail
5+
// needs-unwind
56
// error-pattern: thread 'main' panicked at '`async fn` resumed after panicking'
67
// edition:2018
78
// ignore-wasm no panic or subprocess support

src/test/ui/binding/fn-arg-incomplete-pattern-drop-order.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// Check that partially moved from function parameters are dropped after the
34
// named bindings that move from them.
45

src/test/ui/builtin-clone-unwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
#![allow(unused_variables)]
45
#![allow(unused_imports)]

src/test/ui/catch-unwind-bang.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
fn worker() -> ! {

src/test/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
#![allow(unused_must_use)]
45
#![allow(dead_code)]

src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
// needs-unwind
23

34
#![deny(rust_2021_incompatible_closure_captures)]
45
//~^ NOTE: the lint level is defined here

src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
// needs-unwind
23

34
#![deny(rust_2021_incompatible_closure_captures)]
45
//~^ NOTE: the lint level is defined here

src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
2-
--> $DIR/mir_calls_to_shims.rs:20:38
2+
--> $DIR/mir_calls_to_shims.rs:21:38
33
|
44
LL | let result = panic::catch_unwind(move || {
55
| ^^^^^^^
@@ -11,7 +11,7 @@ LL | f.0()
1111
| --- in Rust 2018, this closure captures all of `f`, but in Rust 2021, it will only capture `f.0`
1212
|
1313
note: the lint level is defined here
14-
--> $DIR/mir_calls_to_shims.rs:3:9
14+
--> $DIR/mir_calls_to_shims.rs:4:9
1515
|
1616
LL | #![deny(rust_2021_incompatible_closure_captures)]
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/drop/drop-trait-enum.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![allow(unused_assignments)]
44
#![allow(unused_variables)]
55
// ignore-emscripten no threads support
6+
// needs-unwind
67

78
use std::thread;
89
use std::sync::mpsc::{channel, Sender};

src/test/ui/drop/dynamic-drop-async.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// * Dropping one of the values panics while dropping the future.
55

66
// run-pass
7+
// needs-unwind
78
// edition:2018
89
// ignore-wasm32-bare compiled with panic=abort by default
910

src/test/ui/drop/dynamic-drop.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
#![feature(generators, generator_trait)]

src/test/ui/drop/terminate-in-initializer.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no threads support
34

45
// Issue #787

src/test/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// ignore-emscripten no threads support
45

src/test/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// ignore-emscripten no threads support
45

src/test/ui/generator/generator-resume-after-panic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-fail
2+
// needs-unwind
23
// error-pattern:generator resumed after panicking
34
// ignore-emscripten no processes
45

src/test/ui/generator/panic-drops-resume.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Tests that panics inside a generator will correctly drop the initial resume argument.
22
33
// run-pass
4+
// needs-unwind
45
// ignore-wasm no unwind support
56
// ignore-emscripten no unwind support
67

src/test/ui/generator/panic-drops.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
// ignore-wasm32-bare compiled with panic=abort by default
45

src/test/ui/generator/panic-safe.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
// ignore-wasm32-bare compiled with panic=abort by default
45

src/test/ui/generator/resume-after-return.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
// ignore-wasm32-bare compiled with panic=abort by default
45

src/test/ui/intrinsics/panic-uninitialized-zeroed.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// revisions: mir thir
45
// [thir]compile-flags: -Zthir-unsafeck

src/test/ui/issues/issue-14875.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
// Check that values are not leaked when a dtor panics (#14875)

src/test/ui/issues/issue-25089.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no threads support
34

45
use std::thread;

src/test/ui/issues/issue-26655.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no threads support
34

45
// Check that the destructors of simple enums are run on unwinding

src/test/ui/issues/issue-29485.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
#![allow(unused_attributes)]
33
// aux-build:issue-29485.rs
4+
// needs-unwind
45
// ignore-emscripten no threads
56

67
#[feature(recover)]

src/test/ui/issues/issue-29948.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
use std::panic;

src/test/ui/issues/issue-30018-panic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// spawned thread to isolate the expected error result from the
55
// SIGTRAP injected by the drop-flag consistency checking.
66

7+
// needs-unwind
78
// ignore-emscripten no threads support
89

910
struct Foo;

src/test/ui/issues/issue-43853.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
use std::panic;

src/test/ui/issues/issue-46519.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// compile-flags:--test -O
33

4+
// needs-unwind
45
// ignore-wasm32-bare compiled with panic=abort by default
56

67
#[test]

src/test/ui/iterators/iter-count-overflow-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// only-32bit too impatient for 2⁶⁴ items
3+
// needs-unwind
34
// ignore-wasm32-bare compiled with panic=abort by default
45
// compile-flags: -C debug_assertions=yes -C opt-level=3
56

src/test/ui/iterators/iter-position-overflow-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// only-32bit too impatient for 2⁶⁴ items
3+
// needs-unwind
34
// ignore-wasm32-bare compiled with panic=abort by default
45
// compile-flags: -C debug_assertions=yes -C opt-level=3
56

src/test/ui/iterators/iter-step-overflow-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// compile-flags: -C debug_assertions=yes
45

src/test/ui/iterators/iter-sum-overflow-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// compile-flags: -C debug_assertions=yes
45

src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// compile-flags: -C overflow-checks
45

src/test/ui/macros/macro-comma-behavior-rpass.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(unused_imports)]
34
// Ideally, any macro call with a trailing comma should behave
45
// identically to a call without the comma.

src/test/ui/mir/mir_calls_to_shims.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
#![feature(fn_traits)]

src/test/ui/mir/mir_drop_order.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
use std::cell::RefCell;

src/test/ui/mir/mir_drop_panics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-fail
2+
// needs-unwind
23
// error-pattern:panic 1
34
// error-pattern:drop 2
45
// ignore-emscripten no processes

src/test/ui/mir/mir_dynamic_drops_3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-fail
2+
// needs-unwind
23
// error-pattern:unwind happens
34
// error-pattern:drop 3
45
// error-pattern:drop 2

src/test/ui/numbers-arithmetic/int-abs-overflow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// compile-flags: -C overflow-checks=on
33
// ignore-emscripten no threads support
4+
// needs-unwind
45

56
use std::thread;
67

src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// compile-flags: -C debug_assertions=yes
3+
// needs-unwind
34
// ignore-wasm32-bare compiled with panic=abort by default
45
// ignore-emscripten dies with an LLVM error
56

src/test/ui/panics/panic-handler-chain.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(stable_features)]
34

45
// ignore-emscripten no threads support

src/test/ui/panics/panic-handler-flail-wildly.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
#![allow(stable_features)]
45
#![allow(unused_must_use)]

src/test/ui/panics/panic-handler-set-twice.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(unused_variables)]
34
#![allow(stable_features)]
45

src/test/ui/panics/panic-in-dtor-drops-fields.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(dead_code)]
34
#![allow(non_upper_case_globals)]
45

src/test/ui/panics/panic-recover-propagate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no threads support
34

45
use std::sync::atomic::{AtomicUsize, Ordering};

src/test/ui/privacy/reachable-unnameable-items.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// ignore-wasm32-bare compiled with panic=abort by default
3+
// needs-unwind
34
// aux-build:reachable-unnameable-items.rs
45

56
extern crate reachable_unnameable_items;

src/test/ui/proc-macro/expand-with-a-macro.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// aux-build:expand-with-a-macro.rs
34

45
// ignore-wasm32-bare compiled with panic=abort by default

src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// compile-flags: --test
22
// run-pass
3+
// needs-unwind
34

45
// ignore-wasm32-bare compiled with panic=abort by default
56

src/test/ui/rfc-2091-track-caller/std-panic-locations.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// revisions: default mir-opt
45
//[mir-opt] compile-flags: -Zmir-opt-level=4

src/test/ui/rfcs/rfc1857-drop-order.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34

45
#![allow(dead_code, unreachable_code)]

src/test/ui/runtime/rt-explody-panic-payloads.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no processes
34
// ignore-sgx no processes
45
// ignore-wasm32-bare no unwinding panic

src/test/ui/sepcomp/sepcomp-unwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
#![allow(dead_code)]
34
// compile-flags: -C codegen-units=3
45
// ignore-emscripten no threads support

src/test/ui/structs-enums/unit-like-struct-drop-run.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-emscripten no threads support
34

45
// Make sure the destructor is run for unit-like structs.

src/test/ui/test-attrs/test-should-fail-good-message.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23
// ignore-wasm32-bare compiled with panic=abort by default
34
// compile-flags: --test
45
#[test]

src/test/ui/threads-sendsync/task-stderr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// ignore-emscripten no threads support
3+
// needs-unwind
34

45
#![feature(internal_output_capture)]
56

src/test/ui/threads-sendsync/unwind-resource.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
// needs-unwind
23

34
#![allow(non_camel_case_types)]
45
// ignore-emscripten no threads support

0 commit comments

Comments
 (0)