diff --git a/tests/ui/proc-macro/custom-attr-panic.rs b/tests/ui/proc-macro/custom-attr-panic.rs new file mode 100644 index 0000000000000..23bcb66319d28 --- /dev/null +++ b/tests/ui/proc-macro/custom-attr-panic.rs @@ -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() {} diff --git a/tests/ui/proc-macro/custom-attr-panic.stderr b/tests/ui/proc-macro/custom-attr-panic.stderr new file mode 100644 index 0000000000000..e436162bcc158 --- /dev/null +++ b/tests/ui/proc-macro/custom-attr-panic.stderr @@ -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 +