Skip to content

Commit 6206fa8

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 4f8f439 commit 6206fa8

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
@@ -997,7 +997,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
997997
pub(crate) struct CfgInfo {
998998
hidden_cfg: FxHashSet<Cfg>,
999999
current_cfg: Cfg,
1000-
doc_auto_cfg_active: bool,
1000+
auto_cfg_active: bool,
10011001
parent_is_doc_cfg: bool,
10021002
}
10031003

@@ -1012,7 +1012,7 @@ impl Default for CfgInfo {
10121012
.into_iter()
10131013
.collect(),
10141014
current_cfg: Cfg::True,
1015-
doc_auto_cfg_active: true,
1015+
auto_cfg_active: true,
10161016
parent_is_doc_cfg: false,
10171017
}
10181018
}
@@ -1129,7 +1129,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11291129
match &attr.kind {
11301130
MetaItemKind::Word => {
11311131
if let Some(first_change) = changed_auto_active_status {
1132-
if !cfg_info.doc_auto_cfg_active {
1132+
if !cfg_info.auto_cfg_active {
11331133
tcx.sess.dcx().struct_span_err(
11341134
vec![first_change, attr.span],
11351135
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1139,12 +1139,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11391139
} else {
11401140
changed_auto_active_status = Some(attr.span);
11411141
}
1142-
cfg_info.doc_auto_cfg_active = true;
1142+
cfg_info.auto_cfg_active = true;
11431143
}
11441144
MetaItemKind::NameValue(lit) => {
11451145
if let LitKind::Bool(value) = lit.kind {
11461146
if let Some(first_change) = changed_auto_active_status {
1147-
if cfg_info.doc_auto_cfg_active != value {
1147+
if cfg_info.auto_cfg_active != value {
11481148
tcx.sess.dcx().struct_span_err(
11491149
vec![first_change, attr.span],
11501150
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1154,12 +1154,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11541154
} else {
11551155
changed_auto_active_status = Some(attr.span);
11561156
}
1157-
cfg_info.doc_auto_cfg_active = value;
1157+
cfg_info.auto_cfg_active = value;
11581158
}
11591159
}
11601160
MetaItemKind::List(sub_attrs) => {
11611161
if let Some(first_change) = changed_auto_active_status {
1162-
if !cfg_info.doc_auto_cfg_active {
1162+
if !cfg_info.auto_cfg_active {
11631163
tcx.sess.dcx().struct_span_err(
11641164
vec![first_change, attr.span],
11651165
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1170,7 +1170,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11701170
changed_auto_active_status = Some(attr.span);
11711171
}
11721172
// Whatever happens next, the feature is enabled again.
1173-
cfg_info.doc_auto_cfg_active = true;
1173+
cfg_info.auto_cfg_active = true;
11741174
for sub_attr in sub_attrs.iter() {
11751175
if let Some(ident) = sub_attr.ident()
11761176
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1228,7 +1228,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12281228

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

0 commit comments

Comments
 (0)