@@ -1038,7 +1038,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1038
1038
pub ( crate ) struct CfgInfo {
1039
1039
hidden_cfg : FxHashSet < Cfg > ,
1040
1040
current_cfg : Cfg ,
1041
- doc_auto_cfg_active : bool ,
1041
+ auto_cfg_active : bool ,
1042
1042
parent_is_doc_cfg : bool ,
1043
1043
}
1044
1044
@@ -1053,7 +1053,7 @@ impl Default for CfgInfo {
1053
1053
. into_iter ( )
1054
1054
. collect ( ) ,
1055
1055
current_cfg : Cfg :: True ,
1056
- doc_auto_cfg_active : true ,
1056
+ auto_cfg_active : true ,
1057
1057
parent_is_doc_cfg : false ,
1058
1058
}
1059
1059
}
@@ -1170,7 +1170,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1170
1170
match & attr. kind {
1171
1171
MetaItemKind :: Word => {
1172
1172
if let Some ( first_change) = changed_auto_active_status {
1173
- if !cfg_info. doc_auto_cfg_active {
1173
+ if !cfg_info. auto_cfg_active {
1174
1174
tcx. sess . dcx ( ) . struct_span_err (
1175
1175
vec ! [ first_change, attr. span] ,
1176
1176
"`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>
1180
1180
} else {
1181
1181
changed_auto_active_status = Some ( attr. span ) ;
1182
1182
}
1183
- cfg_info. doc_auto_cfg_active = true ;
1183
+ cfg_info. auto_cfg_active = true ;
1184
1184
}
1185
1185
MetaItemKind :: NameValue ( lit) => {
1186
1186
if let LitKind :: Bool ( value) = lit. kind {
1187
1187
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 {
1189
1189
tcx. sess . dcx ( ) . struct_span_err (
1190
1190
vec ! [ first_change, attr. span] ,
1191
1191
"`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>
1195
1195
} else {
1196
1196
changed_auto_active_status = Some ( attr. span ) ;
1197
1197
}
1198
- cfg_info. doc_auto_cfg_active = value;
1198
+ cfg_info. auto_cfg_active = value;
1199
1199
}
1200
1200
}
1201
1201
MetaItemKind :: List ( sub_attrs) => {
1202
1202
if let Some ( first_change) = changed_auto_active_status {
1203
- if !cfg_info. doc_auto_cfg_active {
1203
+ if !cfg_info. auto_cfg_active {
1204
1204
tcx. sess . dcx ( ) . struct_span_err (
1205
1205
vec ! [ first_change, attr. span] ,
1206
1206
"`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>
1211
1211
changed_auto_active_status = Some ( attr. span ) ;
1212
1212
}
1213
1213
// Whatever happens next, the feature is enabled again.
1214
- cfg_info. doc_auto_cfg_active = true ;
1214
+ cfg_info. auto_cfg_active = true ;
1215
1215
for sub_attr in sub_attrs. iter ( ) {
1216
1216
if let Some ( ident) = sub_attr. ident ( )
1217
1217
&& ( 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>
1269
1269
1270
1270
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1271
1271
// 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 {
1273
1273
None
1274
1274
} else if cfg_info. parent_is_doc_cfg {
1275
1275
if cfg_info. current_cfg == Cfg :: True {
0 commit comments