add test for panicking attribute macros
This commit is contained in:
parent
23a3d777c8
commit
9f614cb1a0
8
tests/ui/proc-macro/custom-attr-panic.rs
Normal file
8
tests/ui/proc-macro/custom-attr-panic.rs
Normal 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() {}
|
10
tests/ui/proc-macro/custom-attr-panic.stderr
Normal file
10
tests/ui/proc-macro/custom-attr-panic.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user