about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorKiet Tran <ktt3ja@gmail.com>2013-12-08 02:55:28 -0500
committerKiet Tran <ktt3ja@gmail.com>2013-12-08 02:55:28 -0500
commit1755408d1a58684b6c9bce11aeceb18a1ec2d66e (patch)
tree9d781272021fe4ead382ffc8f87c048f194e25b5 /src/libstd/rt
parentc06dd0e0afb4b78ab4e482a7488adcf1c865bd19 (diff)
downloadrust-1755408d1a58684b6c9bce11aeceb18a1ec2d66e.tar.gz
rust-1755408d1a58684b6c9bce11aeceb18a1ec2d66e.zip
Remove dead codes
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/basic.rs22
-rw-r--r--src/libstd/rt/local_heap.rs2
-rw-r--r--src/libstd/rt/local_ptr.rs2
-rw-r--r--src/libstd/rt/thread_local_storage.rs2
4 files changed, 6 insertions, 22 deletions
diff --git a/src/libstd/rt/basic.rs b/src/libstd/rt/basic.rs
index d857f39ceaf..311138d15a2 100644
--- a/src/libstd/rt/basic.rs
+++ b/src/libstd/rt/basic.rs
@@ -37,17 +37,6 @@ struct BasicLoop {
 
 enum Message { RunRemote(uint), RemoveRemote(uint) }
 
-struct Time {
-    sec: u64,
-    nsec: u64,
-}
-
-impl Ord for Time {
-    fn lt(&self, other: &Time) -> bool {
-        self.sec < other.sec || self.nsec < other.nsec
-    }
-}
-
 impl BasicLoop {
     fn new() -> BasicLoop {
         BasicLoop {
@@ -238,14 +227,3 @@ impl Drop for BasicPausible {
         }
     }
 }
-
-fn time() -> Time {
-    extern {
-        fn rust_get_time(sec: &mut i64, nsec: &mut i32);
-    }
-    let mut sec = 0;
-    let mut nsec = 0;
-    unsafe { rust_get_time(&mut sec, &mut nsec) }
-
-    Time { sec: sec as u64, nsec: nsec as u64 }
-}
diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs
index c98a66453eb..2386a261bdf 100644
--- a/src/libstd/rt/local_heap.rs
+++ b/src/libstd/rt/local_heap.rs
@@ -25,7 +25,9 @@ use unstable::intrinsics::TyDesc;
 use unstable::raw;
 
 // This has no meaning with out rtdebug also turned on.
+#[cfg(rtdebug)]
 static TRACK_ALLOCATIONS: int = 0;
+#[cfg(rtdebug)]
 static MAGIC: u32 = 0xbadc0ffe;
 
 pub type Box = raw::Box<()>;
diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs
index bff9390ee3b..be3b5f951eb 100644
--- a/src/libstd/rt/local_ptr.rs
+++ b/src/libstd/rt/local_ptr.rs
@@ -15,6 +15,8 @@
 //! XXX: Add runtime checks for usage of inconsistent pointer types.
 //! and for overwriting an existing pointer.
 
+#[allow(dead_code)];
+
 use cast;
 use cell::Cell;
 use unstable::finally::Finally;
diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs
index 62e1b6c50d6..d5affdd5173 100644
--- a/src/libstd/rt/thread_local_storage.rs
+++ b/src/libstd/rt/thread_local_storage.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(dead_code)];
+
 use libc::c_void;
 #[cfg(unix)]
 use libc::c_int;