@@ -101,9 +101,8 @@ macro_rules! __impl_snapshot_field {
101
101
// This assumes the type has two type parameters, first for the tag (set to `()`),
102
102
// then for the id
103
103
macro_rules! impl_snapshot_for {
104
- // FIXME(mark-i-m): Some of these should be `?` rather than `*`.
105
104
( enum $enum_name: ident {
106
- $( $variant: ident $( ( $( $field: ident $( -> $delegate: expr) * ) ,* ) ) * ) ,* $( , ) *
105
+ $( $variant: ident $( ( $( $field: ident $( -> $delegate: expr) ? ) ,* ) ) ? ) ,* $( , ) ?
107
106
} ) => {
108
107
109
108
impl <' a, Ctx > self :: Snapshot <' a, Ctx > for $enum_name
@@ -115,18 +114,17 @@ macro_rules! impl_snapshot_for {
115
114
fn snapshot( & self , __ctx: & ' a Ctx ) -> Self :: Item {
116
115
match * self {
117
116
$(
118
- $enum_name:: $variant $( ( $( ref $field) ,* ) ) * =>
117
+ $enum_name:: $variant $( ( $( ref $field) ,* ) ) ? =>
119
118
$enum_name:: $variant $(
120
- ( $( __impl_snapshot_field!( $field, __ctx $( , $delegate) * ) ) ,* ) ,
121
- ) *
119
+ ( $( __impl_snapshot_field!( $field, __ctx $( , $delegate) ? ) ) ,* ) ,
120
+ ) ?
122
121
) *
123
122
}
124
123
}
125
124
}
126
125
} ;
127
126
128
- // FIXME(mark-i-m): same here.
129
- ( struct $struct_name: ident { $( $field: ident $( -> $delegate: expr) * ) ,* $( , ) * } ) => {
127
+ ( struct $struct_name: ident { $( $field: ident $( -> $delegate: expr) ?) ,* $( , ) ? } ) => {
130
128
impl <' a, Ctx > self :: Snapshot <' a, Ctx > for $struct_name
131
129
where Ctx : self :: SnapshotContext <' a>,
132
130
{
@@ -139,7 +137,7 @@ macro_rules! impl_snapshot_for {
139
137
} = * self ;
140
138
141
139
$struct_name {
142
- $( $field: __impl_snapshot_field!( $field, __ctx $( , $delegate) * ) ) ,*
140
+ $( $field: __impl_snapshot_field!( $field, __ctx $( , $delegate) ? ) ) ,*
143
141
}
144
142
}
145
143
}
0 commit comments