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