Skip to content

Commit fc9ed12

Browse files
committed
undo @ changes
1 parent f53abfd commit fc9ed12

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/macros.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ 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 like `?` kleenes, `literal` fragments, `$crate`, or `@`. See inline
221+
// FIXME(ctest): ctest doesn't like `?` kleenes, `literal` fragments, or `$crate`. See inline
222222
// comments for what eventually should be fixed.
223223
macro_rules! c_enum {
224224
(
@@ -227,13 +227,13 @@ macro_rules! c_enum {
227227
$($variant:ident $(= $value:tt /* literal */)* /* ? */,)+
228228
}
229229
) => {
230-
pub type $ty_name = c_enum!(__ty $($repr)*);
231-
c_enum!(__one; $ty_name; 0; $($variant $(= $value)*,)+);
230+
pub type $ty_name = c_enum!(@ty $($repr)*);
231+
c_enum!(@one; $ty_name; 0; $($variant $(= $value)*,)+);
232232
};
233233
// Matcher for a single variant
234-
(__one /* @one */; $_ty_name:ident; $_idx:expr;) => {};
234+
(@one; $_ty_name:ident; $_idx:expr;) => {};
235235
(
236-
__one /* @one */; $ty_name:ident; $default_val:expr;
236+
@one; $ty_name:ident; $default_val:expr;
237237
$variant:ident $(= $value:tt /* literal */)* /* ? */,
238238
$($tail:tt)*
239239
) => {
@@ -246,12 +246,12 @@ macro_rules! c_enum {
246246

247247
// The next value is always one more than the previous value, unless
248248
// set explicitly.
249-
c_enum!(__one; $ty_name; $variant + 1; $($tail)*);
249+
c_enum!(@one; $ty_name; $variant + 1; $($tail)*);
250250
};
251251

252252
// Use a specific type if provided, otherwise default to `c_uint`
253-
(__ty /* @ty */ $repr:ty) => { $repr };
254-
(__ty /* @ty */) => { /* $crate:: */ c_uint };
253+
(@ty $repr:ty) => { $repr };
254+
(@ty) => { /* $crate:: */ c_uint };
255255
}
256256

257257
// This is a pretty horrible hack to allow us to conditionally mark some functions as 'const',

0 commit comments

Comments
 (0)