mbe: treat _ as ident

This commit is contained in:
Laurențiu Nicola 2020-12-18 17:47:48 +02:00
parent f4929fa9cc
commit 75a26f64ff
4 changed files with 18 additions and 3 deletions

View file

@ -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)?;