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

@ -888,8 +888,10 @@ pub trait ResolverExpand {
/// Some parent node that is close enough to the given macro call.
fn lint_node_id(&mut self, expn_id: ExpnId) -> NodeId;
// Resolver interfaces for specific built-in macros.
/// Does `#[derive(...)]` attribute with the given `ExpnId` have built-in `Copy` inside it?
fn has_derive_copy(&self, expn_id: ExpnId) -> bool;
fn add_derive_copy(&mut self, expn_id: ExpnId);
/// Path resolution logic for `#[cfg_accessible(path)]`.
fn cfg_accessible(&mut self, expn_id: ExpnId, path: &ast::Path) -> Result<bool, Indeterminate>;
}

View file

@ -1797,7 +1797,4 @@ impl<'feat> ExpansionConfig<'feat> {
fn proc_macro_hygiene(&self) -> bool {
self.features.map_or(false, |features| features.proc_macro_hygiene)
}
fn custom_inner_attributes(&self) -> bool {
self.features.map_or(false, |features| features.custom_inner_attributes)
}
}