Skip to content

Commit de499df

Browse files
Rename CfgInfo::doc_auto_cfg_active into auto_cfg_active
1 parent 1512da8 commit de499df

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

@@ -1027,7 +1027,7 @@ impl Default for CfgInfo {
10271027
.into_iter()
10281028
.collect(),
10291029
current_cfg: Cfg::True,
1030-
doc_auto_cfg_active: true,
1030+
auto_cfg_active: true,
10311031
parent_is_doc_cfg: false,
10321032
}
10331033
}
@@ -1172,7 +1172,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11721172
match &attr.kind {
11731173
MetaItemKind::Word => {
11741174
if let Some(first_change) = changed_auto_active_status {
1175-
if !cfg_info.doc_auto_cfg_active {
1175+
if !cfg_info.auto_cfg_active {
11761176
tcx.sess.dcx().struct_span_err(
11771177
vec![first_change, attr.span],
11781178
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1182,12 +1182,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11821182
} else {
11831183
changed_auto_active_status = Some(attr.span);
11841184
}
1185-
cfg_info.doc_auto_cfg_active = true;
1185+
cfg_info.auto_cfg_active = true;
11861186
}
11871187
MetaItemKind::NameValue(lit) => {
11881188
if let LitKind::Bool(value) = lit.kind {
11891189
if let Some(first_change) = changed_auto_active_status {
1190-
if cfg_info.doc_auto_cfg_active != value {
1190+
if cfg_info.auto_cfg_active != value {
11911191
tcx.sess.dcx().struct_span_err(
11921192
vec![first_change, attr.span],
11931193
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1197,12 +1197,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
11971197
} else {
11981198
changed_auto_active_status = Some(attr.span);
11991199
}
1200-
cfg_info.doc_auto_cfg_active = value;
1200+
cfg_info.auto_cfg_active = value;
12011201
}
12021202
}
12031203
MetaItemKind::List(sub_attrs) => {
12041204
if let Some(first_change) = changed_auto_active_status {
1205-
if !cfg_info.doc_auto_cfg_active {
1205+
if !cfg_info.auto_cfg_active {
12061206
tcx.sess.dcx().struct_span_err(
12071207
vec![first_change, attr.span],
12081208
"`auto_cfg` was disabled and enabled more than once on the same item",
@@ -1213,7 +1213,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12131213
changed_auto_active_status = Some(attr.span);
12141214
}
12151215
// Whatever happens next, the feature is enabled again.
1216-
cfg_info.doc_auto_cfg_active = true;
1216+
cfg_info.auto_cfg_active = true;
12171217
for sub_attr in sub_attrs.iter() {
12181218
if let Some(ident) = sub_attr.ident()
12191219
&& (ident.name == sym::show || ident.name == sym::hide)
@@ -1272,7 +1272,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
12721272

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

0 commit comments

Comments
 (0)