Skip to content

Commit cd62d65

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 618db7d commit cd62d65

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
@@ -1038,7 +1038,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
10381038
pub(crate) struct CfgInfo {
10391039
hidden_cfg: FxHashSet<Cfg>,
10401040
current_cfg: Cfg,
1041-
doc_auto_cfg_active: bool,
1041+
auto_cfg_active: bool,
10421042
parent_is_doc_cfg: bool,
10431043
}
10441044

@@ -1053,7 +1053,7 @@ impl Default for CfgInfo {
10531053
.into_iter()
10541054
.collect(),
10551055
current_cfg: Cfg::True,
1056-
doc_auto_cfg_active: true,
1056+
auto_cfg_active: true,
10571057
parent_is_doc_cfg: false,
10581058
}
10591059
}
@@ -1170,7 +1170,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11701170
match &attr.kind {
11711171
MetaItemKind::Word => {
11721172
if let Some(first_change) = changed_auto_active_status {
1173-
if !cfg_info.doc_auto_cfg_active {
1173+
if !cfg_info.auto_cfg_active {
11741174
tcx.sess.dcx().struct_span_err(
11751175
vec![first_change, attr.span],
11761176
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1180,12 +1180,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11801180
} else {
11811181
changed_auto_active_status = Some(attr.span);
11821182
}
1183-
cfg_info.doc_auto_cfg_active = true;
1183+
cfg_info.auto_cfg_active = true;
11841184
}
11851185
MetaItemKind::NameValue(lit) => {
11861186
if let LitKind::Bool(value) = lit.kind {
11871187
if let Some(first_change) = changed_auto_active_status {
1188-
if cfg_info.doc_auto_cfg_active != value {
1188+
if cfg_info.auto_cfg_active != value {
11891189
tcx.sess.dcx().struct_span_err(
11901190
vec![first_change, attr.span],
11911191
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1195,12 +1195,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11951195
} else {
11961196
changed_auto_active_status = Some(attr.span);
11971197
}
1198-
cfg_info.doc_auto_cfg_active = value;
1198+
cfg_info.auto_cfg_active = value;
11991199
}
12001200
}
12011201
MetaItemKind::List(sub_attrs) => {
12021202
if let Some(first_change) = changed_auto_active_status {
1203-
if !cfg_info.doc_auto_cfg_active {
1203+
if !cfg_info.auto_cfg_active {
12041204
tcx.sess.dcx().struct_span_err(
12051205
vec![first_change, attr.span],
12061206
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1211,7 +1211,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12111211
changed_auto_active_status = Some(attr.span);
12121212
}
12131213
// Whatever happens next, the feature is enabled again.
1214-
cfg_info.doc_auto_cfg_active = true;
1214+
cfg_info.auto_cfg_active = true;
12151215
for sub_attr in sub_attrs.iter() {
12161216
if let Some(ident) = sub_attr.ident()
12171217
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1269,7 +1269,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12691269

12701270
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
12711271
// to be done here.
1272-
if !cfg_info.doc_auto_cfg_active && !cfg_info.parent_is_doc_cfg {
1272+
if !cfg_info.auto_cfg_active && !cfg_info.parent_is_doc_cfg {
12731273
None
12741274
} else if cfg_info.parent_is_doc_cfg {
12751275
if cfg_info.current_cfg == Cfg::True {

0 commit comments

Comments
 (0)