Skip to content

Commit 44135dd

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 77fcf36 commit 44135dd

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
@@ -991,7 +991,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
991991
pub(crate) struct CfgInfo {
992992
hidden_cfg: FxHashSet<Cfg>,
993993
current_cfg: Cfg,
994-
doc_auto_cfg_active: bool,
994+
auto_cfg_active: bool,
995995
parent_is_doc_cfg: bool,
996996
}
997997

@@ -1006,7 +1006,7 @@ impl Default for CfgInfo {
10061006
.into_iter()
10071007
.collect(),
10081008
current_cfg: Cfg::True,
1009-
doc_auto_cfg_active: true,
1009+
auto_cfg_active: true,
10101010
parent_is_doc_cfg: false,
10111011
}
10121012
}
@@ -1123,7 +1123,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11231123
match &attr.kind {
11241124
MetaItemKind::Word => {
11251125
if let Some(first_change) = changed_auto_active_status {
1126-
if !cfg_info.doc_auto_cfg_active {
1126+
if !cfg_info.auto_cfg_active {
11271127
tcx.sess.dcx().struct_span_err(
11281128
vec![first_change, attr.span],
11291129
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1133,12 +1133,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11331133
} else {
11341134
changed_auto_active_status = Some(attr.span);
11351135
}
1136-
cfg_info.doc_auto_cfg_active = true;
1136+
cfg_info.auto_cfg_active = true;
11371137
}
11381138
MetaItemKind::NameValue(lit) => {
11391139
if let LitKind::Bool(value) = lit.kind {
11401140
if let Some(first_change) = changed_auto_active_status {
1141-
if cfg_info.doc_auto_cfg_active != value {
1141+
if cfg_info.auto_cfg_active != value {
11421142
tcx.sess.dcx().struct_span_err(
11431143
vec![first_change, attr.span],
11441144
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1148,12 +1148,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11481148
} else {
11491149
changed_auto_active_status = Some(attr.span);
11501150
}
1151-
cfg_info.doc_auto_cfg_active = value;
1151+
cfg_info.auto_cfg_active = value;
11521152
}
11531153
}
11541154
MetaItemKind::List(sub_attrs) => {
11551155
if let Some(first_change) = changed_auto_active_status {
1156-
if !cfg_info.doc_auto_cfg_active {
1156+
if !cfg_info.auto_cfg_active {
11571157
tcx.sess.dcx().struct_span_err(
11581158
vec![first_change, attr.span],
11591159
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1164,7 +1164,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11641164
changed_auto_active_status = Some(attr.span);
11651165
}
11661166
// Whatever happens next, the feature is enabled again.
1167-
cfg_info.doc_auto_cfg_active = true;
1167+
cfg_info.auto_cfg_active = true;
11681168
for sub_attr in sub_attrs.iter() {
11691169
if let Some(ident) = sub_attr.ident()
11701170
&& (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)