summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-25 23:20:53 +0200
committerGitHub <noreply@github.com>2019-07-25 23:20:53 +0200
commita57c4f6297876c570af86b455e92e050a22328ad (patch)
treef2747fbdd3ea42432dc49f0a9348074048bc4e4e /src/libstd
parent845e146d04bd3591de04ec4bab25f29927d4723c (diff)
parent72ac8ce9aa50d4456239755076a5dd869232006e (diff)
downloadrust-a57c4f6297876c570af86b455e92e050a22328ad.tar.gz
rust-a57c4f6297876c570af86b455e92e050a22328ad.zip
Rollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,Centril
Stablize Euclidean Modulo (feature euclidean_division)

Closes #49048
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/f32.rs6
-rw-r--r--src/libstd/f64.rs6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs
index 7254c621611..f649170c403 100644
--- a/src/libstd/f32.rs
+++ b/src/libstd/f32.rs
@@ -256,7 +256,6 @@ impl f32 {
     /// # Examples
     ///
     /// ```
-    /// #![feature(euclidean_division)]
     /// let a: f32 = 7.0;
     /// let b = 4.0;
     /// assert_eq!(a.div_euclid(b), 1.0); // 7.0 > 4.0 * 1.0
@@ -265,7 +264,7 @@ impl f32 {
     /// assert_eq!((-a).div_euclid(-b), 2.0); // -7.0 >= -4.0 * 2.0
     /// ```
     #[inline]
-    #[unstable(feature = "euclidean_division", issue = "49048")]
+    #[stable(feature = "euclidean_division", since = "1.38.0")]
     pub fn div_euclid(self, rhs: f32) -> f32 {
         let q = (self / rhs).trunc();
         if self % rhs < 0.0 {
@@ -288,7 +287,6 @@ impl f32 {
     /// # Examples
     ///
     /// ```
-    /// #![feature(euclidean_division)]
     /// let a: f32 = 7.0;
     /// let b = 4.0;
     /// assert_eq!(a.rem_euclid(b), 3.0);
@@ -299,7 +297,7 @@ impl f32 {
     /// assert!((-std::f32::EPSILON).rem_euclid(3.0) != 0.0);
     /// ```
     #[inline]
-    #[unstable(feature = "euclidean_division", issue = "49048")]
+    #[stable(feature = "euclidean_division", since = "1.38.0")]
     pub fn rem_euclid(self, rhs: f32) -> f32 {
         let r = self % rhs;
         if r < 0.0 {
diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs
index f8bb36ad0a8..f61630997dc 100644
--- a/src/libstd/f64.rs
+++ b/src/libstd/f64.rs
@@ -232,7 +232,6 @@ impl f64 {
     /// # Examples
     ///
     /// ```
-    /// #![feature(euclidean_division)]
     /// let a: f64 = 7.0;
     /// let b = 4.0;
     /// assert_eq!(a.div_euclid(b), 1.0); // 7.0 > 4.0 * 1.0
@@ -241,7 +240,7 @@ impl f64 {
     /// assert_eq!((-a).div_euclid(-b), 2.0); // -7.0 >= -4.0 * 2.0
     /// ```
     #[inline]
-    #[unstable(feature = "euclidean_division", issue = "49048")]
+    #[stable(feature = "euclidean_division", since = "1.38.0")]
     pub fn div_euclid(self, rhs: f64) -> f64 {
         let q = (self / rhs).trunc();
         if self % rhs < 0.0 {
@@ -264,7 +263,6 @@ impl f64 {
     /// # Examples
     ///
     /// ```
-    /// #![feature(euclidean_division)]
     /// let a: f64 = 7.0;
     /// let b = 4.0;
     /// assert_eq!(a.rem_euclid(b), 3.0);
@@ -275,7 +273,7 @@ impl f64 {
     /// assert!((-std::f64::EPSILON).rem_euclid(3.0) != 0.0);
     /// ```
     #[inline]
-    #[unstable(feature = "euclidean_division", issue = "49048")]
+    #[stable(feature = "euclidean_division", since = "1.38.0")]
     pub fn rem_euclid(self, rhs: f64) -> f64 {
         let r = self % rhs;
         if r < 0.0 {