From 64d654a74d24d323f2f3bbe6ec361dbea9309795 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 29 Mar 2024 12:25:12 -0700 Subject: [PATCH] Sync with rustix' build.rs changes (#58) io-lifetimes and rustix and a few other crates I maintain have similar build.rs scripts. Port some of the changes from rustix here to keep them in sync. --- build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 02dc64fa..33a6803e 100644 --- a/build.rs +++ b/build.rs @@ -34,7 +34,7 @@ fn use_feature(feature: &str) { /// Test whether the rustc at `var("RUSTC")` supports the given feature. fn has_feature(feature: &str) -> bool { - can_compile(&format!( + can_compile(format!( "#![allow(stable_features)]\n#![feature({})]", feature )) @@ -48,8 +48,8 @@ fn can_compile>(test: T) -> bool { let rustc = var("RUSTC").unwrap(); let target = var("TARGET").unwrap(); - // Use `RUSTC_WRAPPER` if it's set, unless it's set to an empty string, - // as documented [here]. + // Use `RUSTC_WRAPPER` if it's set, unless it's set to an empty string, as + // documented [here]. // [here]: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads let wrapper = var("RUSTC_WRAPPER") .ok()