Skip to content

Commit 4dd5ee9

Browse files
authored
fix: update nightly version to avoid issue with transitive dependency (#574)
* Update nightly version to avoid issue with transitive dependency. * Update CI. * Formmating. * Clippy fix * Formatting again
1 parent 925d2d8 commit 4dd5ee9

File tree

24 files changed

+67
-90
lines changed

24 files changed

+67
-90
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: dtolnay/rust-toolchain@stable
1818
with:
1919
components: rustfmt
20-
toolchain: nightly-2025-04-06
20+
toolchain: nightly-2025-05-09
2121

2222
- name: Run `cargo fmt`
2323
run: |
@@ -41,7 +41,7 @@ jobs:
4141
uses: dtolnay/rust-toolchain@stable
4242
with:
4343
components: clippy
44-
toolchain: nightly-2025-04-06
44+
toolchain: nightly-2025-05-09
4545
targets: riscv32im-unknown-none-elf
4646

4747
- name: Add clippy
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install Rust
8080
uses: dtolnay/rust-toolchain@stable
8181
with:
82-
toolchain: nightly-2025-04-06
82+
toolchain: nightly-2025-05-09
8383
targets: riscv32im-unknown-none-elf
8484

8585
- name: Install cargo-expand
@@ -113,7 +113,7 @@ jobs:
113113
- name: Install Rust
114114
uses: dtolnay/rust-toolchain@stable
115115
with:
116-
toolchain: nightly-2025-04-06 # same version as normal tests
116+
toolchain: nightly-2025-05-09 # same version as normal tests
117117
# need riscv32im-unknown-none-elf for building guest binaries
118118
targets: wasm32-wasip1, riscv32im-unknown-none-elf
119119

@@ -153,7 +153,7 @@ jobs:
153153
- name: Install Rust
154154
uses: dtolnay/rust-toolchain@stable
155155
with:
156-
toolchain: nightly-2025-04-06
156+
toolchain: nightly-2025-05-09
157157
targets: riscv32im-unknown-none-elf
158158

159159
- uses: taiki-e/install-action@nextest
@@ -217,7 +217,7 @@ jobs:
217217
- name: Install Rust
218218
uses: dtolnay/rust-toolchain@stable
219219
with:
220-
toolchain: nightly-2025-04-06
220+
toolchain: nightly-2025-05-09
221221
targets: riscv32im-unknown-none-elf
222222

223223
- name: Download pre-built host project

cli/src/command/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,5 @@ const GUEST_TEMPLATE_SRC_MAIN: &str = include_str!(concat!(guest_examples_dir!()
164164

165165
// freeze toolchain that works with all provers
166166
const RUST_TOOLCHAIN: &str = r#"[toolchain]
167-
channel = "nightly-2025-04-06"
167+
channel = "nightly-2025-05-09"
168168
"#;

common/src/memory/alignment.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ pub trait Alignable: Sized + Copy + Display + Debug {
3636
fn is_aligned_to<const N: usize>(self) -> bool;
3737

3838
fn assert_aligned_to<const N: usize>(self) {
39-
assert!(
40-
self.is_aligned_to::<N>(),
41-
"{} is not aligned to {}",
42-
self,
43-
N
44-
);
39+
assert!(self.is_aligned_to::<N>(), "{self} is not aligned to {N}");
4540
}
4641

4742
/// Assert that the value is aligned to a word boundary.

common/src/riscv/instruction.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ impl Instruction {
7272
// I-type instruction with shamt has 5 bits for shamt.
7373
debug_assert!(
7474
op_c <= 0x1F,
75-
"op_c must be in the range [0..32), got {}",
76-
op_c
75+
"op_c must be in the range [0..32), got {op_c}"
7776
);
7877
}
7978

@@ -199,7 +198,7 @@ impl Instruction {
199198
let rd = self.op_a;
200199
let rs1 = self.op_b;
201200
let rs2 = Register::from(self.op_c as u8);
202-
format!("{} {}, {}, {}", opcode, rd, rs1, rs2)
201+
format!("{opcode} {rd}, {rs1}, {rs2}")
203202
}
204203

205204
fn i_type_to_string(&self, opcode: BuiltinOpcode) -> String {
@@ -210,51 +209,51 @@ impl Instruction {
210209
BuiltinOpcode::EBREAK | BuiltinOpcode::ECALL => self.opcode.to_string(),
211210
BuiltinOpcode::JALR => match (rd, rs1, imm12) {
212211
(Register::X0, Register::X1, 0) => "ret".to_string(),
213-
(Register::X0, _, 0) => format!("jr {}", rs1),
212+
(Register::X0, _, 0) => format!("jr {rs1}"),
214213
(Register::X1, _, 0) => format!("{} {}", self.opcode, rs1),
215-
_ => format!("{} {}, {}, {}", opcode, rd, rs1, imm12),
214+
_ => format!("{opcode} {rd}, {rs1}, {imm12}"),
216215
},
217216
BuiltinOpcode::ADDI => match (rd, rs1, imm12) {
218217
(Register::X0, Register::X0, 0) => "nop".to_string(),
219-
(_, Register::X0, _) => format!("li {}, {}", rd, imm12),
220-
(_, _, 0) => format!("mv {}, {}", rd, rs1),
221-
_ => format!("{} {}, {}, {}", opcode, rd, rs1, imm12),
218+
(_, Register::X0, _) => format!("li {rd}, {imm12}"),
219+
(_, _, 0) => format!("mv {rd}, {rs1}"),
220+
_ => format!("{opcode} {rd}, {rs1}, {imm12}"),
222221
},
223222
BuiltinOpcode::LB
224223
| BuiltinOpcode::LH
225224
| BuiltinOpcode::LW
226225
| BuiltinOpcode::LBU
227226
| BuiltinOpcode::LHU => {
228-
format!("{} {}, {}({})", opcode, rd, imm12, rs1)
227+
format!("{opcode} {rd}, {imm12}({rs1})")
229228
}
230-
_ => format!("{} {}, {}, {}", opcode, rd, rs1, imm12),
229+
_ => format!("{opcode} {rd}, {rs1}, {imm12}"),
231230
}
232231
}
233232

234233
fn s_type_to_string(&self, opcode: BuiltinOpcode) -> String {
235234
let rs1 = self.op_a;
236235
let rs2 = self.op_b;
237236
let imm12 = self.op_c as i32;
238-
format!("{} {}, {}({})", opcode, rs2, imm12, rs1)
237+
format!("{opcode} {rs2}, {imm12}({rs1})")
239238
}
240239

241240
fn b_type_to_string(&self, opcode: BuiltinOpcode) -> String {
242241
let rs1 = self.op_a;
243242
let rs2 = self.op_b;
244243
let imm12 = self.op_c as i32;
245-
format!("{} {}, {}, 0x{:x}", opcode, rs1, rs2, imm12)
244+
format!("{opcode} {rs1}, {rs2}, 0x{imm12:x}")
246245
}
247246

248247
fn u_type_to_string(&self, opcode: BuiltinOpcode) -> String {
249248
let rd = self.op_a;
250249
let imm20 = self.op_c;
251-
format!("{} {}, 0x{:x}", opcode, rd, imm20)
250+
format!("{opcode} {rd}, 0x{imm20:x}")
252251
}
253252

254253
fn j_type_to_string(&self, opcode: BuiltinOpcode) -> String {
255254
let rd = self.op_a;
256255
let imm20 = self.op_c as i32;
257-
format!("{} {}, 0x{:x}", opcode, rd, imm20)
256+
format!("{opcode} {rd}, 0x{imm20:x}")
258257
}
259258

260259
// Encode the instruction struct to binary representation.

common/src/riscv/register.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ mod tests {
188188
assert_eq!(
189189
reg.abi_name(),
190190
abi_names[i as usize],
191-
"Mismatch for register X{}",
192-
i
191+
"Mismatch for register X{i}"
193192
);
194193
}
195194
}
@@ -199,7 +198,7 @@ mod tests {
199198
for i in 0..32 {
200199
let reg = Register::from(i);
201200
assert_eq!(
202-
format!("{}", reg),
201+
format!("{reg}"),
203202
reg.abi_name(),
204203
"Display mismatch for register X{}",
205204
i

prover/src/chips/instructions/i/syscall.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ impl MachineChip for SyscallChip {
7171
(0x405, None) => traces.fill_columns(row_idx, true, Column::IsSysMemoryAdvise),
7272
_ => {
7373
panic!(
74-
"Unknown syscall number: 0x{:x} and result: {:?}, on row {}",
75-
syscall_number, result, row_idx
74+
"Unknown syscall number: 0x{syscall_number:x} and result: {result:?}, on row {row_idx}"
7675
);
7776
}
7877
};

prover/src/chips/instructions/m/nexani.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub(super) fn mull_limb(b: u32, c: u32) -> MulResult {
173173
let (a23, carry_1) = (a23 as u16, (a23 >> 16));
174174

175175
// Verify our calculations match the built-in multiplication
176-
assert!(carry_1 < 5, "Carry_1 exceeds expected bounds {}", carry_1);
176+
assert!(carry_1 < 5, "Carry_1 exceeds expected bounds {carry_1}");
177177
assert_eq!(
178178
a01.to_le_bytes(),
179179
[a_l_bytes[0], a_l_bytes[1]],
@@ -217,7 +217,7 @@ pub(super) fn mull_limb(b: u32, c: u32) -> MulResult {
217217
.wrapping_add((c3_prime_prime) << 8);
218218
let (a45, carry_2) = (a45 as u16, (a45 >> 16));
219219

220-
assert!(carry_2 < 4, "Carry_2 exceeds expected bounds {}", carry_2);
220+
assert!(carry_2 < 4, "Carry_2 exceeds expected bounds {carry_2}");
221221

222222
// Bytes 6-7 of the final result
223223
let a67 = (z3 as u32)

prover/src/chips/memory_check/register_mem_check.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,7 @@ fn fill_prev_values(
412412
let cur_value = u32::from_base_fields(reg_value);
413413
assert!(
414414
reg_idx != 0 || cur_value == 0,
415-
"writing non-zero to X0, reg_idx: {}, cur_value: {}, row_idx: {}",
416-
reg_idx,
417-
cur_value,
418-
row_idx
415+
"writing non-zero to X0, reg_idx: {reg_idx}, cur_value: {cur_value}, row_idx: {row_idx}"
419416
);
420417
let AccessResult {
421418
prev_timestamp,

prover/src/chips/range_check/range128.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fn fill_main_col(value_col: BaseField, selector_col: BaseField, side_note: &mut
189189
}
190190
let checked = value_col.0;
191191
#[cfg(not(test))] // Tests need to go past this assertion and break constraints.
192-
assert!(checked < 128, "value is out of range {}", checked);
192+
assert!(checked < 128, "value is out of range {checked}");
193193
side_note.range128.multiplicity[checked as usize] += 1;
194194
}
195195

prover/src/chips/range_check/range16.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ fn fill_main_for_type<VC: VirtualColumn<1>>(
272272
let [is_type] = VC::read_from_traces_builder(traces, row_idx);
273273
!is_type.is_zero()
274274
},
275-
"ProgramStep and the TraceBuilder seem to disagree which type of instruction is being processed at row {}; step: {:?}, instruction_type: {:?}",
276-
row_idx,
277-
step,
278-
instruction_type,
275+
"ProgramStep and the TraceBuilder seem to disagree which type of instruction is being processed at row {row_idx}; step: {step:?}, instruction_type: {instruction_type:?}",
279276
);
280277
if step_is_of_type {
281278
for col in columns.iter() {
@@ -288,7 +285,7 @@ fn fill_main_for_type<VC: VirtualColumn<1>>(
288285
fn fill_main_elm(col: BaseField, side_note: &mut SideNote) {
289286
let checked = col.0;
290287
#[cfg(not(test))] // Tests need to go past this assertion and break constraints.
291-
assert!(checked < 16, "value is out of range {}", checked);
288+
assert!(checked < 16, "value is out of range {checked}");
292289
side_note.range16.multiplicity[checked as usize] += 1;
293290
}
294291

0 commit comments

Comments
 (0)