Skip to content

Commit

Permalink
Rollup merge of #121275 - tshepang:test-panicking-proc-macros, r=nnet…
Browse files Browse the repository at this point in the history
…hercote

add test for panicking attribute macros
  • Loading branch information
matthiaskrgr committed Feb 19, 2024
2 parents c2cc066 + 9f614cb commit 3fe809b
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 3fe809b

Please sign in to comment.