提交 99243616 编写于 作者: F Felix S. Klock II

Review feedback: alpha-rename field from `copy_derives` to `containers_derving_copy`.

上级 0dfe0ed8
......@@ -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<ExpnId>,
containers_deriving_copy: FxHashSet<ExpnId>,
/// 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<ExpnId, ParentScope<'a>>,
......@@ -1219,7 +1219,7 @@ pub fn new(session: &'a Session,
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))
......
......@@ -255,11 +255,11 @@ fn check_unused_macros(&mut self) {
}
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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册