]> git.lizzy.rs Git - rust.git/commitdiff
Add Pod trait bound to std::num::Primitive
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>
Fri, 21 Feb 2014 16:51:56 +0000 (03:51 +1100)
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>
Fri, 21 Feb 2014 16:51:56 +0000 (03:51 +1100)
src/libstd/num/mod.rs

index 8a417096c3ea7522aaf98ccafe7e55cfdfde8117..767faa30f24b602432ad996f6bcda925290cbe9d 100644 (file)
@@ -17,6 +17,7 @@
 
 use clone::{Clone, DeepClone};
 use cmp::{Eq, Ord};
+use kinds::Pod;
 use mem::size_of;
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
 use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
@@ -262,7 +263,8 @@ fn count_zeros(&self) -> Self {
 /// 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: Clone
+pub trait Primitive: Pod
+                   + Clone
                    + DeepClone
                    + Num
                    + NumCast