Currently moving from Gitlab to Gitea at https://labs.phundrak.com. Some features may not work anymore on this Gitlab instance.

Commit 7485919f authored by Geoffry Song's avatar Geoffry Song

Fix for latest nightly

parent 4b7fab5f
......@@ -159,7 +159,7 @@ fn parse_lexer<'a>(cx: &mut base::ExtCtxt<'a>, sp: codemap::Span, args: &[TokenT
let expr = try!(parser.parse_expr_res(parser::RESTRICTION_STMT_EXPR, None));
let optional_comma =
// don't need a comma for blocks...
classify::expr_is_simple_block(&*expr)
!classify::expr_requires_semi_to_be_stmt(&*expr)
// or for the last arm
|| parser.token == token::Eof;
......@@ -245,6 +245,7 @@ fn parse_lexer<'a>(cx: &mut base::ExtCtxt<'a>, sp: codemap::Span, args: &[TokenT
ty_params: vec![],
where_clause: ast::WhereClause {
id: DUMMY_NODE_ID,
span: DUMMY_SP,
predicates: Vec::new(),
},
},
......
......@@ -171,6 +171,7 @@ where T: Ord + fmt::Debug + fmt::Display,
],
where_clause: ast::WhereClause {
id: DUMMY_NODE_ID,
span: DUMMY_SP,
predicates: vec![]
},
span: DUMMY_SP,
......@@ -620,7 +621,7 @@ fn parse_parser<'a>(
let expr = try!(parser.parse_expr_res(parser::RESTRICTION_STMT_EXPR, None));
let optional_comma =
// don't need a comma for blocks...
classify::expr_is_simple_block(&*expr)
!classify::expr_requires_semi_to_be_stmt(&*expr)
// or for the last arm
|| parser.check(&token::CloseDelim(token::Brace));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment