@@ -795,37 +795,6 @@ fn add_patch_with_features() {
795
795
. file (
796
796
"Cargo.toml" ,
797
797
r#"
798
- [package]
799
- name = "foo"
800
- version = "0.0.1"
801
- authors = []
802
-
803
- [dependencies]
804
- bar = "0.1.0"
805
- "# ,
806
- )
807
- . file ( "src/lib.rs" , "" )
808
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
809
- . file ( "bar/src/lib.rs" , r#""# )
810
- . build ( ) ;
811
-
812
- p. cargo ( "build" )
813
- . with_stderr (
814
- "\
815
- [UPDATING] `[ROOT][..]` index
816
- [DOWNLOADING] crates ...
817
- [DOWNLOADED] bar v0.1.0 [..]
818
- [COMPILING] bar v0.1.0
819
- [COMPILING] foo v0.0.1 ([CWD])
820
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
821
- " ,
822
- )
823
- . run ( ) ;
824
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
825
-
826
- p. change_file (
827
- "Cargo.toml" ,
828
- r#"
829
798
[package]
830
799
name = "foo"
831
800
version = "0.0.1"
@@ -837,13 +806,18 @@ fn add_patch_with_features() {
837
806
[patch.crates-io]
838
807
bar = { path = 'bar', features = ["some_feature"] }
839
808
"# ,
840
- ) ;
809
+ )
810
+ . file ( "src/lib.rs" , "" )
811
+ . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
812
+ . file ( "bar/src/lib.rs" , r#""# )
813
+ . build ( ) ;
841
814
842
815
p. cargo ( "build" )
843
816
. with_stderr (
844
817
"\
845
818
[WARNING] patch for `bar` uses the features mechanism. \
846
819
default-features and features will not take effect because the patch dependency does not support this mechanism
820
+ [UPDATING] `[ROOT][..]` index
847
821
[COMPILING] bar v0.1.0 ([CWD]/bar)
848
822
[COMPILING] foo v0.0.1 ([CWD])
849
823
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
@@ -869,37 +843,6 @@ fn add_patch_with_setting_default_features() {
869
843
. file (
870
844
"Cargo.toml" ,
871
845
r#"
872
- [package]
873
- name = "foo"
874
- version = "0.0.1"
875
- authors = []
876
-
877
- [dependencies]
878
- bar = "0.1.0"
879
- "# ,
880
- )
881
- . file ( "src/lib.rs" , "" )
882
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
883
- . file ( "bar/src/lib.rs" , r#""# )
884
- . build ( ) ;
885
-
886
- p. cargo ( "build" )
887
- . with_stderr (
888
- "\
889
- [UPDATING] `[ROOT][..]` index
890
- [DOWNLOADING] crates ...
891
- [DOWNLOADED] bar v0.1.0 [..]
892
- [COMPILING] bar v0.1.0
893
- [COMPILING] foo v0.0.1 ([CWD])
894
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
895
- " ,
896
- )
897
- . run ( ) ;
898
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
899
-
900
- p. change_file (
901
- "Cargo.toml" ,
902
- r#"
903
846
[package]
904
847
name = "foo"
905
848
version = "0.0.1"
@@ -911,13 +854,18 @@ fn add_patch_with_setting_default_features() {
911
854
[patch.crates-io]
912
855
bar = { path = 'bar', default-features = false, features = ["none_default_feature"] }
913
856
"# ,
914
- ) ;
857
+ )
858
+ . file ( "src/lib.rs" , "" )
859
+ . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
860
+ . file ( "bar/src/lib.rs" , r#""# )
861
+ . build ( ) ;
915
862
916
863
p. cargo ( "build" )
917
864
. with_stderr (
918
865
"\
919
866
[WARNING] patch for `bar` uses the features mechanism. \
920
867
default-features and features will not take effect because the patch dependency does not support this mechanism
868
+ [UPDATING] `[ROOT][..]` index
921
869
[COMPILING] bar v0.1.0 ([CWD]/bar)
922
870
[COMPILING] foo v0.0.1 ([CWD])
923
871
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
0 commit comments