diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-04 17:10:55 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-12 09:35:11 +1100 |
| commit | 0b2d7062c47fa385ff83e20dc53b13c8c5ba4616 (patch) | |
| tree | 4bc279d596a743d5ea5d9defb03616783b67663d /compiler/rustc_expand/src | |
| parent | fe04460f6fdc32c0783ca7cab6a0fb73ed254100 (diff) | |
| download | rust-0b2d7062c47fa385ff83e20dc53b13c8c5ba4616.tar.gz rust-0b2d7062c47fa385ff83e20dc53b13c8c5ba4616.zip | |
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.
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/mbe/quoted.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/mbe/quoted.rs b/compiler/rustc_expand/src/mbe/quoted.rs index 8cb001391c5..0ea53627fe7 100644 --- a/compiler/rustc_expand/src/mbe/quoted.rs +++ b/compiler/rustc_expand/src/mbe/quoted.rs @@ -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. |
