]> git.lizzy.rs Git - rust.git/commitdiff
std: Move running_on_valgrind to rt::util. #1457
authorBrian Anderson <banderson@mozilla.com>
Wed, 21 May 2014 03:19:39 +0000 (20:19 -0700)
committerBrian Anderson <banderson@mozilla.com>
Fri, 23 May 2014 22:27:48 +0000 (15:27 -0700)
[breaking-change]

src/libstd/io/test.rs
src/libstd/rt/mod.rs
src/libstd/rt/util.rs
src/libstd/unstable/mod.rs

index de8a6f4beb5ea3102bad955d034d578bbe409cb0..bc52bc9946c087c15fafe4ed8fb6538dcad7c2f4 100644 (file)
@@ -37,7 +37,7 @@ mod $name {
             use io::net::unix::*;
             use io::timer::*;
             use io::process::*;
-            use unstable::running_on_valgrind;
+            use rt::running_on_valgrind;
             use str;
 
             fn f() $b
index daf18346fee2afcfcf0f261e84d7c2ea078e16bf..d2131ad44fb301cabf0e674d45b6935aa74739f2 100644 (file)
 
 pub use alloc::{heap, libc_heap};
 
+// Used by I/O tests
+#[experimental]
+pub use self::util::running_on_valgrind;
+
 // FIXME: these probably shouldn't be public...
 #[doc(hidden)]
 pub mod shouldnt_be_public {
index 1ab9ac1b11edca81f18d34c48acc4d7b3d92c4bb..103fbdc0bc93d2f58ce9f1e51595a375f4826757 100644 (file)
 use io;
 use iter::Iterator;
 use libc;
+use libc::uintptr_t;
 use option::{Some, None, Option};
 use os;
 use result::Ok;
 use str::{Str, StrSlice};
-use unstable::running_on_valgrind;
 use slice::ImmutableVector;
 
 // Indicates whether we should perform expensive sanity checks, including rtassert!
@@ -162,3 +162,15 @@ fn abort() -> ! {
         unsafe { intrinsics::abort() }
     }
 }
+
+/// Dynamically inquire about whether we're running under V.
+/// You should usually not use this unless your test definitely
+/// can't run correctly un-altered. Valgrind is there to help
+/// you notice weirdness in normal, un-doctored code paths!
+pub fn running_on_valgrind() -> bool {
+    unsafe { rust_running_on_valgrind() != 0 }
+}
+
+extern {
+    fn rust_running_on_valgrind() -> uintptr_t;
+}
index f464f70772d9412e6616f21c4f3b9bf70931f9d4..b235ec4d8c8e2275e59308fd9bbe2581fb46c6e0 100644 (file)
@@ -10,8 +10,6 @@
 
 #![doc(hidden)]
 
-use libc::uintptr_t;
-
 pub use core::finally;
 
 pub mod dynamic_lib;
 pub mod sync;
 pub mod mutex;
 
-/// Dynamically inquire about whether we're running under V.
-/// You should usually not use this unless your test definitely
-/// can't run correctly un-altered. Valgrind is there to help
-/// you notice weirdness in normal, un-doctored code paths!
-pub fn running_on_valgrind() -> bool {
-    unsafe { rust_running_on_valgrind() != 0 }
-}
-
-extern {
-    fn rust_running_on_valgrind() -> uintptr_t;
-}