mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
parent
16943e533c
commit
e8d50578ab
4 changed files with 80 additions and 39 deletions
|
@ -88,7 +88,9 @@ fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> {
|
|||
_ => bind_pat(p, true),
|
||||
},
|
||||
|
||||
_ if paths::is_use_path_start(p) => path_or_macro_pat(p),
|
||||
// test type_path_in_pattern
|
||||
// fn main() { let <_>::Foo = (); }
|
||||
_ if paths::is_path_start(p) => path_or_macro_pat(p),
|
||||
_ if is_literal_pat_start(p) => literal_pat(p),
|
||||
|
||||
T![.] if p.at(T![..]) => dot_dot_pat(p),
|
||||
|
@ -138,7 +140,7 @@ fn literal_pat(p: &mut Parser) -> CompletedMarker {
|
|||
// let Bar(..) = ();
|
||||
// }
|
||||
fn path_or_macro_pat(p: &mut Parser) -> CompletedMarker {
|
||||
assert!(paths::is_use_path_start(p));
|
||||
assert!(paths::is_path_start(p));
|
||||
let m = p.start();
|
||||
paths::expr_path(p);
|
||||
let kind = match p.current() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue