Skip to content

Commit

Permalink
Rollup merge of #121275 - tshepang:test-panicking-proc-macros, r=nnet…
Browse files Browse the repository at this point in the history
…hercote

add test for panicking attribute macros
  • Loading branch information
matthiaskrgr authored Feb 19, 2024
2 parents 07f0d04 + 9f614cb commit dc894c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ui/proc-macro/custom-attr-panic.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//@ aux-build: test-macros.rs

extern crate test_macros;

#[test_macros::panic_attr] //~ ERROR custom attribute panicked
fn foo() {}

fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/proc-macro/custom-attr-panic.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
error: custom attribute panicked
--> $DIR/custom-attr-panic.rs:5:1
|
LL | #[test_macros::panic_attr]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: panic-attr

error: aborting due to 1 previous error

0 comments on commit dc894c3

Please sign in to comment.