diff options
author | Aleksey Kladov <[email protected]> | 2018-08-13 21:54:00 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-13 21:54:00 +0100 |
commit | 49ab44102496ac8c4a05b00c584adecf583f4d87 (patch) | |
tree | 853718de93f4c713a084fe728ee5035e57be2a40 /crates/libsyntax2/src/grammar/types.rs | |
parent | d9e86e574ad936f03a64c38dc7b7f39ddcc4eebd (diff) |
Qualified paths
Diffstat (limited to 'crates/libsyntax2/src/grammar/types.rs')
-rw-r--r-- | crates/libsyntax2/src/grammar/types.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/types.rs b/crates/libsyntax2/src/grammar/types.rs index 88631fefe..f58b545c7 100644 --- a/crates/libsyntax2/src/grammar/types.rs +++ b/crates/libsyntax2/src/grammar/types.rs | |||
@@ -12,6 +12,7 @@ pub(super) fn type_(p: &mut Parser) { | |||
12 | FOR_KW => for_type(p), | 12 | FOR_KW => for_type(p), |
13 | IMPL_KW => impl_trait_type(p), | 13 | IMPL_KW => impl_trait_type(p), |
14 | DYN_KW => dyn_trait_type(p), | 14 | DYN_KW => dyn_trait_type(p), |
15 | L_ANGLE => path_type(p), | ||
15 | _ if paths::is_path_start(p) => path_type(p), | 16 | _ if paths::is_path_start(p) => path_type(p), |
16 | _ => { | 17 | _ => { |
17 | p.err_and_bump("expected type"); | 18 | p.err_and_bump("expected type"); |
@@ -214,7 +215,7 @@ fn dyn_trait_type(p: &mut Parser) { | |||
214 | // type C = self::Foo; | 215 | // type C = self::Foo; |
215 | // type D = super::Foo; | 216 | // type D = super::Foo; |
216 | pub(super) fn path_type(p: &mut Parser) { | 217 | pub(super) fn path_type(p: &mut Parser) { |
217 | assert!(paths::is_path_start(p)); | 218 | assert!(paths::is_path_start(p) || p.at(L_ANGLE)); |
218 | let m = p.start(); | 219 | let m = p.start(); |
219 | paths::type_path(p); | 220 | paths::type_path(p); |
220 | // test path_type_with_bounds | 221 | // test path_type_with_bounds |