about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-18 10:46:41 +0000
committerbors <bors@rust-lang.org>2014-11-18 10:46:41 +0000
commit516ece6ee4393990b8a62fb8f16bb7423e0e8828 (patch)
tree9c2658fbe46cbc896498469ea392419493eb2b72 /src/libstd/sys
parentfcb1523241cd682abc9a0622efe9877fbac53231 (diff)
parent225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe (diff)
downloadrust-516ece6ee4393990b8a62fb8f16bb7423e0e8828.tar.gz
rust-516ece6ee4393990b8a62fb8f16bb7423e0e8828.zip
auto merge of #18645 : nick29581/rust/coercions-1, r=alexcrichton
r?

(I realise this needs a rebase, but I will probably have to chop it up in order to land and I'd like to get r+ first so I can do that quicker)
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/windows/fs.rs2
-rw-r--r--src/libstd/sys/windows/os.rs2
-rw-r--r--src/libstd/sys/windows/pipe.rs8
-rw-r--r--src/libstd/sys/windows/process.rs10
4 files changed, 11 insertions, 11 deletions
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index a07688b2fed..b881eb2d495 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -263,7 +263,7 @@ pub fn readdir(p: &Path) -> IoResult<Vec<Path>> {
             let mut more_files = 1 as libc::BOOL;
             while more_files != 0 {
                 {
-                    let filename = str::truncate_utf16_at_nul(wfd.cFileName);
+                    let filename = str::truncate_utf16_at_nul(&wfd.cFileName);
                     match String::from_utf16(filename) {
                         Some(filename) => paths.push(Path::new(filename)),
                         None => {
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index aaa1aaf6327..aa43b42e746 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -76,7 +76,7 @@ pub fn error_string(errnum: i32) -> String {
             return format!("OS Error {} (FormatMessageW() returned error {})", errnum, fm_err);
         }
 
-        let msg = String::from_utf16(::str::truncate_utf16_at_nul(buf));
+        let msg = String::from_utf16(::str::truncate_utf16_at_nul(&buf));
         match msg {
             Some(msg) => format!("OS Error {}: {}", errnum, msg),
             None => format!("OS Error {} (FormatMessageW() returned invalid UTF-16)", errnum),
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index f2f7994a005..e38202302fb 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -395,7 +395,7 @@ impl UnixStream {
         loop {
             // Process a timeout if one is pending
             let wait_succeeded = await(self.handle(), self.read_deadline,
-                                       [overlapped.hEvent]);
+                                       &[overlapped.hEvent]);
 
             let ret = unsafe {
                 libc::GetOverlappedResult(self.handle(),
@@ -459,7 +459,7 @@ impl UnixStream {
                 }
                 // Process a timeout if one is pending
                 let wait_succeeded = await(self.handle(), self.write_deadline,
-                                           [overlapped.hEvent]);
+                                           &[overlapped.hEvent]);
                 let ret = unsafe {
                     libc::GetOverlappedResult(self.handle(),
                                               &mut overlapped,
@@ -660,8 +660,8 @@ impl UnixAcceptor {
             if err == libc::ERROR_IO_PENDING as libc::DWORD {
                 // Process a timeout if one is pending
                 let wait_succeeded = await(handle, self.deadline,
-                                           [self.inner.abort.handle(),
-                                            overlapped.hEvent]);
+                                           &[self.inner.abort.handle(),
+                                             overlapped.hEvent]);
 
                 // This will block until the overlapped I/O is completed. The
                 // timeout was previously handled, so this will either block in
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 67e87841ed2..3fb5ee34356 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -487,24 +487,24 @@ mod tests {
         }
 
         assert_eq!(
-            test_wrapper("prog", ["aaa", "bbb", "ccc"]),
+            test_wrapper("prog", &["aaa", "bbb", "ccc"]),
             "prog aaa bbb ccc".to_string()
         );
 
         assert_eq!(
-            test_wrapper("C:\\Program Files\\blah\\blah.exe", ["aaa"]),
+            test_wrapper("C:\\Program Files\\blah\\blah.exe", &["aaa"]),
             "\"C:\\Program Files\\blah\\blah.exe\" aaa".to_string()
         );
         assert_eq!(
-            test_wrapper("C:\\Program Files\\test", ["aa\"bb"]),
+            test_wrapper("C:\\Program Files\\test", &["aa\"bb"]),
             "\"C:\\Program Files\\test\" aa\\\"bb".to_string()
         );
         assert_eq!(
-            test_wrapper("echo", ["a b c"]),
+            test_wrapper("echo", &["a b c"]),
             "echo \"a b c\"".to_string()
         );
         assert_eq!(
-            test_wrapper("\u03c0\u042f\u97f3\u00e6\u221e", []),
+            test_wrapper("\u03c0\u042f\u97f3\u00e6\u221e", &[]),
             "\u03c0\u042f\u97f3\u00e6\u221e".to_string()
         );
     }