diff --git a/.github/scripts/ci-style.sh b/.github/scripts/ci-style.sh index eb9ccf49ec..077c08e599 100755 --- a/.github/scripts/ci-style.sh +++ b/.github/scripts/ci-style.sh @@ -2,6 +2,13 @@ export RUSTFLAGS="-D warnings -A unknown-lints" +# Workaround the clippy issue on Rust 1.72: https://github.com/mmtk/mmtk-core/issues/929. +# If we are not testing with Rust 1.72, or there is no problem running the following clippy checks, we can remove this export. +CLIPPY_VERSION=$(cargo clippy --version) +if [[ $CLIPPY_VERSION == "clippy 0.1.72"* ]]; then + export CARGO_INCREMENTAL=0 +fi + # --- Check main crate --- # check base diff --git a/src/util/metadata/side_metadata/spec_defs.rs b/src/util/metadata/side_metadata/spec_defs.rs index bcdf678b0d..be7a7730d3 100644 --- a/src/util/metadata/side_metadata/spec_defs.rs +++ b/src/util/metadata/side_metadata/spec_defs.rs @@ -100,6 +100,9 @@ define_side_metadata_specs!( #[cfg(test)] mod tests { + // We assert on constants to test if the macro is working properly. + #![allow(clippy::assertions_on_constants)] + use super::*; #[test] fn first_global_spec() {