diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-21 21:20:48 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-22 10:29:17 -0700 |
| commit | be9bddd46377bc982b73acf15a720365a54197a7 (patch) | |
| tree | 55aeffb471ddf4d96860c8ab4e5ad448c0e0f7f0 /src/libcore/task | |
| parent | 4634f7edaefafa3e5ece93499e08992b4c8c7145 (diff) | |
| download | rust-be9bddd46377bc982b73acf15a720365a54197a7.tar.gz rust-be9bddd46377bc982b73acf15a720365a54197a7.zip | |
libcore: Remove `pure` from libcore. rs=depure
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/local_data_priv.rs | 4 | ||||
| -rw-r--r-- | src/libcore/task/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/task/spawn.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/task/local_data_priv.rs b/src/libcore/task/local_data_priv.rs index 6a933ef515f..59f4942b3a4 100644 --- a/src/libcore/task/local_data_priv.rs +++ b/src/libcore/task/local_data_priv.rs @@ -24,14 +24,14 @@ pub trait LocalData { } impl<T:Durable> LocalData for @T { } impl Eq for @LocalData { - pure fn eq(&self, other: &@LocalData) -> bool { + fn eq(&self, other: &@LocalData) -> bool { unsafe { let ptr_a: (uint, uint) = cast::reinterpret_cast(&(*self)); let ptr_b: (uint, uint) = cast::reinterpret_cast(other); return ptr_a == ptr_b; } } - pure fn ne(&self, other: &@LocalData) -> bool { !(*self).eq(other) } + fn ne(&self, other: &@LocalData) -> bool { !(*self).eq(other) } } // If TLS is used heavily in future, this could be made more efficient with a diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 1ef2316ec07..a38b44afb51 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -78,13 +78,13 @@ pub enum TaskResult { } impl Eq for TaskResult { - pure fn eq(&self, other: &TaskResult) -> bool { + fn eq(&self, other: &TaskResult) -> bool { match ((*self), (*other)) { (Success, Success) | (Failure, Failure) => true, (Success, _) | (Failure, _) => false } } - pure fn ne(&self, other: &TaskResult) -> bool { !(*self).eq(other) } + fn ne(&self, other: &TaskResult) -> bool { !(*self).eq(other) } } /// Scheduler modes diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs index 40a6873ad67..b97a682c4e5 100644 --- a/src/libcore/task/spawn.rs +++ b/src/libcore/task/spawn.rs @@ -126,7 +126,7 @@ type TaskGroupArc = unstable::Exclusive<Option<TaskGroupData>>; type TaskGroupInner = &'self mut Option<TaskGroupData>; // A taskgroup is 'dead' when nothing can cause it to fail; only members can. -pure fn taskgroup_is_dead(tg: &TaskGroupData) -> bool { +fn taskgroup_is_dead(tg: &TaskGroupData) -> bool { (&const tg.members).is_empty() } |
