about summary refs log tree commit diff
path: root/src/libnum/integer.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-22 23:50:30 +0000
committerbors <bors@rust-lang.org>2014-09-22 23:50:30 +0000
commit43fd619819b334b8548dca98797bd4c8078636cb (patch)
tree5d0942d04d12717768a4bab5a2b608a53bf25e69 /src/libnum/integer.rs
parent4b5f4563bff67e2727befdb235314726849331a7 (diff)
parentd845857fd915a2044f74711db3b7e71146b35200 (diff)
downloadrust-43fd619819b334b8548dca98797bd4c8078636cb.tar.gz
rust-43fd619819b334b8548dca98797bd4c8078636cb.zip
auto merge of #17286 : vberger/rust/deprecated_in_macros, r=aturon
Closes #17185.

The stability lint will now check code generated by macro expansion. It will allow to detect :
- arguments passed to macros using deprecated (and others) items
- macro expansion generating code using deprecated items due to its arguments (hence the second commit, fixing such issue found in libcollections)

Checking is still done at expansion, but it will also detect a macro explicitly using a deprecated item in its definition.
Diffstat (limited to 'src/libnum/integer.rs')
-rw-r--r--src/libnum/integer.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libnum/integer.rs b/src/libnum/integer.rs
index f5ac5831ea5..7c786976699 100644
--- a/src/libnum/integer.rs
+++ b/src/libnum/integer.rs
@@ -18,6 +18,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert!(( 8i).div_floor(& 3) ==  2);
     /// assert!(( 8i).div_floor(&-3) == -3);
@@ -34,6 +35,7 @@ pub trait Integer: Num + PartialOrd
     /// Floored integer modulo, satisfying:
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// # let n = 1i; let d = 1i;
     /// assert!(n.div_floor(&d) * d + n.mod_floor(&d) == n)
@@ -42,6 +44,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert!(( 8i).mod_floor(& 3) ==  2);
     /// assert!(( 8i).mod_floor(&-3) == -1);
@@ -60,6 +63,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(6i.gcd(&8), 2);
     /// assert_eq!(7i.gcd(&3), 1);
@@ -71,6 +75,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(7i.lcm(&3), 21);
     /// assert_eq!(2i.lcm(&4), 4);
@@ -86,6 +91,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(9i.is_multiple_of(&3), true);
     /// assert_eq!(3i.is_multiple_of(&9), false);
@@ -97,6 +103,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(3i.is_even(), false);
     /// assert_eq!(4i.is_even(), true);
@@ -108,6 +115,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(3i.is_odd(), true);
     /// assert_eq!(4i.is_odd(), false);
@@ -120,6 +128,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(( 8i).div_rem( &3), ( 2,  2));
     /// assert_eq!(( 8i).div_rem(&-3), (-2,  2));
@@ -142,6 +151,7 @@ pub trait Integer: Num + PartialOrd
     /// # Examples
     ///
     /// ```
+    /// # #![allow(deprecated)]
     /// # use num::Integer;
     /// assert_eq!(( 8i).div_mod_floor( &3), ( 2,  2));
     /// assert_eq!(( 8i).div_mod_floor(&-3), (-3, -1));