1
- use cargo:: core:: dependency:: Kind ;
1
+ use cargo:: core:: dependency:: DepKind ;
2
2
use cargo:: core:: { enable_nightly_features, Dependency } ;
3
3
use cargo:: util:: { is_ci, Config } ;
4
4
@@ -232,7 +232,7 @@ fn pub_fail() {
232
232
let input = vec ! [
233
233
pkg!( ( "a" , "0.0.4" ) ) ,
234
234
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 ) , ] ) ,
236
236
pkg!( ( "kB" , "0.0.3" ) => [ dep_req( "a" , ">= 0.0.5" ) , dep( "e" ) , ] ) ,
237
237
] ;
238
238
let reg = registry ( input) ;
@@ -244,7 +244,7 @@ fn basic_public_dependency() {
244
244
let reg = registry ( vec ! [
245
245
pkg!( ( "A" , "0.1.0" ) ) ,
246
246
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 ) ] ) ,
248
248
pkg!( "C" => [ dep( "A" ) , dep( "B" ) ] ) ,
249
249
] ) ;
250
250
@@ -279,7 +279,7 @@ fn public_dependency_filling_in() {
279
279
pkg!( ( "a" , "0.1.1" ) ) ,
280
280
pkg!( ( "b" , "0.0.0" ) => [ dep( "bad" ) ] ) ,
281
281
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 ) ] ) ,
283
283
pkg!( "c" => [ dep_req( "b" , ">=0.0.1" ) ] ) ,
284
284
pkg!( "d" => [ dep( "c" ) , dep( "a" ) , dep( "b" ) ] ) ,
285
285
] ) ;
@@ -315,7 +315,7 @@ fn public_dependency_filling_in_and_update() {
315
315
let reg = registry ( vec ! [
316
316
pkg!( ( "A" , "0.0.0" ) ) ,
317
317
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 ) , ] ) ,
319
319
pkg!( "C" => [ dep( "A" ) , dep( "B" ) ] ) ,
320
320
pkg!( "D" => [ dep( "B" ) , dep( "C" ) ] ) ,
321
321
] ) ;
@@ -341,7 +341,7 @@ fn public_dependency_skipping() {
341
341
pkg!( ( "a" , "0.2.0" ) ) ,
342
342
pkg!( ( "a" , "2.0.0" ) ) ,
343
343
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 ) ] ) ,
345
345
pkg!( "c" => [ dep( "a" ) , dep( "b" ) ] ) ,
346
346
] ;
347
347
let reg = registry ( input) ;
@@ -361,7 +361,7 @@ fn public_dependency_skipping_in_backtracking() {
361
361
pkg!( ( "A" , "0.0.3" ) => [ dep( "bad" ) ] ) ,
362
362
pkg!( ( "A" , "0.0.4" ) ) ,
363
363
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 ) ] ) ,
365
365
pkg!( "C" => [ dep_req( "A" , "<= 0.0.4" ) , dep( "B" ) ] ) ,
366
366
] ;
367
367
let reg = registry ( input) ;
@@ -374,9 +374,9 @@ fn public_sat_topological_order() {
374
374
let input = vec ! [
375
375
pkg!( ( "a" , "0.0.1" ) ) ,
376
376
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 ) , ] ) ,
378
378
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 ) ] ) ,
380
380
] ;
381
381
382
382
let reg = registry ( input) ;
@@ -388,7 +388,7 @@ fn public_sat_unused_makes_things_pub() {
388
388
let input = vec ! [
389
389
pkg!( ( "a" , "0.0.1" ) ) ,
390
390
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 ) , ] ) ,
392
392
pkg!( ( "b" , "8.0.0" ) => [ dep_req( "a" , "= 0.0.1" ) , ] ) ,
393
393
pkg!( "c" => [ dep_req( "b" , "= 8.0.0" ) , dep_req( "a" , "= 0.0.0" ) , ] ) ,
394
394
] ;
@@ -403,8 +403,8 @@ fn public_sat_unused_makes_things_pub_2() {
403
403
pkg!( ( "c" , "0.0.2" ) ) ,
404
404
pkg!( ( "c" , "0.0.1" ) ) ,
405
405
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" ) , ] ) ,
408
408
pkg!( "A" => [ dep( "P" ) , dep_req( "c" , "= 0.0.2" ) , ] ) ,
409
409
] ;
410
410
let reg = registry ( input) ;
@@ -492,13 +492,17 @@ fn test_resolving_with_same_name() {
492
492
#[ test]
493
493
fn test_resolving_with_dev_deps ( ) {
494
494
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 ) ] ) ,
497
497
pkg!( "bar" ) ,
498
498
pkg!( "bat" ) ,
499
499
] ) ;
500
500
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 ( ) ;
502
506
503
507
assert_same ( & res, & names ( & [ "root" , "foo" , "bar" , "baz" , "bat" ] ) ) ;
504
508
}
@@ -1061,7 +1065,7 @@ fn resolving_with_public_constrained_sibling() {
1061
1065
dep_req( "backtrack_trap1" , "1.0" ) ,
1062
1066
dep_req( "backtrack_trap2" , "1.0" ) ,
1063
1067
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 ) ] ) ,
1065
1069
] ;
1066
1070
// Bump these to make the test harder, but you'll also need to
1067
1071
// change the version constraints on `constrained` above. To correctly
0 commit comments