Skip to content

Commit 547f96f

Browse files
Update proc-macro tests
Due to #59998, the panic hook fires incorrectly for errors that should not be treated as ICEs. Previously, this would only print the default panic message, but moving the ICE printing into the panic handler will now print the entire ICE ordeal we all hate to see. Unfortunately this will make #59998 a lot more visible.
1 parent cf1db72 commit 547f96f

6 files changed

+18
-3
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// FIXME https://github.com/rust-lang/rust/issues/59998
44
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
55
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
7+
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
8+
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
9+
// normalize-stderr-test "note: compiler flags.*\n" -> ""
10+
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""
611

712
#[macro_use]
813
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:10:1
2+
--> $DIR/invalid-punct-ident-1.rs:15:1
33
|
44
LL | invalid_punct!();
55
| ^^^^^^^^^^^^^^^^^

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

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// FIXME https://github.com/rust-lang/rust/issues/59998
44
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
55
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
7+
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
8+
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
9+
// normalize-stderr-test "note: compiler flags.*\n" -> ""
10+
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""
611

712
#[macro_use]
813
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:10:1
2+
--> $DIR/invalid-punct-ident-2.rs:15:1
33
|
44
LL | invalid_ident!();
55
| ^^^^^^^^^^^^^^^^^

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

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// FIXME https://github.com/rust-lang/rust/issues/59998
44
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
55
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
7+
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
8+
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
9+
// normalize-stderr-test "note: compiler flags.*\n" -> ""
10+
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""
611

712
#[macro_use]
813
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:10:1
2+
--> $DIR/invalid-punct-ident-3.rs:15:1
33
|
44
LL | invalid_raw_ident!();
55
| ^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)