Skip to content

Commit fcf45d0

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent d233e85 commit fcf45d0

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
@@ -1045,7 +1045,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
10451045
pub(crate) struct CfgInfo {
10461046
hidden_cfg: FxHashSet<Cfg>,
10471047
current_cfg: Cfg,
1048-
doc_auto_cfg_active: bool,
1048+
auto_cfg_active: bool,
10491049
parent_is_doc_cfg: bool,
10501050
}
10511051

@@ -1060,7 +1060,7 @@ impl Default for CfgInfo {
10601060
.into_iter()
10611061
.collect(),
10621062
current_cfg: Cfg::True,
1063-
doc_auto_cfg_active: true,
1063+
auto_cfg_active: true,
10641064
parent_is_doc_cfg: false,
10651065
}
10661066
}
@@ -1177,7 +1177,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11771177
match &attr.kind {
11781178
MetaItemKind::Word => {
11791179
if let Some(first_change) = changed_auto_active_status {
1180-
if !cfg_info.doc_auto_cfg_active {
1180+
if !cfg_info.auto_cfg_active {
11811181
tcx.sess.dcx().struct_span_err(
11821182
vec![first_change, attr.span],
11831183
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1187,12 +1187,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11871187
} else {
11881188
changed_auto_active_status = Some(attr.span);
11891189
}
1190-
cfg_info.doc_auto_cfg_active = true;
1190+
cfg_info.auto_cfg_active = true;
11911191
}
11921192
MetaItemKind::NameValue(lit) => {
11931193
if let LitKind::Bool(value) = lit.kind {
11941194
if let Some(first_change) = changed_auto_active_status {
1195-
if cfg_info.doc_auto_cfg_active != value {
1195+
if cfg_info.auto_cfg_active != value {
11961196
tcx.sess.dcx().struct_span_err(
11971197
vec![first_change, attr.span],
11981198
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1202,12 +1202,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12021202
} else {
12031203
changed_auto_active_status = Some(attr.span);
12041204
}
1205-
cfg_info.doc_auto_cfg_active = value;
1205+
cfg_info.auto_cfg_active = value;
12061206
}
12071207
}
12081208
MetaItemKind::List(sub_attrs) => {
12091209
if let Some(first_change) = changed_auto_active_status {
1210-
if !cfg_info.doc_auto_cfg_active {
1210+
if !cfg_info.auto_cfg_active {
12111211
tcx.sess.dcx().struct_span_err(
12121212
vec![first_change, attr.span],
12131213
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1218,7 +1218,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12181218
changed_auto_active_status = Some(attr.span);
12191219
}
12201220
// Whatever happens next, the feature is enabled again.
1221-
cfg_info.doc_auto_cfg_active = true;
1221+
cfg_info.auto_cfg_active = true;
12221222
for sub_attr in sub_attrs.iter() {
12231223
if let Some(ident) = sub_attr.ident()
12241224
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1276,7 +1276,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12761276

12771277
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
12781278
// to be done here.
1279-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1279+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
12801280
None
12811281
} else if cfg_info.parent_is_doc_cfg {
12821282
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)