about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/int_macros.rs6
-rw-r--r--src/libcore/num/uint_macros.rs6
-rw-r--r--src/libcore/num/wrapping.rs30
3 files changed, 26 insertions, 16 deletions
diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs
index 04311d687ea..3b1612a4ee2 100644
--- a/src/libcore/num/int_macros.rs
+++ b/src/libcore/num/int_macros.rs
@@ -12,12 +12,12 @@
 
 macro_rules! int_module {
     ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
-    ($T:ident, $($attr: tt)*) => (
+    ($T:ident, #[$attr:meta]) => (
         /// The smallest value that can be represented by this integer type.
-        $($attr)*
+        #[$attr]
         pub const MIN: $T = $T::min_value();
         /// The largest value that can be represented by this integer type.
-        $($attr)*
+        #[$attr]
         pub const MAX: $T = $T::max_value();
     )
 }
diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs
index 2e59b39278a..f7e1f78d69e 100644
--- a/src/libcore/num/uint_macros.rs
+++ b/src/libcore/num/uint_macros.rs
@@ -12,12 +12,12 @@
 
 macro_rules! uint_module {
     ($T:ident) => (uint_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
-    ($T:ident, $($attr: tt)*) => (
+    ($T:ident, #[$attr:meta]) => (
         /// The smallest value that can be represented by this integer type.
-        $($attr)*
+        #[$attr]
         pub const MIN: $T = $T::min_value();
         /// The largest value that can be represented by this integer type.
-        $($attr)*
+        #[$attr]
         pub const MAX: $T = $T::max_value();
     )
 }
diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs
index b3c2c25551e..5d9e6ab1294 100644
--- a/src/libcore/num/wrapping.rs
+++ b/src/libcore/num/wrapping.rs
@@ -131,7 +131,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0.wrapping_add(other.0))
             }
         }
-        forward_ref_binop! { impl Add, add for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl Add, add for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl AddAssign for Wrapping<$t> {
@@ -150,7 +151,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0.wrapping_sub(other.0))
             }
         }
-        forward_ref_binop! { impl Sub, sub for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl Sub, sub for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl SubAssign for Wrapping<$t> {
@@ -169,7 +171,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0.wrapping_mul(other.0))
             }
         }
-        forward_ref_binop! { impl Mul, mul for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl Mul, mul for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl MulAssign for Wrapping<$t> {
@@ -188,7 +191,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0.wrapping_div(other.0))
             }
         }
-        forward_ref_binop! { impl Div, div for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl Div, div for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl DivAssign for Wrapping<$t> {
@@ -207,7 +211,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0.wrapping_rem(other.0))
             }
         }
-        forward_ref_binop! { impl Rem, rem for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl Rem, rem for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl RemAssign for Wrapping<$t> {
@@ -226,7 +231,8 @@ macro_rules! wrapping_impl {
                 Wrapping(!self.0)
             }
         }
-        forward_ref_unop! { impl Not, not for Wrapping<$t> }
+        forward_ref_unop! { impl Not, not for Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "rust1", since = "1.0.0")]
         impl BitXor for Wrapping<$t> {
@@ -237,7 +243,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0 ^ other.0)
             }
         }
-        forward_ref_binop! { impl BitXor, bitxor for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl BitXor, bitxor for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl BitXorAssign for Wrapping<$t> {
@@ -256,7 +263,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0 | other.0)
             }
         }
-        forward_ref_binop! { impl BitOr, bitor for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl BitOr, bitor for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl BitOrAssign for Wrapping<$t> {
@@ -275,7 +283,8 @@ macro_rules! wrapping_impl {
                 Wrapping(self.0 & other.0)
             }
         }
-        forward_ref_binop! { impl BitAnd, bitand for Wrapping<$t>, Wrapping<$t> }
+        forward_ref_binop! { impl BitAnd, bitand for Wrapping<$t>, Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
 
         #[stable(feature = "op_assign_traits", since = "1.8.0")]
         impl BitAndAssign for Wrapping<$t> {
@@ -293,7 +302,8 @@ macro_rules! wrapping_impl {
                 Wrapping(0) - self
             }
         }
-        forward_ref_unop! { impl Neg, neg for Wrapping<$t> }
+        forward_ref_unop! { impl Neg, neg for Wrapping<$t>,
+                #[stable(feature = "wrapping_ref", since = "1.14.0")] }
     )*)
 }