Skip to content

Commit

Permalink
Unrolled build for rust-lang#121275
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121275 - tshepang:test-panicking-proc-macros, r=nnethercote

add test for panicking attribute macros
  • Loading branch information
rust-timer authored Feb 19, 2024
2 parents 43d3470 + 9f614cb commit cf16433
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 cf16433

Please sign in to comment.