From 49ab44102496ac8c4a05b00c584adecf583f4d87 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 13 Aug 2018 23:54:00 +0300 Subject: Qualified paths --- crates/libsyntax2/src/grammar/expressions/atom.rs | 2 +- crates/libsyntax2/src/grammar/expressions/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/libsyntax2/src/grammar/expressions') diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs index e62b16654..4f03862b1 100644 --- a/crates/libsyntax2/src/grammar/expressions/atom.rs +++ b/crates/libsyntax2/src/grammar/expressions/atom.rs @@ -38,7 +38,7 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option return Some(m), None => (), } - if paths::is_path_start(p) { + if paths::is_path_start(p) || p.at(L_ANGLE) { return Some(path_expr(p, r)); } let la = p.nth(1); diff --git a/crates/libsyntax2/src/grammar/expressions/mod.rs b/crates/libsyntax2/src/grammar/expressions/mod.rs index 30a78d0c4..e56f3d30e 100644 --- a/crates/libsyntax2/src/grammar/expressions/mod.rs +++ b/crates/libsyntax2/src/grammar/expressions/mod.rs @@ -332,7 +332,7 @@ fn arg_list(p: &mut Parser) { // let _ = format!(); // } fn path_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker { - assert!(paths::is_path_start(p)); + assert!(paths::is_path_start(p) || p.at(L_ANGLE)); let m = p.start(); paths::expr_path(p); match p.current() { -- cgit v1.2.3