]> git.proxmox.com Git - cargo.git/commitdiff
Add some context to a [target] links deserialize error.
authorEric Huss <eric@huss.org>
Tue, 3 Dec 2019 02:01:49 +0000 (18:01 -0800)
committerEric Huss <eric@huss.org>
Thu, 19 Dec 2019 17:44:02 +0000 (09:44 -0800)
src/cargo/core/compiler/custom_build.rs

index ed3cf530cbaeacc59e773fb6a966004ce3dafd48..2dc69fbf1d97c4994ec4b073f64a4d9d939b1f09 100644 (file)
@@ -773,7 +773,12 @@ impl<'de> serde::Deserialize<'de> for BuildOutput {
         // require an intermediate step to translate LinksOverride to
         // BuildOutput, converting the ConfigRelativePath values to PathBuf.
 
-        let lo = LinksOverride::deserialize(deserializer)?;
+        let lo = LinksOverride::deserialize(deserializer).map_err(|e| {
+            serde::de::Error::custom(format!(
+                "failed to load config [target] links override table: {}",
+                e
+            ))
+        })?;
         if lo.warning.is_some() {
             return Err(Error::custom(
                 "`warning` is not supported in build script overrides",