Skip to content

Commit

Permalink
compatibility with rust 1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Mar 8, 2023
1 parent b9a49d4 commit d63eedc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"]),
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit d63eedc

Please sign in to comment.