about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-24 01:34:38 -0700
committerbors <bors@rust-lang.org>2013-07-24 01:34:38 -0700
commitb5799e1eb519ea53eb72e031d973cf8775dfc6a8 (patch)
treebd18651ff1e8a0b41802a20ca9e81d4c6488be3d
parent7f96eb58d2a4eed4651570ce719363008a8f269f (diff)
parent5c6069141b10f41e2478c335fd4c546e27cc4ce4 (diff)
downloadrust-b5799e1eb519ea53eb72e031d973cf8775dfc6a8.tar.gz
rust-b5799e1eb519ea53eb72e031d973cf8775dfc6a8.zip
auto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw
Closes #5844 
-rw-r--r--src/test/auxiliary/issue_5844_aux.rs16
-rw-r--r--src/test/compile-fail/issue-5844.rs18
2 files changed, 34 insertions, 0 deletions
diff --git a/src/test/auxiliary/issue_5844_aux.rs b/src/test/auxiliary/issue_5844_aux.rs
new file mode 100644
index 00000000000..78e87f32b79
--- /dev/null
+++ b/src/test/auxiliary/issue_5844_aux.rs
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::libc;
+
+extern "C" {
+    pub fn rand() -> libc::c_int;
+}
+
diff --git a/src/test/compile-fail/issue-5844.rs b/src/test/compile-fail/issue-5844.rs
new file mode 100644
index 00000000000..9d4c3cfa678
--- /dev/null
+++ b/src/test/compile-fail/issue-5844.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//aux-build:issue_5844_aux.rs
+
+extern mod issue_5844_aux;
+
+fn main () {
+    issue_5844_aux::rand(); //~ ERROR: requires unsafe
+}
+