diff options
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/local_data_priv.rs | 12 | ||||
| -rw-r--r-- | src/libcore/task/mod.rs | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/libcore/task/local_data_priv.rs b/src/libcore/task/local_data_priv.rs index 02550f3470f..b8537373e65 100644 --- a/src/libcore/task/local_data_priv.rs +++ b/src/libcore/task/local_data_priv.rs @@ -7,23 +7,11 @@ pub trait LocalData { } impl<T: Owned> @T: LocalData { } impl LocalData: Eq { - #[cfg(stage0)] - pure fn eq(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; - } - #[cfg(stage1)] - #[cfg(stage2)] pure 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; } - #[cfg(stage0)] - pure fn ne(other: &@LocalData) -> bool { !self.eq(other) } - #[cfg(stage1)] - #[cfg(stage2)] pure fn ne(&self, other: &@LocalData) -> bool { !(*self).eq(other) } } diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs new file mode 100644 index 00000000000..887983e8b6c --- /dev/null +++ b/src/libcore/task/mod.rs @@ -0,0 +1,8 @@ + +mod local_data_priv; + +pub mod local_data; + +pub mod rt; + +pub mod spawn; |
