File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,15 +221,6 @@ macro_rules! e {
221221// FIXME(ctest): ctest doesn't like `?` kleenes, `literal` fragments, or `$crate`. See inline
222222// comments for what eventually should be fixed.
223223macro_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- } ;
233224 // Matcher for a single variant
234225 ( @one; $_ty_name: ident; $_idx: expr; ) => { } ;
235226 (
@@ -252,6 +243,15 @@ macro_rules! c_enum {
252243 // Use a specific type if provided, otherwise default to `c_uint`
253244 ( @_ty $repr: ty) => { $repr } ;
254245 ( @_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+ } ;
255255}
256256
257257// 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