about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-30 14:19:08 +0000
committerbors <bors@rust-lang.org>2015-12-30 14:19:08 +0000
commit85fb3b6fc0a6698a001ad8b26b26d389645c3507 (patch)
treead24ee33104ccda6f28f86758e88efbbc9a916dc /src/libsyntax/parse
parent176ee349a704a1aee9dfb79c27c5da20db7942a5 (diff)
parent2359ab0dc9c52ab3447b581b88e4994c8f99d200 (diff)
downloadrust-85fb3b6fc0a6698a001ad8b26b26d389645c3507.tar.gz
rust-85fb3b6fc0a6698a001ad8b26b26d389645c3507.zip
Auto merge of #30526 - Ms2ger:PathParameters, r=brson
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index efd351a632d..92ece0a2684 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1697,7 +1697,7 @@ impl<'a> Parser<'a> {
             let parameters = if try!(self.eat_lt() ){
                 let (lifetimes, types, bindings) = try!(self.parse_generic_values_after_lt());
 
-                ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
+                ast::PathParameters::AngleBracketed(ast::AngleBracketedParameterData {
                     lifetimes: lifetimes,
                     types: P::from_vec(types),
                     bindings: P::from_vec(bindings),
@@ -1718,7 +1718,7 @@ impl<'a> Parser<'a> {
 
                 let hi = self.last_span.hi;
 
-                ast::ParenthesizedParameters(ast::ParenthesizedParameterData {
+                ast::PathParameters::Parenthesized(ast::ParenthesizedParameterData {
                     span: mk_sp(lo, hi),
                     inputs: inputs,
                     output: output_ty,
@@ -1759,13 +1759,14 @@ impl<'a> Parser<'a> {
             if try!(self.eat_lt() ){
                 // Consumed `a::b::<`, go look for types
                 let (lifetimes, types, bindings) = try!(self.parse_generic_values_after_lt());
+                let parameters = ast::AngleBracketedParameterData {
+                    lifetimes: lifetimes,
+                    types: P::from_vec(types),
+                    bindings: P::from_vec(bindings),
+                };
                 segments.push(ast::PathSegment {
                     identifier: identifier,
-                    parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
-                        lifetimes: lifetimes,
-                        types: P::from_vec(types),
-                        bindings: P::from_vec(bindings),
-                    }),
+                    parameters: ast::PathParameters::AngleBracketed(parameters),
                 });
 
                 // Consumed `a::b::<T,U>`, check for `::` before proceeding