about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.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_parse/src/parser/path.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_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index 3636a357978..c37d3f0441d 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -193,7 +193,7 @@ impl<'a> Parser<'a> {
         maybe_whole!(self, NtPath, |path| reject_generics_if_mod_style(self, path.into_inner()));
 
         if let token::Interpolated(nt) = &self.token.kind {
-            if let token::NtTy(ty) = &nt.0 {
+            if let token::NtTy(ty) = &**nt {
                 if let ast::TyKind::Path(None, path) = &ty.kind {
                     let path = path.clone();
                     self.bump();