Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e7f5a41

Browse files
committedSep 20, 2024·
Use the Cargo.toml version of the check-cfg squelching
It doesn't make older version of cargo complain. https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table Fixes #576
1 parent a09b66e commit e7f5a41

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ required-features = ["static-curl", "ssl"]
8383
name = "multi-dl"
8484
path = "examples/multi-dl.rs"
8585
required-features = ["ssl"]
86+
87+
[lints.rust.unexpected_cfgs]
88+
level = "warn"
89+
check-cfg = ["cfg(need_openssl_init, need_openssl_probe)"]

‎build.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
use std::env;
22

33
fn main() {
4-
println!(
5-
"cargo::rustc-check-cfg=cfg(\
6-
need_openssl_init,\
7-
need_openssl_probe,\
8-
)"
9-
);
104
// OpenSSL >= 1.1.0 can be initialized concurrently and is initialized correctly by libcurl.
115
// <= 1.0.2 need locking callbacks, which are provided by openssl_sys::init().
126
let use_openssl = match env::var("DEP_OPENSSL_VERSION_NUMBER") {

0 commit comments

Comments
 (0)
Please sign in to comment.