From 7342cc46f88bad93bfa82125a09db01bbbe92075 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 | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 242fe3c12b99..96e0025acd25 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -2134,18 +2134,9 @@ pub struct CargoTarget<'a> { #[derive(Deserialize)] #[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, - }, + CompilerArtifact { filenames: Vec>, target: CargoTarget<'a> }, + BuildScriptExecuted, + BuildFinished, } pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path) {