@@ -1045,7 +1045,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1045
1045
pub ( crate ) struct CfgInfo {
1046
1046
hidden_cfg : FxHashSet < Cfg > ,
1047
1047
current_cfg : Cfg ,
1048
- doc_auto_cfg_active : bool ,
1048
+ auto_cfg_active : bool ,
1049
1049
parent_is_doc_cfg : bool ,
1050
1050
}
1051
1051
@@ -1060,7 +1060,7 @@ impl Default for CfgInfo {
1060
1060
. into_iter ( )
1061
1061
. collect ( ) ,
1062
1062
current_cfg : Cfg :: True ,
1063
- doc_auto_cfg_active : true ,
1063
+ auto_cfg_active : true ,
1064
1064
parent_is_doc_cfg : false ,
1065
1065
}
1066
1066
}
@@ -1177,7 +1177,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1177
1177
match & attr. kind {
1178
1178
MetaItemKind :: Word => {
1179
1179
if let Some ( first_change) = changed_auto_active_status {
1180
- if !cfg_info. doc_auto_cfg_active {
1180
+ if !cfg_info. auto_cfg_active {
1181
1181
tcx. sess . dcx ( ) . struct_span_err (
1182
1182
vec ! [ first_change, attr. span] ,
1183
1183
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1187,12 +1187,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1187
1187
} else {
1188
1188
changed_auto_active_status = Some ( attr. span ) ;
1189
1189
}
1190
- cfg_info. doc_auto_cfg_active = true ;
1190
+ cfg_info. auto_cfg_active = true ;
1191
1191
}
1192
1192
MetaItemKind :: NameValue ( lit) => {
1193
1193
if let LitKind :: Bool ( value) = lit. kind {
1194
1194
if let Some ( first_change) = changed_auto_active_status {
1195
- if cfg_info. doc_auto_cfg_active != value {
1195
+ if cfg_info. auto_cfg_active != value {
1196
1196
tcx. sess . dcx ( ) . struct_span_err (
1197
1197
vec ! [ first_change, attr. span] ,
1198
1198
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1202,12 +1202,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1202
1202
} else {
1203
1203
changed_auto_active_status = Some ( attr. span ) ;
1204
1204
}
1205
- cfg_info. doc_auto_cfg_active = value;
1205
+ cfg_info. auto_cfg_active = value;
1206
1206
}
1207
1207
}
1208
1208
MetaItemKind :: List ( sub_attrs) => {
1209
1209
if let Some ( first_change) = changed_auto_active_status {
1210
- if !cfg_info. doc_auto_cfg_active {
1210
+ if !cfg_info. auto_cfg_active {
1211
1211
tcx. sess . dcx ( ) . struct_span_err (
1212
1212
vec ! [ first_change, attr. span] ,
1213
1213
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1218,7 +1218,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1218
1218
changed_auto_active_status = Some ( attr. span ) ;
1219
1219
}
1220
1220
// Whatever happens next, the feature is enabled again.
1221
- cfg_info. doc_auto_cfg_active = true ;
1221
+ cfg_info. auto_cfg_active = true ;
1222
1222
for sub_attr in sub_attrs. iter ( ) {
1223
1223
if let Some ( ident) = sub_attr. ident ( )
1224
1224
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1276,7 +1276,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1276
1276
1277
1277
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1278
1278
// to be done here.
1279
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1279
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1280
1280
None
1281
1281
} else if cfg_info. parent_is_doc_cfg {
1282
1282
if cfg_info. current_cfg == Cfg :: True {
0 commit comments