提交 cce73274 编写于 作者: L Lindsey Kuper

Allow trailing commas in import lists. Closes #2582.

上级 ce750a7d
......@@ -2414,7 +2414,7 @@ fn parse_view_path() -> @view_path {
token::LBRACE {
let idents = self.parse_unspanned_seq(
token::LBRACE, token::RBRACE,
seq_sep_trailing_disallowed(token::COMMA),
seq_sep_trailing_allowed(token::COMMA),
{|p| p.parse_path_list_ident()});
let path = @{span: mk_sp(lo, self.span.hi),
global: false, idents: path,
......
import foo::bar::{baz, quux,};
mod foo {
mod bar {
fn baz() { }
fn quux() { }
}
}
fn main() { baz(); quux(); }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册