Skip to content

Commit

Permalink
add test for panicking attribute macros
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Feb 18, 2024
1 parent 23a3d77 commit 9f614cb
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 9f614cb

Please sign in to comment.