diff --git a/Cargo.toml b/Cargo.toml index 11236d328..0643972ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ path = "src/cargo/lib.rs" atty = "0.2" bytesize = "1.0" crates-io = { path = "src/crates-io", version = "0.21" } -crossbeam-utils = "0.5" +crossbeam-utils = "0.6" crypto-hash = "0.3.1" curl = { version = "0.4.19", features = ['http2'] } curl-sys = "0.4.15" diff --git a/src/cargo/core/compiler/job_queue.rs b/src/cargo/core/compiler/job_queue.rs index f97c7421a..806412bcd 100644 --- a/src/cargo/core/compiler/job_queue.rs +++ b/src/cargo/core/compiler/job_queue.rs @@ -201,7 +201,9 @@ impl<'a> JobQueue<'a> { srv.start(move |msg| drop(tx2.send(Message::FixDiagnostic(msg)))) }); - crossbeam_utils::thread::scope(|scope| self.drain_the_queue(cx, plan, scope, &helper)) + crossbeam_utils::thread::scope(|scope| { + self.drain_the_queue(cx, plan, scope, &helper) + }).expect("child threads should't panic") } fn drain_the_queue( @@ -409,7 +411,7 @@ impl<'a> JobQueue<'a> { match fresh { Freshness::Fresh => doit(), Freshness::Dirty => { - scope.spawn(doit); + scope.spawn(move |_| doit()); } }