about summary refs log tree commit diff
path: root/src/libsyntax/attr
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-05 11:56:06 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-06 14:04:02 +0300
commitf745e5f9b676be02cc1dfbab0bfb338dc72b4dd3 (patch)
treea4982d98a51c2f8358495b9b60e3a059a9e9c1cd /src/libsyntax/attr
parent4c5d773b4d529c6263f682513ea34ce644a8179b (diff)
downloadrust-f745e5f9b676be02cc1dfbab0bfb338dc72b4dd3.tar.gz
rust-f745e5f9b676be02cc1dfbab0bfb338dc72b4dd3.zip
syntax: Remove duplicate span from `token::Ident`
Diffstat (limited to 'src/libsyntax/attr')
-rw-r--r--src/libsyntax/attr/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index 56afc8728b4..39ffabaa4a9 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -482,19 +482,19 @@ impl MetaItem {
         let path = match tokens.next() {
             Some(TokenTree::Token(Token { kind: kind @ token::Ident(..), span })) |
             Some(TokenTree::Token(Token { kind: kind @ token::ModSep, span })) => 'arm: {
-                let mut segments = if let token::Ident(ident, _) = kind {
+                let mut segments = if let token::Ident(name, _) = kind {
                     if let Some(TokenTree::Token(Token { kind: token::ModSep, .. })) = tokens.peek() {
                         tokens.next();
-                        vec![PathSegment::from_ident(ident.with_span_pos(span))]
+                        vec![PathSegment::from_ident(Ident::new(name, span))]
                     } else {
-                        break 'arm Path::from_ident(ident.with_span_pos(span));
+                        break 'arm Path::from_ident(Ident::new(name, span));
                     }
                 } else {
                     vec![PathSegment::path_root(span)]
                 };
                 loop {
-                    if let Some(TokenTree::Token(Token { kind: token::Ident(ident, _), span })) = tokens.next() {
-                        segments.push(PathSegment::from_ident(ident.with_span_pos(span)));
+                    if let Some(TokenTree::Token(Token { kind: token::Ident(name, _), span })) = tokens.next() {
+                        segments.push(PathSegment::from_ident(Ident::new(name, span)));
                     } else {
                         return None;
                     }