@@ -1011,7 +1011,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
1011
1011
pub ( crate ) struct CfgInfo {
1012
1012
hidden_cfg : FxHashSet < Cfg > ,
1013
1013
current_cfg : Cfg ,
1014
- doc_auto_cfg_active : bool ,
1014
+ auto_cfg_active : bool ,
1015
1015
parent_is_doc_cfg : bool ,
1016
1016
}
1017
1017
@@ -1026,7 +1026,7 @@ impl Default for CfgInfo {
1026
1026
. into_iter ( )
1027
1027
. collect ( ) ,
1028
1028
current_cfg : Cfg :: True ,
1029
- doc_auto_cfg_active : true ,
1029
+ auto_cfg_active : true ,
1030
1030
parent_is_doc_cfg : false ,
1031
1031
}
1032
1032
}
@@ -1150,7 +1150,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1150
1150
match & attr. kind {
1151
1151
MetaItemKind :: Word => {
1152
1152
if let Some ( first_change) = changed_auto_active_status {
1153
- if !cfg_info. doc_auto_cfg_active {
1153
+ if !cfg_info. auto_cfg_active {
1154
1154
tcx. sess . dcx ( ) . struct_span_err (
1155
1155
vec ! [ first_change, attr. span] ,
1156
1156
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1160,12 +1160,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1160
1160
} else {
1161
1161
changed_auto_active_status = Some ( attr. span ) ;
1162
1162
}
1163
- cfg_info. doc_auto_cfg_active = true ;
1163
+ cfg_info. auto_cfg_active = true ;
1164
1164
}
1165
1165
MetaItemKind :: NameValue ( lit) => {
1166
1166
if let LitKind :: Bool ( value) = lit. kind {
1167
1167
if let Some ( first_change) = changed_auto_active_status {
1168
- if cfg_info. doc_auto_cfg_active != value {
1168
+ if cfg_info. auto_cfg_active != value {
1169
1169
tcx. sess . dcx ( ) . struct_span_err (
1170
1170
vec ! [ first_change, attr. span] ,
1171
1171
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1175,12 +1175,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1175
1175
} else {
1176
1176
changed_auto_active_status = Some ( attr. span ) ;
1177
1177
}
1178
- cfg_info. doc_auto_cfg_active = value;
1178
+ cfg_info. auto_cfg_active = value;
1179
1179
}
1180
1180
}
1181
1181
MetaItemKind :: List ( sub_attrs) => {
1182
1182
if let Some ( first_change) = changed_auto_active_status {
1183
- if !cfg_info. doc_auto_cfg_active {
1183
+ if !cfg_info. auto_cfg_active {
1184
1184
tcx. sess . dcx ( ) . struct_span_err (
1185
1185
vec ! [ first_change, attr. span] ,
1186
1186
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1191,7 +1191,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1191
1191
changed_auto_active_status = Some ( attr. span ) ;
1192
1192
}
1193
1193
// Whatever happens next, the feature is enabled again.
1194
- cfg_info. doc_auto_cfg_active = true ;
1194
+ cfg_info. auto_cfg_active = true ;
1195
1195
for sub_attr in sub_attrs. iter ( ) {
1196
1196
if let Some ( ident) = sub_attr. ident ( )
1197
1197
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1250,7 +1250,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1250
1250
1251
1251
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1252
1252
// to be done here.
1253
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1253
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1254
1254
None
1255
1255
} else if cfg_info. parent_is_doc_cfg {
1256
1256
if cfg_info. current_cfg == Cfg :: True {
0 commit comments