diff --git a/.gitignore b/.gitignore index 7fc3c6bc..d7bea00a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /data/bench/uncommitted target Cargo.lock +*.racertmp diff --git a/macros/src/match_token.rs b/macros/src/match_token.rs index 733f4da8..b5131cc3 100644 --- a/macros/src/match_token.rs +++ b/macros/src/match_token.rs @@ -104,7 +104,7 @@ use syntax::diagnostic::FatalError; use syntax::ptr::P; use syntax::codemap::{Span, Spanned, spanned}; use syntax::ast; -use syntax::parse::parser::Parser; +use syntax::parse::parser::{Parser, Restrictions}; use syntax::parse::{token, parser, classify}; use syntax::parse; use syntax::ext::base::{ExtCtxt, MacResult, MacEager}; @@ -203,7 +203,7 @@ fn parse_tag(parser: &mut Parser) -> Result, FatalError> { fn parse(cx: &mut ExtCtxt, toks: &[ast::TokenTree]) -> Result { let mut parser = parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), toks.to_vec()); - let discriminant = try!(parser.parse_expr_res(parser::RESTRICTION_NO_STRUCT_LITERAL)); + let discriminant = try!(parser.parse_expr_res(Restrictions::RESTRICTION_NO_STRUCT_LITERAL)); try!(parser.commit_expr_expecting(&*discriminant, token::OpenDelim(token::Brace))); let mut arms: Vec = Vec::new(); @@ -236,7 +236,7 @@ fn parse(cx: &mut ExtCtxt, toks: &[ast::TokenTree]) -> Result try!(parser.expect(&token::Comma)); Else } else { - let expr = try!(parser.parse_expr_res(parser::RESTRICTION_STMT_EXPR)); + let expr = try!(parser.parse_expr_res(Restrictions::RESTRICTION_STMT_EXPR)); rhs_hi = parser.last_span.hi; let require_comma =