]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/unix/process.rs
rollup merge of #20273: alexcrichton/second-pass-comm
[rust.git] / src / libstd / sys / unix / process.rs
index a11fe3487a8e422e3d741a3de58f1f7ae625ccdc..af09bf4fbd0a290f27dbc512682ee986b6ea358d 100644 (file)
@@ -121,7 +121,7 @@ fn combine(arr: &[u8]) -> i32 {
 
                     let p = Process{ pid: pid };
                     drop(output);
-                    let mut bytes = [0, ..8];
+                    let mut bytes = [08];
                     return match input.read(&mut bytes) {
                         Ok(8) => {
                             assert!(combine(CLOEXEC_MSG_FOOTER) == combine(bytes.slice(4, 8)),
@@ -196,7 +196,7 @@ fn fail(output: &mut FileDesc) -> ! {
                 // up /dev/null into that file descriptor. Otherwise, the first file
                 // descriptor opened up in the child would be numbered as one of the
                 // stdio file descriptors, which is likely to wreak havoc.
-                let setup = |src: Option<P>, dst: c_int| {
+                let setup = |&: src: Option<P>, dst: c_int| {
                     let src = match src {
                         None => {
                             let flags = if dst == libc::STDIN_FILENO {
@@ -349,7 +349,7 @@ pub fn wait(&self, deadline: u64) -> IoResult<ProcessExit> {
         // handler we're going to start receiving signals.
         fn register_sigchld() -> (libc::c_int, c::sigaction) {
             unsafe {
-                let mut pipes = [0, ..2];
+                let mut pipes = [02];
                 assert_eq!(libc::pipe(pipes.as_mut_ptr()), 0);
                 set_nonblocking(pipes[0], true).ok().unwrap();
                 set_nonblocking(pipes[1], true).ok().unwrap();
@@ -483,7 +483,7 @@ fn waitpid_helper(input: libc::c_int,
         fn drain(fd: libc::c_int) -> bool {
             let mut ret = false;
             loop {
-                let mut buf = [0u8, ..1];
+                let mut buf = [0u81];
                 match unsafe {
                     libc::read(fd, buf.as_mut_ptr() as *mut libc::c_void,
                                buf.len() as libc::size_t)