Created
October 5, 2026 12:03
-
-
Save JoJoDeveloping/1c62f119f98ab299f97490d7ac32452c to your computer and use it in GitHub Desktop.
Aeneas Problem Case ( https://github.com/AeneasVerif/aeneas/issues/1223 )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub fn f(a: &mut i32, b: &mut i32, c: &mut i32, cond: bool) { | |
| let y; | |
| let z; | |
| if cond { | |
| y = &mut *a; | |
| z = &mut *b; | |
| } else { | |
| y = &mut *b; | |
| z = &mut *c; | |
| } | |
| *a += 1; | |
| *z += 1; | |
| } | |
| fn main() { | |
| let mut a = 3; | |
| let mut b = 4; | |
| let mut c = 5; | |
| f(&mut a, &mut b, &mut c, true); | |
| assert_eq!(a, 4); | |
| assert_eq!(b, 5); | |
| assert_eq!(c, 5); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment