Skip to content

Commit

Permalink
Add CARGO_INCREMENTAL=0 to work around clippy 1.72 bug (#938)
Browse files Browse the repository at this point in the history
This PR works around the issue
#929, using the suggestion in
rust-lang/rust#83085 (comment).
  • Loading branch information
qinsoon committed Sep 4, 2023
1 parent 5735349 commit 20439de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/ci-style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/util/metadata/side_metadata/spec_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 20439de

Please sign in to comment.