Skip to content

Commit 9a323ed

Browse files
committed
Ignore unused_macro_rules warning in test macros
1 parent 249b4d4 commit 9a323ed

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

tests/ui/delimiter-span.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unused_macro_rules)]
2+
13
use async_trait::async_trait;
24

35
macro_rules! picky {

tests/ui/delimiter-span.stderr

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
error: no rules expected the token `{`
2-
--> tests/ui/delimiter-span.rs:17:16
2+
--> tests/ui/delimiter-span.rs:19:16
33
|
4-
3 | macro_rules! picky {
4+
5 | macro_rules! picky {
55
| ------------------ when calling this macro
66
...
7-
17 | picky!({ 123, self });
7+
19 | picky!({ 123, self });
88
| ^ no rules expected this token in macro call
99

1010
error: no rules expected the token `{`
11-
--> tests/ui/delimiter-span.rs:18:16
11+
--> tests/ui/delimiter-span.rs:20:16
1212
|
13-
3 | macro_rules! picky {
13+
5 | macro_rules! picky {
1414
| ------------------ when calling this macro
1515
...
16-
18 | picky!({ 123 });
16+
20 | picky!({ 123 });
1717
| ^ no rules expected this token in macro call
18-
19-
warning: 1st rule of macro `picky` is never used
20-
--> tests/ui/delimiter-span.rs:4:5
21-
|
22-
4 | ($(t:tt)*) => {};
23-
| ^^^^^^^^^^
24-
|
25-
= note: `#[warn(unused_macro_rules)]` on by default

0 commit comments

Comments
 (0)