Skip to content

Commit

Permalink
Remove Neg from Num trait
Browse files Browse the repository at this point in the history
As per rust-lang/rust#23945, Neg is no longer
implemented for unsigned types.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk committed Apr 3, 2015
1 parent 0e26cec commit 44f1883
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Note copied from the stdlib under MIT license

use std::ops::{ Add, Div, Mul, Neg, Rem, Sub };
use std::ops::{ Add, Div, Mul, Rem, Sub };
use std::num::{ Float, Int, NumCast };
use std::marker::Reflect;

/// Num trait from old stdlib
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> { }
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 { }
pub trait Num: Zero + One + Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Rem<Output=Self> + PartialEq<Self> { }
impl<A: Zero + One + Add<Output=A> + Sub<Output=A> + Mul<Output=A> + Div<Output=A> + Rem<Output=A> + PartialEq<A>> Num for A { }

/// Zero trait from old stdlib
pub trait Zero: Add<Output=Self> {
Expand Down

0 comments on commit 44f1883

Please sign in to comment.