From a7b1b4a4b69c38d986020fda55b199db8e5658e2 Mon Sep 17 00:00:00 2001 From: Matthias Goergens Date: Tue, 7 Jan 2025 10:52:59 +0800 Subject: [PATCH] Update toolchain And make new clippy happy --- .github/workflows/lints.yml | 2 +- .github/workflows/tests.yml | 2 +- ceno_emul/src/syscalls/keccak_permute.rs | 2 +- ceno_zkvm/src/instructions/riscv/shift.rs | 2 +- multilinear_extensions/src/mle.rs | 1 + rust-toolchain.toml | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index f738f7183..b8b359fb2 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -25,7 +25,7 @@ jobs: components: rustfmt, clippy targets: riscv32im-unknown-none-elf # TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically? - toolchain: nightly-2024-12-06 + toolchain: nightly-2025-01-06 - name: Cargo cache uses: actions/cache@v4 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 598f397e2..9512bb501 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: with: targets: riscv32im-unknown-none-elf # TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically? - toolchain: nightly-2024-12-06 + toolchain: nightly-2025-01-06 - name: Cargo cache uses: actions/cache@v4 with: diff --git a/ceno_emul/src/syscalls/keccak_permute.rs b/ceno_emul/src/syscalls/keccak_permute.rs index 091725f9c..63aba9201 100644 --- a/ceno_emul/src/syscalls/keccak_permute.rs +++ b/ceno_emul/src/syscalls/keccak_permute.rs @@ -40,7 +40,7 @@ pub fn keccak_permute(vm: &VMState) -> SyscallEffects { let output = { let mut state = [0_u64; KECCAK_CELLS]; for (cell, (&lo, &hi)) in izip!(&mut state, input.iter().tuples()) { - *cell = lo as u64 | (hi as u64) << 32; + *cell = lo as u64 | ((hi as u64) << 32); } keccakf(&mut state); diff --git a/ceno_zkvm/src/instructions/riscv/shift.rs b/ceno_zkvm/src/instructions/riscv/shift.rs index e375912af..6e71b8118 100644 --- a/ceno_zkvm/src/instructions/riscv/shift.rs +++ b/ceno_zkvm/src/instructions/riscv/shift.rs @@ -251,7 +251,7 @@ mod tests { verify::("basic", 0b_0001, 3, 0b_1000); // 33 << 33 === 33 << 1 verify::("rs2 over 5-bits", 0b_0001, 33, 0b_0010); - verify::("bit loss", 1 << 31 | 1, 1, 0b_0010); + verify::("bit loss", (1 << 31) | 1, 1, 0b_0010); verify::("zero shift", 0b_0001, 0, 0b_0001); verify::("all zeros", 0b_0000, 0, 0b_0000); verify::("base is zero", 0b_0000, 1, 0b_0000); diff --git a/multilinear_extensions/src/mle.rs b/multilinear_extensions/src/mle.rs index b4e8df983..c86a8800f 100644 --- a/multilinear_extensions/src/mle.rs +++ b/multilinear_extensions/src/mle.rs @@ -334,6 +334,7 @@ impl DenseMultilinearExtension { op_mle!(self, |evaluations| { DenseMultilinearExtension::from_evaluations_ext_vec( self.num_vars(), + #[allow(clippy::useless_conversion)] evaluations.iter().cloned().map(E::from).collect(), ) }) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c736f462f..faa027589 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-12-06" +channel = "nightly-2025-01-06" targets = ["riscv32im-unknown-none-elf"] # We need the sources for build-std. components = ["rust-src"]