We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e5bb8f commit e1fbcecCopy full SHA for e1fbcec
prusti-tests/tests/v2/pass/loop-invariants/nested.rs
@@ -0,0 +1,19 @@
1
+fn test() {
2
+ let mut idx: usize = 0;
3
+ let length: usize = 10;;
4
+ while idx < length {
5
+ loop_invariant!(idx <= length);
6
+ loop_invariant!(0 <= length);
7
+ idx += 1;
8
+ let mut jdx: usize = 0;
9
+ let inner_length: usize = 5;
10
+ while jdx < inner_length {
11
+ loop_invariant!(jdx <= inner_length);
12
+ jdx += 1;
13
+ }
14
15
+}
16
+
17
+fn main() {
18
+ test();
19
prusti-tests/tests/v2/pass/loop-invariants/simple.rs
@@ -0,0 +1,12 @@
0 commit comments