Skip to content

Commit f74f6e8

Browse files
add assumption
1 parent f71ef69 commit f74f6e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/num/dec2flt/decimal_seq.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ impl DecimalSeq {
159159

160160
#[safety::loop_invariant(self.num_digits <= Self::MAX_DIGITS && self.decimal_point <= self.num_digits as i32)]
161161
while n > 0 {
162+
//true but hard to write proof with kani currently
163+
kani::assume(write_index > 0);
162164
write_index -= 1;
163165
let quotient = n / 10;
164166
let remainder = n - (10 * quotient);

0 commit comments

Comments
 (0)