Rust: Update test assertions to match results

This commit is contained in:
Simon Friis Vindum
2024-12-06 19:05:53 +01:00
parent ed68423d6e
commit 9b34615a64
2 changed files with 3 additions and 7 deletions

View File

@@ -1,8 +1,4 @@
testFailures
| variables.rs:493:13:493:16 | self | Unexpected result: read_access=self |
| variables.rs:493:25:493:25 | n | Unexpected result: read_access=n |
| variables.rs:495:9:495:9 | f | Unexpected result: read_access=f |
| variables.rs:496:9:496:9 | f | Unexpected result: read_access=f |
variable
| variables.rs:3:14:3:14 | s |
| variables.rs:7:14:7:14 | i |

View File

@@ -490,10 +490,10 @@ impl MyStruct {
fn my_method(&mut self) {
let mut f = |n| {
// Capture of `self`
self.val += n;
self.val += n; // $ read_access=self read_access=n
};
f(3);
f(4);
f(3); // $ read_access=f
f(4); // $ read_access=f
}
}