File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ fn main() {
99
99
) ;
100
100
match ( test, & kind[ ..] ) {
101
101
( true , "test" ) => {
102
+ // For test binaries we call `cargo rustc --test target -- <rustc args>`
102
103
if let Err ( code) = process (
103
104
vec ! [ "--test" . to_string( ) , target. name] . into_iter ( ) . chain (
104
105
args,
@@ -109,6 +110,8 @@ fn main() {
109
110
}
110
111
}
111
112
( true , "lib" ) => {
113
+ // For libraries we call `cargo rustc -- --test <rustc args>`
114
+ // Notice now that `--test` is a rustc arg rather than a cargo arg.
112
115
if let Err ( code) = process (
113
116
vec ! [ "--" . to_string( ) , "--test" . to_string( ) ] . into_iter ( ) . chain (
114
117
args,
@@ -119,6 +122,7 @@ fn main() {
119
122
}
120
123
}
121
124
( false , "bin" ) => {
125
+ // For ordinary binaries we call `cargo rustc --bin target -- <rustc args>`
122
126
if let Err ( code) = process (
123
127
vec ! [ "--bin" . to_string( ) , target. name] . into_iter ( ) . chain (
124
128
args,
You can’t perform that action at this time.
0 commit comments