From d63eedc3a3fe078e0aa32ba5a329f10d2e63c18d Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 8 Mar 2023 09:28:12 +0100 Subject: compatibility with rust 1.13.0 --- build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 43a5d890d1..e60672a761 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,7 @@ use std::str; // List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we // need to know all the possible cfgs that this script will set. If you need to set another cfg // make sure to add it to this list as well. -const ALLOWED_CFGS: &[&str] = &[ +const ALLOWED_CFGS: &'static [&'static str] = &[ "freebsd10", "freebsd11", "freebsd12", @@ -30,7 +30,7 @@ const ALLOWED_CFGS: &[&str] = &[ ]; // Extra values to allow for check-cfg. -const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[ +const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[ ("target_os", &["switch", "aix", "ohos"]), ("target_env", &["illumos", "wasi", "aix", "ohos"]), ("target_arch", &["loongarch64"]), @@ -158,7 +158,7 @@ fn main() { for cfg in ALLOWED_CFGS { println!("cargo:rustc-check-cfg=values({})", cfg); } - for (name, values) in CHECK_CFG_EXTRA { + for &(name, values) in CHECK_CFG_EXTRA { let values = values.join("\",\""); println!("cargo:rustc-check-cfg=values({},\"{}\")", name, values); } -- cgit v1.2.1