Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b64ab4a

Browse files
make target-pointer-width a u16 in compiletest
1 parent 267f0bd commit b64ab4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/tools/compiletest/src/common.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::sync::OnceLock;
66
use build_helper::git::GitConfig;
77
use camino::{Utf8Path, Utf8PathBuf};
88
use semver::Version;
9+
#[cfg(bootstrap)]
910
use serde::de::{Deserialize, Deserializer, Error as _};
1011

1112
use crate::executor::{ColorConfig, OutputFormat};
@@ -1064,7 +1065,8 @@ pub struct TargetCfg {
10641065
pub(crate) abi: String,
10651066
#[serde(rename = "target-family", default)]
10661067
pub(crate) families: Vec<String>,
1067-
#[serde(rename = "target-pointer-width", deserialize_with = "serde_parse_u32")]
1068+
#[serde(rename = "target-pointer-width")]
1069+
#[cfg_attr(bootstrap, serde(deserialize_with = "serde_parse_u32"))]
10681070
pub(crate) pointer_width: u32,
10691071
#[serde(rename = "target-endian", default)]
10701072
endian: Endian,
@@ -1172,6 +1174,7 @@ fn rustc_output(config: &Config, args: &[&str], envs: HashMap<String, String>) -
11721174
String::from_utf8(output.stdout).unwrap()
11731175
}
11741176

1177+
#[cfg(bootstrap)]
11751178
fn serde_parse_u32<'de, D: Deserializer<'de>>(deserializer: D) -> Result<u32, D::Error> {
11761179
let string = String::deserialize(deserializer)?;
11771180
string.parse().map_err(D::Error::custom)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /