Skip to content

Commit f5906f4

Browse files
committed
Remove Neg from Num trait
As per rust-lang/rust#23945, Neg is no longer implemented for unsigned types. Signed-off-by: Anders Kaseorg <[email protected]>
1 parent ea58de3 commit f5906f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/traits.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
33
// Note copied from the stdlib under MIT license
44

5-
use std::ops::{ Add, Div, Mul, Neg, Rem, Sub };
5+
use std::ops::{ Add, Div, Mul, Rem, Sub };
66
use std::num::{ Float, Int, NumCast };
77
use std::marker::Reflect;
88

99
/// Num trait from old stdlib
10-
pub trait Num: Zero + One + Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Rem<Output=Self> + Neg<Output=Self> + PartialEq<Self> { }
11-
impl<A: Zero + One + Add<Output=A> + Sub<Output=A> + Mul<Output=A> + Div<Output=A> + Rem<Output=A> + Neg<Output=A> + PartialEq<A>> Num for A { }
10+
pub trait Num: Zero + One + Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Rem<Output=Self> + PartialEq<Self> { }
11+
impl<A: Zero + One + Add<Output=A> + Sub<Output=A> + Mul<Output=A> + Div<Output=A> + Rem<Output=A> + PartialEq<A>> Num for A { }
1212

1313
/// Zero trait from old stdlib
1414
pub trait Zero: Add<Output=Self> {

0 commit comments

Comments
 (0)