@@ -71,7 +71,9 @@ macro_rules! __impl_stable_hash_field {
71
71
72
72
#[ macro_export]
73
73
macro_rules! impl_stable_hash_for {
74
- ( enum $enum_name: path { $( $variant: ident $( ( $( $field: ident $( -> $delegate: tt) ?) ,* ) ) * ) ,* $( , ) ? } ) => {
74
+ // FIXME(mark-i-m): Some of these should be `?` rather than `*`. See the git blame and change
75
+ // them back when `?` is supported again.
76
+ ( enum $enum_name: path { $( $variant: ident $( ( $( $field: ident $( -> $delegate: tt) * ) ,* ) ) * ) ,* $( , ) * } ) => {
75
77
impl <' a, ' tcx> :: rustc_data_structures:: stable_hasher:: HashStable <$crate:: ich:: StableHashingContext <' a>> for $enum_name {
76
78
#[ inline]
77
79
fn hash_stable<W : :: rustc_data_structures:: stable_hasher:: StableHasherResult >( & self ,
@@ -83,14 +85,15 @@ macro_rules! impl_stable_hash_for {
83
85
match * self {
84
86
$(
85
87
$variant $( ( $( ref $field) ,* ) ) * => {
86
- $( $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) ? ) ) ;* ) *
88
+ $( $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) * ) ) ;* ) *
87
89
}
88
90
) *
89
91
}
90
92
}
91
93
}
92
94
} ;
93
- ( struct $struct_name: path { $( $field: ident $( -> $delegate: tt) ?) ,* $( , ) ? } ) => {
95
+ // FIXME(mark-i-m): same here.
96
+ ( struct $struct_name: path { $( $field: ident $( -> $delegate: tt) * ) ,* $( , ) * } ) => {
94
97
impl <' a, ' tcx> :: rustc_data_structures:: stable_hasher:: HashStable <$crate:: ich:: StableHashingContext <' a>> for $struct_name {
95
98
#[ inline]
96
99
fn hash_stable<W : :: rustc_data_structures:: stable_hasher:: StableHasherResult >( & self ,
@@ -100,11 +103,12 @@ macro_rules! impl_stable_hash_for {
100
103
$( ref $field) ,*
101
104
} = * self ;
102
105
103
- $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) ? ) ) ;*
106
+ $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) * ) ) ;*
104
107
}
105
108
}
106
109
} ;
107
- ( tuple_struct $struct_name: path { $( $field: ident $( -> $delegate: tt) ?) ,* $( , ) ? } ) => {
110
+ // FIXME(mark-i-m): same here.
111
+ ( tuple_struct $struct_name: path { $( $field: ident $( -> $delegate: tt) * ) ,* $( , ) * } ) => {
108
112
impl <' a, ' tcx> :: rustc_data_structures:: stable_hasher:: HashStable <$crate:: ich:: StableHashingContext <' a>> for $struct_name {
109
113
#[ inline]
110
114
fn hash_stable<W : :: rustc_data_structures:: stable_hasher:: StableHasherResult >( & self ,
@@ -114,7 +118,7 @@ macro_rules! impl_stable_hash_for {
114
118
$( ref $field) ,*
115
119
) = * self ;
116
120
117
- $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) ? ) ) ;*
121
+ $( __impl_stable_hash_field!( $field, __ctx, __hasher $( , $delegate) * ) ) ;*
118
122
}
119
123
}
120
124
} ;
0 commit comments