]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/parse/parser.rs
Fix ICE with nested macro_rules!-style macros
[rust.git] / src / libsyntax / parse / parser.rs
index 2aa2da3ba4b001b81c4bc3731f9e1b7429632a74..f3789e25bc8a7e5e39bc1e1ded000561e43c4578 100644 (file)
@@ -3248,7 +3248,7 @@ fn check_expected_item(p: &mut Parser, found_attrs: bool) {
                 None      => {
                     // we only expect an ident if we didn't parse one
                     // above.
-                    let ident_str = if id == token::special_idents::invalid {
+                    let ident_str = if id.name == token::special_idents::invalid.name {
                         "identifier, "
                     } else {
                         ""
@@ -3268,7 +3268,7 @@ fn check_expected_item(p: &mut Parser, found_attrs: bool) {
             );
             let hi = self.span.hi;
 
-            if id == token::special_idents::invalid {
+            if id.name == token::special_idents::invalid.name {
                 return box(GC) spanned(lo, hi, StmtMac(
                     spanned(lo, hi, MacInvocTT(pth, tts, EMPTY_CTXT)), false));
             } else {