about summary refs log tree commit diff
path: root/src/libstd/rt.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-30 07:35:10 +0000
committerbors <bors@rust-lang.org>2015-12-30 07:35:10 +0000
commita06bb977d86dcfe786d4265f4807a11c39b51141 (patch)
tree27a2b4e75bd918cbe2276a3e9a26eac34825e72f /src/libstd/rt.rs
parent6e2a64b57a74f35bef215972adf1b803cff288bd (diff)
parente27cbeff370897b8450caa204c08049651a10c13 (diff)
downloadrust-a06bb977d86dcfe786d4265f4807a11c39b51141.tar.gz
rust-a06bb977d86dcfe786d4265f4807a11c39b51141.zip
Auto merge of #30458 - fhahn:fix-warnings-tests-stdlib, r=sanxiyn
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`.

I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as  `#[cfg(not(test))]`
Diffstat (limited to 'src/libstd/rt.rs')
-rw-r--r--src/libstd/rt.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libstd/rt.rs b/src/libstd/rt.rs
index 63fb9b561ff..fcd827e2a8b 100644
--- a/src/libstd/rt.rs
+++ b/src/libstd/rt.rs
@@ -22,13 +22,7 @@
             issue = "0")]
 #![doc(hidden)]
 
-use borrow::ToOwned;
-use mem;
-use panic;
-use sys;
-use sys_common::thread_info::{self, NewThread};
-use sys_common;
-use thread::Thread;
+
 
 // Reexport some of our utilities which are expected by other crates.
 pub use sys_common::unwind::{begin_unwind, begin_unwind_fmt};
@@ -41,6 +35,14 @@ pub use sys_common::unwind::imp::eh_frame_registry::*;
 #[cfg(not(test))]
 #[lang = "start"]
 fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
+    use borrow::ToOwned;
+    use mem;
+    use panic;
+    use sys;
+    use sys_common;
+    use sys_common::thread_info::{self, NewThread};
+    use thread::Thread;
+
     sys::init();
 
     let failed = unsafe {