@@ -35,7 +35,7 @@ use str::{FromStr, from_str, StrExt};
35
35
/// Simultaneous division and remainder
36
36
#[ inline]
37
37
#[ deprecated = "use division and remainder directly" ]
38
- pub fn div_rem < T : Clone + Div < T , T > + Rem < T , T > > ( x : T , y : T ) -> ( T , T ) {
38
+ pub fn div_rem < T : Clone + Div < Output = T > + Rem < Output = T > > ( x : T , y : T ) -> ( T , T ) {
39
39
( x. clone ( ) / y. clone ( ) , x % y)
40
40
}
41
41
@@ -53,17 +53,17 @@ pub trait Int
53
53
+ NumCast
54
54
+ PartialOrd + Ord
55
55
+ PartialEq + Eq
56
- + Add < Self , Self >
57
- + Sub < Self , Self >
58
- + Mul < Self , Self >
59
- + Div < Self , Self >
60
- + Rem < Self , Self >
56
+ + Add < Output = Self >
57
+ + Sub < Output = Self >
58
+ + Mul < Output = Self >
59
+ + Div < Output = Self >
60
+ + Rem < Output = Self >
61
61
+ Not < Self >
62
- + BitAnd < Self , Self >
63
- + BitOr < Self , Self >
64
- + BitXor < Self , Self >
65
- + Shl < uint , Self >
66
- + Shr < uint , Self >
62
+ + BitAnd < Output = Self >
63
+ + BitOr < Output = Self >
64
+ + BitXor < Output = Self >
65
+ + Shl < uint , Output = Self >
66
+ + Shr < uint , Output = Self >
67
67
{
68
68
/// Returns the `0` value of this integer type.
69
69
// FIXME (#5527): Should be an associated constant
@@ -1246,11 +1246,11 @@ pub trait Float
1246
1246
+ PartialOrd
1247
1247
+ PartialEq
1248
1248
+ Neg < Self >
1249
- + Add < Self , Self >
1250
- + Sub < Self , Self >
1251
- + Mul < Self , Self >
1252
- + Div < Self , Self >
1253
- + Rem < Self , Self >
1249
+ + Add < Output = Self >
1250
+ + Sub < Output = Self >
1251
+ + Mul < Output = Self >
1252
+ + Div < Output = Self >
1253
+ + Rem < Output = Self >
1254
1254
{
1255
1255
/// Returns the NaN value.
1256
1256
fn nan ( ) -> Self ;
@@ -1719,11 +1719,11 @@ macro_rules! trait_impl {
1719
1719
#[ allow( deprecated) ]
1720
1720
pub trait Num : PartialEq + Zero + One
1721
1721
+ Neg < Self >
1722
- + Add < Self , Self >
1723
- + Sub < Self , Self >
1724
- + Mul < Self , Self >
1725
- + Div < Self , Self >
1726
- + Rem < Self , Self > { }
1722
+ + Add < Output = Self >
1723
+ + Sub < Output = Self >
1724
+ + Mul < Output = Self >
1725
+ + Div < Output = Self >
1726
+ + Rem < Output = Self > { }
1727
1727
trait_impl ! { Num for uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
1728
1728
1729
1729
#[ deprecated = "Generalised unsigned numbers are no longer supported" ]
@@ -1737,7 +1737,7 @@ pub trait Primitive: Copy + Clone + Num + NumCast + PartialOrd {}
1737
1737
trait_impl ! { Primitive for uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
1738
1738
1739
1739
#[ deprecated = "The generic `Zero` trait will be removed soon." ]
1740
- pub trait Zero : Add < Self , Self > {
1740
+ pub trait Zero : Add < Output = Self > {
1741
1741
#[ deprecated = "Use `Int::zero()` or `Float::zero()`." ]
1742
1742
fn zero ( ) -> Self ;
1743
1743
#[ deprecated = "Use `x == Int::zero()` or `x == Float::zero()`." ]
@@ -1768,7 +1768,7 @@ zero_impl! { f32, 0.0f32 }
1768
1768
zero_impl ! { f64 , 0.0f64 }
1769
1769
1770
1770
#[ deprecated = "The generic `One` trait will be removed soon." ]
1771
- pub trait One : Mul < Self , Self > {
1771
+ pub trait One : Mul < Output = Self > {
1772
1772
#[ deprecated = "Use `Int::one()` or `Float::one()`." ]
1773
1773
fn one ( ) -> Self ;
1774
1774
}
0 commit comments