Skip to content

Commit e69e661

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 4c94944 commit e69e661

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
@@ -1024,7 +1024,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
10241024
pub(crate) struct CfgInfo {
10251025
hidden_cfg: FxHashSet<Cfg>,
10261026
current_cfg: Cfg,
1027-
doc_auto_cfg_active: bool,
1027+
auto_cfg_active: bool,
10281028
parent_is_doc_cfg: bool,
10291029
}
10301030

@@ -1039,7 +1039,7 @@ impl Default for CfgInfo {
10391039
.into_iter()
10401040
.collect(),
10411041
current_cfg: Cfg::True,
1042-
doc_auto_cfg_active: true,
1042+
auto_cfg_active: true,
10431043
parent_is_doc_cfg: false,
10441044
}
10451045
}
@@ -1156,7 +1156,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11561156
match &attr.kind {
11571157
MetaItemKind::Word => {
11581158
if let Some(first_change) = changed_auto_active_status {
1159-
if !cfg_info.doc_auto_cfg_active {
1159+
if !cfg_info.auto_cfg_active {
11601160
tcx.sess.dcx().struct_span_err(
11611161
vec![first_change, attr.span],
11621162
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1166,12 +1166,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11661166
} else {
11671167
changed_auto_active_status = Some(attr.span);
11681168
}
1169-
cfg_info.doc_auto_cfg_active = true;
1169+
cfg_info.auto_cfg_active = true;
11701170
}
11711171
MetaItemKind::NameValue(lit) => {
11721172
if let LitKind::Bool(value) = lit.kind {
11731173
if let Some(first_change) = changed_auto_active_status {
1174-
if cfg_info.doc_auto_cfg_active != value {
1174+
if cfg_info.auto_cfg_active != value {
11751175
tcx.sess.dcx().struct_span_err(
11761176
vec![first_change, attr.span],
11771177
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1181,12 +1181,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11811181
} else {
11821182
changed_auto_active_status = Some(attr.span);
11831183
}
1184-
cfg_info.doc_auto_cfg_active = value;
1184+
cfg_info.auto_cfg_active = value;
11851185
}
11861186
}
11871187
MetaItemKind::List(sub_attrs) => {
11881188
if let Some(first_change) = changed_auto_active_status {
1189-
if !cfg_info.doc_auto_cfg_active {
1189+
if !cfg_info.auto_cfg_active {
11901190
tcx.sess.dcx().struct_span_err(
11911191
vec![first_change, attr.span],
11921192
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1197,7 +1197,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11971197
changed_auto_active_status = Some(attr.span);
11981198
}
11991199
// Whatever happens next, the feature is enabled again.
1200-
cfg_info.doc_auto_cfg_active = true;
1200+
cfg_info.auto_cfg_active = true;
12011201
for sub_attr in sub_attrs.iter() {
12021202
if let Some(ident) = sub_attr.ident()
12031203
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1255,7 +1255,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12551255

12561256
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
12571257
// to be done here.
1258-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1258+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
12591259
None
12601260
} else if cfg_info.parent_is_doc_cfg {
12611261
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)