Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/paths.rs')
-rw-r--r--crates/parser/src/grammar/paths.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/parser/src/grammar/paths.rs b/crates/parser/src/grammar/paths.rs
index 5dc9c6c82a..af3b6f63cf 100644
--- a/crates/parser/src/grammar/paths.rs
+++ b/crates/parser/src/grammar/paths.rs
@@ -83,11 +83,12 @@ fn path_segment(p: &mut Parser<'_>, mode: Mode, first: bool) {
}
p.expect(T![>]);
} else {
- let mut empty = true;
- if first {
+ let empty = if first {
p.eat(T![::]);
- empty = false;
- }
+ false
+ } else {
+ true
+ };
match p.current() {
IDENT => {
name_ref(p);