File tree 2 files changed +18
-16
lines changed
2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -1734,12 +1734,11 @@ impl<P: ResolveToPath> DetailedTomlDependency<P> {
1734
1734
1735
1735
for & ( key, key_name) in & git_only_keys {
1736
1736
if key. is_some ( ) {
1737
- let msg = format ! (
1738
- "key `{}` is ignored for dependency ({}). \
1739
- This will be considered an error in future versions" ,
1740
- key_name , name_in_toml
1737
+ bail ! (
1738
+ "key `{}` is ignored for dependency ({})." ,
1739
+ key_name ,
1740
+ name_in_toml
1741
1741
) ;
1742
- cx. warnings . push ( msg)
1743
1742
}
1744
1743
}
1745
1744
}
@@ -1791,13 +1790,11 @@ impl<P: ResolveToPath> DetailedTomlDependency<P> {
1791
1790
) ,
1792
1791
( Some ( git) , maybe_path, _, _) => {
1793
1792
if maybe_path. is_some ( ) {
1794
- let msg = format ! (
1793
+ bail ! (
1795
1794
"dependency ({}) specification is ambiguous. \
1796
- Only one of `git` or `path` is allowed. \
1797
- This will be considered an error in future versions",
1795
+ Only one of `git` or `path` is allowed.",
1798
1796
name_in_toml
1799
1797
) ;
1800
- cx. warnings . push ( msg)
1801
1798
}
1802
1799
1803
1800
let n_details = [ & self . branch , & self . tag , & self . rev ]
Original file line number Diff line number Diff line change @@ -1112,11 +1112,12 @@ fn both_git_and_path_specified() {
1112
1112
1113
1113
foo. cargo ( "build -v" )
1114
1114
. with_status ( 101 )
1115
- . with_stderr_contains (
1115
+ . with_stderr (
1116
1116
"\
1117
- [WARNING] dependency (bar) specification is ambiguous. \
1118
- Only one of `git` or `path` is allowed. \
1119
- This will be considered an error in future versions
1117
+ error: failed to parse manifest at `[..]`
1118
+
1119
+ Caused by:
1120
+ dependency (bar) specification is ambiguous. Only one of `git` or `path` is allowed.
1120
1121
" ,
1121
1122
)
1122
1123
. run ( ) ;
@@ -1182,9 +1183,13 @@ fn ignored_git_revision() {
1182
1183
1183
1184
foo. cargo ( "build -v" )
1184
1185
. with_status ( 101 )
1185
- . with_stderr_contains (
1186
- "[WARNING] key `branch` is ignored for dependency (bar). \
1187
- This will be considered an error in future versions",
1186
+ . with_stderr (
1187
+ "\
1188
+ error: failed to parse manifest at `[..]`
1189
+
1190
+ Caused by:
1191
+ key `branch` is ignored for dependency (bar).
1192
+ " ,
1188
1193
)
1189
1194
. run ( ) ;
1190
1195
}
You can’t perform that action at this time.
0 commit comments