File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ futures = "0.3"
5151parking_lot = " 0.11.2"
5252tokio = { version = " 1" , features = [" io-util" ] }
5353rustc-semver = " 1.1"
54- num_cpus = " 1.13"
5554
5655[build-dependencies ]
5756rustc_tools_util = { version = " 0.2" , path = " rustc_tools_util" }
Original file line number Diff line number Diff line change @@ -168,7 +168,11 @@ fn run_ui() {
168168 let _threads = VarGuard :: set (
169169 "RUST_TEST_THREADS" ,
170170 // if RUST_TEST_THREADS is set, adhere to it, otherwise override it
171- env:: var ( "RUST_TEST_THREADS" ) . unwrap_or_else ( |_| num_cpus:: get ( ) . to_string ( ) ) ,
171+ env:: var ( "RUST_TEST_THREADS" ) . unwrap_or_else ( |_| {
172+ std:: thread:: available_parallelism ( )
173+ . map_or ( 1 , std:: num:: NonZeroUsize :: get)
174+ . to_string ( )
175+ } ) ,
172176 ) ;
173177 compiletest:: run_tests ( & config) ;
174178}
You can’t perform that action at this time.
0 commit comments