Skip to content

Commit 6a31263

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 9e971e0 commit 6a31263

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
@@ -1011,7 +1011,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
10111011
pub(crate) struct CfgInfo {
10121012
hidden_cfg: FxHashSet<Cfg>,
10131013
current_cfg: Cfg,
1014-
doc_auto_cfg_active: bool,
1014+
auto_cfg_active: bool,
10151015
parent_is_doc_cfg: bool,
10161016
}
10171017

@@ -1026,7 +1026,7 @@ impl Default for CfgInfo {
10261026
.into_iter()
10271027
.collect(),
10281028
current_cfg: Cfg::True,
1029-
doc_auto_cfg_active: true,
1029+
auto_cfg_active: true,
10301030
parent_is_doc_cfg: false,
10311031
}
10321032
}
@@ -1143,7 +1143,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11431143
match &attr.kind {
11441144
MetaItemKind::Word => {
11451145
if let Some(first_change) = changed_auto_active_status {
1146-
if !cfg_info.doc_auto_cfg_active {
1146+
if !cfg_info.auto_cfg_active {
11471147
tcx.sess.dcx().struct_span_err(
11481148
vec![first_change, attr.span],
11491149
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1153,12 +1153,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11531153
} else {
11541154
changed_auto_active_status = Some(attr.span);
11551155
}
1156-
cfg_info.doc_auto_cfg_active = true;
1156+
cfg_info.auto_cfg_active = true;
11571157
}
11581158
MetaItemKind::NameValue(lit) => {
11591159
if let LitKind::Bool(value) = lit.kind {
11601160
if let Some(first_change) = changed_auto_active_status {
1161-
if cfg_info.doc_auto_cfg_active != value {
1161+
if cfg_info.auto_cfg_active != value {
11621162
tcx.sess.dcx().struct_span_err(
11631163
vec![first_change, attr.span],
11641164
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1168,12 +1168,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11681168
} else {
11691169
changed_auto_active_status = Some(attr.span);
11701170
}
1171-
cfg_info.doc_auto_cfg_active = value;
1171+
cfg_info.auto_cfg_active = value;
11721172
}
11731173
}
11741174
MetaItemKind::List(sub_attrs) => {
11751175
if let Some(first_change) = changed_auto_active_status {
1176-
if !cfg_info.doc_auto_cfg_active {
1176+
if !cfg_info.auto_cfg_active {
11771177
tcx.sess.dcx().struct_span_err(
11781178
vec![first_change, attr.span],
11791179
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1184,7 +1184,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11841184
changed_auto_active_status = Some(attr.span);
11851185
}
11861186
// Whatever happens next, the feature is enabled again.
1187-
cfg_info.doc_auto_cfg_active = true;
1187+
cfg_info.auto_cfg_active = true;
11881188
for sub_attr in sub_attrs.iter() {
11891189
if let Some(ident) = sub_attr.ident()
11901190
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1243,7 +1243,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12431243

12441244
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
12451245
// to be done here.
1246-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1246+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
12471247
None
12481248
} else if cfg_info.parent_is_doc_cfg {
12491249
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)