about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArthur Carcano <arthur.carcano@ocamlpro.com>2024-03-22 10:17:16 +0100
committerArthur Carcano <arthur.carcano@ocamlpro.com>2024-03-22 23:59:19 +0100
commit7342cc46f88bad93bfa82125a09db01bbbe92075 (patch)
tree41533eeb73500e448a64401f72e06532b91a6892
parentf60c4ed197ad4bc5d7390a6073b49c4c2eae3785 (diff)
downloadrust-7342cc46f88bad93bfa82125a09db01bbbe92075.tar.gz
rust-7342cc46f88bad93bfa82125a09db01bbbe92075.zip
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.
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs15
1 files 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 242fe3c12b9..96e0025acd2 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<Cow<'a, str>>,
-        filenames: Vec<Cow<'a, str>>,
-        target: CargoTarget<'a>,
-    },
-    BuildScriptExecuted {
-        package_id: Cow<'a, str>,
-    },
-    BuildFinished {
-        success: bool,
-    },
+    CompilerArtifact { filenames: Vec<Cow<'a, str>>, target: CargoTarget<'a> },
+    BuildScriptExecuted,
+    BuildFinished,
 }
 
 pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path) {