Skip to content

Commit 9aa4f0d

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent e6e9bc4 commit 9aa4f0d

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

@@ -1024,7 +1024,7 @@ impl Default for CfgInfo {
10241024
.into_iter()
10251025
.collect(),
10261026
current_cfg: Cfg::True,
1027-
doc_auto_cfg_active: true,
1027+
auto_cfg_active: true,
10281028
parent_is_doc_cfg: false,
10291029
}
10301030
}
@@ -1141,7 +1141,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11411141
match &attr.kind {
11421142
MetaItemKind::Word => {
11431143
if let Some(first_change) = changed_auto_active_status {
1144-
if !cfg_info.doc_auto_cfg_active {
1144+
if !cfg_info.auto_cfg_active {
11451145
tcx.sess.dcx().struct_span_err(
11461146
vec![first_change, attr.span],
11471147
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1151,12 +1151,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11511151
} else {
11521152
changed_auto_active_status = Some(attr.span);
11531153
}
1154-
cfg_info.doc_auto_cfg_active = true;
1154+
cfg_info.auto_cfg_active = true;
11551155
}
11561156
MetaItemKind::NameValue(lit) => {
11571157
if let LitKind::Bool(value) = lit.kind {
11581158
if let Some(first_change) = changed_auto_active_status {
1159-
if cfg_info.doc_auto_cfg_active != value {
1159+
if cfg_info.auto_cfg_active != value {
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 = value;
1169+
cfg_info.auto_cfg_active = value;
11701170
}
11711171
}
11721172
MetaItemKind::List(sub_attrs) => {
11731173
if let Some(first_change) = changed_auto_active_status {
1174-
if !cfg_info.doc_auto_cfg_active {
1174+
if !cfg_info.auto_cfg_active {
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",
@@ -1182,7 +1182,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11821182
changed_auto_active_status = Some(attr.span);
11831183
}
11841184
// Whatever happens next, the feature is enabled again.
1185-
cfg_info.doc_auto_cfg_active = true;
1185+
cfg_info.auto_cfg_active = true;
11861186
for sub_attr in sub_attrs.iter() {
11871187
if let Some(ident) = sub_attr.ident()
11881188
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1240,7 +1240,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12401240

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

0 commit comments

Comments
 (0)