mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Align naming
This commit is contained in:
parent
55356332bf
commit
deb40d52aa
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user