libsyntax: Fix test and merge fallout.

This commit is contained in:
Patrick Walton 2014-01-02 12:30:58 -08:00
parent 8b088d493c
commit f3eee0ebad
3 changed files with 4 additions and 4 deletions

View File

@ -635,7 +635,7 @@ mod test {
}
#[test] fn parse_ident_pat () {
let parser = string_to_parser(@"b");
let mut parser = string_to_parser(@"b");
assert_eq!(parser.parse_pat(),
@ast::Pat{id: ast::DUMMY_NODE_ID,
node: ast::PatIdent(

View File

@ -4442,12 +4442,12 @@ impl Parser {
}
if *self.token == token::LPAREN {
if self.token == token::LPAREN {
// `extern mod foo (name = "bar"[,vers = "version"]) is obsolete,
// `extern mod foo = "bar#[version]";` should be used.
// Parse obsolete options to avoid wired parser errors
self.parse_optional_meta();
self.obsolete(*self.span, ObsoleteExternModAttributesInParens);
self.obsolete(self.span, ObsoleteExternModAttributesInParens);
}
// extern mod foo;
self.expect(&token::SEMI);

View File

@ -55,7 +55,7 @@ pub fn string_to_crate (source_str : @str) -> ast::Crate {
// parse a string, return a crate and the ParseSess
pub fn string_to_crate_and_sess (source_str : @str) -> (ast::Crate,@mut ParseSess) {
let (p,ps) = string_to_parser_and_sess(source_str);
let (mut p,ps) = string_to_parser_and_sess(source_str);
(p.parse_crate_mod(),ps)
}