@@ -22,63 +22,63 @@ fn test_with_teardown(rustc_calls: &dyn Fn()) {
22
22
}
23
23
24
24
fn main ( ) {
25
- test_with_teardown ( || {
25
+ test_with_teardown ( & || {
26
26
// Building just baz
27
27
rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . run ( ) ;
28
28
rustc ( ) . crate_type ( "dylib" ) . input ( "bar1.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
29
29
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
30
30
rustc ( ) . crate_type ( "bin" ) . input ( "baz.rs" ) . run ( ) ;
31
31
} ) ;
32
- test_with_teardown ( || {
32
+ test_with_teardown ( & || {
33
33
rustc ( ) . crate_type ( "dylib" ) . input ( "foo.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
34
34
rustc ( ) . crate_type ( "rlib" ) . input ( "bar1.rs" ) . run ( ) ;
35
35
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
36
36
rustc ( ) . crate_type ( "bin" ) . input ( "baz.rs" ) . run ( ) ;
37
37
} ) ;
38
- test_with_teardown ( || {
38
+ test_with_teardown ( & || {
39
39
// Building baz2
40
40
rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . run ( ) ;
41
41
rustc ( ) . crate_type ( "dylib" ) . input ( "bar1.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
42
42
rustc ( ) . crate_type ( "dylib" ) . input ( "bar2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
43
43
rustc ( ) . crate_type ( "dylib" ) . input ( "baz2.rs" ) . run_fail_assert_exit_code ( 1 ) ;
44
44
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run_fail_assert_exit_code ( 1 ) ;
45
45
} ) ;
46
- test_with_teardown ( || {
46
+ test_with_teardown ( & || {
47
47
rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . run ( ) ;
48
48
rustc ( ) . crate_type ( "rlib" ) . input ( "bar1.rs" ) . run ( ) ;
49
49
rustc ( ) . crate_type ( "dylib" ) . input ( "bar2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
50
50
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz2.rs" ) . run ( ) ;
51
51
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run ( ) ;
52
52
} ) ;
53
- test_with_teardown ( || {
53
+ test_with_teardown ( & || {
54
54
rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . run ( ) ;
55
55
rustc ( ) . crate_type ( "dylib" ) . input ( "bar1.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
56
56
rustc ( ) . crate_type ( "rlib" ) . input ( "bar2.rs" ) . run ( ) ;
57
57
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
58
58
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run ( ) ;
59
59
} ) ;
60
- test_with_teardown ( || {
60
+ test_with_teardown ( & || {
61
61
rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . run ( ) ;
62
62
rustc ( ) . crate_type ( "rlib" ) . input ( "bar1.rs" ) . run ( ) ;
63
63
rustc ( ) . crate_type ( "rlib" ) . input ( "bar2.rs" ) . run ( ) ;
64
64
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
65
65
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run ( ) ;
66
66
} ) ;
67
- test_with_teardown ( || {
67
+ test_with_teardown ( & || {
68
68
rustc ( ) . crate_type ( "dylib" ) . input ( "foo.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
69
69
rustc ( ) . crate_type ( "rlib" ) . input ( "bar1.rs" ) . run ( ) ;
70
70
rustc ( ) . crate_type ( "rlib" ) . input ( "bar2.rs" ) . run ( ) ;
71
71
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
72
72
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run ( ) ;
73
73
} ) ;
74
- test_with_teardown ( || {
74
+ test_with_teardown ( & || {
75
75
rustc ( ) . crate_type ( "dylib" ) . input ( "foo.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
76
76
rustc ( ) . crate_type ( "dylib" ) . input ( "bar1.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
77
77
rustc ( ) . crate_type ( "rlib" ) . input ( "bar2.rs" ) . run ( ) ;
78
78
rustc ( ) . crate_type ( "dylib,rlib" ) . input ( "baz2.rs" ) . run ( ) ;
79
79
rustc ( ) . crate_type ( "bin" ) . input ( "baz2.rs" ) . run ( ) ;
80
80
} ) ;
81
- test_with_teardown ( || {
81
+ test_with_teardown ( & || {
82
82
rustc ( ) . crate_type ( "dylib" ) . input ( "foo.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
83
83
rustc ( ) . crate_type ( "rlib" ) . input ( "bar1.rs" ) . run ( ) ;
84
84
rustc ( ) . crate_type ( "dylib" ) . input ( "bar2.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
0 commit comments