diff --git a/.ci_extras/pin-crate-vers-msrv.sh b/.ci_extras/pin-crate-vers-msrv.sh index b1e8f239..941b0d0d 100755 --- a/.ci_extras/pin-crate-vers-msrv.sh +++ b/.ci_extras/pin-crate-vers-msrv.sh @@ -6,4 +6,5 @@ set -eux # cargo update -p --precise cargo update -p actix-rt --precise 2.9.0 cargo update -p cc --precise 1.0.105 +cargo update -p tokio-util --precise 0.7.11 cargo update -p tokio --precise 1.38.1 diff --git a/.github/workflows/Kani.yml b/.github/workflows/Kani.yml index 59c0bff2..0307966d 100644 --- a/.github/workflows/Kani.yml +++ b/.github/workflows/Kani.yml @@ -53,3 +53,5 @@ jobs: uses: model-checking/kani-github-action@v1.0 with: args: --features 'sync, future' + # Workaround for https://github.com/moka-rs/moka/issues/457 + kani-version: '0.54.0' diff --git a/Cargo.toml b/Cargo.toml index 0fb928b5..b363bc2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,17 @@ trybuild = "1.0" [target.'cfg(rustver)'.build-dependencies] rustc_version = "0.4.0" +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + "cfg(armv5te)", + "cfg(beta_clippy)", + "cfg(kani)", + "cfg(mips)", + "cfg(rustver)", + "cfg(skip_large_mem_tests)", + "cfg(trybuild)", +] } + # https://docs.rs/about/metadata [package.metadata.docs.rs] # Build the doc at docs.rs with some features enabled. diff --git a/build.rs b/build.rs index b82d02a6..72a59c0e 100644 --- a/build.rs +++ b/build.rs @@ -1,15 +1,3 @@ -#![allow(unexpected_cfgs)] // for `#[cfg(rustver)]` in this build.rs. - -const ALLOWED_CFG_NAMES: &[&str] = &[ - "armv5te", - "beta_clippy", - "kani", - "mips", - "rustver", - "skip_large_mem_tests", - "trybuild", -]; - #[cfg(rustver)] fn main() { use rustc_version::version; @@ -18,18 +6,7 @@ fn main() { "cargo:rustc-env=RUSTC_SEMVER={}.{}", version.major, version.minor ); - - allow_cfgs(ALLOWED_CFG_NAMES); } #[cfg(not(rustver))] -fn main() { - allow_cfgs(ALLOWED_CFG_NAMES); -} - -/// Tells `rustc` to allow `#[cfg(...)]` with the given names. -fn allow_cfgs(names: &[&str]) { - for name in names.iter() { - println!("cargo:rustc-check-cfg=cfg({name})"); - } -} +fn main() {}