mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
mbe: treat _ as ident
This commit is contained in:
parent
f4929fa9cc
commit
75a26f64ff
4 changed files with 18 additions and 3 deletions
|
@ -101,7 +101,9 @@ fn next_op<'a>(
|
|||
Op::Repeat { subtree, separator, kind }
|
||||
}
|
||||
tt::TokenTree::Leaf(leaf) => match leaf {
|
||||
tt::Leaf::Punct(..) => return Err(ExpandError::UnexpectedToken),
|
||||
tt::Leaf::Punct(_) => {
|
||||
return Err(ExpandError::UnexpectedToken);
|
||||
}
|
||||
tt::Leaf::Ident(ident) => {
|
||||
let name = &ident.text;
|
||||
let kind = eat_fragment_kind(src, mode)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue