Skip to content

Commit

Permalink
Review feedback: alpha-rename field from copy_derives to `container…
Browse files Browse the repository at this point in the history
…s_derving_copy`.
  • Loading branch information
pnkfelix committed Nov 5, 2019
1 parent 0dfe0ed commit 9924361
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_resolve/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 9924361

Please # to comment.