@@ -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
}
@@ -1124,7 +1124,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1124
1124
match & attr. kind {
1125
1125
MetaItemKind :: Word => {
1126
1126
if let Some ( first_change) = changed_auto_active_status {
1127
- if !cfg_info. doc_auto_cfg_active {
1127
+ if !cfg_info. auto_cfg_active {
1128
1128
tcx. sess . dcx ( ) . struct_span_err (
1129
1129
vec ! [ first_change, attr. span] ,
1130
1130
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1134,12 +1134,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1134
1134
} else {
1135
1135
changed_auto_active_status = Some ( attr. span ) ;
1136
1136
}
1137
- cfg_info. doc_auto_cfg_active = true ;
1137
+ cfg_info. auto_cfg_active = true ;
1138
1138
}
1139
1139
MetaItemKind :: NameValue ( lit) => {
1140
1140
if let LitKind :: Bool ( value) = lit. kind {
1141
1141
if let Some ( first_change) = changed_auto_active_status {
1142
- if cfg_info. doc_auto_cfg_active != value {
1142
+ if cfg_info. auto_cfg_active != value {
1143
1143
tcx. sess . dcx ( ) . struct_span_err (
1144
1144
vec ! [ first_change, attr. span] ,
1145
1145
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1149,12 +1149,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1149
1149
} else {
1150
1150
changed_auto_active_status = Some ( attr. span ) ;
1151
1151
}
1152
- cfg_info. doc_auto_cfg_active = value;
1152
+ cfg_info. auto_cfg_active = value;
1153
1153
}
1154
1154
}
1155
1155
MetaItemKind :: List ( sub_attrs) => {
1156
1156
if let Some ( first_change) = changed_auto_active_status {
1157
- if !cfg_info. doc_auto_cfg_active {
1157
+ if !cfg_info. auto_cfg_active {
1158
1158
tcx. sess . dcx ( ) . struct_span_err (
1159
1159
vec ! [ first_change, attr. span] ,
1160
1160
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1165,7 +1165,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1165
1165
changed_auto_active_status = Some ( attr. span ) ;
1166
1166
}
1167
1167
// Whatever happens next, the feature is enabled again.
1168
- cfg_info. doc_auto_cfg_active = true ;
1168
+ cfg_info. auto_cfg_active = true ;
1169
1169
for sub_attr in sub_attrs. iter ( ) {
1170
1170
if let Some ( ident) = sub_attr. ident ( )
1171
1171
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1223,7 +1223,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1223
1223
1224
1224
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1225
1225
// to be done here.
1226
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1226
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1227
1227
None
1228
1228
} else if cfg_info. parent_is_doc_cfg {
1229
1229
if cfg_info. current_cfg == Cfg :: True {
0 commit comments