about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-08 10:06:45 -0800
committerbors <bors@rust-lang.org>2014-01-08 10:06:45 -0800
commit430652c970db41f718936bb649516c401b02964b (patch)
treea41d51a20c1b3c876a345039bcfdd86a5c9b8cc2 /src/libstd/rt
parentf3a8baafbecdb6e41f001c8f218d4796a9ca8d40 (diff)
parent0547fb9cad4053f3ec66e722b7a05df259d63038 (diff)
downloadrust-430652c970db41f718936bb649516c401b02964b.tar.gz
rust-430652c970db41f718936bb649516c401b02964b.zip
auto merge of #11370 : alexcrichton/rust/issue-10465, r=pwalton
Turned out to be a 2-line fix, but the compiler fallout was huge.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/args.rs4
-rw-r--r--src/libstd/rt/borrowck.rs4
-rw-r--r--src/libstd/rt/crate_map.rs2
-rw-r--r--src/libstd/rt/global_heap.rs1
-rw-r--r--src/libstd/rt/local_heap.rs3
-rw-r--r--src/libstd/rt/local_ptr.rs3
-rw-r--r--src/libstd/rt/logging.rs4
-rw-r--r--src/libstd/rt/mod.rs5
-rw-r--r--src/libstd/rt/task.rs1
-rw-r--r--src/libstd/rt/unwind.rs15
-rw-r--r--src/libstd/rt/util.rs2
11 files changed, 26 insertions, 18 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs
index a767af4cc0e..526ad60bb21 100644
--- a/src/libstd/rt/args.rs
+++ b/src/libstd/rt/args.rs
@@ -64,8 +64,10 @@ pub unsafe fn init(argc: int, argv: **u8) { realargs::init(argc, argv) }
 #[cfg(target_os = "freebsd")]
 mod imp {
     use cast;
+    use clone::Clone;
     #[cfg(not(test))] use libc;
     use option::{Option, Some, None};
+    use ptr::RawPtr;
     use iter::Iterator;
     #[cfg(not(test))] use str;
     use unstable::finally::Finally;
@@ -138,7 +140,7 @@ mod imp {
 
     #[cfg(test)]
     mod tests {
-        use option::{Some, None};
+        use prelude::*;
         use super::*;
         use unstable::finally::Finally;
 
diff --git a/src/libstd/rt/borrowck.rs b/src/libstd/rt/borrowck.rs
index d1e97cb6ec0..7dcbae995ed 100644
--- a/src/libstd/rt/borrowck.rs
+++ b/src/libstd/rt/borrowck.rs
@@ -9,6 +9,8 @@
 // except according to those terms.
 
 use c_str::{ToCStr, CString};
+use container::Container;
+use iter::Iterator;
 use libc::{c_char, size_t};
 use option::{Option, None, Some};
 use ptr::RawPtr;
@@ -19,7 +21,7 @@ use str::OwnedStr;
 use str;
 use uint;
 use unstable::raw;
-use vec::ImmutableVector;
+use vec::{ImmutableVector, OwnedVector};
 
 pub static FROZEN_BIT: uint = 1 << (uint::bits - 1);
 pub static MUT_BIT: uint = 1 << (uint::bits - 2);
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index d9b40cfbb6e..16c1ad25448 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -10,7 +10,9 @@
 
 use container::MutableSet;
 use hashmap::HashSet;
+use iter::Iterator;
 use option::{Some, None, Option};
+use ptr::RawPtr;
 use vec::ImmutableVector;
 use rt::rtio::EventLoop;
 
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs
index c094344f6b9..7a417990a4c 100644
--- a/src/libstd/rt/global_heap.rs
+++ b/src/libstd/rt/global_heap.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use libc::{c_void, c_char, size_t, uintptr_t, free, malloc, realloc};
+use ptr::RawPtr;
 use unstable::intrinsics::TyDesc;
 use unstable::raw;
 use mem::size_of;
diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs
index f2edc6e7ede..1be942b2db1 100644
--- a/src/libstd/rt/local_heap.rs
+++ b/src/libstd/rt/local_heap.rs
@@ -11,18 +11,21 @@
 //! The local, garbage collected heap
 
 use cast;
+use iter::Iterator;
 use libc::{c_void, uintptr_t};
 use libc;
 use mem;
 use ops::Drop;
 use option::{Option, None, Some};
 use ptr;
+use ptr::RawPtr;
 use rt::env;
 use rt::global_heap;
 use rt::local::Local;
 use rt::task::Task;
 use unstable::intrinsics::TyDesc;
 use unstable::raw;
+use vec::ImmutableVector;
 
 // This has no meaning with out rtdebug also turned on.
 #[cfg(rtdebug)]
diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs
index 546a6476b57..f4efd8e27d0 100644
--- a/src/libstd/rt/local_ptr.rs
+++ b/src/libstd/rt/local_ptr.rs
@@ -19,6 +19,7 @@
 
 use cast;
 use ops::Drop;
+use ptr::RawPtr;
 
 #[cfg(windows)]               // mingw-w32 doesn't like thread_local things
 #[cfg(target_os = "android")] // see #10686
@@ -79,6 +80,7 @@ pub unsafe fn borrow<T>() -> Borrowed<T> {
 pub mod compiled {
     use cast;
     use option::{Option, Some, None};
+    use ptr::RawPtr;
     #[cfg(not(test))] use libc::c_void;
 
     #[cfg(test)]
@@ -177,6 +179,7 @@ pub mod native {
     use libc::c_void;
     use option::{Option, Some, None};
     use ptr;
+    use ptr::RawPtr;
     use tls = rt::thread_local_storage;
 
     static mut RT_TLS_KEY: tls::Key = -1;
diff --git a/src/libstd/rt/logging.rs b/src/libstd/rt/logging.rs
index 586d26a24e3..b86a9612d70 100644
--- a/src/libstd/rt/logging.rs
+++ b/src/libstd/rt/logging.rs
@@ -8,12 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use container::Container;
 use from_str::from_str;
+use iter::Iterator;
 use libc::exit;
 use option::{Some, None, Option};
 use rt::crate_map::{ModEntry, CrateMap, iter_crate_map, get_crate_map};
 use str::StrSlice;
-use vec::{ImmutableVector, MutableTotalOrdVector};
+use vec::{ImmutableVector, MutableTotalOrdVector, OwnedVector};
 #[cfg(test)] use cast::transmute;
 
 struct LogDirective {
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 050caef86eb..d839ef62af9 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -58,14 +58,9 @@ Several modules in `core` are clients of `rt`:
 #[allow(missing_doc)];
 
 use any::Any;
-use clone::Clone;
-use container::Container;
-use iter::Iterator;
 use option::Option;
-use ptr::RawPtr;
 use result::Result;
 use task::TaskOpts;
-use vec::{OwnedVector, MutableVector, ImmutableVector};
 
 use self::task::{Task, BlockedTask};
 
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index 2d9105d6766..6c94f237789 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -17,6 +17,7 @@ use any::AnyOwnExt;
 use borrow;
 use cast;
 use cleanup;
+use clone::Clone;
 use io::Writer;
 use iter::{Iterator, Take};
 use local_data;
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs
index cb5360200d5..3a07e8c373b 100644
--- a/src/libstd/rt/unwind.rs
+++ b/src/libstd/rt/unwind.rs
@@ -62,6 +62,7 @@ use kinds::Send;
 use libc::{c_void, c_char, size_t};
 use option::{Some, None, Option};
 use prelude::drop;
+use ptr::RawPtr;
 use result::{Err, Ok};
 use rt::local::Local;
 use rt::task::Task;
@@ -76,6 +77,7 @@ mod libunwind {
     //! Unwind library interface
 
     #[allow(non_camel_case_types)];
+    #[allow(dead_code)] // these are just bindings
 
     use libc::{uintptr_t, uint64_t};
 
@@ -261,7 +263,8 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class {
 //   This is achieved by overriding the return value in search phase to always
 //   say "catch!".
 
-#[cfg(not(target_arch = "arm"))]
+#[cfg(not(target_arch = "arm"), not(test))]
+#[doc(hidden)]
 pub mod eabi {
     use uw = super::libunwind;
     use libc::c_int;
@@ -277,8 +280,6 @@ pub mod eabi {
 
     #[lang="eh_personality"]
     #[no_mangle] // so we can reference it by name from middle/trans/base.rs
-    #[doc(hidden)]
-    #[cfg(not(test))]
     pub extern "C" fn rust_eh_personality(
         version: c_int,
         actions: uw::_Unwind_Action,
@@ -294,8 +295,6 @@ pub mod eabi {
     }
 
     #[no_mangle] // referenced from rust_try.ll
-    #[doc(hidden)]
-    #[cfg(not(test))]
     pub extern "C" fn rust_eh_personality_catch(
         version: c_int,
         actions: uw::_Unwind_Action,
@@ -318,7 +317,7 @@ pub mod eabi {
 
 // ARM EHABI uses a slightly different personality routine signature,
 // but otherwise works the same.
-#[cfg(target_arch = "arm")]
+#[cfg(target_arch = "arm", not(test))]
 pub mod eabi {
     use uw = super::libunwind;
     use libc::c_int;
@@ -332,8 +331,6 @@ pub mod eabi {
 
     #[lang="eh_personality"]
     #[no_mangle] // so we can reference it by name from middle/trans/base.rs
-    #[doc(hidden)]
-    #[cfg(not(test))]
     pub extern "C" fn rust_eh_personality(
         state: uw::_Unwind_State,
         ue_header: *uw::_Unwind_Exception,
@@ -346,8 +343,6 @@ pub mod eabi {
     }
 
     #[no_mangle] // referenced from rust_try.ll
-    #[doc(hidden)]
-    #[cfg(not(test))]
     pub extern "C" fn rust_eh_personality_catch(
         state: uw::_Unwind_State,
         ue_header: *uw::_Unwind_Exception,
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index 730a38ce886..ee336d7d847 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -11,11 +11,13 @@
 use container::Container;
 use fmt;
 use from_str::FromStr;
+use iter::Iterator;
 use libc;
 use option::{Some, None, Option};
 use os;
 use str::StrSlice;
 use unstable::running_on_valgrind;
+use vec::ImmutableVector;
 
 // Indicates whether we should perform expensive sanity checks, including rtassert!
 // XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.