about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/proc_macro.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-04-22 16:29:27 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-13 10:30:30 +1000
commit9a63a42cb787476930f094fdbd9885251ae01de0 (patch)
tree5e07fa7de037abee072ce2acf94ea0a730fd0a95 /compiler/rustc_expand/src/proc_macro.rs
parent852a78ea8de3aa24c50457340d9560547bc67008 (diff)
downloadrust-9a63a42cb787476930f094fdbd9885251ae01de0.tar.gz
rust-9a63a42cb787476930f094fdbd9885251ae01de0.zip
Remove a `Span` from `TokenKind::Interpolated`.
This span records the declaration of the metavariable in the LHS of the macro.
It's used in a couple of error messages. Unfortunately, it gets in the way of
the long-term goal of removing `TokenKind::Interpolated`. So this commit
removes it, which degrades a couple of (obscure) error messages but makes
things simpler and enables the next commit.
Diffstat (limited to 'compiler/rustc_expand/src/proc_macro.rs')
-rw-r--r--compiler/rustc_expand/src/proc_macro.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs
index 4b5c148cb55..530059e53c2 100644
--- a/compiler/rustc_expand/src/proc_macro.rs
+++ b/compiler/rustc_expand/src/proc_macro.rs
@@ -127,7 +127,7 @@ impl MultiItemModifier for DeriveProcMacro {
                 Annotatable::Stmt(stmt) => token::NtStmt(stmt),
                 _ => unreachable!(),
             };
-            TokenStream::token_alone(token::Interpolated(Lrc::new((nt, span))), DUMMY_SP)
+            TokenStream::token_alone(token::Interpolated(Lrc::new(nt)), DUMMY_SP)
         } else {
             item.to_tokens()
         };