Introduce sym::dummy
and Ident::dummy
.
The idea is to identify cases of symbols/identifiers that are not expected to be used. There isn't a perfectly sharp line between "dummy" and "not dummy", but I think it's useful nonetheless.
This commit is contained in:
parent
fe04460f6f
commit
0b2d7062c4
7 changed files with 29 additions and 8 deletions
|
@ -274,7 +274,7 @@ fn parse_tree<'a>(
|
|||
let msg =
|
||||
format!("expected identifier, found `{}`", pprust::token_to_string(token),);
|
||||
sess.dcx().span_err(token.span, msg);
|
||||
TokenTree::MetaVar(token.span, Ident::empty())
|
||||
TokenTree::MetaVar(token.span, Ident::dummy())
|
||||
}
|
||||
|
||||
// There are no more tokens. Just return the `$` we already have.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue