about summary refs log tree commit diff
path: root/src/test/stdtest
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-10-10 15:16:55 -0700
committerBrian Anderson <banderson@mozilla.com>2011-10-12 16:33:06 -0700
commit85da98db4ae228f8b3d1b1ebf702b0fea99bd7e6 (patch)
treeffb141dc35ef1d93eebe1800a9322c5d55361898 /src/test/stdtest
parentf2cd33df72cfe9648b668d8822a785dc81bee908 (diff)
downloadrust-85da98db4ae228f8b3d1b1ebf702b0fea99bd7e6.tar.gz
rust-85da98db4ae228f8b3d1b1ebf702b0fea99bd7e6.zip
continue to annotate functions as unsafe where neccessary
Diffstat (limited to 'src/test/stdtest')
-rw-r--r--src/test/stdtest/ptr.rs2
-rw-r--r--src/test/stdtest/run.rs8
-rw-r--r--src/test/stdtest/sys.rs2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/test/stdtest/ptr.rs b/src/test/stdtest/ptr.rs
index ef0ffa54a04..ac829f90e5f 100644
--- a/src/test/stdtest/ptr.rs
+++ b/src/test/stdtest/ptr.rs
@@ -5,7 +5,7 @@ import std::unsafe;
 type pair = {mutable fst: int, mutable snd: int};
 
 #[test]
-fn test() {
+fn test() unsafe {
     let p = {mutable fst: 10, mutable snd: 20};
     let pptr: *mutable pair = ptr::addr_of(p);
     let iptr: *mutable int = unsafe::reinterpret_cast(pptr);
diff --git a/src/test/stdtest/run.rs b/src/test/stdtest/run.rs
index e5c36d37041..15bcf4e5320 100644
--- a/src/test/stdtest/run.rs
+++ b/src/test/stdtest/run.rs
@@ -23,7 +23,7 @@ fn test_leaks() {
 fn test_leaks() { }
 
 #[test]
-fn test_pipes() {
+fn test_pipes() unsafe {
     let pipe_in = os::pipe();
     let pipe_out = os::pipe();
     let pipe_err = os::pipe();
@@ -45,14 +45,14 @@ fn test_pipes() {
     log actual;
     assert (expected == actual);
 
-    fn writeclose(fd: int, s: str) {
+    fn writeclose(fd: int, s: str) unsafe {
         let writer = io::new_writer(io::fd_buf_writer(fd, option::none));
         writer.write_str(s);
 
         os::libc::close(fd);
     }
 
-    fn readclose(fd: int) -> str {
+    fn readclose(fd: int) -> str unsafe {
         // Copied from run::program_output
         let file = os::fd_FILE(fd);
         let reader = io::new_reader(io::FILE_buf_reader(file, option::none));
@@ -67,7 +67,7 @@ fn test_pipes() {
 }
 
 #[test]
-fn waitpid() {
+fn waitpid() unsafe {
     let pid = run::spawn_process("false", [], 0, 0, 0);
     let status = run::waitpid(pid);
     assert status == 1;
diff --git a/src/test/stdtest/sys.rs b/src/test/stdtest/sys.rs
index 56cafe9217a..547adba7bf5 100644
--- a/src/test/stdtest/sys.rs
+++ b/src/test/stdtest/sys.rs
@@ -1,4 +1,4 @@
 import std::sys;
 
 #[test]
-fn last_os_error() { log sys::rustrt::last_os_error(); }
+fn last_os_error() unsafe { log sys::rustrt::last_os_error(); }