stabilize const_int_sign

This commit is contained in:
Trevor Spiteri 2020-06-29 10:36:41 +02:00
parent c1c674c2db
commit 056d925167
2 changed files with 2 additions and 3 deletions

View file

@ -2203,7 +2203,8 @@ assert_eq!((-10", stringify!($SelfT), ").signum(), -1);",
$EndFeature, "
```"),
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_sign", issue = "53718")]
#[rustc_const_stable(feature = "const_int_sign", since = "1.46.0")]
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
#[inline]
pub const fn signum(self) -> Self {
match self {

View file

@ -1,7 +1,5 @@
// run-pass
#![feature(const_int_sign)]
const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
const POSITIVE_A: bool = (-10i32).is_positive();