Skip to content

Commit 0eaf3b6

Browse files
committed
Upgrade toolchain to 2/8
- clippy subtree update, c.f. rust-lang/rust#136645
1 parent 6520265 commit 0eaf3b6

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ impl GotocCtx<'_> {
552552
let ty = self.operand_ty_stable(op);
553553
if ty.kind().is_bool() {
554554
Some(self.codegen_operand_stable(op).cast_to(Type::c_bool()))
555-
} else if arg_abi.map_or(true, |abi| abi.mode != PassMode::Ignore) {
555+
} else if arg_abi.is_none_or(|abi| abi.mode != PassMode::Ignore) {
556556
Some(self.codegen_operand_stable(op))
557557
} else {
558558
None

kani-compiler/src/kani_middle/analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl From<&Terminator> for Key {
149149
TerminatorKind::Drop { .. } => Key("Drop"),
150150
TerminatorKind::Goto { .. } => Key("Goto"),
151151
TerminatorKind::InlineAsm { .. } => Key("InlineAsm"),
152-
TerminatorKind::Resume { .. } => Key("Resume"),
152+
TerminatorKind::Resume => Key("Resume"),
153153
TerminatorKind::Return => Key("Return"),
154154
TerminatorKind::SwitchInt { .. } => Key("SwitchInt"),
155155
TerminatorKind::Unreachable => Key("Unreachable"),

kani-compiler/src/kani_middle/reachability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ impl MirVisitor for MonoItemsFnCollector<'_, '_> {
458458
// We don't support inline assembly. This shall be replaced by an unsupported
459459
// construct during codegen.
460460
}
461-
TerminatorKind::Abort { .. } | TerminatorKind::Assert { .. } => {
461+
TerminatorKind::Abort | TerminatorKind::Assert { .. } => {
462462
// We generate code for this without invoking any lang item.
463463
}
464464
TerminatorKind::Goto { .. }

kani-driver/src/call_cbmc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ impl VerificationResult {
309309
///
310310
/// NOTE: We actually ignore the CBMC exit status, in favor of two checks:
311311
/// 1. Examining the actual results of CBMC properties.
312-
/// (CBMC will regularly report "failure" but that's just our cover checks.)
312+
/// (CBMC will regularly report "failure" but that's just our cover checks.)
313313
/// 2. Positively checking for the presence of results.
314-
/// (Do not mistake lack of results for success: report it as failure.)
314+
/// (Do not mistake lack of results for success: report it as failure.)
315315
fn from(
316316
output: VerificationOutput,
317317
should_panic: bool,

library/kani/src/models/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mod intrinsics {
6565
/// Logic similar to `bitmask_len` from `portable_simd`.
6666
/// <https://github.com/rust-lang/portable-simd/blob/490b5cf/crates/core_simd/src/masks/to_bitmask.rs#L75-L79>
6767
pub(super) const fn mask_len(len: usize) -> usize {
68-
(len + 7) / 8
68+
len.div_ceil(8)
6969
}
7070

7171
#[cfg(target_endian = "little")]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2025-02-07"
5+
channel = "nightly-2025-02-08"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

tools/kani-cov/src/report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ fn insert_escapes(str: &str, markers: Vec<(ColumnNumber, bool)>, format: &Report
261261
escaped_str.insert_str(i + offset, b);
262262
// `offset` keeps track of the bytes we've already inserted so the original
263263
// index is shifted by the appropriate amount in subsequent insertions.
264-
offset += b.bytes().len();
264+
offset += b.len();
265265
}
266266
escaped_str
267267
}

tools/kani-cov/src/summary.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ pub fn line_coverage_results(
165165
}
166166
}
167167
} else {
168-
line_status = std::iter::repeat(Some((0, MarkerInfo::FullLine)))
169-
.take(end_line - start_line + 1)
170-
.collect();
168+
line_status =
169+
std::iter::repeat_n(Some((0, MarkerInfo::FullLine)), end_line - start_line + 1)
170+
.collect();
171171
}
172172
line_status
173173
}

0 commit comments

Comments
 (0)