@@ -201,9 +201,10 @@ fn run_ui() {
201201 let quiet = args. quiet ;
202202
203203 compiletest:: run_tests_generic (
204- config,
204+ vec ! [ config] ,
205+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
205206 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) ,
207208 compiletest:: default_per_file_config,
208209 if quiet {
209210 status_emitter:: Text :: quiet ( )
@@ -227,9 +228,10 @@ fn run_internal_tests() {
227228 let quiet = args. quiet ;
228229
229230 compiletest:: run_tests_generic (
230- config,
231+ vec ! [ config] ,
232+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
231233 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) ,
233235 compiletest:: default_per_file_config,
234236 if quiet {
235237 status_emitter:: Text :: quiet ( )
@@ -259,16 +261,15 @@ fn run_ui_toml() {
259261 let quiet = args. quiet ;
260262
261263 ui_test:: run_tests_generic (
262- config,
264+ vec ! [ config] ,
265+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
263266 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| {
267269 config
268270 . program
269271 . envs
270272 . push ( ( "CLIPPY_CONF_DIR" . into ( ) , Some ( path. parent ( ) . unwrap ( ) . into ( ) ) ) ) ;
271- Some ( config)
272273 } ,
273274 if quiet {
274275 status_emitter:: Text :: quiet ( )
@@ -318,19 +319,18 @@ fn run_ui_cargo() {
318319 let quiet = args. quiet ;
319320
320321 ui_test:: run_tests_generic (
321- config,
322+ vec ! [ config] ,
323+ std:: thread:: available_parallelism ( ) . unwrap ( ) ,
322324 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| {
326327 config. out_dir = canonicalize (
327328 std:: env:: current_dir ( )
328329 . unwrap ( )
329330 . join ( "target" )
330331 . join ( "ui_test_cargo/" )
331332 . join ( path. parent ( ) . unwrap ( ) ) ,
332333 ) ;
333- Some ( config)
334334 } ,
335335 if quiet {
336336 status_emitter:: Text :: quiet ( )
0 commit comments