diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-11-08 06:59:10 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-11-19 05:53:40 -0500 |
| commit | b64c7b83dd08c7c3afc643564d65975d57785172 (patch) | |
| tree | 2df9a43cab3b8b88a4f264e92efceeff8694379b /src/libsyntax/parse/parser.rs | |
| parent | cf7df1e6382e239619a8447719c3c19787d7b60d (diff) | |
| download | rust-b64c7b83dd08c7c3afc643564d65975d57785172.tar.gz rust-b64c7b83dd08c7c3afc643564d65975d57785172.zip | |
Refactor QPath to take an ast::TraitRef
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 50b1a2204b0..d3ae9838c6d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1502,17 +1502,17 @@ impl<'a> Parser<'a> { } else if self.eat_keyword(keywords::Proc) { self.parse_proc_type(Vec::new()) } else if self.token == token::Lt { - // QUALIFIED PATH + // QUALIFIED PATH `<TYPE as TRAIT_REF>::item` self.bump(); - let for_type = self.parse_ty(true); + let self_type = self.parse_ty(true); self.expect_keyword(keywords::As); - let trait_name = self.parse_path(LifetimeAndTypesWithoutColons); + let trait_ref = self.parse_trait_ref(); self.expect(&token::Gt); self.expect(&token::ModSep); let item_name = self.parse_ident(); TyQPath(P(QPath { - for_type: for_type, - trait_name: trait_name.path, + self_type: self_type, + trait_ref: P(trait_ref), item_name: item_name, })) } else if self.token == token::ModSep || |
