@@ -1024,7 +1024,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1024
1024
pub ( crate ) struct CfgInfo {
1025
1025
hidden_cfg : FxHashSet < Cfg > ,
1026
1026
current_cfg : Cfg ,
1027
- doc_auto_cfg_active : bool ,
1027
+ auto_cfg_active : bool ,
1028
1028
parent_is_doc_cfg : bool ,
1029
1029
}
1030
1030
@@ -1039,7 +1039,7 @@ impl Default for CfgInfo {
1039
1039
. into_iter ( )
1040
1040
. collect ( ) ,
1041
1041
current_cfg : Cfg :: True ,
1042
- doc_auto_cfg_active : true ,
1042
+ auto_cfg_active : true ,
1043
1043
parent_is_doc_cfg : false ,
1044
1044
}
1045
1045
}
@@ -1156,7 +1156,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1156
1156
match & attr. kind {
1157
1157
MetaItemKind :: Word => {
1158
1158
if let Some ( first_change) = changed_auto_active_status {
1159
- if !cfg_info. doc_auto_cfg_active {
1159
+ if !cfg_info. auto_cfg_active {
1160
1160
tcx. sess . dcx ( ) . struct_span_err (
1161
1161
vec ! [ first_change, attr. span] ,
1162
1162
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1166,12 +1166,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1166
1166
} else {
1167
1167
changed_auto_active_status = Some ( attr. span ) ;
1168
1168
}
1169
- cfg_info. doc_auto_cfg_active = true ;
1169
+ cfg_info. auto_cfg_active = true ;
1170
1170
}
1171
1171
MetaItemKind :: NameValue ( lit) => {
1172
1172
if let LitKind :: Bool ( value) = lit. kind {
1173
1173
if let Some ( first_change) = changed_auto_active_status {
1174
- if cfg_info. doc_auto_cfg_active != value {
1174
+ if cfg_info. auto_cfg_active != value {
1175
1175
tcx. sess . dcx ( ) . struct_span_err (
1176
1176
vec ! [ first_change, attr. span] ,
1177
1177
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1181,12 +1181,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1181
1181
} else {
1182
1182
changed_auto_active_status = Some ( attr. span ) ;
1183
1183
}
1184
- cfg_info. doc_auto_cfg_active = value;
1184
+ cfg_info. auto_cfg_active = value;
1185
1185
}
1186
1186
}
1187
1187
MetaItemKind :: List ( sub_attrs) => {
1188
1188
if let Some ( first_change) = changed_auto_active_status {
1189
- if !cfg_info. doc_auto_cfg_active {
1189
+ if !cfg_info. auto_cfg_active {
1190
1190
tcx. sess . dcx ( ) . struct_span_err (
1191
1191
vec ! [ first_change, attr. span] ,
1192
1192
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1197,7 +1197,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1197
1197
changed_auto_active_status = Some ( attr. span ) ;
1198
1198
}
1199
1199
// Whatever happens next, the feature is enabled again.
1200
- cfg_info. doc_auto_cfg_active = true ;
1200
+ cfg_info. auto_cfg_active = true ;
1201
1201
for sub_attr in sub_attrs. iter ( ) {
1202
1202
if let Some ( ident) = sub_attr. ident ( )
1203
1203
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1255,7 +1255,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1255
1255
1256
1256
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1257
1257
// to be done here.
1258
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1258
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1259
1259
None
1260
1260
} else if cfg_info. parent_is_doc_cfg {
1261
1261
if cfg_info. current_cfg == Cfg :: True {
0 commit comments