Rollup merge of #121275 - tshepang:test-panicking-proc-macros, r=nnethercote

add test for panicking attribute macros
This commit is contained in:
Matthias Krüger 2024-02-19 13:04:34 +01:00 committed by GitHub
commit 3fe809b38d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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