Skip to content

Commit a694b0b

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 4822fcb commit a694b0b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/librustdoc/clean/types.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
992992
pub(crate) struct CfgInfo {
993993
hidden_cfg: FxHashSet<Cfg>,
994994
current_cfg: Cfg,
995-
doc_auto_cfg_active: bool,
995+
auto_cfg_active: bool,
996996
parent_is_doc_cfg: bool,
997997
}
998998

@@ -1007,7 +1007,7 @@ impl Default for CfgInfo {
10071007
.into_iter()
10081008
.collect(),
10091009
current_cfg: Cfg::True,
1010-
doc_auto_cfg_active: true,
1010+
auto_cfg_active: true,
10111011
parent_is_doc_cfg: false,
10121012
}
10131013
}
@@ -1124,7 +1124,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11241124
match &attr.kind {
11251125
MetaItemKind::Word => {
11261126
if let Some(first_change) = changed_auto_active_status {
1127-
if !cfg_info.doc_auto_cfg_active {
1127+
if !cfg_info.auto_cfg_active {
11281128
tcx.sess.dcx().struct_span_err(
11291129
vec![first_change, attr.span],
11301130
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1134,12 +1134,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11341134
} else {
11351135
changed_auto_active_status = Some(attr.span);
11361136
}
1137-
cfg_info.doc_auto_cfg_active = true;
1137+
cfg_info.auto_cfg_active = true;
11381138
}
11391139
MetaItemKind::NameValue(lit) => {
11401140
if let LitKind::Bool(value) = lit.kind {
11411141
if let Some(first_change) = changed_auto_active_status {
1142-
if cfg_info.doc_auto_cfg_active != value {
1142+
if cfg_info.auto_cfg_active != value {
11431143
tcx.sess.dcx().struct_span_err(
11441144
vec![first_change, attr.span],
11451145
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1149,12 +1149,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11491149
} else {
11501150
changed_auto_active_status = Some(attr.span);
11511151
}
1152-
cfg_info.doc_auto_cfg_active = value;
1152+
cfg_info.auto_cfg_active = value;
11531153
}
11541154
}
11551155
MetaItemKind::List(sub_attrs) => {
11561156
if let Some(first_change) = changed_auto_active_status {
1157-
if !cfg_info.doc_auto_cfg_active {
1157+
if !cfg_info.auto_cfg_active {
11581158
tcx.sess.dcx().struct_span_err(
11591159
vec![first_change, attr.span],
11601160
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1165,7 +1165,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11651165
changed_auto_active_status = Some(attr.span);
11661166
}
11671167
// Whatever happens next, the feature is enabled again.
1168-
cfg_info.doc_auto_cfg_active = true;
1168+
cfg_info.auto_cfg_active = true;
11691169
for sub_attr in sub_attrs.iter() {
11701170
if let Some(ident) = sub_attr.ident()
11711171
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1223,7 +1223,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12231223

12241224
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
12251225
// to be done here.
1226-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1226+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
12271227
None
12281228
} else if cfg_info.parent_is_doc_cfg {
12291229
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)