diff options
| author | James Miller <bladeon@gmail.com> | 2013-07-06 12:47:42 +1200 |
|---|---|---|
| committer | James Miller <bladeon@gmail.com> | 2013-07-07 22:51:09 +1200 |
| commit | 97c5a44d3e805652a54a5693bbf2ab6d44db993b (patch) | |
| tree | d80edf6d0f724bcb435200078501f2564bd9f5f9 /src/libsyntax/parse/parser.rs | |
| parent | 62c83bb17be9a47799d702a9470aa7a84012c782 (diff) | |
| download | rust-97c5a44d3e805652a54a5693bbf2ab6d44db993b.tar.gz rust-97c5a44d3e805652a54a5693bbf2ab6d44db993b.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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)), |
