@@ -997,7 +997,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
997
997
pub ( crate ) struct CfgInfo {
998
998
hidden_cfg : FxHashSet < Cfg > ,
999
999
current_cfg : Cfg ,
1000
- doc_auto_cfg_active : bool ,
1000
+ auto_cfg_active : bool ,
1001
1001
parent_is_doc_cfg : bool ,
1002
1002
}
1003
1003
@@ -1012,7 +1012,7 @@ impl Default for CfgInfo {
1012
1012
. into_iter ( )
1013
1013
. collect ( ) ,
1014
1014
current_cfg : Cfg :: True ,
1015
- doc_auto_cfg_active : true ,
1015
+ auto_cfg_active : true ,
1016
1016
parent_is_doc_cfg : false ,
1017
1017
}
1018
1018
}
@@ -1129,7 +1129,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1129
1129
match & attr. kind {
1130
1130
MetaItemKind :: Word => {
1131
1131
if let Some ( first_change) = changed_auto_active_status {
1132
- if !cfg_info. doc_auto_cfg_active {
1132
+ if !cfg_info. auto_cfg_active {
1133
1133
tcx. sess . dcx ( ) . struct_span_err (
1134
1134
vec ! [ first_change, attr. span] ,
1135
1135
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1139,12 +1139,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1139
1139
} else {
1140
1140
changed_auto_active_status = Some ( attr. span ) ;
1141
1141
}
1142
- cfg_info. doc_auto_cfg_active = true ;
1142
+ cfg_info. auto_cfg_active = true ;
1143
1143
}
1144
1144
MetaItemKind :: NameValue ( lit) => {
1145
1145
if let LitKind :: Bool ( value) = lit. kind {
1146
1146
if let Some ( first_change) = changed_auto_active_status {
1147
- if cfg_info. doc_auto_cfg_active != value {
1147
+ if cfg_info. auto_cfg_active != value {
1148
1148
tcx. sess . dcx ( ) . struct_span_err (
1149
1149
vec ! [ first_change, attr. span] ,
1150
1150
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1154,12 +1154,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1154
1154
} else {
1155
1155
changed_auto_active_status = Some ( attr. span ) ;
1156
1156
}
1157
- cfg_info. doc_auto_cfg_active = value;
1157
+ cfg_info. auto_cfg_active = value;
1158
1158
}
1159
1159
}
1160
1160
MetaItemKind :: List ( sub_attrs) => {
1161
1161
if let Some ( first_change) = changed_auto_active_status {
1162
- if !cfg_info. doc_auto_cfg_active {
1162
+ if !cfg_info. auto_cfg_active {
1163
1163
tcx. sess . dcx ( ) . struct_span_err (
1164
1164
vec ! [ first_change, attr. span] ,
1165
1165
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1170,7 +1170,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1170
1170
changed_auto_active_status = Some ( attr. span ) ;
1171
1171
}
1172
1172
// Whatever happens next, the feature is enabled again.
1173
- cfg_info. doc_auto_cfg_active = true ;
1173
+ cfg_info. auto_cfg_active = true ;
1174
1174
for sub_attr in sub_attrs. iter ( ) {
1175
1175
if let Some ( ident) = sub_attr. ident ( )
1176
1176
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1228,7 +1228,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1228
1228
1229
1229
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1230
1230
// to be done here.
1231
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1231
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1232
1232
None
1233
1233
} else if cfg_info. parent_is_doc_cfg {
1234
1234
if cfg_info. current_cfg == Cfg :: True {
0 commit comments