diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 17b62b3bda2..5c996bffb9a 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -936,7 +936,7 @@ pub struct Resolver<'a> { /// `derive(Copy)` marks items they are applied to so they are treated specially later. /// Derive macros cannot modify the item themselves and have to store the markers in the global /// context, so they attach the markers to derive container IDs using this resolver table. - copy_derives: FxHashSet, + containers_deriving_copy: FxHashSet, /// Parent scopes in which the macros were invoked. /// FIXME: `derives` are missing in these parent scopes and need to be taken from elsewhere. invocation_parent_scopes: FxHashMap>, @@ -1219,7 +1219,7 @@ impl<'a> Resolver<'a> { single_segment_macro_resolutions: Default::default(), multi_segment_macro_resolutions: Default::default(), builtin_attrs: Default::default(), - copy_derives: Default::default(), + containers_deriving_copy: Default::default(), active_features: features.declared_lib_features.iter().map(|(feat, ..)| *feat) .chain(features.declared_lang_features.iter().map(|(feat, ..)| *feat)) diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs index 9997d0f946a..0fbd6b0e5d3 100644 --- a/src/librustc_resolve/macros.rs +++ b/src/librustc_resolve/macros.rs @@ -255,11 +255,11 @@ impl<'a> base::Resolver for Resolver<'a> { } fn has_derive_copy(&self, expn_id: ExpnId) -> bool { - self.copy_derives.contains(&expn_id) + self.containers_deriving_copy.contains(&expn_id) } fn add_derive_copy(&mut self, expn_id: ExpnId) { - self.copy_derives.insert(expn_id); + self.containers_deriving_copy.insert(expn_id); } }