about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-01 04:19:35 -0700
committerbors <bors@rust-lang.org>2013-08-01 04:19:35 -0700
commit9824d90ffd7684eca7171c4e019fd85b9317904e (patch)
treec10e64c980b6dae552e2f2a43418d08b89122567 /src/libstd
parent5c6069c7a90761c120cecbd8e18317bce21dd213 (diff)
parenta5912736be38ff10e41b475634119f83b937a072 (diff)
downloadrust-9824d90ffd7684eca7171c4e019fd85b9317904e.tar.gz
rust-9824d90ffd7684eca7171c4e019fd85b9317904e.zip
auto merge of #8155 : stepancheg/rust/unit-zero, r=alexcrichton
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/nil.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstd/nil.rs b/src/libstd/nil.rs
index 40f6d53ed22..81b7662e581 100644
--- a/src/libstd/nil.rs
+++ b/src/libstd/nil.rs
@@ -16,6 +16,10 @@ Functions for the unit type.
 
 #[cfg(not(test))]
 use prelude::*;
+#[cfg(not(test))]
+use num::Zero;
+
+
 
 #[cfg(not(test))]
 impl Eq for () {
@@ -48,3 +52,10 @@ impl TotalEq for () {
     #[inline]
     fn equals(&self, _other: &()) -> bool { true }
 }
+
+#[cfg(not(test))]
+impl Zero for () {
+    fn zero() -> () { () }
+    fn is_zero(&self) -> bool { true }
+}
+