File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -222,11 +222,12 @@ macro_rules! e {
222
222
/// purpose is to calculate the correct enum values.
223
223
///
224
224
/// See <https://github.com/rust-lang/libc/issues/4419> for more.
225
+ // FIXME(ctest): ctest doesn't recognize the `literal` fragment specifier.
225
226
macro_rules! c_enum {
226
227
(
227
228
$( #[ repr( $repr: ty) ] ) ?
228
229
enum $ty_name: ident {
229
- $( $variant: ident $( = $value: literal) ?, ) +
230
+ $( $variant: ident $( = $value: expr /* literal */ ) ?, ) +
230
231
}
231
232
) => {
232
233
pub type $ty_name = c_enum!( @ty $( $repr) ?) ;
@@ -237,7 +238,7 @@ macro_rules! c_enum {
237
238
( @one; $_ty_name: ident; $_idx: expr; ) => { } ;
238
239
(
239
240
@one; $ty_name: ident; $default_val: expr;
240
- $variant: ident $( = $value: literal) ?,
241
+ $variant: ident $( = $value: expr /* literal */ ) ?,
241
242
$( $tail: tt) *
242
243
) => {
243
244
pub const $variant: $ty_name = {
You can’t perform that action at this time.
0 commit comments