Skip to content

Commit c809d5a

Browse files
brsonalexcrichton
authored andcommitted
---
yaml --- r: 151724 b: refs/heads/try2 c: a0594eb h: refs/heads/master v: v3
1 parent d514957 commit c809d5a

File tree

5 files changed

+23
-48
lines changed

5 files changed

+23
-48
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 50331595fca761eba8b034a6e73143b01b330c04
8+
refs/heads/try2: a0594ebb8baa0544ed0f818c494be20b3c9957a5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/cmp.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,23 @@ pub fn max<T: TotalOrd>(v1: T, v2: T) -> T {
192192
// Implementation of Eq/TotalEq for some primitive types
193193
#[cfg(not(test))]
194194
mod impls {
195-
use cmp::{Ord, TotalOrd, Eq, TotalEq, Ordering};
195+
use cmp::{Ord, TotalOrd, Eq, TotalEq, Ordering, Equal};
196+
197+
impl Eq for () {
198+
#[inline]
199+
fn eq(&self, _other: &()) -> bool { true }
200+
#[inline]
201+
fn ne(&self, _other: &()) -> bool { false }
202+
}
203+
impl TotalEq for () {}
204+
impl Ord for () {
205+
#[inline]
206+
fn lt(&self, _other: &()) -> bool { false }
207+
}
208+
impl TotalOrd for () {
209+
#[inline]
210+
fn cmp(&self, _other: &()) -> Ordering { Equal }
211+
}
196212

197213
// & pointers
198214
impl<'a, T: Eq> Eq for &'a T {

branches/try2/src/libcore/default.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ pub trait Default {
1616
fn default() -> Self;
1717
}
1818

19+
impl Default for () {
20+
#[inline]
21+
fn default() -> () { () }
22+
}
23+
1924
impl<T: Default + 'static> Default for @T {
2025
fn default() -> @T { @Default::default() }
2126
}

branches/try2/src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ pub mod container;
103103
/* Core types and methods on primitives */
104104

105105
mod unicode;
106-
mod unit;
107106
pub mod any;
108107
pub mod atomics;
109108
pub mod bool;

branches/try2/src/libcore/unit.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)