]> git.lizzy.rs Git - rust.git/commitdiff
core: Derive Default for Wrapping<T>
authorCristi Cobzarenco <cristi.cobzarenco@gmail.com>
Wed, 7 Oct 2015 20:31:36 +0000 (21:31 +0100)
committerCristi Cobzarenco <cristi.cobzarenco@gmail.com>
Wed, 7 Oct 2015 20:31:36 +0000 (21:31 +0100)
src/libcore/num/mod.rs

index 6507bb7bf8c8286c4f5c4e9dfb9c1c50849148b4..e942e8b69235175c34fab582d87dbb20900e1897 100644 (file)
@@ -39,7 +39,7 @@
 /// all standard arithmetic operations on the underlying value are
 /// intended to have wrapping semantics.
 #[stable(feature = "rust1", since = "1.0.0")]
-#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
+#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default)]
 pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T);
 
 pub mod wrapping;