File tree 2 files changed +25
-12
lines changed
2 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -1861,8 +1861,7 @@ impl TomlManifest {
1861
1861
None ,
1862
1862
& workspace_config,
1863
1863
& inherit_cell,
1864
- )
1865
- . unwrap ( ) ;
1864
+ ) ?;
1866
1865
if platform. build_dependencies . is_some ( ) && platform. build_dependencies2 . is_some ( ) {
1867
1866
warn_on_deprecated ( "build-dependencies" , name, "platform target" , cx. warnings ) ;
1868
1867
}
@@ -1876,8 +1875,7 @@ impl TomlManifest {
1876
1875
Some ( DepKind :: Build ) ,
1877
1876
& workspace_config,
1878
1877
& inherit_cell,
1879
- )
1880
- . unwrap ( ) ;
1878
+ ) ?;
1881
1879
if platform. dev_dependencies . is_some ( ) && platform. dev_dependencies2 . is_some ( ) {
1882
1880
warn_on_deprecated ( "dev-dependencies" , name, "platform target" , cx. warnings ) ;
1883
1881
}
@@ -1891,8 +1889,7 @@ impl TomlManifest {
1891
1889
Some ( DepKind :: Development ) ,
1892
1890
& workspace_config,
1893
1891
& inherit_cell,
1894
- )
1895
- . unwrap ( ) ;
1892
+ ) ?;
1896
1893
target. insert (
1897
1894
name. clone ( ) ,
1898
1895
TomlPlatform {
Original file line number Diff line number Diff line change @@ -1141,16 +1141,32 @@ fn ignored_git_revision() {
1141
1141
. file ( "src/lib.rs" , "" )
1142
1142
. build ( ) ;
1143
1143
1144
- foo. cargo ( "build -v" )
1145
- . with_status ( 101 )
1146
- . with_stderr (
1147
- "\
1144
+ let err_msg = "\
1148
1145
error: failed to parse manifest at `[..]`
1149
1146
1150
1147
Caused by:
1151
1148
key `branch` is ignored for dependency (bar).
1152
- " ,
1153
- )
1149
+ " ;
1150
+ foo. cargo ( "build -v" )
1151
+ . with_status ( 101 )
1152
+ . with_stderr ( err_msg)
1153
+ . run ( ) ;
1154
+
1155
+ // #11540, check that [target] dependencies fail the same way.
1156
+ foo. change_file (
1157
+ "Cargo.toml" ,
1158
+ r#"
1159
+ [package]
1160
+ name = "foo"
1161
+ version = "0.0.0"
1162
+
1163
+ [target.some-target.dependencies]
1164
+ bar = { path = "bar", branch = "spam" }
1165
+ "# ,
1166
+ ) ;
1167
+ foo. cargo ( "build" )
1168
+ . with_status ( 101 )
1169
+ . with_stderr ( err_msg)
1154
1170
. run ( ) ;
1155
1171
}
1156
1172
You can’t perform that action at this time.
0 commit comments