about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSeiichi Uchida <seuchida@gmail.com>2018-01-30 14:53:01 +0900
committerflip1995 <uwdkn@student.kit.edu>2018-05-02 11:32:34 +0200
commit9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0 (patch)
treedafe616470a07d22095ed35f0d2f421d309d44d9 /src/libsyntax/parse/parser.rs
parent759bd01e039452a1a357d347aea51348f9ffc443 (diff)
downloadrust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.tar.gz
rust-9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0.zip
Remove Option from the return type of Attribute::name()
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 324cadc84e8..d8fd3870495 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1955,19 +1955,19 @@ impl<'a> Parser<'a> {
     /// Like `parse_path`, but also supports parsing `Word` meta items into paths for back-compat.
     /// This is used when parsing derive macro paths in `#[derive]` attributes.
     pub fn parse_path_allowing_meta(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
-        let meta_ident = match self.token {
+        let meta_name = match self.token {
             token::Interpolated(ref nt) => match nt.0 {
                 token::NtMeta(ref meta) => match meta.node {
-                    ast::MetaItemKind::Word => Some(meta.ident),
+                    ast::MetaItemKind::Word => Some(meta.name.clone()),
                     _ => None,
                 },
                 _ => None,
             },
             _ => None,
         };
-        if let Some(ident) = meta_ident {
+        if let Some(path) = meta_name {
             self.bump();
-            return Ok(ast::Path::from_ident(ident));
+            return Ok(path);
         }
         self.parse_path(style)
     }