about summary refs log tree commit diff
path: root/src/libsyntax_expand
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2019-10-30 11:13:00 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2019-11-05 14:59:29 +0100
commit0dfe0ed8e1b2b8596a8cabee0afdae23e343ee69 (patch)
treea5694a1e9e0eacc626722ce5f4dea75fd7dfcc60 /src/libsyntax_expand
parent7d7fbcb3015521412ab17a814680cd1d9bb6cde9 (diff)
downloadrust-0dfe0ed8e1b2b8596a8cabee0afdae23e343ee69.tar.gz
rust-0dfe0ed8e1b2b8596a8cabee0afdae23e343ee69.zip
Review feedback: Remove more stuff! Simplify simplify simplify!
Diffstat (limited to 'src/libsyntax_expand')
-rw-r--r--src/libsyntax_expand/base.rs5
-rw-r--r--src/libsyntax_expand/expand.rs2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax_expand/base.rs b/src/libsyntax_expand/base.rs
index d79b6910587..6cc7b7da53b 100644
--- a/src/libsyntax_expand/base.rs
+++ b/src/libsyntax_expand/base.rs
@@ -13,7 +13,6 @@ use syntax::symbol::{kw, sym, Ident, Symbol};
 use syntax::{ThinVec, MACRO_ARGUMENTS};
 use syntax::tokenstream::{self, TokenStream};
 use syntax::visit::Visitor;
-crate use syntax::expand::SpecialDerives;
 
 use errors::{DiagnosticBuilder, DiagnosticId};
 use smallvec::{smallvec, SmallVec};
@@ -860,8 +859,8 @@ pub trait Resolver {
 
     fn check_unused_macros(&mut self);
 
-    fn has_derives(&self, expn_id: ExpnId, derives: SpecialDerives) -> bool;
-    fn add_derives(&mut self, expn_id: ExpnId, derives: SpecialDerives);
+    fn has_derive_copy(&self, expn_id: ExpnId) -> bool;
+    fn add_derive_copy(&mut self, expn_id: ExpnId);
 }
 
 #[derive(Clone)]
diff --git a/src/libsyntax_expand/expand.rs b/src/libsyntax_expand/expand.rs
index bdb50dbfb4f..da70fdbb0f3 100644
--- a/src/libsyntax_expand/expand.rs
+++ b/src/libsyntax_expand/expand.rs
@@ -432,7 +432,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
                     // can be in scope for all code produced by that container's expansion.
                     item.visit_with(&mut MarkAttrs(&helper_attrs));
                     if has_copy {
-                        self.cx.resolver.add_derives(invoc.expansion_data.id, SpecialDerives::COPY);
+                        self.cx.resolver.add_derive_copy(invoc.expansion_data.id);
                     }
 
                     let mut derive_placeholders = Vec::with_capacity(derives.len());