]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #809 - RalfJung:intptrcast, r=RalfJung
authorbors <bors@rust-lang.org>
Sun, 30 Jun 2019 21:19:56 +0000 (21:19 +0000)
committerbors <bors@rust-lang.org>
Sun, 30 Jun 2019 21:19:56 +0000 (21:19 +0000)
use intptrcast for heap_allocator test; then it should work on Windows

tests/run-pass/issue-30530.rs
tests/run-pass/sync.rs [new file with mode: 0644]
tests/run-pass/threads.rs [deleted file]

index 10dec30c64ca7125deb4c7fab72fd2514ea948ad..86c2d9184e0166abf30bbb7524a2ebdd7341593e 100644 (file)
@@ -21,7 +21,9 @@ pub enum Handler {
 }
 
 fn main() {
-    take(Handler::Default, Box::new(main));
+    #[allow(unused_must_use)] {
+        take(Handler::Default, Box::new(main));
+    }
 }
 
 #[inline(never)]
diff --git a/tests/run-pass/sync.rs b/tests/run-pass/sync.rs
new file mode 100644 (file)
index 0000000..54d7956
--- /dev/null
@@ -0,0 +1,18 @@
+// Just instantiate some data structures to make sure we got all their foreign items covered.
+// Requires full MIR on Windows.
+
+use std::sync;
+
+fn main() {
+    let m = sync::Mutex::new(0);
+    drop(m.lock());
+    drop(m);
+
+    #[cfg(not(target_os = "windows"))] // TODO: implement RwLock on Windows
+    {
+        let rw = sync::RwLock::new(0);
+        drop(rw.read());
+        drop(rw.write());
+        drop(rw);
+    }
+}
diff --git a/tests/run-pass/threads.rs b/tests/run-pass/threads.rs
deleted file mode 100644 (file)
index dad47d8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Just instantiate some data structures to make sure we got all their foreign items covered.
-// Requires full MIR on Windows.
-
-use std::sync;
-
-fn main() {
-    let m = sync::Mutex::new(0);
-    drop(m.lock());
-    drop(m);
-
-    // We don't provide RwLock on Windows
-    #[cfg(not(target_os = "windows"))]
-    {
-        let rw = sync::RwLock::new(0);
-        drop(rw.read());
-        drop(rw.write());
-        drop(rw);
-    }
-}