mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Add some context to a [target] links deserialize error.
This commit is contained in:
parent
00a47302dd
commit
c7f6528ef9
@ -773,7 +773,12 @@ impl<'de> serde::Deserialize<'de> for BuildOutput {
|
|||||||
// require an intermediate step to translate LinksOverride to
|
// require an intermediate step to translate LinksOverride to
|
||||||
// BuildOutput, converting the ConfigRelativePath values to PathBuf.
|
// 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() {
|
if lo.warning.is_some() {
|
||||||
return Err(Error::custom(
|
return Err(Error::custom(
|
||||||
"`warning` is not supported in build script overrides",
|
"`warning` is not supported in build script overrides",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user