We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6c6d6 commit abf7f7bCopy full SHA for abf7f7b
tests/ui/macros/macro-rules-attr-nested.rs
@@ -0,0 +1,24 @@
1
+//@ run-pass
2
+//@ check-run-results
3
+#![feature(macro_attr)]
4
+
5
+macro_rules! nest {
6
+ attr() { struct $name:ident; } => {
7
+ println!("nest");
8
+ #[nest(1)]
9
+ struct $name;
10
+ };
11
+ attr(1) { struct $name:ident; } => {
12
+ println!("nest(1)");
13
+ #[nest(2)]
14
15
16
+ attr(2) { struct $name:ident; } => {
17
+ println!("nest(2)");
18
19
+}
20
21
+fn main() {
22
+ #[nest]
23
+ struct S;
24
tests/ui/macros/macro-rules-attr-nested.run.stdout
@@ -0,0 +1,3 @@
+nest
+nest(1)
+nest(2)
0 commit comments