Skip to content

Commit

Permalink
Merge pull request #458 from moka-rs/fix-ci/2024-09-15/v012
Browse files Browse the repository at this point in the history
Fix the CI: 2024-09-15 v0.12.x
  • Loading branch information
tatsuya6502 authored Sep 14, 2024
2 parents c948f22 + bd5e447 commit 84acc73
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
1 change: 1 addition & 0 deletions .ci_extras/pin-crate-vers-msrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ set -eux
# cargo update -p <crate> --precise <version>
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
2 changes: 2 additions & 0 deletions .github/workflows/Kani.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ jobs:
uses: model-checking/[email protected]
with:
args: --features 'sync, future'
# Workaround for https://github.com/moka-rs/moka/issues/457
kani-version: '0.54.0'
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
25 changes: 1 addition & 24 deletions build.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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() {}

0 comments on commit 84acc73

Please sign in to comment.