diff options
Diffstat (limited to 'src/parser/grammar/paths.rs')
-rw-r--r-- | src/parser/grammar/paths.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/parser/grammar/paths.rs b/src/parser/grammar/paths.rs index 69ed84665..6f66701ac 100644 --- a/src/parser/grammar/paths.rs +++ b/src/parser/grammar/paths.rs | |||
@@ -20,7 +20,11 @@ pub(super) fn expr_path(p: &mut Parser) { | |||
20 | } | 20 | } |
21 | 21 | ||
22 | #[derive(Clone, Copy, Eq, PartialEq)] | 22 | #[derive(Clone, Copy, Eq, PartialEq)] |
23 | enum Mode { Use, Type, Expr } | 23 | enum Mode { |
24 | Use, | ||
25 | Type, | ||
26 | Expr, | ||
27 | } | ||
24 | 28 | ||
25 | fn path(p: &mut Parser, mode: Mode) { | 29 | fn path(p: &mut Parser, mode: Mode) { |
26 | if !is_path_start(p) { | 30 | if !is_path_start(p) { |
@@ -55,7 +59,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) { | |||
55 | IDENT => { | 59 | IDENT => { |
56 | name_ref(p); | 60 | name_ref(p); |
57 | path_generic_args(p, mode); | 61 | path_generic_args(p, mode); |
58 | }, | 62 | } |
59 | SELF_KW | SUPER_KW => p.bump(), | 63 | SELF_KW | SUPER_KW => p.bump(), |
60 | _ => { | 64 | _ => { |
61 | p.error("expected identifier"); | 65 | p.error("expected identifier"); |