diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-05 20:59:31 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-05 20:59:31 +0000 |
commit | 750d3cb84678b23a55092f2e4726e48ead37a9ff (patch) | |
tree | c07742b3121cb50f90535b042c7e4e114f5d3720 /crates/parser | |
parent | 94012e24e038bc1b96e06638b6e2b38852a510eb (diff) | |
parent | 20eda09712f0c4cd701575d125122472252820db (diff) |
Merge #7887
7887: Fix fail to parse :: for meta in mbe r=edwin0cheng a=edwin0cheng
fixes #7886
bors r+
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/parser')
-rw-r--r-- | crates/parser/src/grammar.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 6913e9ec2..6159d064c 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs | |||
@@ -95,7 +95,7 @@ pub(crate) mod fragments { | |||
95 | // https://doc.rust-lang.org/reference/paths.html#simple-paths | 95 | // https://doc.rust-lang.org/reference/paths.html#simple-paths |
96 | // The start of an meta must be a simple path | 96 | // The start of an meta must be a simple path |
97 | match p.current() { | 97 | match p.current() { |
98 | IDENT | T![::] | T![super] | T![self] | T![crate] => p.bump_any(), | 98 | IDENT | T![super] | T![self] | T![crate] => p.bump_any(), |
99 | T![=] => { | 99 | T![=] => { |
100 | p.bump_any(); | 100 | p.bump_any(); |
101 | match p.current() { | 101 | match p.current() { |
@@ -105,6 +105,7 @@ pub(crate) mod fragments { | |||
105 | } | 105 | } |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | _ if p.at(T![::]) => p.bump(T![::]), | ||
108 | _ => break, | 109 | _ => break, |
109 | } | 110 | } |
110 | } | 111 | } |