Skip to content

Commit 81e5ece

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent ae3664a commit 81e5ece

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

@@ -1013,7 +1013,7 @@ impl Default for CfgInfo {
10131013
.into_iter()
10141014
.collect(),
10151015
current_cfg: Cfg::True,
1016-
doc_auto_cfg_active: true,
1016+
auto_cfg_active: true,
10171017
parent_is_doc_cfg: false,
10181018
}
10191019
}
@@ -1130,7 +1130,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11301130
match &attr.kind {
11311131
MetaItemKind::Word => {
11321132
if let Some(first_change) = changed_auto_active_status {
1133-
if !cfg_info.doc_auto_cfg_active {
1133+
if !cfg_info.auto_cfg_active {
11341134
tcx.sess.dcx().struct_span_err(
11351135
vec![first_change, attr.span],
11361136
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1140,12 +1140,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11401140
} else {
11411141
changed_auto_active_status = Some(attr.span);
11421142
}
1143-
cfg_info.doc_auto_cfg_active = true;
1143+
cfg_info.auto_cfg_active = true;
11441144
}
11451145
MetaItemKind::NameValue(lit) => {
11461146
if let LitKind::Bool(value) = lit.kind {
11471147
if let Some(first_change) = changed_auto_active_status {
1148-
if cfg_info.doc_auto_cfg_active != value {
1148+
if cfg_info.auto_cfg_active != value {
11491149
tcx.sess.dcx().struct_span_err(
11501150
vec![first_change, attr.span],
11511151
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1155,12 +1155,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11551155
} else {
11561156
changed_auto_active_status = Some(attr.span);
11571157
}
1158-
cfg_info.doc_auto_cfg_active = value;
1158+
cfg_info.auto_cfg_active = value;
11591159
}
11601160
}
11611161
MetaItemKind::List(sub_attrs) => {
11621162
if let Some(first_change) = changed_auto_active_status {
1163-
if !cfg_info.doc_auto_cfg_active {
1163+
if !cfg_info.auto_cfg_active {
11641164
tcx.sess.dcx().struct_span_err(
11651165
vec![first_change, attr.span],
11661166
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1171,7 +1171,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11711171
changed_auto_active_status = Some(attr.span);
11721172
}
11731173
// Whatever happens next, the feature is enabled again.
1174-
cfg_info.doc_auto_cfg_active = true;
1174+
cfg_info.auto_cfg_active = true;
11751175
for sub_attr in sub_attrs.iter() {
11761176
if let Some(ident) = sub_attr.ident()
11771177
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1230,7 +1230,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12301230

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

0 commit comments

Comments
 (0)