add test for panicking attribute macros

This commit is contained in:
Tshepang Mbambo 2024-02-18 22:51:19 +02:00
parent 23a3d777c8
commit 9f614cb1a0
2 changed files with 18 additions and 0 deletions

View File

@ -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() {}

View File

@ -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