]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax_ext/proc_macro_decls.rs
syntax: Remove duplicate span from `token::Ident`
[rust.git] / src / libsyntax_ext / proc_macro_decls.rs
index de8b689396fb9bb94cd83a461b4f7df78150a512..29297aa913ed418c11c3e41f812db6e4478e5bd7 100644 (file)
@@ -132,7 +132,7 @@ fn collect_custom_derive(&mut self, item: &'a ast::Item, attr: &'a ast::Attribut
             }
         };
 
-        if !trait_ident.can_be_raw() {
+        if !trait_ident.name.can_be_raw() {
             self.handler.span_err(trait_attr.span,
                                   &format!("`{}` cannot be a name of derive macro", trait_ident));
         }
@@ -166,7 +166,7 @@ fn collect_custom_derive(&mut self, item: &'a ast::Item, attr: &'a ast::Attribut
                         return None;
                     }
                 };
-                if !ident.can_be_raw() {
+                if !ident.name.can_be_raw() {
                     self.handler.span_err(
                         attr.span,
                         &format!("`{}` cannot be a name of derive helper attribute", ident),