about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-08-08 11:38:10 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-08-27 18:47:57 -0700
commit8693943676487c01fa09f5f3daf0df6a1f71e24d (patch)
tree5aa978e4144d51f320d069d88fe0fad4ed40705e /src/libsyntax/parse/parser.rs
parent3b6314c39bfc13b5a41c53f13c3fafa7ad91e062 (diff)
downloadrust-8693943676487c01fa09f5f3daf0df6a1f71e24d.tar.gz
rust-8693943676487c01fa09f5f3daf0df6a1f71e24d.zip
librustc: Ensure that type parameters are in the right positions in paths.
This removes the stacking of type parameters that occurs when invoking
trait methods, and fixes all places in the standard library that were
relying on it. It is somewhat awkward in places; I think we'll probably
want something like the `Foo::<for T>::new()` syntax.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0882a5e3143..8ca858b7935 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1374,7 +1374,7 @@ impl Parser {
             _ => None,
         };
         match found {
-            Some(INTERPOLATED(token::nt_path(path))) => {
+            Some(INTERPOLATED(token::nt_path(~path))) => {
                 return PathAndBounds {
                     path: path,
                     bounds: None,
@@ -1483,7 +1483,7 @@ impl Parser {
         let mut path_segments = ~[];
         let mut bounds = None;
         let last_segment_index = segments.len() - 1;
-        for (i, segment_and_bounds) in segments.consume_iter().enumerate() {
+        for (i, segment_and_bounds) in segments.move_iter().enumerate() {
             let PathSegmentAndBoundSet {
                 segment: segment,
                 bound_set: bound_set
@@ -4840,7 +4840,7 @@ impl Parser {
             let path = ast::Path {
                 span: mk_sp(lo, self.span.hi),
                 global: false,
-                segments: path.consume_iter().transform(|identifier| {
+                segments: path.move_iter().map(|identifier| {
                     ast::PathSegment {
                         identifier: identifier,
                         lifetime: None,
@@ -4876,7 +4876,7 @@ impl Parser {
                     let path = ast::Path {
                         span: mk_sp(lo, self.span.hi),
                         global: false,
-                        segments: path.consume_iter().transform(|identifier| {
+                        segments: path.move_iter().map(|identifier| {
                             ast::PathSegment {
                                 identifier: identifier,
                                 lifetime: None,
@@ -4894,7 +4894,7 @@ impl Parser {
                     let path = ast::Path {
                         span: mk_sp(lo, self.span.hi),
                         global: false,
-                        segments: path.consume_iter().transform(|identifier| {
+                        segments: path.move_iter().map(|identifier| {
                             ast::PathSegment {
                                 identifier: identifier,
                                 lifetime: None,
@@ -4916,7 +4916,7 @@ impl Parser {
         let path = ast::Path {
             span: mk_sp(lo, self.span.hi),
             global: false,
-            segments: path.consume_iter().transform(|identifier| {
+            segments: path.move_iter().map(|identifier| {
                 ast::PathSegment {
                     identifier: identifier,
                     lifetime: None,