Skip to content

Commit

Permalink
Update proc-macro tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonas-schievink committed Aug 30, 2019
1 parent cf1db72 commit 547f96f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-1.rs
Expand Up @@ -3,6 +3,11 @@
// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
// normalize-stderr-test "note: compiler flags.*\n" -> ""
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""

#[macro_use]
extern crate invalid_punct_ident;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-1.stderr
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-1.rs:10:1
--> $DIR/invalid-punct-ident-1.rs:15:1
|
LL | invalid_punct!();
| ^^^^^^^^^^^^^^^^^
Expand Down
5 changes: 5 additions & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-2.rs
Expand Up @@ -3,6 +3,11 @@
// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
// normalize-stderr-test "note: compiler flags.*\n" -> ""
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""

#[macro_use]
extern crate invalid_punct_ident;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-2.stderr
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-2.rs:10:1
--> $DIR/invalid-punct-ident-2.rs:15:1
|
LL | invalid_ident!();
| ^^^^^^^^^^^^^^^^^
Expand Down
5 changes: 5 additions & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-3.rs
Expand Up @@ -3,6 +3,11 @@
// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
// normalize-stderr-test "error: internal compiler error.*\n" -> ""
// normalize-stderr-test "note:.*unexpectedly panicked.*\n" -> ""
// normalize-stderr-test "note: we would appreciate a bug report.*\n" -> ""
// normalize-stderr-test "note: compiler flags.*\n" -> ""
// normalize-stderr-test "note: rustc.*running on.*\n" -> ""

#[macro_use]
extern crate invalid_punct_ident;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-3.stderr
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-3.rs:10:1
--> $DIR/invalid-punct-ident-3.rs:15:1
|
LL | invalid_raw_ident!();
| ^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 547f96f

Please sign in to comment.