]> git.proxmox.com Git - cargo.git/commitdiff
Better msg for wrong position
authorhi-rustin <rustin.liu@gmail.com>
Sat, 24 Jul 2021 02:44:44 +0000 (10:44 +0800)
committerhi-rustin <rustin.liu@gmail.com>
Sat, 24 Jul 2021 02:44:44 +0000 (10:44 +0800)
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
src/cargo/util/toml/mod.rs
tests/testsuite/cargo_features.rs

index ebc1c12bb65011fad3bafe195f3bc310b67f0103..70951cabc3d408e3475b511b1bf3081723e60718 100644 (file)
@@ -76,8 +76,8 @@ 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 \
-                 should be set at the top of Cargo.toml before any tables",
+                "cargo-features = {} was found in the wrong location: it \
+                 should be set at the top of Cargo.toml before any sections",
                 toml::to_string(feats).unwrap()
             );
         }
index b49154a192a7958a187611e4424f533c88fb0e9c..9af42c30b6cc008553757c5cfb047d339daaa3d5 100644 (file)
@@ -647,8 +647,8 @@ fn wrong_position() {
 error: failed to parse manifest at [..]
 
 Caused by:
-  cargo-features = [\"test-dummy-unstable\"] was found in the wrong location, it \
-  should be set at the top of Cargo.toml before any tables
+  cargo-features = [\"test-dummy-unstable\"] was found in the wrong location: it \
+  should be set at the top of Cargo.toml before any sections
 ",
         )
         .run();