aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/paths.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-02-02 20:24:14 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-02-02 20:24:14 +0000
commitf9ecc680f0317bc56e661d7b41e7edcf52b2f995 (patch)
treec15234d193badb99117c3f4a4b53a4d76c243f90 /src/parser/event_parser/grammar/paths.rs
parenta1fcead680b0f52036dd48dd1781606e7a7339db (diff)
parentbe20b014d9fd4df64a8b6b88aaf6950d44ca6f39 (diff)
Merge #35
35: Move use r=matklad a=matklad
Diffstat (limited to 'src/parser/event_parser/grammar/paths.rs')
-rw-r--r--src/parser/event_parser/grammar/paths.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs
index 4c0d2c8b4..6efac2610 100644
--- a/src/parser/event_parser/grammar/paths.rs
+++ b/src/parser/event_parser/grammar/paths.rs
@@ -20,7 +20,11 @@ fn path(p: &mut Parser) {
20 path_segment(p, true); 20 path_segment(p, true);
21 let mut qual = path.complete(p, PATH); 21 let mut qual = path.complete(p, PATH);
22 loop { 22 loop {
23 if p.at(COLONCOLON) && !items::is_use_tree_start(p.nth(1)) { 23 let use_tree = match p.nth(1) {
24 STAR | L_CURLY => true,
25 _ => false,
26 };
27 if p.at(COLONCOLON) && !use_tree {
24 let path = qual.precede(p); 28 let path = qual.precede(p);
25 p.bump(); 29 p.bump();
26 path_segment(p, false); 30 path_segment(p, false);