Skip to content

Commit 217a82a

Browse files
authored
Rollup merge of rust-lang#101741 - andrewpollack:add-needs-unwind-ui-tests, r=tmandry
Adding needs-unwind arg to applicable compiler ui tests Adding `needs-unwind` arg to applicable compiler ui tests
2 parents fffb7f2 + 5d27f19 commit 217a82a

18 files changed

+21
-11
lines changed

src/test/ui/asm/x86_64/may_unwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// only-x86_64
22
// run-pass
33
// needs-asm-support
4+
// needs-unwind
45

56
#![feature(asm_sym, asm_unwind)]
67

src/test/ui/mir/mir_codegen_calls_diverging_drops.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// error-pattern:diverging_fn called
33
// error-pattern:0 dropped
44
// ignore-emscripten no processes
5+
// needs-unwind this test checks that a destructor is called after panicking
56

67
struct Droppable(u8);
78
impl Drop for Droppable {

src/test/ui/proc-macro/invalid-punct-ident-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate invalid_punct_ident;

src/test/ui/proc-macro/invalid-punct-ident-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-1.rs:6:1
2+
--> $DIR/invalid-punct-ident-1.rs:7:1
33
|
44
LL | invalid_punct!();
55
| ^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/invalid-punct-ident-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate invalid_punct_ident;

src/test/ui/proc-macro/invalid-punct-ident-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-2.rs:6:1
2+
--> $DIR/invalid-punct-ident-2.rs:7:1
33
|
44
LL | invalid_ident!();
55
| ^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/invalid-punct-ident-3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate invalid_punct_ident;

src/test/ui/proc-macro/invalid-punct-ident-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-3.rs:6:1
2+
--> $DIR/invalid-punct-ident-3.rs:7:1
33
|
44
LL | invalid_raw_ident!();
55
| ^^^^^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/invalid-punct-ident-4.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate invalid_punct_ident;

src/test/ui/proc-macro/invalid-punct-ident-4.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: unexpected closing delimiter: `)`
2-
--> $DIR/invalid-punct-ident-4.rs:6:1
2+
--> $DIR/invalid-punct-ident-4.rs:7:1
33
|
44
LL | lexer_failure!();
55
| ^^^^^^^^^^^^^^^^ unexpected closing delimiter
66
|
77
= note: this error originates in the macro `lexer_failure` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: proc macro panicked
10-
--> $DIR/invalid-punct-ident-4.rs:6:1
10+
--> $DIR/invalid-punct-ident-4.rs:7:1
1111
|
1212
LL | lexer_failure!();
1313
| ^^^^^^^^^^^^^^^^
1414

1515
error[E0308]: mismatched types
16-
--> $DIR/invalid-punct-ident-4.rs:11:33
16+
--> $DIR/invalid-punct-ident-4.rs:12:33
1717
|
1818
LL | let _recovery_witness: () = 0;
1919
| -- ^ expected `()`, found integer

src/test/ui/proc-macro/issue-36935.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:test-macros.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate test_macros;

src/test/ui/proc-macro/issue-36935.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0428]: the name `Baz` is defined multiple times
2-
--> $DIR/issue-36935.rs:7:1
2+
--> $DIR/issue-36935.rs:8:1
33
|
44
LL | struct Baz {
55
| ^^^^^^^^^^
@@ -10,7 +10,7 @@ LL | struct Baz {
1010
= note: `Baz` must be defined only once in the type namespace of this module
1111

1212
error: proc-macro derive panicked
13-
--> $DIR/issue-36935.rs:6:20
13+
--> $DIR/issue-36935.rs:7:20
1414
|
1515
LL | #[derive(Identity, Panic)]
1616
| ^^^^^

src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// aux-build:proc-macro-panic.rs
22
// edition:2018
3+
// needs-unwind proc macro panics to report errors
34

45
// Regression test for issue #76270
56
// Tests that we don't print an ICE message when a panic

src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/issue-76270-panic-in-libproc-macro.rs:10:1
2+
--> $DIR/issue-76270-panic-in-libproc-macro.rs:11:1
33
|
44
LL | proc_macro_panic::panic_in_libproc_macro!();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/load-panic-backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// rustc-env:RUST_BACKTRACE=0
44
// normalize-stderr-test "thread '.*' panicked " -> ""
55
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
// needs-unwind proc macro panics to report errors
67

78
#[macro_use]
89
extern crate test_macros;

src/test/ui/proc-macro/load-panic-backtrace.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
at 'panic-derive', $DIR/auxiliary/test-macros.rs:43:5
22
error: proc-macro derive panicked
3-
--> $DIR/load-panic-backtrace.rs:10:10
3+
--> $DIR/load-panic-backtrace.rs:11:10
44
|
55
LL | #[derive(Panic)]
66
| ^^^^^

src/test/ui/proc-macro/load-panic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:test-macros.rs
2+
// needs-unwind proc macro panics to report errors
23

34
#[macro_use]
45
extern crate test_macros;

src/test/ui/proc-macro/load-panic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc-macro derive panicked
2-
--> $DIR/load-panic.rs:6:10
2+
--> $DIR/load-panic.rs:7:10
33
|
44
LL | #[derive(Panic)]
55
| ^^^^^

0 commit comments

Comments
 (0)