@@ -992,7 +992,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
992
992
pub ( crate ) struct CfgInfo {
993
993
hidden_cfg : FxHashSet < Cfg > ,
994
994
current_cfg : Cfg ,
995
- doc_auto_cfg_active : bool ,
995
+ auto_cfg_active : bool ,
996
996
parent_is_doc_cfg : bool ,
997
997
}
998
998
@@ -1007,7 +1007,7 @@ impl Default for CfgInfo {
1007
1007
. into_iter ( )
1008
1008
. collect ( ) ,
1009
1009
current_cfg : Cfg :: True ,
1010
- doc_auto_cfg_active : true ,
1010
+ auto_cfg_active : true ,
1011
1011
parent_is_doc_cfg : false ,
1012
1012
}
1013
1013
}
@@ -1131,7 +1131,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1131
1131
match & attr. kind {
1132
1132
MetaItemKind :: Word => {
1133
1133
if let Some ( first_change) = changed_auto_active_status {
1134
- if !cfg_info. doc_auto_cfg_active {
1134
+ if !cfg_info. auto_cfg_active {
1135
1135
tcx. sess . dcx ( ) . struct_span_err (
1136
1136
vec ! [ first_change, attr. span] ,
1137
1137
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1141,12 +1141,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1141
1141
} else {
1142
1142
changed_auto_active_status = Some ( attr. span ) ;
1143
1143
}
1144
- cfg_info. doc_auto_cfg_active = true ;
1144
+ cfg_info. auto_cfg_active = true ;
1145
1145
}
1146
1146
MetaItemKind :: NameValue ( lit) => {
1147
1147
if let LitKind :: Bool ( value) = lit. kind {
1148
1148
if let Some ( first_change) = changed_auto_active_status {
1149
- if cfg_info. doc_auto_cfg_active != value {
1149
+ if cfg_info. auto_cfg_active != value {
1150
1150
tcx. sess . dcx ( ) . struct_span_err (
1151
1151
vec ! [ first_change, attr. span] ,
1152
1152
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1156,12 +1156,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1156
1156
} else {
1157
1157
changed_auto_active_status = Some ( attr. span ) ;
1158
1158
}
1159
- cfg_info. doc_auto_cfg_active = value;
1159
+ cfg_info. auto_cfg_active = value;
1160
1160
}
1161
1161
}
1162
1162
MetaItemKind :: List ( sub_attrs) => {
1163
1163
if let Some ( first_change) = changed_auto_active_status {
1164
- if !cfg_info. doc_auto_cfg_active {
1164
+ if !cfg_info. auto_cfg_active {
1165
1165
tcx. sess . dcx ( ) . struct_span_err (
1166
1166
vec ! [ first_change, attr. span] ,
1167
1167
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1172,7 +1172,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1172
1172
changed_auto_active_status = Some ( attr. span ) ;
1173
1173
}
1174
1174
// Whatever happens next, the feature is enabled again.
1175
- cfg_info. doc_auto_cfg_active = true ;
1175
+ cfg_info. auto_cfg_active = true ;
1176
1176
for sub_attr in sub_attrs. iter ( ) {
1177
1177
if let Some ( ident) = sub_attr. ident ( )
1178
1178
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1231,7 +1231,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1231
1231
1232
1232
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1233
1233
// to be done here.
1234
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1234
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1235
1235
None
1236
1236
} else if cfg_info. parent_is_doc_cfg {
1237
1237
if cfg_info. current_cfg == Cfg :: True {
0 commit comments