Align naming

This commit is contained in:
Aleksey Kladov 2020-04-11 17:20:26 +02:00
parent 55356332bf
commit deb40d52aa
4 changed files with 5 additions and 6 deletions

View File

@ -202,7 +202,7 @@ fn lower_struct(
ast::StructKind::Tuple(fl) => {
for (i, fd) in fl.fields().enumerate() {
let attrs = expander.parse_attrs(&fd);
if !expander.check_cfg(&attrs) {
if !expander.is_cfg_enabled(&attrs) {
continue;
}
@ -220,7 +220,7 @@ fn lower_struct(
ast::StructKind::Record(fl) => {
for fd in fl.fields() {
let attrs = expander.parse_attrs(&fd);
if !expander.check_cfg(&attrs) {
if !expander.is_cfg_enabled(&attrs) {
continue;
}

View File

@ -118,7 +118,7 @@ impl Expander {
Attrs::new(owner, &self.hygiene)
}
pub(crate) fn check_cfg(&self, attrs: &Attrs) -> bool {
pub(crate) fn is_cfg_enabled(&self, attrs: &Attrs) -> bool {
attrs.is_cfg_enabled(&self.cfg_options)
}

View File

@ -306,8 +306,7 @@ impl ExprCollector<'_> {
.inspect(|field| field_ptrs.push(AstPtr::new(field)))
.filter_map(|field| {
let attrs = self.expander.parse_attrs(&field);
if !self.expander.check_cfg(&attrs) {
if !self.expander.is_cfg_enabled(&attrs) {
return None;
}

View File

@ -337,7 +337,7 @@ fn collect_impl_items(
.filter_map(|item_node| match item_node {
ast::ImplItem::FnDef(it) => {
let attrs = expander.parse_attrs(&it);
if !expander.check_cfg(&attrs) {
if !expander.is_cfg_enabled(&attrs) {
return None;
}
let def = FunctionLoc {