From 843e79fa9e8867a0d2760994e39ee64f3332226e Mon Sep 17 00:00:00 2001 From: Arthur Carcano Date: Fri, 22 Mar 2024 10:17:16 +0100 Subject: [PATCH] Delete dead fields of deserialized cargo output The dead_code lint was previously eroneously missing this dead code. Since this lint bug has been fixed, the unused field need to be removed or marked as `#[allow(dead_code)]`. Given that this struct is deserialized without #[serde(deny_unknown_fields)] it is ok to simply delete the never read fields. --- src/bootstrap/src/core/build_steps/compile.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 242fe3c12b998..8a7ed1ef9a60d 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -2135,17 +2135,12 @@ pub struct CargoTarget<'a> { #[serde(tag = "reason", rename_all = "kebab-case")] pub enum CargoMessage<'a> { CompilerArtifact { - package_id: Cow<'a, str>, features: Vec>, filenames: Vec>, target: CargoTarget<'a>, }, - BuildScriptExecuted { - package_id: Cow<'a, str>, - }, - BuildFinished { - success: bool, - }, + BuildScriptExecuted, + BuildFinished, } pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path) {