core: Inherit the unit module
This commit is contained in:
parent
dfd967f239
commit
e7eed5f670
@ -38,6 +38,7 @@ pub mod container;
|
||||
|
||||
/* Core types and methods on primitives */
|
||||
|
||||
mod unit;
|
||||
pub mod any;
|
||||
pub mod finally;
|
||||
pub mod raw;
|
||||
|
@ -14,7 +14,6 @@
|
||||
use default::Default;
|
||||
#[cfg(not(test))]
|
||||
use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd};
|
||||
use fmt;
|
||||
|
||||
#[cfg(not(test))]
|
||||
impl Eq for () {
|
||||
@ -44,9 +43,3 @@ impl Default for () {
|
||||
#[inline]
|
||||
fn default() -> () { () }
|
||||
}
|
||||
|
||||
impl fmt::Show for () {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("()")
|
||||
}
|
||||
}
|
@ -1250,6 +1250,12 @@ impl<'a> Show for &'a any::Any {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") }
|
||||
}
|
||||
|
||||
impl Show for () {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
f.pad("()")
|
||||
}
|
||||
}
|
||||
|
||||
impl Show for TypeId {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
write!(f.buf, "TypeId \\{ {} \\}", self.hash())
|
||||
|
@ -190,7 +190,6 @@ pub mod prelude;
|
||||
#[path = "num/f32.rs"] pub mod f32;
|
||||
#[path = "num/f64.rs"] pub mod f64;
|
||||
|
||||
pub mod unit;
|
||||
pub mod bool;
|
||||
pub mod tuple;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user