Skip to content

Commit ed05315

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent bb34332 commit ed05315

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
@@ -926,7 +926,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
926926
pub(crate) struct CfgInfo {
927927
hidden_cfg: FxHashSet<Cfg>,
928928
current_cfg: Cfg,
929-
doc_auto_cfg_active: bool,
929+
auto_cfg_active: bool,
930930
parent_is_doc_cfg: bool,
931931
}
932932

@@ -941,7 +941,7 @@ impl Default for CfgInfo {
941941
.into_iter()
942942
.collect(),
943943
current_cfg: Cfg::True,
944-
doc_auto_cfg_active: true,
944+
auto_cfg_active: true,
945945
parent_is_doc_cfg: false,
946946
}
947947
}
@@ -1058,7 +1058,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
10581058
match &attr.kind {
10591059
MetaItemKind::Word => {
10601060
if let Some(first_change) = changed_auto_active_status {
1061-
if !cfg_info.doc_auto_cfg_active {
1061+
if !cfg_info.auto_cfg_active {
10621062
tcx.sess.dcx().struct_span_err(
10631063
vec![first_change, attr.span],
10641064
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1068,12 +1068,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
10681068
} else {
10691069
changed_auto_active_status = Some(attr.span);
10701070
}
1071-
cfg_info.doc_auto_cfg_active = true;
1071+
cfg_info.auto_cfg_active = true;
10721072
}
10731073
MetaItemKind::NameValue(lit) => {
10741074
if let LitKind::Bool(value) = lit.kind {
10751075
if let Some(first_change) = changed_auto_active_status {
1076-
if cfg_info.doc_auto_cfg_active != value {
1076+
if cfg_info.auto_cfg_active != value {
10771077
tcx.sess.dcx().struct_span_err(
10781078
vec![first_change, attr.span],
10791079
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1083,12 +1083,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
10831083
} else {
10841084
changed_auto_active_status = Some(attr.span);
10851085
}
1086-
cfg_info.doc_auto_cfg_active = value;
1086+
cfg_info.auto_cfg_active = value;
10871087
}
10881088
}
10891089
MetaItemKind::List(sub_attrs) => {
10901090
if let Some(first_change) = changed_auto_active_status {
1091-
if !cfg_info.doc_auto_cfg_active {
1091+
if !cfg_info.auto_cfg_active {
10921092
tcx.sess.dcx().struct_span_err(
10931093
vec![first_change, attr.span],
10941094
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1099,7 +1099,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
10991099
changed_auto_active_status = Some(attr.span);
11001100
}
11011101
// Whatever happens next, the feature is enabled again.
1102-
cfg_info.doc_auto_cfg_active = true;
1102+
cfg_info.auto_cfg_active = true;
11031103
for sub_attr in sub_attrs.iter() {
11041104
if let Some(ident) = sub_attr.ident()
11051105
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1157,7 +1157,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11571157

11581158
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
11591159
// to be done here.
1160-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1160+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
11611161
None
11621162
} else if cfg_info.parent_is_doc_cfg {
11631163
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)