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 @@ -218,11 +218,12 @@ macro_rules! e {
218
218
/// purpose is to calculate the correct enum values.
219
219
///
220
220
/// See <https://github.com/rust-lang/libc/issues/4419> for more.
221
+ // FIXME(ctest): ctest doesn't recognize the `literal` fragment specifier.
221
222
macro_rules! c_enum {
222
223
(
223
224
$( #[ repr( $repr: ty) ] ) ?
224
225
$ty_name: ident {
225
- $( $variant: ident $( = $value: literal) ?, ) +
226
+ $( $variant: ident $( = $value: expr /* literal */ ) ?, ) +
226
227
}
227
228
) => {
228
229
pub type $ty_name = c_enum!( @ty $( $repr) ?) ;
@@ -233,7 +234,7 @@ macro_rules! c_enum {
233
234
( @one; $_ty_name: ident; $_idx: expr; ) => { } ;
234
235
(
235
236
@one; $ty_name: ident; $default_val: expr;
236
- $variant: ident $( = $value: literal) ?,
237
+ $variant: ident $( = $value: expr /* literal */ ) ?,
237
238
$( $tail: tt) *
238
239
) => {
239
240
pub const $variant: $ty_name = {
You can’t perform that action at this time.
0 commit comments