diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index ebc1c12bb65..6a928c4b0ce 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -76,7 +76,7 @@ fn do_read_manifest( if let Some(package) = toml.get("package").or_else(|| toml.get("project")) { if let Some(feats) = package.get("cargo-features") { bail!( - "cargo-features = {} was found in the wrong location, it \ + "cargo-features = {} was found in the wrong location: it \ should be set at the top of Cargo.toml before any tables", toml::to_string(feats).unwrap() ); diff --git a/tests/testsuite/cargo_features.rs b/tests/testsuite/cargo_features.rs index b49154a192a..3bc66e7485f 100644 --- a/tests/testsuite/cargo_features.rs +++ b/tests/testsuite/cargo_features.rs @@ -647,7 +647,7 @@ fn wrong_position() { error: failed to parse manifest at [..] Caused by: - cargo-features = [\"test-dummy-unstable\"] was found in the wrong location, it \ + cargo-features = [\"test-dummy-unstable\"] was found in the wrong location: it \ should be set at the top of Cargo.toml before any tables ", )