@@ -285,8 +285,8 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
285285 format!( "--target={}" , config. target) ,
286286 "-L" . to_string( ) ,
287287 aux_dir. to_str( ) . unwrap( ) . to_string( ) ) ;
288- args. extend ( split_maybe_args ( & config. target_rustcflags ) . into_iter ( ) ) ;
289- args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
288+ args. extend ( split_maybe_args ( & config. target_rustcflags ) ) ;
289+ args. extend ( split_maybe_args ( & props. compile_flags ) ) ;
290290 return ProcArgs {
291291 prog : config. rustc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
292292 args : args,
@@ -333,8 +333,8 @@ actual:\n\
333333 config. build_base. to_str( ) . unwrap( ) . to_string( ) ,
334334 "-L" . to_string( ) ,
335335 aux_dir. to_str( ) . unwrap( ) . to_string( ) ) ;
336- args. extend ( split_maybe_args ( & config. target_rustcflags ) . into_iter ( ) ) ;
337- args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
336+ args. extend ( split_maybe_args ( & config. target_rustcflags ) ) ;
337+ args. extend ( split_maybe_args ( & props. compile_flags ) ) ;
338338 // FIXME (#9639): This needs to handle non-utf8 paths
339339 return ProcArgs {
340340 prog : config. rustc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -380,7 +380,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
380380 script_str. push_str ( & format ! ( "set solib-search-path \
381381 ./{}/stage2/lib/rustlib/{}/lib/\n ",
382382 config. host, config. target) ) ;
383- for line in breakpoint_lines. iter ( ) {
383+ for line in & breakpoint_lines {
384384 script_str. push_str ( & format ! ( "break {:?}:{}\n " ,
385385 testfile. file_name( ) . unwrap( )
386386 . to_string_lossy( ) ,
@@ -1171,7 +1171,7 @@ fn document(config: &Config, props: &TestProps,
11711171 out_dir. to_str( ) . unwrap( ) . to_string( ) ,
11721172 testfile. to_str( ) . unwrap( ) . to_string( ) ] ;
11731173 args. extend ( extra_args. iter ( ) . cloned ( ) ) ;
1174- args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
1174+ args. extend ( split_maybe_args ( & props. compile_flags ) ) ;
11751175 let args = ProcArgs {
11761176 prog : config. rustdoc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
11771177 args : args,
@@ -1236,7 +1236,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
12361236 vec ! ( "--crate-type=dylib" . to_string( ) )
12371237 }
12381238 } ;
1239- crate_type. extend ( extra_link_args. clone ( ) . into_iter ( ) ) ;
1239+ crate_type. extend ( extra_link_args. clone ( ) ) ;
12401240 let aux_args =
12411241 make_compile_args ( config,
12421242 & aux_props,
@@ -1334,11 +1334,11 @@ fn make_compile_args<F>(config: &Config,
13341334 } ;
13351335 args. push ( path. to_str ( ) . unwrap ( ) . to_string ( ) ) ;
13361336 if props. force_host {
1337- args. extend ( split_maybe_args ( & config. host_rustcflags ) . into_iter ( ) ) ;
1337+ args. extend ( split_maybe_args ( & config. host_rustcflags ) ) ;
13381338 } else {
1339- args. extend ( split_maybe_args ( & config. target_rustcflags ) . into_iter ( ) ) ;
1339+ args. extend ( split_maybe_args ( & config. target_rustcflags ) ) ;
13401340 }
1341- args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
1341+ args. extend ( split_maybe_args ( & props. compile_flags ) ) ;
13421342 return ProcArgs {
13431343 prog : config. rustc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
13441344 args : args,
@@ -1373,7 +1373,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path)
13731373 args. push ( exe_file. to_str ( ) . unwrap ( ) . to_string ( ) ) ;
13741374
13751375 // Add the arguments in the run_flags directive
1376- args. extend ( split_maybe_args ( & props. run_flags ) . into_iter ( ) ) ;
1376+ args. extend ( split_maybe_args ( & props. run_flags ) ) ;
13771377
13781378 let prog = args. remove ( 0 ) ;
13791379 return ProcArgs {
@@ -1683,7 +1683,7 @@ fn compile_test_and_save_ir(config: &Config, props: &TestProps,
16831683 aux_dir. to_str( ) . unwrap( ) . to_string( ) ) ;
16841684 let llvm_args = vec ! ( "--emit=llvm-ir" . to_string( ) ,
16851685 "--crate-type=lib" . to_string( ) ) ;
1686- link_args. extend ( llvm_args. into_iter ( ) ) ;
1686+ link_args. extend ( llvm_args) ;
16871687 let args = make_compile_args ( config,
16881688 props,
16891689 link_args,
0 commit comments