@@ -25,7 +25,7 @@ impl fmt::Display for CudaBuilderError {
2525 }
2626 CudaBuilderError :: BuildFailed => f. write_str ( "Build failed" ) ,
2727 CudaBuilderError :: FailedToCopyPtxFile ( err) => {
28- f. write_str ( & format ! ( "Failed to copy PTX file: {:?}" , err ) )
28+ f. write_str ( & format ! ( "Failed to copy PTX file: {err :?}" ) )
2929 }
3030 }
3131 }
@@ -369,19 +369,14 @@ fn find_rustc_codegen_nvvm() -> PathBuf {
369369 return path;
370370 }
371371 }
372- panic ! ( "Could not find {} in library path" , filename ) ;
372+ panic ! ( "Could not find {filename } in library path" ) ;
373373}
374374
375375/// Joins strings together while ensuring none of the strings contain the separator.
376376fn join_checking_for_separators ( strings : Vec < impl Borrow < str > > , sep : & str ) -> String {
377377 for s in & strings {
378378 let s = s. borrow ( ) ;
379- assert ! (
380- !s. contains( sep) ,
381- "{:?} may not contain separator {:?}" ,
382- s,
383- sep
384- ) ;
379+ assert ! ( !s. contains( sep) , "{s:?} may not contain separator {sep:?}" ) ;
385380 }
386381 strings. join ( sep)
387382}
@@ -404,7 +399,7 @@ fn invoke_rustc(builder: &CudaBuilder) -> Result<PathBuf, CudaBuilderError> {
404399 EmitOption :: LlvmIr => "llvm-ir" ,
405400 EmitOption :: Bitcode => "llvm-bc" ,
406401 } ;
407- rustflags. push ( format ! ( "--emit={}" , string ) ) ;
402+ rustflags. push ( format ! ( "--emit={string}" ) ) ;
408403 }
409404
410405 let mut llvm_args = vec ! [ NvvmOption :: Arch ( builder. arch) . to_string( ) ] ;
@@ -533,7 +528,7 @@ fn get_last_artifact(out: &str) -> Option<PathBuf> {
533528 Ok ( line) => Some ( line) ,
534529 Err ( _) => {
535530 // Pass through invalid lines
536- println ! ( "{}" , line ) ;
531+ println ! ( "{line}" ) ;
537532 None
538533 }
539534 } )
0 commit comments