@@ -241,7 +241,10 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
241
241
( "cfg_target_thread_local" , "1.7.0" , Some ( 29594 ) , Active ) ,
242
242
243
243
// rustc internal
244
- ( "abi_vectorcall" , "1.7.0" , None , Active )
244
+ ( "abi_vectorcall" , "1.7.0" , None , Active ) ,
245
+
246
+ // a...b and ...b
247
+ ( "inclusive_range_syntax" , "1.7.0" , Some ( 28237 ) , Active ) ,
245
248
] ;
246
249
// (changing above list without updating src/doc/reference.md makes @cmr sad)
247
250
@@ -549,6 +552,7 @@ pub struct Features {
549
552
pub allow_placement_in : bool ,
550
553
pub allow_box : bool ,
551
554
pub allow_pushpop_unsafe : bool ,
555
+ pub allow_inclusive_range : bool ,
552
556
pub simd_ffi : bool ,
553
557
pub unmarked_api : bool ,
554
558
/// spans of #![feature] attrs for stable language features. for error reporting
@@ -585,6 +589,7 @@ impl Features {
585
589
allow_placement_in : false ,
586
590
allow_box : false ,
587
591
allow_pushpop_unsafe : false ,
592
+ allow_inclusive_range : false ,
588
593
simd_ffi : false ,
589
594
unmarked_api : false ,
590
595
declared_stable_lang_features : Vec :: new ( ) ,
@@ -998,6 +1003,11 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
998
1003
self . gate_feature ( "type_ascription" , e. span ,
999
1004
"type ascription is experimental" ) ;
1000
1005
}
1006
+ ast:: ExprRange ( _, _, ast:: RangeLimits :: Closed ) => {
1007
+ self . gate_feature ( "inclusive_range_syntax" ,
1008
+ e. span ,
1009
+ "inclusive range syntax is experimental" ) ;
1010
+ }
1001
1011
_ => { }
1002
1012
}
1003
1013
visit:: walk_expr ( self , e) ;
@@ -1184,6 +1194,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &Handler,
1184
1194
allow_placement_in : cx. has_feature ( "placement_in_syntax" ) ,
1185
1195
allow_box : cx. has_feature ( "box_syntax" ) ,
1186
1196
allow_pushpop_unsafe : cx. has_feature ( "pushpop_unsafe" ) ,
1197
+ allow_inclusive_range : cx. has_feature ( "inclusive_range_syntax" ) ,
1187
1198
simd_ffi : cx. has_feature ( "simd_ffi" ) ,
1188
1199
unmarked_api : cx. has_feature ( "unmarked_api" ) ,
1189
1200
declared_stable_lang_features : accepted_features,
0 commit comments