@@ -926,7 +926,7 @@ pub(crate) fn hir_attr_lists<'a, I: IntoIterator<Item = &'a hir::Attribute>>(
926
926
pub ( crate ) struct CfgInfo {
927
927
hidden_cfg : FxHashSet < Cfg > ,
928
928
current_cfg : Cfg ,
929
- doc_auto_cfg_active : bool ,
929
+ auto_cfg_active : bool ,
930
930
parent_is_doc_cfg : bool ,
931
931
}
932
932
@@ -941,7 +941,7 @@ impl Default for CfgInfo {
941
941
. into_iter ( )
942
942
. collect ( ) ,
943
943
current_cfg : Cfg :: True ,
944
- doc_auto_cfg_active : true ,
944
+ auto_cfg_active : true ,
945
945
parent_is_doc_cfg : false ,
946
946
}
947
947
}
@@ -1058,7 +1058,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1058
1058
match & attr. kind {
1059
1059
MetaItemKind :: Word => {
1060
1060
if let Some ( first_change) = changed_auto_active_status {
1061
- if !cfg_info. doc_auto_cfg_active {
1061
+ if !cfg_info. auto_cfg_active {
1062
1062
tcx. sess . dcx ( ) . struct_span_err (
1063
1063
vec ! [ first_change, attr. span] ,
1064
1064
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1068,12 +1068,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1068
1068
} else {
1069
1069
changed_auto_active_status = Some ( attr. span ) ;
1070
1070
}
1071
- cfg_info. doc_auto_cfg_active = true ;
1071
+ cfg_info. auto_cfg_active = true ;
1072
1072
}
1073
1073
MetaItemKind :: NameValue ( lit) => {
1074
1074
if let LitKind :: Bool ( value) = lit. kind {
1075
1075
if let Some ( first_change) = changed_auto_active_status {
1076
- if cfg_info. doc_auto_cfg_active != value {
1076
+ if cfg_info. auto_cfg_active != value {
1077
1077
tcx. sess . dcx ( ) . struct_span_err (
1078
1078
vec ! [ first_change, attr. span] ,
1079
1079
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1083,12 +1083,12 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1083
1083
} else {
1084
1084
changed_auto_active_status = Some ( attr. span ) ;
1085
1085
}
1086
- cfg_info. doc_auto_cfg_active = value;
1086
+ cfg_info. auto_cfg_active = value;
1087
1087
}
1088
1088
}
1089
1089
MetaItemKind :: List ( sub_attrs) => {
1090
1090
if let Some ( first_change) = changed_auto_active_status {
1091
- if !cfg_info. doc_auto_cfg_active {
1091
+ if !cfg_info. auto_cfg_active {
1092
1092
tcx. sess . dcx ( ) . struct_span_err (
1093
1093
vec ! [ first_change, attr. span] ,
1094
1094
"`auto_cfg` was disabled and enabled more than once on the same item" ,
@@ -1099,7 +1099,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1099
1099
changed_auto_active_status = Some ( attr. span ) ;
1100
1100
}
1101
1101
// Whatever happens next, the feature is enabled again.
1102
- cfg_info. doc_auto_cfg_active = true ;
1102
+ cfg_info. auto_cfg_active = true ;
1103
1103
for sub_attr in sub_attrs. iter ( ) {
1104
1104
if let Some ( ident) = sub_attr. ident ( )
1105
1105
&& ( ident. name == sym:: show || ident. name == sym:: hide)
@@ -1157,7 +1157,7 @@ pub(crate) fn extract_cfg_from_attrs<'a, I: Iterator<Item = &'a hir::Attribute>
1157
1157
1158
1158
// If `doc(auto_cfg)` feature is disabled and `doc(cfg())` wasn't used, there is nothing
1159
1159
// to be done here.
1160
- if !cfg_info. doc_auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1160
+ if !cfg_info. auto_cfg_active && !cfg_info. parent_is_doc_cfg {
1161
1161
None
1162
1162
} else if cfg_info. parent_is_doc_cfg {
1163
1163
if cfg_info. current_cfg == Cfg :: True {
0 commit comments