@@ -7,12 +7,7 @@ macro_rules! pin_project {
7
7
$vis: vis struct $name: ident $( <$( $generics: ident) ,* >) ?
8
8
$( where $( $whr: tt) * ) ?
9
9
) ,
10
- @body(
11
- {
12
- $( $( #[ $( $attr: tt) * ] ) * $field: ident : $type: ty) ,*
13
- $( , ) ?
14
- }
15
- )
10
+ @body( { $( $fields: tt) * } )
16
11
) => {
17
12
$crate:: init:: pin_project!( find_pinned_fields:
18
13
@struct_attrs( $( #[ $( $struct_attr) * ] ) * ) ,
@@ -21,7 +16,7 @@ macro_rules! pin_project {
21
16
@impl_generics( $( $( $generics) ,* ) ?) ,
22
17
@ty_generics( $( $( $generics) ,* ) ?) ,
23
18
@where ( $( $( $whr) * ) ?) ,
24
- @fields_munch( $( $( # [ $ ( $attr ) * ] ) * $field : $type , ) * ) ,
19
+ @fields_munch( $( $fields ) * ) ,
25
20
@pinned( ) ,
26
21
@not_pinned( ) ,
27
22
@fields( ) ,
@@ -37,12 +32,7 @@ macro_rules! pin_project {
37
32
$vis: vis struct $name: ident $( <$( $lifetimes: lifetime, ) * $( $generics: ident) ,+>) ?
38
33
$( where $( $whr: tt) * ) ?
39
34
) ,
40
- @body(
41
- {
42
- $( $( #[ $( $attr: tt) * ] ) * $field: ident : $type: ty) ,*
43
- $( , ) ?
44
- }
45
- )
35
+ @body( { $( $fields: tt) * } )
46
36
) => {
47
37
$crate:: init:: pin_project!( find_pinned_fields:
48
38
@struct_attrs( $( #[ $( $struct_attr) * ] ) * ) ,
@@ -51,7 +41,7 @@ macro_rules! pin_project {
51
41
@impl_generics( $( $( $lifetimes, ) * $( $generics) ,+) ?) ,
52
42
@ty_generics( $( $( $lifetimes, ) * $( $generics) ,+) ?) ,
53
43
@where ( $( $( $whr) * ) ?) ,
54
- @fields_munch( $( $( # [ $ ( $attr ) * ] ) * $field : $type , ) * ) ,
44
+ @fields_munch( $( $fields ) * ) ,
55
45
@pinned( ) ,
56
46
@not_pinned( ) ,
57
47
@fields( ) ,
0 commit comments