diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 059c4480377..019dc346dd5 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -1762,11 +1762,14 @@ impl DetailedTomlDependency

{ kind: Option, ) -> CargoResult { if self.version.is_none() && self.path.is_none() && self.git.is_none() { - bail!( + let msg = format!( "dependency ({}) specified without \ - providing a local path, Git repository, or version to use.", + providing a local path, Git repository, or \ + version to use. This will be considered an \ + error in future versions", name_in_toml ); + cx.warnings.push(msg); } if let Some(version) = &self.version { diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index e5e1775ad85..330a0c5829a 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -763,14 +763,10 @@ fn empty_dependencies() { Package::new("bar", "0.0.1").publish(); p.cargo("build") - .with_status(101) - .with_stderr( + .with_stderr_contains( "\ -[ERROR] failed to parse manifest at `[..]` - -Caused by: - dependency (bar) specified without providing a local path, Git repository, or version \ -to use. +warning: dependency (bar) specified without providing a local path, Git repository, or version \ +to use. This will be considered an error in future versions ", ) .run();