1- use cargo:: core:: dependency:: Kind ;
1+ use cargo:: core:: dependency:: DepKind ;
22use cargo:: core:: { enable_nightly_features, Dependency } ;
33use cargo:: util:: { is_ci, Config } ;
44
@@ -232,7 +232,7 @@ fn pub_fail() {
232232 let input = vec ! [
233233 pkg!( ( "a" , "0.0.4" ) ) ,
234234 pkg!( ( "a" , "0.0.5" ) ) ,
235- pkg!( ( "e" , "0.0.6" ) => [ dep_req_kind( "a" , "<= 0.0.4" , Kind :: Normal , true ) , ] ) ,
235+ pkg!( ( "e" , "0.0.6" ) => [ dep_req_kind( "a" , "<= 0.0.4" , DepKind :: Normal , true ) , ] ) ,
236236 pkg!( ( "kB" , "0.0.3" ) => [ dep_req( "a" , ">= 0.0.5" ) , dep( "e" ) , ] ) ,
237237 ] ;
238238 let reg = registry ( input) ;
@@ -244,7 +244,7 @@ fn basic_public_dependency() {
244244 let reg = registry ( vec ! [
245245 pkg!( ( "A" , "0.1.0" ) ) ,
246246 pkg!( ( "A" , "0.2.0" ) ) ,
247- pkg!( "B" => [ dep_req_kind( "A" , "0.1" , Kind :: Normal , true ) ] ) ,
247+ pkg!( "B" => [ dep_req_kind( "A" , "0.1" , DepKind :: Normal , true ) ] ) ,
248248 pkg!( "C" => [ dep( "A" ) , dep( "B" ) ] ) ,
249249 ] ) ;
250250
@@ -279,7 +279,7 @@ fn public_dependency_filling_in() {
279279 pkg!( ( "a" , "0.1.1" ) ) ,
280280 pkg!( ( "b" , "0.0.0" ) => [ dep( "bad" ) ] ) ,
281281 pkg!( ( "b" , "0.0.1" ) => [ dep( "bad" ) ] ) ,
282- pkg!( ( "b" , "0.0.2" ) => [ dep_req_kind( "a" , "=0.0.6" , Kind :: Normal , true ) ] ) ,
282+ pkg!( ( "b" , "0.0.2" ) => [ dep_req_kind( "a" , "=0.0.6" , DepKind :: Normal , true ) ] ) ,
283283 pkg!( "c" => [ dep_req( "b" , ">=0.0.1" ) ] ) ,
284284 pkg!( "d" => [ dep( "c" ) , dep( "a" ) , dep( "b" ) ] ) ,
285285 ] ) ;
@@ -315,7 +315,7 @@ fn public_dependency_filling_in_and_update() {
315315 let reg = registry ( vec ! [
316316 pkg!( ( "A" , "0.0.0" ) ) ,
317317 pkg!( ( "A" , "0.0.2" ) ) ,
318- pkg!( "B" => [ dep_req_kind( "A" , "=0.0.0" , Kind :: Normal , true ) , ] ) ,
318+ pkg!( "B" => [ dep_req_kind( "A" , "=0.0.0" , DepKind :: Normal , true ) , ] ) ,
319319 pkg!( "C" => [ dep( "A" ) , dep( "B" ) ] ) ,
320320 pkg!( "D" => [ dep( "B" ) , dep( "C" ) ] ) ,
321321 ] ) ;
@@ -341,7 +341,7 @@ fn public_dependency_skipping() {
341341 pkg!( ( "a" , "0.2.0" ) ) ,
342342 pkg!( ( "a" , "2.0.0" ) ) ,
343343 pkg!( ( "b" , "0.0.0" ) => [ dep( "bad" ) ] ) ,
344- pkg!( ( "b" , "0.2.1" ) => [ dep_req_kind( "a" , "0.2.0" , Kind :: Normal , true ) ] ) ,
344+ pkg!( ( "b" , "0.2.1" ) => [ dep_req_kind( "a" , "0.2.0" , DepKind :: Normal , true ) ] ) ,
345345 pkg!( "c" => [ dep( "a" ) , dep( "b" ) ] ) ,
346346 ] ;
347347 let reg = registry ( input) ;
@@ -361,7 +361,7 @@ fn public_dependency_skipping_in_backtracking() {
361361 pkg!( ( "A" , "0.0.3" ) => [ dep( "bad" ) ] ) ,
362362 pkg!( ( "A" , "0.0.4" ) ) ,
363363 pkg!( ( "A" , "0.0.5" ) ) ,
364- pkg!( "B" => [ dep_req_kind( "A" , ">= 0.0.3" , Kind :: Normal , true ) ] ) ,
364+ pkg!( "B" => [ dep_req_kind( "A" , ">= 0.0.3" , DepKind :: Normal , true ) ] ) ,
365365 pkg!( "C" => [ dep_req( "A" , "<= 0.0.4" ) , dep( "B" ) ] ) ,
366366 ] ;
367367 let reg = registry ( input) ;
@@ -374,9 +374,9 @@ fn public_sat_topological_order() {
374374 let input = vec ! [
375375 pkg!( ( "a" , "0.0.1" ) ) ,
376376 pkg!( ( "a" , "0.0.0" ) ) ,
377- pkg!( ( "b" , "0.0.1" ) => [ dep_req_kind( "a" , "= 0.0.1" , Kind :: Normal , true ) , ] ) ,
377+ pkg!( ( "b" , "0.0.1" ) => [ dep_req_kind( "a" , "= 0.0.1" , DepKind :: Normal , true ) , ] ) ,
378378 pkg!( ( "b" , "0.0.0" ) => [ dep( "bad" ) , ] ) ,
379- pkg!( "A" => [ dep_req( "a" , "= 0.0.0" ) , dep_req_kind( "b" , "*" , Kind :: Normal , true ) ] ) ,
379+ pkg!( "A" => [ dep_req( "a" , "= 0.0.0" ) , dep_req_kind( "b" , "*" , DepKind :: Normal , true ) ] ) ,
380380 ] ;
381381
382382 let reg = registry ( input) ;
@@ -388,7 +388,7 @@ fn public_sat_unused_makes_things_pub() {
388388 let input = vec ! [
389389 pkg!( ( "a" , "0.0.1" ) ) ,
390390 pkg!( ( "a" , "0.0.0" ) ) ,
391- pkg!( ( "b" , "8.0.1" ) => [ dep_req_kind( "a" , "= 0.0.1" , Kind :: Normal , true ) , ] ) ,
391+ pkg!( ( "b" , "8.0.1" ) => [ dep_req_kind( "a" , "= 0.0.1" , DepKind :: Normal , true ) , ] ) ,
392392 pkg!( ( "b" , "8.0.0" ) => [ dep_req( "a" , "= 0.0.1" ) , ] ) ,
393393 pkg!( "c" => [ dep_req( "b" , "= 8.0.0" ) , dep_req( "a" , "= 0.0.0" ) , ] ) ,
394394 ] ;
@@ -403,8 +403,8 @@ fn public_sat_unused_makes_things_pub_2() {
403403 pkg!( ( "c" , "0.0.2" ) ) ,
404404 pkg!( ( "c" , "0.0.1" ) ) ,
405405 pkg!( ( "a-sys" , "0.0.2" ) ) ,
406- pkg!( ( "a-sys" , "0.0.1" ) => [ dep_req_kind( "c" , "= 0.0.1" , Kind :: Normal , true ) , ] ) ,
407- pkg!( "P" => [ dep_req_kind( "a-sys" , "*" , Kind :: Normal , true ) , dep_req( "c" , "= 0.0.1" ) , ] ) ,
406+ pkg!( ( "a-sys" , "0.0.1" ) => [ dep_req_kind( "c" , "= 0.0.1" , DepKind :: Normal , true ) , ] ) ,
407+ pkg!( "P" => [ dep_req_kind( "a-sys" , "*" , DepKind :: Normal , true ) , dep_req( "c" , "= 0.0.1" ) , ] ) ,
408408 pkg!( "A" => [ dep( "P" ) , dep_req( "c" , "= 0.0.2" ) , ] ) ,
409409 ] ;
410410 let reg = registry ( input) ;
@@ -492,13 +492,17 @@ fn test_resolving_with_same_name() {
492492#[ test]
493493fn test_resolving_with_dev_deps ( ) {
494494 let reg = registry ( vec ! [
495- pkg!( "foo" => [ "bar" , dep_kind( "baz" , Kind :: Development ) ] ) ,
496- pkg!( "baz" => [ "bat" , dep_kind( "bam" , Kind :: Development ) ] ) ,
495+ pkg!( "foo" => [ "bar" , dep_kind( "baz" , DepKind :: Development ) ] ) ,
496+ pkg!( "baz" => [ "bat" , dep_kind( "bam" , DepKind :: Development ) ] ) ,
497497 pkg!( "bar" ) ,
498498 pkg!( "bat" ) ,
499499 ] ) ;
500500
501- let res = resolve ( vec ! [ dep( "foo" ) , dep_kind( "baz" , Kind :: Development ) ] , & reg) . unwrap ( ) ;
501+ let res = resolve (
502+ vec ! [ dep( "foo" ) , dep_kind( "baz" , DepKind :: Development ) ] ,
503+ & reg,
504+ )
505+ . unwrap ( ) ;
502506
503507 assert_same ( & res, & names ( & [ "root" , "foo" , "bar" , "baz" , "bat" ] ) ) ;
504508}
@@ -1061,7 +1065,7 @@ fn resolving_with_public_constrained_sibling() {
10611065 dep_req( "backtrack_trap1" , "1.0" ) ,
10621066 dep_req( "backtrack_trap2" , "1.0" ) ,
10631067 dep_req( "constrained" , "<=60" ) ] ) ,
1064- pkg!( ( "bar" , "1.0.0" ) => [ dep_req_kind( "constrained" , ">=60" , Kind :: Normal , true ) ] ) ,
1068+ pkg!( ( "bar" , "1.0.0" ) => [ dep_req_kind( "constrained" , ">=60" , DepKind :: Normal , true ) ] ) ,
10651069 ] ;
10661070 // Bump these to make the test harder, but you'll also need to
10671071 // change the version constraints on `constrained` above. To correctly
0 commit comments