@@ -200,9 +200,10 @@ fn run_ui() {
200200 let quiet = args. quiet ;
201201
202202 compiletest:: run_tests_generic (
203- config,
203+ vec ! [ config] ,
204+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
204205 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) ,
206207 compiletest:: default_per_file_config,
207208 if quiet {
208209 status_emitter:: Text :: quiet ( )
@@ -226,9 +227,10 @@ fn run_internal_tests() {
226227 let quiet = args. quiet ;
227228
228229 compiletest:: run_tests_generic (
229- config,
230+ vec ! [ config] ,
231+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
230232 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) ,
232234 compiletest:: default_per_file_config,
233235 if quiet {
234236 status_emitter:: Text :: quiet ( )
@@ -258,16 +260,15 @@ fn run_ui_toml() {
258260 let quiet = args. quiet ;
259261
260262 ui_test:: run_tests_generic (
261- config,
263+ vec ! [ config] ,
264+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
262265 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| {
266268 config
267269 . program
268270 . envs
269271 . push ( ( "CLIPPY_CONF_DIR" . into ( ) , Some ( path. parent ( ) . unwrap ( ) . into ( ) ) ) ) ;
270- Some ( config)
271272 } ,
272273 if quiet {
273274 status_emitter:: Text :: quiet ( )
@@ -317,19 +318,18 @@ fn run_ui_cargo() {
317318 let quiet = args. quiet ;
318319
319320 ui_test:: run_tests_generic (
320- config,
321+ vec ! [ config] ,
322+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
321323 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| {
325326 config. out_dir = canonicalize (
326327 std:: env:: current_dir ( )
327328 . unwrap ( )
328329 . join ( "target" )
329330 . join ( "ui_test_cargo/" )
330331 . join ( path. parent ( ) . unwrap ( ) ) ,
331332 ) ;
332- Some ( config)
333333 } ,
334334 if quiet {
335335 status_emitter:: Text :: quiet ( )
0 commit comments