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