Skip to content

Commit 5643271

Browse files
committed
Use identifiers to denote internal macro patterns
I believe this is something fixed by rust-lang/rust#42913 in Rust 1.20, but we still need to support Rust 1.15.
1 parent 9f29ae3 commit 5643271

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/macros.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -253,20 +253,20 @@ macro_rules! simple_derive {
253253
(
254254
$iname:ident impl $path:path { $($rest:tt)* }
255255
) => {
256-
simple_derive!(@I [$iname, $path] { $($rest)* } [] []);
256+
simple_derive!(__I [$iname, $path] { $($rest)* } [] []);
257257
};
258258

259259
// Adding a filter block
260260
(
261-
@I $opt:tt {
261+
__I $opt:tt {
262262
filter($s:ident) {
263263
$($body:tt)*
264264
}
265265
$($rest:tt)*
266266
} [$($done:tt)*] [$($filter:tt)*]
267267
) => {
268268
simple_derive!(
269-
@I $opt { $($rest)* } [$($done)*] [
269+
__I $opt { $($rest)* } [$($done)*] [
270270
$($filter)*
271271
[
272272
st_name = $s,
@@ -280,15 +280,15 @@ macro_rules! simple_derive {
280280

281281
// &self bound method
282282
(
283-
@I $opt:tt {
283+
__I $opt:tt {
284284
fn $fn_name:ident (&self as $s:ident $($params:tt)*) $(-> $t:ty)* {
285285
$($body:tt)*
286286
}
287287
$($rest:tt)*
288288
} [$($done:tt)*] [$($filter:tt)*]
289289
) => {
290290
simple_derive!(
291-
@I $opt { $($rest)* } [
291+
__I $opt { $($rest)* } [
292292
$($done)*
293293
[
294294
st_name = $s,
@@ -307,15 +307,15 @@ macro_rules! simple_derive {
307307

308308
// &mut self bound method
309309
(
310-
@I $opt:tt {
310+
__I $opt:tt {
311311
fn $fn_name:ident (&mut self as $s:ident $($params:tt)*) $(-> $t:ty)* {
312312
$($body:tt)*
313313
}
314314
$($rest:tt)*
315315
} [$($done:tt)*] [$($filter:tt)*]
316316
) => {
317317
simple_derive!(
318-
@I $opt { $($rest)* } [
318+
__I $opt { $($rest)* } [
319319
$($done)*
320320
[
321321
st_name = $s,
@@ -334,15 +334,15 @@ macro_rules! simple_derive {
334334

335335
// self bound method
336336
(
337-
@I $opt:tt {
337+
__I $opt:tt {
338338
fn $fn_name:ident (self as $s:ident $($params:tt)*) $(-> $t:ty)* {
339339
$($body:tt)*
340340
}
341341
$($rest:tt)*
342342
} [$($done:tt)*] [$($filter:tt)*]
343343
) => {
344344
simple_derive!(
345-
@I $opt { $($rest)* } [
345+
__I $opt { $($rest)* } [
346346
$($done)*
347347
[
348348
st_name = $s,
@@ -363,7 +363,7 @@ macro_rules! simple_derive {
363363

364364
// codegen after data collection
365365
(
366-
@I [$iname:ident, $path:path] {} [$(
366+
__I [$iname:ident, $path:path] {} [$(
367367
[
368368
st_name = $st_name:ident,
369369
bind_style = $bind_style:ident,

0 commit comments

Comments
 (0)