diff --git a/Cargo.toml b/Cargo.toml index ed871cfdd..54eb015b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,3 +83,7 @@ required-features = ["static-curl", "ssl"] name = "multi-dl" path = "examples/multi-dl.rs" required-features = ["ssl"] + +[lints.rust.unexpected_cfgs] +level = "warn" +check-cfg = ["cfg(need_openssl_init, need_openssl_probe)"] diff --git a/build.rs b/build.rs index d6b0797a6..11539d433 100644 --- a/build.rs +++ b/build.rs @@ -1,12 +1,6 @@ use std::env; fn main() { - println!( - "cargo::rustc-check-cfg=cfg(\ - need_openssl_init,\ - need_openssl_probe,\ - )" - ); // OpenSSL >= 1.1.0 can be initialized concurrently and is initialized correctly by libcurl. // <= 1.0.2 need locking callbacks, which are provided by openssl_sys::init(). let use_openssl = match env::var("DEP_OPENSSL_VERSION_NUMBER") { diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 51e30028d..b83fb3a99 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -55,3 +55,7 @@ zlib-ng-compat = ["libz-sys/zlib-ng", "static-curl"] upkeep_7_62_0 = [] poll_7_68_0 = [] ntlm = [] + +[lints.rust.unexpected_cfgs] +level = "warn" +check-cfg = ["cfg(libcurl_vendored,link_libnghttp2,link_libz,link_openssl)"] diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 9eefa8e72..abb717c42 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -5,14 +5,6 @@ use std::process::Command; fn main() { println!("cargo:rerun-if-changed=curl"); - println!( - "cargo::rustc-check-cfg=cfg(\ - libcurl_vendored,\ - link_libnghttp2,\ - link_libz,\ - link_openssl,\ - )" - ); let target = env::var("TARGET").unwrap(); let windows = target.contains("windows");