From e7eed5f670e8b283e7afcba5c79b3b208167a647 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 30 Apr 2014 20:50:56 -0700 Subject: core: Inherit the unit module --- src/libstd/unit.rs | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/libstd/unit.rs (limited to 'src/libstd/unit.rs') diff --git a/src/libstd/unit.rs b/src/libstd/unit.rs deleted file mode 100644 index 38307f415ac..00000000000 --- a/src/libstd/unit.rs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Functions for the unit type. - -#[cfg(not(test))] -use default::Default; -#[cfg(not(test))] -use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd}; -use fmt; - -#[cfg(not(test))] -impl Eq for () { - #[inline] - fn eq(&self, _other: &()) -> bool { true } - #[inline] - fn ne(&self, _other: &()) -> bool { false } -} - -#[cfg(not(test))] -impl Ord for () { - #[inline] - fn lt(&self, _other: &()) -> bool { false } -} - -#[cfg(not(test))] -impl TotalOrd for () { - #[inline] - fn cmp(&self, _other: &()) -> Ordering { Equal } -} - -#[cfg(not(test))] -impl TotalEq for () {} - -#[cfg(not(test))] -impl Default for () { - #[inline] - fn default() -> () { () } -} - -impl fmt::Show for () { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("()") - } -} -- cgit 1.4.1-3-g733a5