File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -2856,3 +2856,50 @@ fn same_target_artifact_dep_sharing() {
2856
2856
)
2857
2857
. run ( ) ;
2858
2858
}
2859
+
2860
+ #[ cargo_test]
2861
+ fn check_transitive_artifact_dependency_with_different_target ( ) {
2862
+ let p = project ( )
2863
+ . file (
2864
+ "Cargo.toml" ,
2865
+ r#"
2866
+ [package]
2867
+ name = "foo"
2868
+ version = "0.0.0"
2869
+
2870
+ [dependencies]
2871
+ bar = { path = "bar/" }
2872
+ "# ,
2873
+ )
2874
+ . file ( "src/lib.rs" , "" )
2875
+ . file (
2876
+ "bar/Cargo.toml" ,
2877
+ r#"
2878
+ [package]
2879
+ name = "bar"
2880
+ version = "0.0.0"
2881
+
2882
+ [dependencies]
2883
+ baz = { path = "baz/", artifact = "bin", target = "custom" }
2884
+ "# ,
2885
+ )
2886
+ . file ( "bar/src/lib.rs" , "" )
2887
+ . file (
2888
+ "bar/baz/Cargo.toml" ,
2889
+ r#"
2890
+ [package]
2891
+ name = "baz"
2892
+ version = "0.0.0"
2893
+
2894
+ [dependencies]
2895
+ "# ,
2896
+ )
2897
+ . file ( "bar/baz/src/main.rs" , "fn main() {}" )
2898
+ . build ( ) ;
2899
+
2900
+ p. cargo ( "check -Z bindeps" )
2901
+ . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
2902
+ . with_stderr_contains ( r#"thread 'main' panicked at 'no entry found for key'[..]"# )
2903
+ . with_status ( 101 )
2904
+ . run ( ) ;
2905
+ }
You can’t perform that action at this time.
0 commit comments