1
Fork 0

resolve/expand: Misc cleanup

This commit is contained in:
Vadim Petrochenkov 2020-11-19 01:50:16 +03:00
parent 68f94e94ed
commit dfb690eaa9
4 changed files with 10 additions and 16 deletions

View file

@ -286,7 +286,7 @@ impl<'a> ResolverExpand for Resolver<'a> {
ext.helper_attrs.iter().map(|name| Ident::new(*name, span)),
);
if ext.is_derive_copy {
self.add_derive_copy(invoc_id);
self.containers_deriving_copy.insert(invoc_id);
}
ext
}
@ -351,10 +351,6 @@ impl<'a> ResolverExpand for Resolver<'a> {
self.containers_deriving_copy.contains(&expn_id)
}
fn add_derive_copy(&mut self, expn_id: ExpnId) {
self.containers_deriving_copy.insert(expn_id);
}
// The function that implements the resolution logic of `#[cfg_accessible(path)]`.
// Returns true if the path can certainly be resolved in one of three namespaces,
// returns false if the path certainly cannot be resolved in any of the three namespaces.