diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-30 20:04:56 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-07 08:12:48 -0700 |
| commit | 5b75e44fb01f0eda10ce8d8df92b80945d894768 (patch) | |
| tree | 5d8a2300e8eacc5afa7d1f98a562c125c5189f92 /src/libstd/fmt | |
| parent | 836d4b96a91cd6a36228d757004655e26e3f2c46 (diff) | |
| download | rust-5b75e44fb01f0eda10ce8d8df92b80945d894768.tar.gz rust-5b75e44fb01f0eda10ce8d8df92b80945d894768.zip | |
core: Inherit the intrinsics module
Diffstat (limited to 'src/libstd/fmt')
| -rw-r--r-- | src/libstd/fmt/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index 38456e195e3..53d6f2fc0d2 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -499,6 +499,7 @@ use str::StrSlice; use str; use slice::{Vector, ImmutableVector}; use slice; +use intrinsics::TypeId; pub use self::num::radix; pub use self::num::Radix; @@ -1241,5 +1242,11 @@ impl<T> Show for *mut T { fn fmt(&self, f: &mut Formatter) -> Result { secret_pointer(self, f) } } +impl Show for TypeId { + fn fmt(&self, f: &mut Formatter) -> Result { + write!(f.buf, "TypeId \\{ {} \\}", self.hash()) + } +} + // If you expected tests to be here, look instead at the run-pass/ifmt.rs test, // it's a lot easier than creating all of the rt::Piece structures here. |
