Skip to content

Instantly share code, notes, and snippets.

@tbelaire
Created December 25, 2017 23:55
Show Gist options
  • Save tbelaire/7f53e3593886d901a4bdb81ac3ee7306 to your computer and use it in GitHub Desktop.
Save tbelaire/7f53e3593886d901a4bdb81ac3ee7306 to your computer and use it in GitHub Desktop.
error: no rules expected the token `i`
--> <alt macros>:43:18
|
1 | / (
2 | | __impl $ i : expr , $ submac : ident ! ( $ ( $ args : tt ) * ) , $ (
3 | | $ rest : tt ) * ) => (
4 | | compiler_error ! (
... |
42 | | $ i : expr , $ ( $ rest : tt ) * ) => (
43 | | { alt ! ( __impl $ i , $ ( $ rest ) * | __end ) } ) ;
| |___________________^^^________________________________- in this expansion of `alt!`
|
::: <named macros>
|
1 | / ( # $ ( $ args : tt ) * ) => ( named_attr ! ( # $ ( $ args ) * ) ; ) ; (
2 | | $ name : ident ( $ i : ty ) -> $ o : ty , $ submac : ident ! (
3 | | $ ( $ args : tt ) * ) ) => (
4 | | # [ allow ( unused_variables ) ] fn $ name ( i : $ i ) -> $ crate :: IResult <
... |
41 | | crate :: IResult < & [ u8 ] , & [ u8 ] , u32 > {
42 | | $ submac ! ( i , $ ( $ args ) * ) } ) ;
| |_______________________________________- in this expansion of `named!`
|
::: src/day9.rs
|
18 | | fn new() -> Self {
| |____________________________________- in this macro invocation
...
31 | |/ named!{ garbage_interior <Garbage>,
32 | | alt!(
| |_______-
33 | | bang_pair() => (|_| Garbage) |
34 | | tag!("x") => (|_| Garbage) ) }
| |__________________________________________- in this macro invocation
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment