@@ -1012,7 +1012,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1012
1012
pub ( crate ) struct CfgInfo {
1013
1013
hidden_cfg : FxHashSet < Cfg > ,
1014
1014
current_cfg : Cfg ,
1015
- doc_auto_cfg_active : bool ,
1015
+ auto_cfg_active : bool ,
1016
1016
parent_is_doc_cfg : bool ,
1017
1017
}
1018
1018
@@ -1027,7 +1027,7 @@ impl Default for CfgInfo {
1027
1027
. into_iter ( )
1028
1028
. collect ( ) ,
1029
1029
current_cfg : Cfg :: True ,
1030
- doc_auto_cfg_active : true ,
1030
+ auto_cfg_active : true ,
1031
1031
parent_is_doc_cfg : false ,
1032
1032
}
1033
1033
}
@@ -1172,7 +1172,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1172
1172
match & attr. kind {
1173
1173
MetaItemKind :: Word => {
1174
1174
if let Some ( first_change) = changed_auto_active_status {
1175
- if !cfg_info. doc_auto_cfg_active {
1175
+ if !cfg_info. auto_cfg_active {
1176
1176
tcx. sess . dcx ( ) . struct_span_err (
1177
1177
vec ! [ first_change, attr. span] ,
1178
1178
"`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>
1182
1182
} else {
1183
1183
changed_auto_active_status = Some ( attr. span ) ;
1184
1184
}
1185
- cfg_info. doc_auto_cfg_active = true ;
1185
+ cfg_info. auto_cfg_active = true ;
1186
1186
}
1187
1187
MetaItemKind :: NameValue ( lit) => {
1188
1188
if let LitKind :: Bool ( value) = lit. kind {
1189
1189
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 {
1191
1191
tcx. sess . dcx ( ) . struct_span_err (
1192
1192
vec ! [ first_change, attr. span] ,
1193
1193
"`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>
1197
1197
} else {
1198
1198
changed_auto_active_status = Some ( attr. span ) ;
1199
1199
}
1200
- cfg_info. doc_auto_cfg_active = value;
1200
+ cfg_info. auto_cfg_active = value;
1201
1201
}
1202
1202
}
1203
1203
MetaItemKind :: List ( sub_attrs) => {
1204
1204
if let Some ( first_change) = changed_auto_active_status {
1205
- if !cfg_info. doc_auto_cfg_active {
1205
+ if !cfg_info. auto_cfg_active {
1206
1206
tcx. sess . dcx ( ) . struct_span_err (
1207
1207
vec ! [ first_change, attr. span] ,
1208
1208
"`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>
1213
1213
changed_auto_active_status = Some ( attr. span ) ;
1214
1214
}
1215
1215
// Whatever happens next, the feature is enabled again.
1216
- cfg_info. doc_auto_cfg_active = true ;
1216
+ cfg_info. auto_cfg_active = true ;
1217
1217
for sub_attr in sub_attrs. iter ( ) {
1218
1218
if let Some ( ident) = sub_attr. ident ( )
1219
1219
&& ( 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>
1272
1272
1273
1273
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1274
1274
// 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 {
1276
1276
None
1277
1277
} else if cfg_info. parent_is_doc_cfg {
1278
1278
if cfg_info. current_cfg == Cfg :: True {
0 commit comments