File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -221,15 +221,6 @@ macro_rules! e {
221
221
// FIXME(ctest): ctest doesn't like `?` kleenes, `literal` fragments, or `$crate`. See inline
222
222
// comments for what eventually should be fixed.
223
223
macro_rules! c_enum {
224
- (
225
- $( #[ repr( $repr: ty) ] ) * /* ? */
226
- $ty_name: ident {
227
- $( $variant: ident $( = $value: tt /* literal */ ) * /* ? */ , ) +
228
- }
229
- ) => {
230
- pub type $ty_name = c_enum!( @_ty $( $repr) * ) ;
231
- c_enum!( @one; $ty_name; 0 ; $( $variant $( = $value) * , ) +) ;
232
- } ;
233
224
// Matcher for a single variant
234
225
( @one; $_ty_name: ident; $_idx: expr; ) => { } ;
235
226
(
@@ -252,6 +243,15 @@ macro_rules! c_enum {
252
243
// Use a specific type if provided, otherwise default to `c_uint`
253
244
( @_ty $repr: ty) => { $repr } ;
254
245
( @_ty) => { /* $crate */ crate :: c_uint } ;
246
+ (
247
+ $( #[ repr( $repr: ty) ] ) * /* ? */
248
+ $ty_name: ident {
249
+ $( $variant: ident $( = $value: tt /* literal */ ) * /* ? */ , ) +
250
+ }
251
+ ) => {
252
+ pub type $ty_name = c_enum!( @_ty $( $repr) * ) ;
253
+ c_enum!( @one; $ty_name; 0 ; $( $variant $( = $value) * , ) +) ;
254
+ } ;
255
255
}
256
256
257
257
// This is a pretty horrible hack to allow us to conditionally mark some functions as 'const',
You can’t perform that action at this time.
0 commit comments