File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
tests/run-make/issue-11908 Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use run_make_support:: { rustc, dynamic_lib, tmp_dir} ;
15
15
use std:: fs;
16
- use std:: path:: PathBuf ;
17
16
18
17
fn main ( ) {
19
18
let mut tmp_dir_other = tmp_dir ( ) ;
20
19
tmp_dir_other. push ( "other" ) ;
21
20
22
- fs:: create_dir ( tmp_dir_other) ;
21
+ fs:: create_dir ( tmp_dir_other. clone ( ) ) ;
23
22
rustc ( ) . input ( "foo.rs" )
24
23
. crate_type ( "dylib" )
25
24
. codegen_option ( "prefer-dynamic" )
26
25
. run ( ) ;
27
- fs:: rename ( dynamic_lib ( "foo" ) , tmp_dir_other) ;
26
+ fs:: rename ( dynamic_lib ( "foo" ) , tmp_dir_other. clone ( ) ) ;
28
27
rustc ( ) . input ( "foo.rs" )
29
28
. crate_type ( "dylib" )
30
29
. codegen_option ( "prefer-dynamic" )
31
30
. run ( ) ;
32
31
rustc ( ) . input ( "bar.rs" )
33
- . library_search_path ( tmp_dir_other)
32
+ . library_search_path ( tmp_dir_other. clone ( ) )
34
33
. run ( ) ;
35
34
fs:: remove_dir_all ( tmp_dir ( ) ) ;
36
35
37
- fs:: create_dir_all ( tmp_dir_other) ;
36
+ fs:: create_dir_all ( tmp_dir_other. clone ( ) ) ;
38
37
rustc ( ) . input ( "foo.rs" )
39
38
. crate_type ( "rlib" )
40
39
. run ( ) ;
41
40
let mut tmp_dir_libfoo = tmp_dir ( ) ;
42
41
tmp_dir_libfoo. push ( "libfoo.rlib" ) ;
43
- fs:: rename ( tmp_dir_libfoo, tmp_dir_other) ;
42
+ fs:: rename ( tmp_dir_libfoo, tmp_dir_other. clone ( ) ) ;
44
43
rustc ( ) . input ( "foo.rs" )
45
44
. crate_type ( "rlib" )
46
45
. run ( ) ;
47
46
rustc ( ) . input ( "bar.rs" )
48
- . library_search_path ( tmp_dir_other)
47
+ . library_search_path ( tmp_dir_other. clone ( ) )
49
48
. run ( ) ;
50
49
}
You can’t perform that action at this time.
0 commit comments