@@ -5,7 +5,7 @@ use std::str;
55// List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we
66// need to know all the possible cfgs that this script will set. If you need to set another cfg
77// make sure to add it to this list as well.
8- const ALLOWED_CFGS : & [ & str ] = & [
8+ const ALLOWED_CFGS : & ' static [ & ' static str ] = & [
99 "freebsd10" ,
1010 "freebsd11" ,
1111 "freebsd12" ,
@@ -30,7 +30,7 @@ const ALLOWED_CFGS: &[&str] = &[
3030] ;
3131
3232// Extra values to allow for check-cfg.
33- const CHECK_CFG_EXTRA : & [ ( & str , & [ & str ] ) ] = & [
33+ const CHECK_CFG_EXTRA : & ' static [ ( & ' static str , & ' static [ & ' static str ] ) ] = & [
3434 ( "target_os" , & [ "switch" , "aix" , "ohos" ] ) ,
3535 ( "target_env" , & [ "illumos" , "wasi" , "aix" , "ohos" ] ) ,
3636 ( "target_arch" , & [ "loongarch64" ] ) ,
@@ -158,7 +158,7 @@ fn main() {
158158 for cfg in ALLOWED_CFGS {
159159 println ! ( "cargo:rustc-check-cfg=values({})" , cfg) ;
160160 }
161- for ( name, values) in CHECK_CFG_EXTRA {
161+ for & ( name, values) in CHECK_CFG_EXTRA {
162162 let values = values. join ( "\" ,\" " ) ;
163163 println ! ( "cargo:rustc-check-cfg=values({},\" {}\" )" , name, values) ;
164164 }
0 commit comments