Skip to content

Commit 8445009

Browse files
committed
Add Clone and DeepClone constraints to Primitive trait
1 parent 0fcb859 commit 8445009

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/num/num.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
1616
#[allow(missing_doc)];
1717

18+
use clone::{Clone, DeepClone};
1819
use cmp::{Eq, ApproxEq, Ord};
1920
use ops::{Add, Sub, Mul, Div, Rem, Neg};
2021
use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
@@ -274,7 +275,9 @@ pub trait Bounded {
274275
/// Specifies the available operations common to all of Rust's core numeric primitives.
275276
/// These may not always make sense from a purely mathematical point of view, but
276277
/// may be useful for systems programming.
277-
pub trait Primitive: Num
278+
pub trait Primitive: Clone
279+
+ DeepClone
280+
+ Num
278281
+ NumCast
279282
+ Bounded
280283
+ Neg<Self>

0 commit comments

Comments
 (0)