@@ -200,9 +200,10 @@ fn run_ui() {
200
200
let quiet = args. quiet ;
201
201
202
202
compiletest:: run_tests_generic (
203
- config,
203
+ vec ! [ config] ,
204
+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
204
205
args,
205
- move |path, args| compiletest:: default_file_filter ( path, args) && test_filter ( path) ,
206
+ move |path, args, config | compiletest:: default_file_filter ( path, args, config ) && test_filter ( path) ,
206
207
compiletest:: default_per_file_config,
207
208
if quiet {
208
209
status_emitter:: Text :: quiet ( )
@@ -226,9 +227,10 @@ fn run_internal_tests() {
226
227
let quiet = args. quiet ;
227
228
228
229
compiletest:: run_tests_generic (
229
- config,
230
+ vec ! [ config] ,
231
+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
230
232
args,
231
- move |path, args| compiletest:: default_file_filter ( path, args) && test_filter ( path) ,
233
+ move |path, args, config | compiletest:: default_file_filter ( path, args, config ) && test_filter ( path) ,
232
234
compiletest:: default_per_file_config,
233
235
if quiet {
234
236
status_emitter:: Text :: quiet ( )
@@ -258,16 +260,15 @@ fn run_ui_toml() {
258
260
let quiet = args. quiet ;
259
261
260
262
ui_test:: run_tests_generic (
261
- config,
263
+ vec ! [ config] ,
264
+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
262
265
args,
263
- |path, args| compiletest:: default_file_filter ( path, args) && test_filter ( path) ,
264
- |config, path| {
265
- let mut config = config. clone ( ) ;
266
+ |path, args, config| compiletest:: default_file_filter ( path, args, config) && test_filter ( path) ,
267
+ |config, path, _file_contents| {
266
268
config
267
269
. program
268
270
. envs
269
271
. push ( ( "CLIPPY_CONF_DIR" . into ( ) , Some ( path. parent ( ) . unwrap ( ) . into ( ) ) ) ) ;
270
- Some ( config)
271
272
} ,
272
273
if quiet {
273
274
status_emitter:: Text :: quiet ( )
@@ -317,19 +318,18 @@ fn run_ui_cargo() {
317
318
let quiet = args. quiet ;
318
319
319
320
ui_test:: run_tests_generic (
320
- config,
321
+ vec ! [ config] ,
322
+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
321
323
args,
322
- |path, _args| test_filter ( path) && path. ends_with ( "Cargo.toml" ) ,
323
- |config, path| {
324
- let mut config = config. clone ( ) ;
324
+ |path, _args, _config| test_filter ( path) && path. ends_with ( "Cargo.toml" ) ,
325
+ |config, path, _file_contents| {
325
326
config. out_dir = canonicalize (
326
327
std:: env:: current_dir ( )
327
328
. unwrap ( )
328
329
. join ( "target" )
329
330
. join ( "ui_test_cargo/" )
330
331
. join ( path. parent ( ) . unwrap ( ) ) ,
331
332
) ;
332
- Some ( config)
333
333
} ,
334
334
if quiet {
335
335
status_emitter:: Text :: quiet ( )
0 commit comments