From 97c5a44d3e805652a54a5693bbf2ab6d44db993b Mon Sep 17 00:00:00 2001 From: James Miller Date: Sat, 6 Jul 2013 12:47:42 +1200 Subject: De-share trait_ref Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs. --- src/libsyntax/parse/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1959649a865..8f1bffdaa78 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3566,7 +3566,7 @@ impl Parser { // New-style trait. Reinterpret the type as a trait. let opt_trait_ref = match ty.node { ty_path(ref path, @None, node_id) => { - Some(@trait_ref { + Some(trait_ref { path: /* bad */ copy *path, ref_id: node_id }) @@ -3608,15 +3608,15 @@ impl Parser { } // parse a::B<~str,int> - fn parse_trait_ref(&self) -> @trait_ref { - @ast::trait_ref { + fn parse_trait_ref(&self) -> trait_ref { + ast::trait_ref { path: self.parse_path_with_tps(false), ref_id: self.get_id(), } } // parse B + C<~str,int> + D - fn parse_trait_ref_list(&self, ket: &token::Token) -> ~[@trait_ref] { + fn parse_trait_ref_list(&self, ket: &token::Token) -> ~[trait_ref] { self.parse_seq_to_before_end( ket, seq_sep_trailing_disallowed(token::BINOP(token::PLUS)), -- cgit 1.4.1-3-g733a5