diff options
author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-03-08 09:28:12 +0100 |
---|---|---|
committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-03-08 09:28:12 +0100 |
commit | d63eedc3a3fe078e0aa32ba5a329f10d2e63c18d (patch) | |
tree | 9d056dd64c10b1b8e40e79948e841e25f1cae64e | |
parent | b9a49d442bdeeac8cac3bb097f5e224e7623e037 (diff) | |
download | rust-libc-d63eedc3a3fe078e0aa32ba5a329f10d2e63c18d.tar.gz |
compatibility with rust 1.13.0
-rw-r--r-- | build.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } |