Skip to content

Commit 2d11fd1

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent dcfa375 commit 2d11fd1

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
}
@@ -1150,7 +1150,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11501150
match &attr.kind {
11511151
MetaItemKind::Word => {
11521152
if let Some(first_change) = changed_auto_active_status {
1153-
if !cfg_info.doc_auto_cfg_active {
1153+
if !cfg_info.auto_cfg_active {
11541154
tcx.sess.dcx().struct_span_err(
11551155
vec![first_change, attr.span],
11561156
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1160,12 +1160,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11601160
} else {
11611161
changed_auto_active_status = Some(attr.span);
11621162
}
1163-
cfg_info.doc_auto_cfg_active = true;
1163+
cfg_info.auto_cfg_active = true;
11641164
}
11651165
MetaItemKind::NameValue(lit) => {
11661166
if let LitKind::Bool(value) = lit.kind {
11671167
if let Some(first_change) = changed_auto_active_status {
1168-
if cfg_info.doc_auto_cfg_active != value {
1168+
if cfg_info.auto_cfg_active != value {
11691169
tcx.sess.dcx().struct_span_err(
11701170
vec![first_change, attr.span],
11711171
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1175,12 +1175,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11751175
} else {
11761176
changed_auto_active_status = Some(attr.span);
11771177
}
1178-
cfg_info.doc_auto_cfg_active = value;
1178+
cfg_info.auto_cfg_active = value;
11791179
}
11801180
}
11811181
MetaItemKind::List(sub_attrs) => {
11821182
if let Some(first_change) = changed_auto_active_status {
1183-
if !cfg_info.doc_auto_cfg_active {
1183+
if !cfg_info.auto_cfg_active {
11841184
tcx.sess.dcx().struct_span_err(
11851185
vec![first_change, attr.span],
11861186
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1191,7 +1191,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11911191
changed_auto_active_status = Some(attr.span);
11921192
}
11931193
// Whatever happens next, the feature is enabled again.
1194-
cfg_info.doc_auto_cfg_active = true;
1194+
cfg_info.auto_cfg_active = true;
11951195
for sub_attr in sub_attrs.iter() {
11961196
if let Some(ident) = sub_attr.ident()
11971197
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1250,7 +1250,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12501250

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

0 commit comments

Comments
 (0)