about summary refs log tree commit diff
path: root/src/libstd/unit.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-13 15:17:21 -0800
committerbors <bors@rust-lang.org>2014-02-13 15:17:21 -0800
commit94d453e459107ed1c5d76f693686b29d31cdc58c (patch)
treeb586a7c785fa57253b3ba1bcaaee5ae1ea167411 /src/libstd/unit.rs
parentcfb87f10ec7d41d0e7f8c68fbb908fc195517d41 (diff)
parent640b22852f59e4505cedfd02c01cc343d5ec0d9e (diff)
downloadrust-94d453e459107ed1c5d76f693686b29d31cdc58c.tar.gz
rust-94d453e459107ed1c5d76f693686b29d31cdc58c.zip
auto merge of #12248 : alexcrichton/rust/rollup, r=alexcrichton
This passed `make check` locally, so hopefully it passes on bors!
Diffstat (limited to 'src/libstd/unit.rs')
-rw-r--r--src/libstd/unit.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/unit.rs b/src/libstd/unit.rs
index 3aa3e020500..b23dafbca69 100644
--- a/src/libstd/unit.rs
+++ b/src/libstd/unit.rs
@@ -14,6 +14,7 @@
 use default::Default;
 #[cfg(not(test))]
 use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd};
+use fmt;
 
 #[cfg(not(test))]
 impl Eq for () {
@@ -46,3 +47,9 @@ impl Default for () {
     #[inline]
     fn default() -> () { () }
 }
+
+impl fmt::Show for () {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.pad("()")
+    }
+}