diff options
Diffstat (limited to 'src/libcore/task.rs')
| -rw-r--r-- | src/libcore/task.rs | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 1f38a10b2e7..9e2949c37ef 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -83,13 +83,6 @@ enum Task { TaskHandle(task_id) } -#[cfg(stage0)] -impl Task : cmp::Eq { - pure fn eq(&&other: Task) -> bool { *self == *other } - pure fn ne(&&other: Task) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Task : cmp::Eq { pure fn eq(other: &Task) -> bool { *self == *(*other) } pure fn ne(other: &Task) -> bool { !self.eq(other) } @@ -111,18 +104,6 @@ enum TaskResult { Failure, } -#[cfg(stage0)] -impl TaskResult: Eq { - pure fn eq(&&other: TaskResult) -> bool { - match (self, other) { - (Success, Success) | (Failure, Failure) => true, - (Success, _) | (Failure, _) => false - } - } - pure fn ne(&&other: TaskResult) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl TaskResult : Eq { pure fn eq(other: &TaskResult) -> bool { match (self, (*other)) { @@ -139,21 +120,6 @@ enum Notification { Exit(Task, TaskResult) } -#[cfg(stage0)] -impl Notification : cmp::Eq { - pure fn eq(&&other: Notification) -> bool { - match self { - Exit(e0a, e1a) => { - match other { - Exit(e0b, e1b) => e0a == e0b && e1a == e1b - } - } - } - } - pure fn ne(&&other: Notification) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Notification : cmp::Eq { pure fn eq(other: &Notification) -> bool { match self { @@ -186,48 +152,6 @@ enum SchedMode { PlatformThread } -#[cfg(stage0)] -impl SchedMode : cmp::Eq { - pure fn eq(&&other: SchedMode) -> bool { - match self { - SingleThreaded => { - match other { - SingleThreaded => true, - _ => false - } - } - ThreadPerCore => { - match other { - ThreadPerCore => true, - _ => false - } - } - ThreadPerTask => { - match other { - ThreadPerTask => true, - _ => false - } - } - ManualThreads(e0a) => { - match other { - ManualThreads(e0b) => e0a == e0b, - _ => false - } - } - PlatformThread => { - match other { - PlatformThread => true, - _ => false - } - } - } - } - pure fn ne(&&other: SchedMode) -> bool { - !self.eq(other) - } -} -#[cfg(stage1)] -#[cfg(stage2)] impl SchedMode : cmp::Eq { pure fn eq(other: &SchedMode) -> bool { match self { |
