@@ -991,7 +991,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
991
991
pub ( crate ) struct CfgInfo {
992
992
hidden_cfg : FxHashSet < Cfg > ,
993
993
current_cfg : Cfg ,
994
- doc_auto_cfg_active : bool ,
994
+ auto_cfg_active : bool ,
995
995
parent_is_doc_cfg : bool ,
996
996
}
997
997
@@ -1006,7 +1006,7 @@ impl Default for CfgInfo {
1006
1006
. into_iter ( )
1007
1007
. collect ( ) ,
1008
1008
current_cfg : Cfg :: True ,
1009
- doc_auto_cfg_active : true ,
1009
+ auto_cfg_active : true ,
1010
1010
parent_is_doc_cfg : false ,
1011
1011
}
1012
1012
}
@@ -1123,7 +1123,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1123
1123
match & attr. kind {
1124
1124
MetaItemKind :: Word => {
1125
1125
if let Some ( first_change) = changed_auto_active_status {
1126
- if !cfg_info. doc_auto_cfg_active {
1126
+ if !cfg_info. auto_cfg_active {
1127
1127
tcx. sess . dcx ( ) . struct_span_err (
1128
1128
vec ! [ first_change, attr. span] ,
1129
1129
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1133,12 +1133,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1133
1133
} else {
1134
1134
changed_auto_active_status = Some ( attr. span ) ;
1135
1135
}
1136
- cfg_info. doc_auto_cfg_active = true ;
1136
+ cfg_info. auto_cfg_active = true ;
1137
1137
}
1138
1138
MetaItemKind :: NameValue ( lit) => {
1139
1139
if let LitKind :: Bool ( value) = lit. kind {
1140
1140
if let Some ( first_change) = changed_auto_active_status {
1141
- if cfg_info. doc_auto_cfg_active != value {
1141
+ if cfg_info. auto_cfg_active != value {
1142
1142
tcx. sess . dcx ( ) . struct_span_err (
1143
1143
vec ! [ first_change, attr. span] ,
1144
1144
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1148,12 +1148,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1148
1148
} else {
1149
1149
changed_auto_active_status = Some ( attr. span ) ;
1150
1150
}
1151
- cfg_info. doc_auto_cfg_active = value;
1151
+ cfg_info. auto_cfg_active = value;
1152
1152
}
1153
1153
}
1154
1154
MetaItemKind :: List ( sub_attrs) => {
1155
1155
if let Some ( first_change) = changed_auto_active_status {
1156
- if !cfg_info. doc_auto_cfg_active {
1156
+ if !cfg_info. auto_cfg_active {
1157
1157
tcx. sess . dcx ( ) . struct_span_err (
1158
1158
vec ! [ first_change, attr. span] ,
1159
1159
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1164,7 +1164,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1164
1164
changed_auto_active_status = Some ( attr. span ) ;
1165
1165
}
1166
1166
// Whatever happens next, the feature is enabled again.
1167
- cfg_info. doc_auto_cfg_active = true ;
1167
+ cfg_info. auto_cfg_active = true ;
1168
1168
for sub_attr in sub_attrs. iter ( ) {
1169
1169
if let Some ( ident) = sub_attr. ident ( )
1170
1170
&& ( 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