]> git.lizzy.rs Git - rust.git/commitdiff
Add Clone and DeepClone constraints to Primitive trait
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>
Sat, 7 Sep 2013 07:16:56 +0000 (17:16 +1000)
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>
Sun, 8 Sep 2013 03:48:46 +0000 (13:48 +1000)
src/libstd/num/num.rs

index 724bc6dda015b15bb8cf8be2f7d119b92887c5d9..135124b04c143a4bcb27cdcbf160618507f4ddd9 100644 (file)
@@ -15,6 +15,7 @@
 
 #[allow(missing_doc)];
 
+use clone::{Clone, DeepClone};
 use cmp::{Eq, ApproxEq, Ord};
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
 use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
@@ -274,7 +275,9 @@ pub trait Bounded {
 /// Specifies the available operations common to all of Rust's core numeric primitives.
 /// These may not always make sense from a purely mathematical point of view, but
 /// may be useful for systems programming.
-pub trait Primitive: Num
+pub trait Primitive: Clone
+                   + DeepClone
+                   + Num
                    + NumCast
                    + Bounded
                    + Neg<Self>