File tree Expand file tree Collapse file tree 8 files changed +15
-18
lines changed
src/tools/run-make-support/src
arguments-non-c-like-enum
c-link-to-rust-va-list-fn Expand file tree Collapse file tree 8 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -525,11 +525,12 @@ macro_rules! impl_common_helpers {
525525 /// Generic command arguments provider. Prefer specific helper methods if possible.
526526 /// Note that for some executables, arguments might be platform specific. For C/C++
527527 /// compilers, arguments might be platform *and* compiler specific.
528- pub fn args<S >( & mut self , args: & [ S ] ) -> & mut Self
528+ pub fn args<V , S >( & mut self , args: V ) -> & mut Self
529529 where
530+ V : AsRef <[ S ] >,
530531 S : AsRef <:: std:: ffi:: OsStr >,
531532 {
532- self . cmd. args( args) ;
533+ self . cmd. args( args. as_ref ( ) ) ;
533534 self
534535 }
535536
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ pub fn main() {
1010 cc ( ) . input ( "test.c" )
1111 . input ( static_lib_name ( "nonclike" ) )
1212 . out_exe ( "test" )
13- . args ( & extra_c_flags ( ) )
14- . args ( & extra_cxx_flags ( ) )
13+ . args ( extra_c_flags ( ) )
14+ . args ( extra_cxx_flags ( ) )
1515 . inspect ( |cmd| eprintln ! ( "{cmd:?}" ) )
1616 . run ( ) ;
1717 run ( "test" ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::fs;
99
1010fn main ( ) {
1111 rustc ( ) . input ( "foo.rs" ) . run ( ) ;
12- cc ( ) . input ( "bar.c" ) . input ( static_lib_name ( "foo" ) ) . out_exe ( "bar" ) . args ( & extra_c_flags ( ) ) . run ( ) ;
12+ cc ( ) . input ( "bar.c" ) . input ( static_lib_name ( "foo" ) ) . out_exe ( "bar" ) . args ( extra_c_flags ( ) ) . run ( ) ;
1313 run ( "bar" ) ;
1414 remove_file ( static_lib_name ( "foo" ) ) ;
1515 run ( "bar" ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ fn main() {
1212 cc ( ) . input ( "test.c" )
1313 . input ( static_lib_name ( "checkrust" ) )
1414 . out_exe ( "test" )
15- . args ( & extra_c_flags ( ) )
15+ . args ( extra_c_flags ( ) )
1616 . run ( ) ;
1717 run ( "test" ) ;
1818}
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fn main() {
1111 cc ( ) . input ( "program.c" )
1212 . arg ( static_lib_name ( "library" ) )
1313 . out_exe ( "program" )
14- . args ( & extra_c_flags ( ) )
15- . args ( & extra_cxx_flags ( ) )
14+ . args ( extra_c_flags ( ) )
15+ . args ( extra_cxx_flags ( ) )
1616 . run ( ) ;
1717 run ( & bin_name ( "program" ) ) ;
1818}
Original file line number Diff line number Diff line change @@ -86,12 +86,8 @@ fn main() {
8686}
8787
8888fn check ( CheckCfg { args, contains } : CheckCfg ) {
89- let output = rustc ( )
90- . input ( "lib.rs" )
91- . arg ( "-Zunstable-options" )
92- . arg ( "--print=check-cfg" )
93- . args ( & * args)
94- . run ( ) ;
89+ let output =
90+ rustc ( ) . input ( "lib.rs" ) . arg ( "-Zunstable-options" ) . arg ( "--print=check-cfg" ) . args ( args) . run ( ) ;
9591
9692 let stdout = output. stdout_utf8 ( ) ;
9793
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fn main() {
1111 cc ( ) . input ( "test.c" )
1212 . arg ( & static_lib_name ( "nonclike" ) )
1313 . out_exe ( "test" )
14- . args ( & extra_c_flags ( ) )
15- . args ( & extra_cxx_flags ( ) )
14+ . args ( extra_c_flags ( ) )
15+ . args ( extra_cxx_flags ( ) )
1616 . run ( ) ;
1717 run ( "test" ) ;
1818}
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ fn main() {
2020 . out_exe ( & dynamic_lib_name ( "bar" ) )
2121 . arg ( "-fPIC" )
2222 . arg ( "-shared" )
23- . args ( & extra_c_flags ( ) )
24- . args ( & extra_cxx_flags ( ) )
23+ . args ( extra_c_flags ( ) )
24+ . args ( extra_cxx_flags ( ) )
2525 . run ( ) ;
2626 llvm_readobj ( )
2727 . input ( dynamic_lib_name ( "bar" ) )
You can’t perform that action at this time.
0 commit comments