@@ -1009,7 +1009,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1009
1009
pub ( crate ) struct CfgInfo {
1010
1010
hidden_cfg : FxHashSet < Cfg > ,
1011
1011
current_cfg : Cfg ,
1012
- doc_auto_cfg_active : bool ,
1012
+ auto_cfg_active : bool ,
1013
1013
parent_is_doc_cfg : bool ,
1014
1014
}
1015
1015
@@ -1024,7 +1024,7 @@ impl Default for CfgInfo {
1024
1024
. into_iter ( )
1025
1025
. collect ( ) ,
1026
1026
current_cfg : Cfg :: True ,
1027
- doc_auto_cfg_active : true ,
1027
+ auto_cfg_active : true ,
1028
1028
parent_is_doc_cfg : false ,
1029
1029
}
1030
1030
}
@@ -1141,7 +1141,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1141
1141
match & attr. kind {
1142
1142
MetaItemKind :: Word => {
1143
1143
if let Some ( first_change) = changed_auto_active_status {
1144
- if !cfg_info. doc_auto_cfg_active {
1144
+ if !cfg_info. auto_cfg_active {
1145
1145
tcx. sess . dcx ( ) . struct_span_err (
1146
1146
vec ! [ first_change, attr. span] ,
1147
1147
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1151,12 +1151,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1151
1151
} else {
1152
1152
changed_auto_active_status = Some ( attr. span ) ;
1153
1153
}
1154
- cfg_info. doc_auto_cfg_active = true ;
1154
+ cfg_info. auto_cfg_active = true ;
1155
1155
}
1156
1156
MetaItemKind :: NameValue ( lit) => {
1157
1157
if let LitKind :: Bool ( value) = lit. kind {
1158
1158
if let Some ( first_change) = changed_auto_active_status {
1159
- if cfg_info. doc_auto_cfg_active != value {
1159
+ if cfg_info. auto_cfg_active != value {
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 = value;
1169
+ cfg_info. auto_cfg_active = value;
1170
1170
}
1171
1171
}
1172
1172
MetaItemKind :: List ( sub_attrs) => {
1173
1173
if let Some ( first_change) = changed_auto_active_status {
1174
- if !cfg_info. doc_auto_cfg_active {
1174
+ if !cfg_info. auto_cfg_active {
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" ,
@@ -1182,7 +1182,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1182
1182
changed_auto_active_status = Some ( attr. span ) ;
1183
1183
}
1184
1184
// Whatever happens next, the feature is enabled again.
1185
- cfg_info. doc_auto_cfg_active = true ;
1185
+ cfg_info. auto_cfg_active = true ;
1186
1186
for sub_attr in sub_attrs. iter ( ) {
1187
1187
if let Some ( ident) = sub_attr. ident ( )
1188
1188
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1240,7 +1240,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1240
1240
1241
1241
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1242
1242
// to be done here.
1243
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1243
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1244
1244
None
1245
1245
} else if cfg_info. parent_is_doc_cfg {
1246
1246
if cfg_info. current_cfg == Cfg :: True {
0 commit comments