We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28c5b4a commit b569cfcCopy full SHA for b569cfc
src/macros.rs
@@ -379,6 +379,23 @@ macro_rules! libc_enum {
379
}
380
};
381
382
+ // Munch an ident and cast it to the given type; covers terminating comma.
383
+ (@accumulate_entries
384
+ $prefix:tt,
385
+ [$($entries:tt)*];
386
+ $entry:ident as $ty:ty, $($tail:tt)*
387
+ ) => {
388
+ libc_enum! {
389
+ @accumulate_entries
390
+ $prefix,
391
+ [
392
+ $($entries)*
393
+ $entry = libc::$entry as $ty,
394
+ ];
395
+ $($tail)*
396
+ }
397
+ };
398
+
399
// (non-pub) Entry rule.
400
(
401
$(#[$attr:meta])*
0 commit comments