Skip to content

Commit 20439de

Browse files
authored
Add CARGO_INCREMENTAL=0 to work around clippy 1.72 bug (#938)
This PR works around the issue #929, using the suggestion in rust-lang/rust#83085 (comment).
1 parent 5735349 commit 20439de

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/scripts/ci-style.sh

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
export RUSTFLAGS="-D warnings -A unknown-lints"
44

5+
# Workaround the clippy issue on Rust 1.72: https://github.com/mmtk/mmtk-core/issues/929.
6+
# If we are not testing with Rust 1.72, or there is no problem running the following clippy checks, we can remove this export.
7+
CLIPPY_VERSION=$(cargo clippy --version)
8+
if [[ $CLIPPY_VERSION == "clippy 0.1.72"* ]]; then
9+
export CARGO_INCREMENTAL=0
10+
fi
11+
512
# --- Check main crate ---
613

714
# check base

src/util/metadata/side_metadata/spec_defs.rs

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ define_side_metadata_specs!(
100100

101101
#[cfg(test)]
102102
mod tests {
103+
// We assert on constants to test if the macro is working properly.
104+
#![allow(clippy::assertions_on_constants)]
105+
103106
use super::*;
104107
#[test]
105108
fn first_global_spec() {

0 commit comments

Comments
 (0)