@@ -179,6 +179,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
179
179
// Allows the definition of `const fn` functions.
180
180
( "const_fn" , "1.2.0" , Some ( 24111 ) , Active ) ,
181
181
182
+ // Allows indexing into constant arrays.
183
+ ( "const_indexing" , "1.4.0" , Some ( 29947 ) , Active ) ,
184
+
182
185
// Allows using #[prelude_import] on glob `use` items.
183
186
//
184
187
// rustc internal
@@ -494,6 +497,7 @@ pub struct Features {
494
497
/// #![feature] attrs for non-language (library) features
495
498
pub declared_lib_features : Vec < ( InternedString , Span ) > ,
496
499
pub const_fn : bool ,
500
+ pub const_indexing : bool ,
497
501
pub static_recursion : bool ,
498
502
pub default_type_parameter_fallback : bool ,
499
503
pub type_macros : bool ,
@@ -525,6 +529,7 @@ impl Features {
525
529
declared_stable_lang_features : Vec :: new ( ) ,
526
530
declared_lib_features : Vec :: new ( ) ,
527
531
const_fn : false ,
532
+ const_indexing : false ,
528
533
static_recursion : false ,
529
534
default_type_parameter_fallback : false ,
530
535
type_macros : false ,
@@ -1097,6 +1102,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler,
1097
1102
declared_stable_lang_features : accepted_features,
1098
1103
declared_lib_features : unknown_features,
1099
1104
const_fn : cx. has_feature ( "const_fn" ) ,
1105
+ const_indexing : cx. has_feature ( "const_indexing" ) ,
1100
1106
static_recursion : cx. has_feature ( "static_recursion" ) ,
1101
1107
default_type_parameter_fallback : cx. has_feature ( "default_type_parameter_fallback" ) ,
1102
1108
type_macros : cx. has_feature ( "type_macros" ) ,
0 commit comments