@@ -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
}
@@ -1143,7 +1143,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1143
1143
match & attr. kind {
1144
1144
MetaItemKind :: Word => {
1145
1145
if let Some ( first_change) = changed_auto_active_status {
1146
- if !cfg_info. doc_auto_cfg_active {
1146
+ if !cfg_info. auto_cfg_active {
1147
1147
tcx. sess . dcx ( ) . struct_span_err (
1148
1148
vec ! [ first_change, attr. span] ,
1149
1149
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1153,12 +1153,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1153
1153
} else {
1154
1154
changed_auto_active_status = Some ( attr. span ) ;
1155
1155
}
1156
- cfg_info. doc_auto_cfg_active = true ;
1156
+ cfg_info. auto_cfg_active = true ;
1157
1157
}
1158
1158
MetaItemKind :: NameValue ( lit) => {
1159
1159
if let LitKind :: Bool ( value) = lit. kind {
1160
1160
if let Some ( first_change) = changed_auto_active_status {
1161
- if cfg_info. doc_auto_cfg_active != value {
1161
+ if cfg_info. auto_cfg_active != value {
1162
1162
tcx. sess . dcx ( ) . struct_span_err (
1163
1163
vec ! [ first_change, attr. span] ,
1164
1164
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1168,12 +1168,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1168
1168
} else {
1169
1169
changed_auto_active_status = Some ( attr. span ) ;
1170
1170
}
1171
- cfg_info. doc_auto_cfg_active = value;
1171
+ cfg_info. auto_cfg_active = value;
1172
1172
}
1173
1173
}
1174
1174
MetaItemKind :: List ( sub_attrs) => {
1175
1175
if let Some ( first_change) = changed_auto_active_status {
1176
- if !cfg_info. doc_auto_cfg_active {
1176
+ if !cfg_info. auto_cfg_active {
1177
1177
tcx. sess . dcx ( ) . struct_span_err (
1178
1178
vec ! [ first_change, attr. span] ,
1179
1179
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1184,7 +1184,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1184
1184
changed_auto_active_status = Some ( attr. span ) ;
1185
1185
}
1186
1186
// Whatever happens next, the feature is enabled again.
1187
- cfg_info. doc_auto_cfg_active = true ;
1187
+ cfg_info. auto_cfg_active = true ;
1188
1188
for sub_attr in sub_attrs. iter ( ) {
1189
1189
if let Some ( ident) = sub_attr. ident ( )
1190
1190
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1243,7 +1243,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1243
1243
1244
1244
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1245
1245
// to be done here.
1246
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1246
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1247
1247
None
1248
1248
} else if cfg_info. parent_is_doc_cfg {
1249
1249
if cfg_info. current_cfg == Cfg :: True {
0 commit comments