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