about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2025-07-25 15:12:44 +0200
committerWaffle Lapkin <waffle.lapkin@gmail.com>2025-08-27 23:44:49 +0200
commitaa0887b223d3af4570f2a6f31c9d85d792a7b4de (patch)
treeb6d419edbad72b0c8ae665d057a5a6cf4f9b2923 /src
parent1f7efabdc6204b3a1cc9bfe612136f848f643949 (diff)
downloadrust-aa0887b223d3af4570f2a6f31c9d85d792a7b4de.tar.gz
rust-aa0887b223d3af4570f2a6f31c9d85d792a7b4de.zip
accept integer `target-pointer-width` in compiletest
Diffstat (limited to 'src')
-rw-r--r--src/tools/compiletest/src/common.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index 7fc80c1edb1..645ed474b60 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -6,7 +6,6 @@ use std::sync::OnceLock;
 use build_helper::git::GitConfig;
 use camino::{Utf8Path, Utf8PathBuf};
 use semver::Version;
-use serde::de::{Deserialize, Deserializer, Error as _};
 
 use crate::executor::{ColorConfig, OutputFormat};
 use crate::fatal;
@@ -1080,7 +1079,7 @@ pub struct TargetCfg {
     pub(crate) abi: String,
     #[serde(rename = "target-family", default)]
     pub(crate) families: Vec<String>,
-    #[serde(rename = "target-pointer-width", deserialize_with = "serde_parse_u32")]
+    #[serde(rename = "target-pointer-width")]
     pub(crate) pointer_width: u32,
     #[serde(rename = "target-endian", default)]
     endian: Endian,
@@ -1190,11 +1189,6 @@ fn query_rustc_output(config: &Config, args: &[&str], envs: HashMap<String, Stri
     String::from_utf8(output.stdout).unwrap()
 }
 
-fn serde_parse_u32<'de, D: Deserializer<'de>>(deserializer: D) -> Result<u32, D::Error> {
-    let string = String::deserialize(deserializer)?;
-    string.parse().map_err(D::Error::custom)
-}
-
 #[derive(Debug, Clone)]
 pub struct TestPaths {
     pub file: Utf8PathBuf,         // e.g., compile-test/foo/bar/baz.rs