Skip to content

Commit 9b34615

Browse files
committed
Rust: Update test assertions to match results
1 parent ed68423 commit 9b34615

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

rust/ql/test/library-tests/variables/variables.expected

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
testFailures
2-
| variables.rs:493:13:493:16 | self | Unexpected result: read_access=self |
3-
| variables.rs:493:25:493:25 | n | Unexpected result: read_access=n |
4-
| variables.rs:495:9:495:9 | f | Unexpected result: read_access=f |
5-
| variables.rs:496:9:496:9 | f | Unexpected result: read_access=f |
62
variable
73
| variables.rs:3:14:3:14 | s |
84
| variables.rs:7:14:7:14 | i |

rust/ql/test/library-tests/variables/variables.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ impl MyStruct {
490490
fn my_method(&mut self) {
491491
let mut f = |n| {
492492
// Capture of `self`
493-
self.val += n;
493+
self.val += n; // $ read_access=self read_access=n
494494
};
495-
f(3);
496-
f(4);
495+
f(3); // $ read_access=f
496+
f(4); // $ read_access=f
497497
}
498498
}
499499

0 commit comments

Comments
 (0)