@@ -111,15 +111,14 @@ static EXTERN_FLAGS: LazyLock<String> = LazyLock::new(|| {
111111 . collect ( ) ;
112112 assert ! (
113113 not_found. is_empty( ) ,
114- "dependencies not found in depinfo: {:?}\n \
114+ "dependencies not found in depinfo: {not_found :?}\n \
115115 help: Make sure the `-Z binary-dep-depinfo` rust flag is enabled\n \
116116 help: Try adding to dev-dependencies in Cargo.toml\n \
117117 help: Be sure to also add `extern crate ...;` to tests/compile-test.rs",
118- not_found,
119118 ) ;
120119 crates
121120 . into_iter ( )
122- . map ( |( name, path) | format ! ( " --extern {}={}" , name , path ) )
121+ . map ( |( name, path) | format ! ( " --extern {name }={path}" ) )
123122 . collect ( )
124123} ) ;
125124
@@ -150,9 +149,8 @@ fn base_config(test_dir: &str) -> compiletest::Config {
150149 . map ( |p| format ! ( " -L dependency={}" , Path :: new( p) . join( "deps" ) . display( ) ) )
151150 . unwrap_or_default ( ) ;
152151 config. target_rustcflags = Some ( format ! (
153- "--emit=metadata -Dwarnings -Zui-testing -L dependency={}{}{}" ,
152+ "--emit=metadata -Dwarnings -Zui-testing -L dependency={}{host_libs }{}" ,
154153 deps_path. display( ) ,
155- host_libs,
156154 & * EXTERN_FLAGS ,
157155 ) ) ;
158156
@@ -239,7 +237,7 @@ fn run_ui_toml() {
239237 Ok ( true ) => { } ,
240238 Ok ( false ) => panic ! ( "Some tests failed" ) ,
241239 Err ( e) => {
242- panic ! ( "I/O failure during tests: {:?}" , e ) ;
240+ panic ! ( "I/O failure during tests: {e :?}" ) ;
243241 } ,
244242 }
245243}
@@ -348,7 +346,7 @@ fn run_ui_cargo() {
348346 Ok ( true ) => { } ,
349347 Ok ( false ) => panic ! ( "Some tests failed" ) ,
350348 Err ( e) => {
351- panic ! ( "I/O failure during tests: {:?}" , e ) ;
349+ panic ! ( "I/O failure during tests: {e :?}" ) ;
352350 } ,
353351 }
354352}
@@ -419,16 +417,15 @@ fn check_rustfix_coverage() {
419417 if rs_path. starts_with ( "tests/ui/crashes" ) {
420418 continue ;
421419 }
422- assert ! ( rs_path. starts_with( "tests/ui/" ) , "{:?}" , rs_file ) ;
420+ assert ! ( rs_path. starts_with( "tests/ui/" ) , "{rs_file :?}" ) ;
423421 let filename = rs_path. strip_prefix ( "tests/ui/" ) . unwrap ( ) ;
424422 assert ! (
425423 RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS
426424 . binary_search_by_key( & filename, Path :: new)
427425 . 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. \
429427 Please either add `// run-rustfix` at the top of the file or add the file to \
430428 `RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS` in `tests/compile-test.rs`.",
431- rs_file,
432429 ) ;
433430 }
434431 }
@@ -478,15 +475,13 @@ fn ui_cargo_toml_metadata() {
478475 . map( |component| component. as_os_str( ) . to_string_lossy( ) . replace( '-' , "_" ) )
479476 . any( |s| * s == name)
480477 || path. starts_with( & cargo_common_metadata_path) ,
481- "{:?} has incorrect package name" ,
482- path
478+ "{path:?} has incorrect package name"
483479 ) ;
484480
485481 let publish = package. get ( "publish" ) . and_then ( toml:: Value :: as_bool) . unwrap_or ( true ) ;
486482 assert ! (
487483 !publish || publish_exceptions. contains( & path. parent( ) . unwrap( ) . to_path_buf( ) ) ,
488- "{:?} lacks `publish = false`" ,
489- path
484+ "{path:?} lacks `publish = false`"
490485 ) ;
491486 }
492487}
0 commit comments