hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.07k stars 1.55k forks source link

Add unexpected cfgs to `[lints]` table #3678

Closed Urgau closed 1 week ago

Urgau commented 1 month ago

With the release of rust-lang/cargo#13913 (in nightly-2024-05-19), there is no longer any need for the kind of workarounds employed in #3660. Cargo has now gain the ability to declare --check-cfg args directly inside the [lints] table with [lints.rust.unexpected_cfgs.check-cfg][^1]:

Cargo.toml:

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(hyper_unstable_tracing,hyper_unstable_ffi)'] }

This PR adds those unexpected cfgs inside the [lints], reverts #3660 and remove the manual --cfg docsrs (since it's automaticly added by docs.rs).

[^1]: take effect on Rust 1.80 (current nightly), is ignored on Rust 1.79 (current beta), and produce an unused warning below