Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1692,13 +1692,11 @@ impl DetailedTomlDependency {
.count();

if n_details > 1 {
let msg = format!(
bail!(
"dependency ({}) specification is ambiguous. \
Only one of `branch`, `tag` or `rev` is allowed. \
This will be considered an error in future versions",
Only one of `branch`, `tag` or `rev` is allowed.",
name_in_toml
);
cx.warnings.push(msg)
}

let reference = self
Expand Down
9 changes: 5 additions & 4 deletions tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,12 @@ fn ambiguous_git_reference() {

p.cargo("build -v")
.with_status(101)
.with_stderr_contains(
.with_stderr(
"\
[WARNING] dependency (bar) specification is ambiguous. \
Only one of `branch`, `tag` or `rev` is allowed. \
This will be considered an error in future versions
[ERROR] failed to parse manifest at `[..]`

Caused by:
dependency (bar) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.
",
)
.run();
Expand Down