@@ -2602,9 +2602,7 @@ target-dep = ["dep:target-dep"]
2602
2602
2603
2603
#[ cargo_test]
2604
2604
fn add_feature_for_unused_dep_existing_table ( ) {
2605
- Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
2606
- Package :: new ( "baz" , "0.1.0" ) . publish ( ) ;
2607
- Package :: new ( "target-dep" , "0.1.0" ) . publish ( ) ;
2605
+ Package :: new ( "dep" , "0.1.0" ) . publish ( ) ;
2608
2606
let p = project ( )
2609
2607
. file (
2610
2608
"Cargo.toml" ,
@@ -2615,16 +2613,10 @@ version = "0.1.0"
2615
2613
edition = "2021"
2616
2614
2617
2615
[dependencies]
2618
- bar = { version = "0.1.0", optional = true }
2619
-
2620
- [build-dependencies]
2621
- baz = { version = "0.1.0", optional = true }
2622
-
2623
- [target.'cfg(target_os = "linux")'.dependencies]
2624
- target-dep = { version = "0.1.0", optional = true }
2616
+ dep = { version = "0.1.0", optional = true }
2625
2617
2626
2618
[features]
2627
- target-dep = ["dep:target-dep" ]
2619
+ existing = []
2628
2620
"# ,
2629
2621
)
2630
2622
. file ( "src/lib.rs" , "" )
@@ -2635,9 +2627,9 @@ target-dep = ["dep:target-dep"]
2635
2627
. with_stderr (
2636
2628
"\
2637
2629
[MIGRATING] Cargo.toml from 2021 edition to 2024
2638
- [FIXED] Cargo.toml (2 fixes )
2630
+ [FIXED] Cargo.toml (1 fix )
2639
2631
[UPDATING] `dummy-registry` index
2640
- [LOCKING] 4 packages to latest compatible versions
2632
+ [LOCKING] 2 packages to latest compatible versions
2641
2633
[CHECKING] foo v0.1.0 ([CWD])
2642
2634
[MIGRATING] src/lib.rs from 2021 edition to 2024
2643
2635
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
@@ -2654,18 +2646,11 @@ version = "0.1.0"
2654
2646
edition = "2021"
2655
2647
2656
2648
[dependencies]
2657
- bar = { version = "0.1.0", optional = true }
2658
-
2659
- [build-dependencies]
2660
- baz = { version = "0.1.0", optional = true }
2661
-
2662
- [target.'cfg(target_os = "linux")'.dependencies]
2663
- target-dep = { version = "0.1.0", optional = true }
2649
+ dep = { version = "0.1.0", optional = true }
2664
2650
2665
2651
[features]
2666
- target-dep = ["dep:target-dep"]
2667
- bar = ["dep:bar"]
2668
- baz = ["dep:baz"]
2652
+ existing = []
2653
+ dep = ["dep:dep"]
2669
2654
2670
2655
"# ] ] ,
2671
2656
) ;
0 commit comments