@@ -132,7 +132,7 @@ fn compute_deps<'a, 'b, 'cfg>(
132
132
if unit. target . is_custom_build ( ) {
133
133
return Ok ( ret) ;
134
134
}
135
- ret. extend ( dep_build_script ( cx , unit ) ) ;
135
+ ret. extend ( dep_build_script ( unit , cx ) ) ;
136
136
137
137
// If this target is a binary, test, example, etc, then it depends on
138
138
// the library of the same package. The call to `resolve.deps` above
@@ -141,7 +141,7 @@ fn compute_deps<'a, 'b, 'cfg>(
141
141
if unit. target . is_lib ( ) && unit. mode != CompileMode :: Doctest {
142
142
return Ok ( ret) ;
143
143
}
144
- ret. extend ( maybe_lib ( cx , unit , profile_for) ) ;
144
+ ret. extend ( maybe_lib ( unit , cx , profile_for) ) ;
145
145
146
146
Ok ( ret)
147
147
}
@@ -178,7 +178,7 @@ fn compute_deps_custom_build<'a, 'cfg>(
178
178
if !unit. target . linkable ( ) || unit. pkg . manifest ( ) . links ( ) . is_none ( ) {
179
179
return None ;
180
180
}
181
- dep_build_script ( cx , unit )
181
+ dep_build_script ( unit , cx )
182
182
} )
183
183
. chain ( Some ( (
184
184
new_unit (
@@ -248,18 +248,18 @@ fn compute_deps_doc<'a, 'cfg>(
248
248
}
249
249
250
250
// Be sure to build/run the build script for documented libraries as
251
- ret. extend ( dep_build_script ( cx , unit ) ) ;
251
+ ret. extend ( dep_build_script ( unit , cx ) ) ;
252
252
253
253
// If we document a binary, we need the library available
254
254
if unit. target . is_bin ( ) {
255
- ret. extend ( maybe_lib ( cx , unit , ProfileFor :: Any ) ) ;
255
+ ret. extend ( maybe_lib ( unit , cx , ProfileFor :: Any ) ) ;
256
256
}
257
257
Ok ( ret)
258
258
}
259
259
260
260
fn maybe_lib < ' a > (
261
- cx : & Context ,
262
261
unit : & Unit < ' a > ,
262
+ cx : & Context ,
263
263
profile_for : ProfileFor ,
264
264
) -> Option < ( Unit < ' a > , ProfileFor ) > {
265
265
let mode = check_or_build_mode ( & unit. mode , unit. target ) ;
@@ -276,7 +276,7 @@ fn maybe_lib<'a>(
276
276
/// script itself doesn't have any dependencies, so even in that case a unit
277
277
/// of work is still returned. `None` is only returned if the package has no
278
278
/// build script.
279
- fn dep_build_script < ' a > ( cx : & Context , unit : & Unit < ' a > ) -> Option < ( Unit < ' a > , ProfileFor ) > {
279
+ fn dep_build_script < ' a > ( unit : & Unit < ' a > , cx : & Context ) -> Option < ( Unit < ' a > , ProfileFor ) > {
280
280
unit. pkg
281
281
. targets ( )
282
282
. iter ( )
0 commit comments