File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,11 +218,12 @@ macro_rules! e {
218218/// purpose is to calculate the correct enum values.
219219///
220220/// See <https://github.com/rust-lang/libc/issues/4419> for more.
221+ // FIXME(ctest): ctest doesn't recognize the `literal` fragment specifier.
221222macro_rules! c_enum {
222223 (
223224 $( #[ repr( $repr: ty) ] ) ?
224225 $ty_name: ident {
225- $( $variant: ident $( = $value: literal) ?, ) +
226+ $( $variant: ident $( = $value: expr /* literal */ ) ?, ) +
226227 }
227228 ) => {
228229 pub type $ty_name = c_enum!( @ty $( $repr) ?) ;
@@ -233,7 +234,7 @@ macro_rules! c_enum {
233234 ( @one; $_ty_name: ident; $_idx: expr; ) => { } ;
234235 (
235236 @one; $ty_name: ident; $default_val: expr;
236- $variant: ident $( = $value: literal) ?,
237+ $variant: ident $( = $value: expr /* literal */ ) ?,
237238 $( $tail: tt) *
238239 ) => {
239240 pub const $variant: $ty_name = {
You can’t perform that action at this time.
0 commit comments