@@ -150,6 +150,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
150
150
151
151
// #23121. Array patterns have some hazards yet.
152
152
( "slice_patterns" , "1.0.0" , Active ) ,
153
+
154
+ // Allows use of unary negate on unsigned integers, e.g. -e for e: u8
155
+ ( "negate_unsigned" , "1.0.0" , Active ) ,
153
156
] ;
154
157
// (changing above list without updating src/doc/reference.md makes @cmr sad)
155
158
@@ -319,6 +322,7 @@ pub struct Features {
319
322
pub allow_custom_derive : bool ,
320
323
pub simd_ffi : bool ,
321
324
pub unmarked_api : bool ,
325
+ pub negate_unsigned : bool ,
322
326
/// spans of #![feature] attrs for stable language features. for error reporting
323
327
pub declared_stable_lang_features : Vec < Span > ,
324
328
/// #![feature] attrs for non-language (library) features
@@ -340,6 +344,7 @@ impl Features {
340
344
allow_custom_derive : false ,
341
345
simd_ffi : false ,
342
346
unmarked_api : false ,
347
+ negate_unsigned : false ,
343
348
declared_stable_lang_features : Vec :: new ( ) ,
344
349
declared_lib_features : Vec :: new ( )
345
350
}
@@ -712,6 +717,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler,
712
717
allow_custom_derive : cx. has_feature ( "custom_derive" ) ,
713
718
simd_ffi : cx. has_feature ( "simd_ffi" ) ,
714
719
unmarked_api : cx. has_feature ( "unmarked_api" ) ,
720
+ negate_unsigned : cx. has_feature ( "negate_unsigned" ) ,
715
721
declared_stable_lang_features : accepted_features,
716
722
declared_lib_features : unknown_features
717
723
}
0 commit comments