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"
51
51
parking_lot = " 0.11.2"
52
52
tokio = { version = " 1" , features = [" io-util" ] }
53
53
rustc-semver = " 1.1"
54
- num_cpus = " 1.13"
55
54
56
55
[build-dependencies ]
57
56
rustc_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() {
168
168
let _threads = VarGuard :: set (
169
169
"RUST_TEST_THREADS" ,
170
170
// 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
+ } ) ,
172
176
) ;
173
177
compiletest:: run_tests ( & config) ;
174
178
}
You can’t perform that action at this time.
0 commit comments