diff options
| author | bors <bors@rust-lang.org> | 2013-03-20 16:42:47 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-20 16:42:47 -0700 |
| commit | b12714eff5dd2ccde118c520444990216739e006 (patch) | |
| tree | 1c741e92773a414eabc5c09c25568135bb5b6253 /src/libsyntax | |
| parent | 6f3d1686b2353f8df196aecd5bc2772f86508e41 (diff) | |
| parent | a29934a61b0ade13ef799a9aa9e95c0be940e0f5 (diff) | |
| download | rust-b12714eff5dd2ccde118c520444990216739e006.tar.gz rust-b12714eff5dd2ccde118c520444990216739e006.zip | |
auto merge of #5455 : pcwalton/rust/framework, r=catamorphism
r? @catamorphism
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 086bf86b4b2..de861075a5b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -581,7 +581,9 @@ pub impl Parser { } } - fn parse_ty(&self, colons_before_params: bool) -> @Ty { + // Useless second parameter for compatibility with quasiquote macros. + // Bleh! + fn parse_ty(&self, _: bool) -> @Ty { maybe_whole!(self, nt_ty); let lo = self.span.lo; @@ -661,7 +663,7 @@ pub impl Parser { result } else if *self.token == token::MOD_SEP || is_ident_or_path(&*self.token) { - let path = self.parse_path_with_tps(colons_before_params); + let path = self.parse_path_with_tps(false); ty_path(path, self.get_id()) } else { self.fatal(~"expected type"); diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index ba9a5082132..72b734ed73d 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -370,10 +370,6 @@ pub fn print_opt_lifetime(s: @ps, lifetime: Option<@ast::Lifetime>) { } pub fn print_type(s: @ps, &&ty: @ast::Ty) { - print_type_ex(s, ty, false); -} - -pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) { maybe_print_comment(s, ty.span.lo); ibox(s, 0u); match ty.node { @@ -415,7 +411,7 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) { f.purity, f.onceness, &f.decl, None, None, None); } - ast::ty_path(path, _) => print_path(s, path, print_colons), + ast::ty_path(path, _) => print_path(s, path, false), ast::ty_fixed_length_vec(ref mt, v) => { word(s.s, ~"["); match mt.mutbl { @@ -1211,7 +1207,7 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) { print_expr(s, expr); space(s.s); word_space(s, ~"as"); - print_type_ex(s, ty, true); + print_type(s, ty); } ast::expr_if(test, ref blk, elseopt) => { print_if(s, test, blk, elseopt, false); |
