@@ -111,15 +111,14 @@ static EXTERN_FLAGS: LazyLock<String> = LazyLock::new(|| {
111
111
. collect ( ) ;
112
112
assert ! (
113
113
not_found. is_empty( ) ,
114
- "dependencies not found in depinfo: {:?}\n \
114
+ "dependencies not found in depinfo: {not_found :?}\n \
115
115
help: Make sure the `-Z binary-dep-depinfo` rust flag is enabled\n \
116
116
help: Try adding to dev-dependencies in Cargo.toml\n \
117
117
help: Be sure to also add `extern crate ...;` to tests/compile-test.rs",
118
- not_found,
119
118
) ;
120
119
crates
121
120
. into_iter ( )
122
- . map ( |( name, path) | format ! ( " --extern {}={}" , name , path ) )
121
+ . map ( |( name, path) | format ! ( " --extern {name }={path}" ) )
123
122
. collect ( )
124
123
} ) ;
125
124
@@ -150,9 +149,8 @@ fn base_config(test_dir: &str) -> compiletest::Config {
150
149
. map ( |p| format ! ( " -L dependency={}" , Path :: new( p) . join( "deps" ) . display( ) ) )
151
150
. unwrap_or_default ( ) ;
152
151
config. target_rustcflags = Some ( format ! (
153
- "--emit=metadata -Dwarnings -Zui-testing -L dependency={}{}{}" ,
152
+ "--emit=metadata -Dwarnings -Zui-testing -L dependency={}{host_libs }{}" ,
154
153
deps_path. display( ) ,
155
- host_libs,
156
154
& * EXTERN_FLAGS ,
157
155
) ) ;
158
156
@@ -239,7 +237,7 @@ fn run_ui_toml() {
239
237
Ok ( true ) => { } ,
240
238
Ok ( false ) => panic ! ( "Some tests failed" ) ,
241
239
Err ( e) => {
242
- panic ! ( "I/O failure during tests: {:?}" , e ) ;
240
+ panic ! ( "I/O failure during tests: {e :?}" ) ;
243
241
} ,
244
242
}
245
243
}
@@ -348,7 +346,7 @@ fn run_ui_cargo() {
348
346
Ok ( true ) => { } ,
349
347
Ok ( false ) => panic ! ( "Some tests failed" ) ,
350
348
Err ( e) => {
351
- panic ! ( "I/O failure during tests: {:?}" , e ) ;
349
+ panic ! ( "I/O failure during tests: {e :?}" ) ;
352
350
} ,
353
351
}
354
352
}
@@ -419,16 +417,15 @@ fn check_rustfix_coverage() {
419
417
if rs_path. starts_with ( "tests/ui/crashes" ) {
420
418
continue ;
421
419
}
422
- assert ! ( rs_path. starts_with( "tests/ui/" ) , "{:?}" , rs_file ) ;
420
+ assert ! ( rs_path. starts_with( "tests/ui/" ) , "{rs_file :?}" ) ;
423
421
let filename = rs_path. strip_prefix ( "tests/ui/" ) . unwrap ( ) ;
424
422
assert ! (
425
423
RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS
426
424
. binary_search_by_key( & filename, Path :: new)
427
425
. is_ok( ) ,
428
- "`{}` runs `MachineApplicable` diagnostics but is missing a `run-rustfix` annotation. \
426
+ "`{rs_file }` runs `MachineApplicable` diagnostics but is missing a `run-rustfix` annotation. \
429
427
Please either add `// run-rustfix` at the top of the file or add the file to \
430
428
`RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS` in `tests/compile-test.rs`.",
431
- rs_file,
432
429
) ;
433
430
}
434
431
}
@@ -478,15 +475,13 @@ fn ui_cargo_toml_metadata() {
478
475
. map( |component| component. as_os_str( ) . to_string_lossy( ) . replace( '-' , "_" ) )
479
476
. any( |s| * s == name)
480
477
|| path. starts_with( & cargo_common_metadata_path) ,
481
- "{:?} has incorrect package name" ,
482
- path
478
+ "{path:?} has incorrect package name"
483
479
) ;
484
480
485
481
let publish = package. get ( "publish" ) . and_then ( toml:: Value :: as_bool) . unwrap_or ( true ) ;
486
482
assert ! (
487
483
!publish || publish_exceptions. contains( & path. parent( ) . unwrap( ) . to_path_buf( ) ) ,
488
- "{:?} lacks `publish = false`" ,
489
- path
484
+ "{path:?} lacks `publish = false`"
490
485
) ;
491
486
}
492
487
}
0 commit comments