diff --git a/src/Cargo.lock b/src/Cargo.lock index 0dd693e7217e7..921d44d7f0d71 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -201,7 +201,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ignore 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.11 (git+https://github.com/RalfJung/jobserver-rs)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1024,7 +1024,7 @@ dependencies = [ [[package]] name = "jobserver" version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/RalfJung/jobserver-rs#3de40df347fcaeb0591dab77af47d3071ffa7b3b" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1919,7 +1919,7 @@ dependencies = [ "flate2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fmt_macros 0.0.0", "graphviz 0.0.0", - "jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.11 (git+https://github.com/RalfJung/jobserver-rs)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3309,7 +3309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc62c8e50e381768ce8ee0428ee53741929f7ebd73e4d83f669bcf7693e00ae" -"checksum jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "60af5f849e1981434e4a31d3d782c4774ae9b434ce55b101a96ecfd09147e8be" +"checksum jobserver 0.1.11 (git+https://github.com/RalfJung/jobserver-rs)" = "" "checksum json 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9ad0485404155f45cce53a40d4b2d6ac356418300daed05273d9e26f91c390be" "checksum jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf83704f4e79979a424d1082dd2c1e52683058056c9280efa19ac5f6bc9033c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" diff --git a/src/Cargo.toml b/src/Cargo.toml index e8c44ea57c2e9..1e0784235f17c 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -57,6 +57,7 @@ cargo = { path = "tools/cargo" } # that we're shipping as well (to ensure that the rustfmt in RLS and the # `rustfmt` executable are the same exact version). rustfmt-nightly = { path = "tools/rustfmt" } +jobserver = { git = 'https://github.com/RalfJung/jobserver-rs' } # See comments in `tools/rustc-workspace-hack/README.md` for what's going on # here diff --git a/src/libstd/sys/redox/ext/process.rs b/src/libstd/sys/redox/ext/process.rs index cfb6d5fc703a6..39a7a664410a0 100644 --- a/src/libstd/sys/redox/ext/process.rs +++ b/src/libstd/sys/redox/ext/process.rs @@ -59,7 +59,7 @@ pub trait CommandExt { /// working directory have successfully been changed, so output to these /// locations may not appear where intended. #[stable(feature = "process_exec", since = "1.15.0")] - fn before_exec(&mut self, f: F) -> &mut process::Command + unsafe fn before_exec(&mut self, f: F) -> &mut process::Command where F: FnMut() -> io::Result<()> + Send + Sync + 'static; /// Performs all the required setup by this `Command`, followed by calling @@ -97,7 +97,7 @@ impl CommandExt for process::Command { self } - fn before_exec(&mut self, f: F) -> &mut process::Command + unsafe fn before_exec(&mut self, f: F) -> &mut process::Command where F: FnMut() -> io::Result<()> + Send + Sync + 'static { self.as_inner_mut().before_exec(Box::new(f)); diff --git a/src/libstd/sys/redox/process.rs b/src/libstd/sys/redox/process.rs index 4370c1e05027b..d8a81e765edb6 100644 --- a/src/libstd/sys/redox/process.rs +++ b/src/libstd/sys/redox/process.rs @@ -126,7 +126,7 @@ impl Command { self.gid = Some(id); } - pub fn before_exec(&mut self, + pub unsafe fn before_exec(&mut self, f: Box io::Result<()> + Send + Sync>) { self.closures.push(f); } diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 21630ae9746fc..1ba695d9072cf 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -59,7 +59,7 @@ pub trait CommandExt { /// working directory have successfully been changed, so output to these /// locations may not appear where intended. #[stable(feature = "process_exec", since = "1.15.0")] - fn before_exec(&mut self, f: F) -> &mut process::Command + unsafe fn before_exec(&mut self, f: F) -> &mut process::Command where F: FnMut() -> io::Result<()> + Send + Sync + 'static; /// Performs all the required setup by this `Command`, followed by calling @@ -107,7 +107,7 @@ impl CommandExt for process::Command { self } - fn before_exec(&mut self, f: F) -> &mut process::Command + unsafe fn before_exec(&mut self, f: F) -> &mut process::Command where F: FnMut() -> io::Result<()> + Send + Sync + 'static { self.as_inner_mut().before_exec(Box::new(f)); diff --git a/src/libstd/sys/unix/process/process_common.rs b/src/libstd/sys/unix/process/process_common.rs index 77f125f3c5b56..45fa89be731a3 100644 --- a/src/libstd/sys/unix/process/process_common.rs +++ b/src/libstd/sys/unix/process/process_common.rs @@ -159,7 +159,7 @@ impl Command { &mut self.closures } - pub fn before_exec(&mut self, + pub unsafe fn before_exec(&mut self, f: Box io::Result<()> + Send + Sync>) { self.closures.push(f); }