@@ -477,6 +477,14 @@ declare_features! (
477
477
( active, c_variadic, "1.34.0" , Some ( 44930 ) , None ) ,
478
478
) ;
479
479
480
+ // Some features are known to be incomplete and using them is likely to have
481
+ // unanticipated results, such as compiler crashes. We warn the user about these
482
+ // to alert them.
483
+ const INCOMPLETE_FEATURES : & [ & str ] = & [
484
+ "generic_associated_types" ,
485
+ "const_generics"
486
+ ] ;
487
+
480
488
declare_features ! (
481
489
( removed, import_shadowing, "1.0.0" , None , None , None ) ,
482
490
( removed, managed_boxes, "1.0.0" , None , None , None ) ,
@@ -2150,11 +2158,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
2150
2158
err. emit ( ) ;
2151
2159
}
2152
2160
2153
- // Some features are known to be incomplete and using them is likely to have
2154
- // unanticipated results, such as compiler crashes. We warn the user about these
2155
- // to alert them.
2156
- let incomplete_features = [ "generic_associated_types" , "const_generics" ] ;
2157
-
2158
2161
let mut features = Features :: new ( ) ;
2159
2162
let mut edition_enabled_features = FxHashMap :: default ( ) ;
2160
2163
@@ -2193,7 +2196,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
2193
2196
}
2194
2197
2195
2198
let name = mi. name_or_empty ( ) ;
2196
- if incomplete_features . iter ( ) . any ( |f| name == * f) {
2199
+ if INCOMPLETE_FEATURES . iter ( ) . any ( |f| name == * f) {
2197
2200
span_handler. struct_span_warn (
2198
2201
mi. span ( ) ,
2199
2202
& format ! (
0 commit comments