diff options
| author | Trevor Spiteri <tspiteri@ieee.org> | 2020-06-29 10:36:41 +0200 |
|---|---|---|
| committer | Trevor Spiteri <tspiteri@ieee.org> | 2020-06-29 10:36:41 +0200 |
| commit | 056d925167318636fcf975c8ffb81efebdc9bca3 (patch) | |
| tree | 49e002f62d3c8d08819d4cc678cf99700c05b6e2 /src | |
| parent | c1c674c2dbfe3f6dc47d11368c1b5ee4ab008799 (diff) | |
| download | rust-056d925167318636fcf975c8ffb81efebdc9bca3.tar.gz rust-056d925167318636fcf975c8ffb81efebdc9bca3.zip | |
stabilize const_int_sign
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/num/mod.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/consts/const-int-sign-rpass.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index c4d574c5bc5..00860476d9c 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -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 { diff --git a/src/test/ui/consts/const-int-sign-rpass.rs b/src/test/ui/consts/const-int-sign-rpass.rs index dc46fce39a9..63c191d4227 100644 --- a/src/test/ui/consts/const-int-sign-rpass.rs +++ b/src/test/ui/consts/const-int-sign-rpass.rs @@ -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(); |
