diff --git a/rust/ql/test/library-tests/variables/Cfg.expected b/rust/ql/test/library-tests/variables/Cfg.expected index 77ea9a8b15bf..6b979eac0da2 100644 --- a/rust/ql/test/library-tests/variables/Cfg.expected +++ b/rust/ql/test/library-tests/variables/Cfg.expected @@ -1078,195 +1078,201 @@ edges | variables.rs:483:9:483:24 | ExprStmt | variables.rs:483:16:483:19 | self | | | variables.rs:483:16:483:19 | self | variables.rs:483:16:483:23 | self.val | | | variables.rs:483:16:483:23 | self.val | variables.rs:483:9:483:23 | return ... | | -| variables.rs:487:1:494:1 | enter fn structs | variables.rs:488:5:488:36 | let ... = ... | | -| variables.rs:487:1:494:1 | exit fn structs (normal) | variables.rs:487:1:494:1 | exit fn structs | | -| variables.rs:487:14:494:1 | { ... } | variables.rs:487:1:494:1 | exit fn structs (normal) | | -| variables.rs:488:5:488:36 | let ... = ... | variables.rs:488:33:488:33 | 1 | | -| variables.rs:488:9:488:13 | a | variables.rs:489:5:489:26 | ExprStmt | match | -| variables.rs:488:17:488:35 | MyStruct {...} | variables.rs:488:9:488:13 | a | | -| variables.rs:488:33:488:33 | 1 | variables.rs:488:17:488:35 | MyStruct {...} | | -| variables.rs:489:5:489:13 | print_i64 | variables.rs:489:15:489:15 | a | | -| variables.rs:489:5:489:25 | print_i64(...) | variables.rs:490:5:490:14 | ExprStmt | | -| variables.rs:489:5:489:26 | ExprStmt | variables.rs:489:5:489:13 | print_i64 | | -| variables.rs:489:15:489:15 | a | variables.rs:489:15:489:24 | ... .my_get(...) | | -| variables.rs:489:15:489:24 | ... .my_get(...) | variables.rs:489:5:489:25 | print_i64(...) | | -| variables.rs:490:5:490:5 | a | variables.rs:490:5:490:9 | a.val | | -| variables.rs:490:5:490:9 | a.val | variables.rs:490:13:490:13 | 5 | | -| variables.rs:490:5:490:13 | ... = ... | variables.rs:491:5:491:26 | ExprStmt | | -| variables.rs:490:5:490:14 | ExprStmt | variables.rs:490:5:490:5 | a | | -| variables.rs:490:13:490:13 | 5 | variables.rs:490:5:490:13 | ... = ... | | -| variables.rs:491:5:491:13 | print_i64 | variables.rs:491:15:491:15 | a | | -| variables.rs:491:5:491:25 | print_i64(...) | variables.rs:492:5:492:28 | ExprStmt | | -| variables.rs:491:5:491:26 | ExprStmt | variables.rs:491:5:491:13 | print_i64 | | -| variables.rs:491:15:491:15 | a | variables.rs:491:15:491:24 | ... .my_get(...) | | -| variables.rs:491:15:491:24 | ... .my_get(...) | variables.rs:491:5:491:25 | print_i64(...) | | -| variables.rs:492:5:492:5 | a | variables.rs:492:25:492:25 | 2 | | -| variables.rs:492:5:492:27 | ... = ... | variables.rs:493:5:493:26 | ExprStmt | | -| variables.rs:492:5:492:28 | ExprStmt | variables.rs:492:5:492:5 | a | | -| variables.rs:492:9:492:27 | MyStruct {...} | variables.rs:492:5:492:27 | ... = ... | | -| variables.rs:492:25:492:25 | 2 | variables.rs:492:9:492:27 | MyStruct {...} | | +| variables.rs:486:5:488:5 | enter fn id | variables.rs:486:11:486:14 | self | | +| variables.rs:486:5:488:5 | exit fn id (normal) | variables.rs:486:5:488:5 | exit fn id | | +| variables.rs:486:11:486:14 | SelfParam | variables.rs:487:9:487:12 | self | | +| variables.rs:486:11:486:14 | self | variables.rs:486:11:486:14 | SelfParam | | +| variables.rs:486:25:488:5 | { ... } | variables.rs:486:5:488:5 | exit fn id (normal) | | +| variables.rs:487:9:487:12 | self | variables.rs:486:25:488:5 | { ... } | | +| variables.rs:491:1:498:1 | enter fn structs | variables.rs:492:5:492:36 | let ... = ... | | +| variables.rs:491:1:498:1 | exit fn structs (normal) | variables.rs:491:1:498:1 | exit fn structs | | +| variables.rs:491:14:498:1 | { ... } | variables.rs:491:1:498:1 | exit fn structs (normal) | | +| variables.rs:492:5:492:36 | let ... = ... | variables.rs:492:33:492:33 | 1 | | +| variables.rs:492:9:492:13 | a | variables.rs:493:5:493:26 | ExprStmt | match | +| variables.rs:492:17:492:35 | MyStruct {...} | variables.rs:492:9:492:13 | a | | +| variables.rs:492:33:492:33 | 1 | variables.rs:492:17:492:35 | MyStruct {...} | | | variables.rs:493:5:493:13 | print_i64 | variables.rs:493:15:493:15 | a | | -| variables.rs:493:5:493:25 | print_i64(...) | variables.rs:487:14:494:1 | { ... } | | +| variables.rs:493:5:493:25 | print_i64(...) | variables.rs:494:5:494:14 | ExprStmt | | | variables.rs:493:5:493:26 | ExprStmt | variables.rs:493:5:493:13 | print_i64 | | | variables.rs:493:15:493:15 | a | variables.rs:493:15:493:24 | ... .my_get(...) | | | variables.rs:493:15:493:24 | ... .my_get(...) | variables.rs:493:5:493:25 | print_i64(...) | | -| variables.rs:496:1:503:1 | enter fn ref_arg | variables.rs:497:5:497:15 | let ... = 16 | | -| variables.rs:496:1:503:1 | exit fn ref_arg (normal) | variables.rs:496:1:503:1 | exit fn ref_arg | | -| variables.rs:496:14:503:1 | { ... } | variables.rs:496:1:503:1 | exit fn ref_arg (normal) | | -| variables.rs:497:5:497:15 | let ... = 16 | variables.rs:497:13:497:14 | 16 | | -| variables.rs:497:9:497:9 | x | variables.rs:498:5:498:22 | ExprStmt | match | -| variables.rs:497:13:497:14 | 16 | variables.rs:497:9:497:9 | x | | -| variables.rs:498:5:498:17 | print_i64_ref | variables.rs:498:20:498:20 | x | | -| variables.rs:498:5:498:21 | print_i64_ref(...) | variables.rs:499:5:499:17 | ExprStmt | | -| variables.rs:498:5:498:22 | ExprStmt | variables.rs:498:5:498:17 | print_i64_ref | | -| variables.rs:498:19:498:20 | &x | variables.rs:498:5:498:21 | print_i64_ref(...) | | -| variables.rs:498:20:498:20 | x | variables.rs:498:19:498:20 | &x | | -| variables.rs:499:5:499:13 | print_i64 | variables.rs:499:15:499:15 | x | | -| variables.rs:499:5:499:16 | print_i64(...) | variables.rs:501:5:501:15 | let ... = 17 | | -| variables.rs:499:5:499:17 | ExprStmt | variables.rs:499:5:499:13 | print_i64 | | -| variables.rs:499:15:499:15 | x | variables.rs:499:5:499:16 | print_i64(...) | | -| variables.rs:501:5:501:15 | let ... = 17 | variables.rs:501:13:501:14 | 17 | | -| variables.rs:501:9:501:9 | z | variables.rs:502:5:502:22 | ExprStmt | match | -| variables.rs:501:13:501:14 | 17 | variables.rs:501:9:501:9 | z | | -| variables.rs:502:5:502:17 | print_i64_ref | variables.rs:502:20:502:20 | z | | -| variables.rs:502:5:502:21 | print_i64_ref(...) | variables.rs:496:14:503:1 | { ... } | | +| variables.rs:494:5:494:5 | a | variables.rs:494:5:494:9 | a.val | | +| variables.rs:494:5:494:9 | a.val | variables.rs:494:13:494:13 | 5 | | +| variables.rs:494:5:494:13 | ... = ... | variables.rs:495:5:495:26 | ExprStmt | | +| variables.rs:494:5:494:14 | ExprStmt | variables.rs:494:5:494:5 | a | | +| variables.rs:494:13:494:13 | 5 | variables.rs:494:5:494:13 | ... = ... | | +| variables.rs:495:5:495:13 | print_i64 | variables.rs:495:15:495:15 | a | | +| variables.rs:495:5:495:25 | print_i64(...) | variables.rs:496:5:496:28 | ExprStmt | | +| variables.rs:495:5:495:26 | ExprStmt | variables.rs:495:5:495:13 | print_i64 | | +| variables.rs:495:15:495:15 | a | variables.rs:495:15:495:24 | ... .my_get(...) | | +| variables.rs:495:15:495:24 | ... .my_get(...) | variables.rs:495:5:495:25 | print_i64(...) | | +| variables.rs:496:5:496:5 | a | variables.rs:496:25:496:25 | 2 | | +| variables.rs:496:5:496:27 | ... = ... | variables.rs:497:5:497:26 | ExprStmt | | +| variables.rs:496:5:496:28 | ExprStmt | variables.rs:496:5:496:5 | a | | +| variables.rs:496:9:496:27 | MyStruct {...} | variables.rs:496:5:496:27 | ... = ... | | +| variables.rs:496:25:496:25 | 2 | variables.rs:496:9:496:27 | MyStruct {...} | | +| variables.rs:497:5:497:13 | print_i64 | variables.rs:497:15:497:15 | a | | +| variables.rs:497:5:497:25 | print_i64(...) | variables.rs:491:14:498:1 | { ... } | | +| variables.rs:497:5:497:26 | ExprStmt | variables.rs:497:5:497:13 | print_i64 | | +| variables.rs:497:15:497:15 | a | variables.rs:497:15:497:24 | ... .my_get(...) | | +| variables.rs:497:15:497:24 | ... .my_get(...) | variables.rs:497:5:497:25 | print_i64(...) | | +| variables.rs:500:1:507:1 | enter fn ref_arg | variables.rs:501:5:501:15 | let ... = 16 | | +| variables.rs:500:1:507:1 | exit fn ref_arg (normal) | variables.rs:500:1:507:1 | exit fn ref_arg | | +| variables.rs:500:14:507:1 | { ... } | variables.rs:500:1:507:1 | exit fn ref_arg (normal) | | +| variables.rs:501:5:501:15 | let ... = 16 | variables.rs:501:13:501:14 | 16 | | +| variables.rs:501:9:501:9 | x | variables.rs:502:5:502:22 | ExprStmt | match | +| variables.rs:501:13:501:14 | 16 | variables.rs:501:9:501:9 | x | | +| variables.rs:502:5:502:17 | print_i64_ref | variables.rs:502:20:502:20 | x | | +| variables.rs:502:5:502:21 | print_i64_ref(...) | variables.rs:503:5:503:17 | ExprStmt | | | variables.rs:502:5:502:22 | ExprStmt | variables.rs:502:5:502:17 | print_i64_ref | | -| variables.rs:502:19:502:20 | &z | variables.rs:502:5:502:21 | print_i64_ref(...) | | -| variables.rs:502:20:502:20 | z | variables.rs:502:19:502:20 | &z | | -| variables.rs:510:3:512:3 | enter fn bar | variables.rs:510:15:510:18 | self | | -| variables.rs:510:3:512:3 | exit fn bar (normal) | variables.rs:510:3:512:3 | exit fn bar | | -| variables.rs:510:10:510:18 | SelfParam | variables.rs:511:5:511:32 | ExprStmt | | -| variables.rs:510:15:510:18 | self | variables.rs:510:10:510:18 | SelfParam | | -| variables.rs:510:21:512:3 | { ... } | variables.rs:510:3:512:3 | exit fn bar (normal) | | -| variables.rs:511:5:511:9 | * ... | variables.rs:511:29:511:29 | 3 | | -| variables.rs:511:5:511:31 | ... = ... | variables.rs:510:21:512:3 | { ... } | | -| variables.rs:511:5:511:32 | ExprStmt | variables.rs:511:6:511:9 | self | | -| variables.rs:511:6:511:9 | self | variables.rs:511:5:511:9 | * ... | | -| variables.rs:511:13:511:31 | MyStruct {...} | variables.rs:511:5:511:31 | ... = ... | | -| variables.rs:511:29:511:29 | 3 | variables.rs:511:13:511:31 | MyStruct {...} | | -| variables.rs:515:1:520:1 | enter fn ref_methodcall_receiver | variables.rs:516:3:516:34 | let ... = ... | | -| variables.rs:515:1:520:1 | exit fn ref_methodcall_receiver (normal) | variables.rs:515:1:520:1 | exit fn ref_methodcall_receiver | | -| variables.rs:515:30:520:1 | { ... } | variables.rs:515:1:520:1 | exit fn ref_methodcall_receiver (normal) | | -| variables.rs:516:3:516:34 | let ... = ... | variables.rs:516:31:516:31 | 1 | | -| variables.rs:516:7:516:11 | a | variables.rs:517:3:517:10 | ExprStmt | match | -| variables.rs:516:15:516:33 | MyStruct {...} | variables.rs:516:7:516:11 | a | | -| variables.rs:516:31:516:31 | 1 | variables.rs:516:15:516:33 | MyStruct {...} | | -| variables.rs:517:3:517:3 | a | variables.rs:517:3:517:9 | ... .bar(...) | | -| variables.rs:517:3:517:9 | ... .bar(...) | variables.rs:519:3:519:19 | ExprStmt | | -| variables.rs:517:3:517:10 | ExprStmt | variables.rs:517:3:517:3 | a | | -| variables.rs:519:3:519:11 | print_i64 | variables.rs:519:13:519:13 | a | | -| variables.rs:519:3:519:18 | print_i64(...) | variables.rs:515:30:520:1 | { ... } | | -| variables.rs:519:3:519:19 | ExprStmt | variables.rs:519:3:519:11 | print_i64 | | -| variables.rs:519:13:519:13 | a | variables.rs:519:13:519:17 | a.val | | -| variables.rs:519:13:519:17 | a.val | variables.rs:519:3:519:18 | print_i64(...) | | -| variables.rs:522:1:556:1 | enter fn main | variables.rs:523:5:523:25 | ExprStmt | | -| variables.rs:522:1:556:1 | exit fn main (normal) | variables.rs:522:1:556:1 | exit fn main | | -| variables.rs:522:11:556:1 | { ... } | variables.rs:522:1:556:1 | exit fn main (normal) | | -| variables.rs:523:5:523:22 | immutable_variable | variables.rs:523:5:523:24 | immutable_variable(...) | | -| variables.rs:523:5:523:24 | immutable_variable(...) | variables.rs:524:5:524:23 | ExprStmt | | -| variables.rs:523:5:523:25 | ExprStmt | variables.rs:523:5:523:22 | immutable_variable | | -| variables.rs:524:5:524:20 | mutable_variable | variables.rs:524:5:524:22 | mutable_variable(...) | | -| variables.rs:524:5:524:22 | mutable_variable(...) | variables.rs:525:5:525:40 | ExprStmt | | -| variables.rs:524:5:524:23 | ExprStmt | variables.rs:524:5:524:20 | mutable_variable | | -| variables.rs:525:5:525:37 | mutable_variable_immutable_borrow | variables.rs:525:5:525:39 | mutable_variable_immutable_borrow(...) | | -| variables.rs:525:5:525:39 | mutable_variable_immutable_borrow(...) | variables.rs:526:5:526:23 | ExprStmt | | -| variables.rs:525:5:525:40 | ExprStmt | variables.rs:525:5:525:37 | mutable_variable_immutable_borrow | | -| variables.rs:526:5:526:20 | variable_shadow1 | variables.rs:526:5:526:22 | variable_shadow1(...) | | -| variables.rs:526:5:526:22 | variable_shadow1(...) | variables.rs:527:5:527:23 | ExprStmt | | -| variables.rs:526:5:526:23 | ExprStmt | variables.rs:526:5:526:20 | variable_shadow1 | | -| variables.rs:527:5:527:20 | variable_shadow2 | variables.rs:527:5:527:22 | variable_shadow2(...) | | -| variables.rs:527:5:527:22 | variable_shadow2(...) | variables.rs:528:5:528:19 | ExprStmt | | -| variables.rs:527:5:527:23 | ExprStmt | variables.rs:527:5:527:20 | variable_shadow2 | | -| variables.rs:528:5:528:16 | let_pattern1 | variables.rs:528:5:528:18 | let_pattern1(...) | | -| variables.rs:528:5:528:18 | let_pattern1(...) | variables.rs:529:5:529:19 | ExprStmt | | -| variables.rs:528:5:528:19 | ExprStmt | variables.rs:528:5:528:16 | let_pattern1 | | -| variables.rs:529:5:529:16 | let_pattern2 | variables.rs:529:5:529:18 | let_pattern2(...) | | -| variables.rs:529:5:529:18 | let_pattern2(...) | variables.rs:530:5:530:19 | ExprStmt | | -| variables.rs:529:5:529:19 | ExprStmt | variables.rs:529:5:529:16 | let_pattern2 | | -| variables.rs:530:5:530:16 | let_pattern3 | variables.rs:530:5:530:18 | let_pattern3(...) | | -| variables.rs:530:5:530:18 | let_pattern3(...) | variables.rs:531:5:531:19 | ExprStmt | | -| variables.rs:530:5:530:19 | ExprStmt | variables.rs:530:5:530:16 | let_pattern3 | | -| variables.rs:531:5:531:16 | let_pattern4 | variables.rs:531:5:531:18 | let_pattern4(...) | | -| variables.rs:531:5:531:18 | let_pattern4(...) | variables.rs:532:5:532:21 | ExprStmt | | -| variables.rs:531:5:531:19 | ExprStmt | variables.rs:531:5:531:16 | let_pattern4 | | -| variables.rs:532:5:532:18 | match_pattern1 | variables.rs:532:5:532:20 | match_pattern1(...) | | -| variables.rs:532:5:532:20 | match_pattern1(...) | variables.rs:533:5:533:21 | ExprStmt | | -| variables.rs:532:5:532:21 | ExprStmt | variables.rs:532:5:532:18 | match_pattern1 | | -| variables.rs:533:5:533:18 | match_pattern2 | variables.rs:533:5:533:20 | match_pattern2(...) | | -| variables.rs:533:5:533:20 | match_pattern2(...) | variables.rs:534:5:534:21 | ExprStmt | | -| variables.rs:533:5:533:21 | ExprStmt | variables.rs:533:5:533:18 | match_pattern2 | | -| variables.rs:534:5:534:18 | match_pattern3 | variables.rs:534:5:534:20 | match_pattern3(...) | | -| variables.rs:534:5:534:20 | match_pattern3(...) | variables.rs:535:5:535:21 | ExprStmt | | -| variables.rs:534:5:534:21 | ExprStmt | variables.rs:534:5:534:18 | match_pattern3 | | -| variables.rs:535:5:535:18 | match_pattern4 | variables.rs:535:5:535:20 | match_pattern4(...) | | -| variables.rs:535:5:535:20 | match_pattern4(...) | variables.rs:536:5:536:21 | ExprStmt | | -| variables.rs:535:5:535:21 | ExprStmt | variables.rs:535:5:535:18 | match_pattern4 | | -| variables.rs:536:5:536:18 | match_pattern5 | variables.rs:536:5:536:20 | match_pattern5(...) | | -| variables.rs:536:5:536:20 | match_pattern5(...) | variables.rs:537:5:537:21 | ExprStmt | | -| variables.rs:536:5:536:21 | ExprStmt | variables.rs:536:5:536:18 | match_pattern5 | | -| variables.rs:537:5:537:18 | match_pattern6 | variables.rs:537:5:537:20 | match_pattern6(...) | | -| variables.rs:537:5:537:20 | match_pattern6(...) | variables.rs:538:5:538:21 | ExprStmt | | -| variables.rs:537:5:537:21 | ExprStmt | variables.rs:537:5:537:18 | match_pattern6 | | -| variables.rs:538:5:538:18 | match_pattern7 | variables.rs:538:5:538:20 | match_pattern7(...) | | -| variables.rs:538:5:538:20 | match_pattern7(...) | variables.rs:539:5:539:21 | ExprStmt | | -| variables.rs:538:5:538:21 | ExprStmt | variables.rs:538:5:538:18 | match_pattern7 | | -| variables.rs:539:5:539:18 | match_pattern8 | variables.rs:539:5:539:20 | match_pattern8(...) | | -| variables.rs:539:5:539:20 | match_pattern8(...) | variables.rs:540:5:540:21 | ExprStmt | | -| variables.rs:539:5:539:21 | ExprStmt | variables.rs:539:5:539:18 | match_pattern8 | | -| variables.rs:540:5:540:18 | match_pattern9 | variables.rs:540:5:540:20 | match_pattern9(...) | | -| variables.rs:540:5:540:20 | match_pattern9(...) | variables.rs:541:5:541:36 | ExprStmt | | -| variables.rs:540:5:540:21 | ExprStmt | variables.rs:540:5:540:18 | match_pattern9 | | -| variables.rs:541:5:541:18 | param_pattern1 | variables.rs:541:20:541:22 | "a" | | -| variables.rs:541:5:541:35 | param_pattern1(...) | variables.rs:542:5:542:37 | ExprStmt | | -| variables.rs:541:5:541:36 | ExprStmt | variables.rs:541:5:541:18 | param_pattern1 | | -| variables.rs:541:20:541:22 | "a" | variables.rs:541:26:541:28 | "b" | | -| variables.rs:541:25:541:34 | TupleExpr | variables.rs:541:5:541:35 | param_pattern1(...) | | -| variables.rs:541:26:541:28 | "b" | variables.rs:541:31:541:33 | "c" | | -| variables.rs:541:31:541:33 | "c" | variables.rs:541:25:541:34 | TupleExpr | | -| variables.rs:542:5:542:18 | param_pattern2 | variables.rs:542:20:542:31 | ...::Left | | -| variables.rs:542:5:542:36 | param_pattern2(...) | variables.rs:543:5:543:26 | ExprStmt | | -| variables.rs:542:5:542:37 | ExprStmt | variables.rs:542:5:542:18 | param_pattern2 | | -| variables.rs:542:20:542:31 | ...::Left | variables.rs:542:33:542:34 | 45 | | -| variables.rs:542:20:542:35 | ...::Left(...) | variables.rs:542:5:542:36 | param_pattern2(...) | | -| variables.rs:542:33:542:34 | 45 | variables.rs:542:20:542:35 | ...::Left(...) | | -| variables.rs:543:5:543:23 | destruct_assignment | variables.rs:543:5:543:25 | destruct_assignment(...) | | -| variables.rs:543:5:543:25 | destruct_assignment(...) | variables.rs:544:5:544:23 | ExprStmt | | -| variables.rs:543:5:543:26 | ExprStmt | variables.rs:543:5:543:23 | destruct_assignment | | -| variables.rs:544:5:544:20 | closure_variable | variables.rs:544:5:544:22 | closure_variable(...) | | -| variables.rs:544:5:544:22 | closure_variable(...) | variables.rs:545:5:545:19 | ExprStmt | | -| variables.rs:544:5:544:23 | ExprStmt | variables.rs:544:5:544:20 | closure_variable | | -| variables.rs:545:5:545:16 | for_variable | variables.rs:545:5:545:18 | for_variable(...) | | -| variables.rs:545:5:545:18 | for_variable(...) | variables.rs:546:5:546:17 | ExprStmt | | -| variables.rs:545:5:545:19 | ExprStmt | variables.rs:545:5:545:16 | for_variable | | -| variables.rs:546:5:546:14 | add_assign | variables.rs:546:5:546:16 | add_assign(...) | | -| variables.rs:546:5:546:16 | add_assign(...) | variables.rs:547:5:547:13 | ExprStmt | | -| variables.rs:546:5:546:17 | ExprStmt | variables.rs:546:5:546:14 | add_assign | | -| variables.rs:547:5:547:10 | mutate | variables.rs:547:5:547:12 | mutate(...) | | -| variables.rs:547:5:547:12 | mutate(...) | variables.rs:548:5:548:17 | ExprStmt | | -| variables.rs:547:5:547:13 | ExprStmt | variables.rs:547:5:547:10 | mutate | | -| variables.rs:548:5:548:14 | mutate_arg | variables.rs:548:5:548:16 | mutate_arg(...) | | -| variables.rs:548:5:548:16 | mutate_arg(...) | variables.rs:549:5:549:12 | ExprStmt | | -| variables.rs:548:5:548:17 | ExprStmt | variables.rs:548:5:548:14 | mutate_arg | | -| variables.rs:549:5:549:9 | alias | variables.rs:549:5:549:11 | alias(...) | | -| variables.rs:549:5:549:11 | alias(...) | variables.rs:550:5:550:18 | ExprStmt | | -| variables.rs:549:5:549:12 | ExprStmt | variables.rs:549:5:549:9 | alias | | -| variables.rs:550:5:550:15 | capture_mut | variables.rs:550:5:550:17 | capture_mut(...) | | -| variables.rs:550:5:550:17 | capture_mut(...) | variables.rs:551:5:551:20 | ExprStmt | | -| variables.rs:550:5:550:18 | ExprStmt | variables.rs:550:5:550:15 | capture_mut | | -| variables.rs:551:5:551:17 | capture_immut | variables.rs:551:5:551:19 | capture_immut(...) | | -| variables.rs:551:5:551:19 | capture_immut(...) | variables.rs:552:5:552:26 | ExprStmt | | -| variables.rs:551:5:551:20 | ExprStmt | variables.rs:551:5:551:17 | capture_immut | | -| variables.rs:552:5:552:23 | async_block_capture | variables.rs:552:5:552:25 | async_block_capture(...) | | -| variables.rs:552:5:552:25 | async_block_capture(...) | variables.rs:553:5:553:14 | ExprStmt | | -| variables.rs:552:5:552:26 | ExprStmt | variables.rs:552:5:552:23 | async_block_capture | | -| variables.rs:553:5:553:11 | structs | variables.rs:553:5:553:13 | structs(...) | | -| variables.rs:553:5:553:13 | structs(...) | variables.rs:554:5:554:14 | ExprStmt | | -| variables.rs:553:5:553:14 | ExprStmt | variables.rs:553:5:553:11 | structs | | -| variables.rs:554:5:554:11 | ref_arg | variables.rs:554:5:554:13 | ref_arg(...) | | -| variables.rs:554:5:554:13 | ref_arg(...) | variables.rs:555:5:555:30 | ExprStmt | | -| variables.rs:554:5:554:14 | ExprStmt | variables.rs:554:5:554:11 | ref_arg | | -| variables.rs:555:5:555:27 | ref_methodcall_receiver | variables.rs:555:5:555:29 | ref_methodcall_receiver(...) | | -| variables.rs:555:5:555:29 | ref_methodcall_receiver(...) | variables.rs:522:11:556:1 | { ... } | | -| variables.rs:555:5:555:30 | ExprStmt | variables.rs:555:5:555:27 | ref_methodcall_receiver | | +| variables.rs:502:19:502:20 | &x | variables.rs:502:5:502:21 | print_i64_ref(...) | | +| variables.rs:502:20:502:20 | x | variables.rs:502:19:502:20 | &x | | +| variables.rs:503:5:503:13 | print_i64 | variables.rs:503:15:503:15 | x | | +| variables.rs:503:5:503:16 | print_i64(...) | variables.rs:505:5:505:15 | let ... = 17 | | +| variables.rs:503:5:503:17 | ExprStmt | variables.rs:503:5:503:13 | print_i64 | | +| variables.rs:503:15:503:15 | x | variables.rs:503:5:503:16 | print_i64(...) | | +| variables.rs:505:5:505:15 | let ... = 17 | variables.rs:505:13:505:14 | 17 | | +| variables.rs:505:9:505:9 | z | variables.rs:506:5:506:22 | ExprStmt | match | +| variables.rs:505:13:505:14 | 17 | variables.rs:505:9:505:9 | z | | +| variables.rs:506:5:506:17 | print_i64_ref | variables.rs:506:20:506:20 | z | | +| variables.rs:506:5:506:21 | print_i64_ref(...) | variables.rs:500:14:507:1 | { ... } | | +| variables.rs:506:5:506:22 | ExprStmt | variables.rs:506:5:506:17 | print_i64_ref | | +| variables.rs:506:19:506:20 | &z | variables.rs:506:5:506:21 | print_i64_ref(...) | | +| variables.rs:506:20:506:20 | z | variables.rs:506:19:506:20 | &z | | +| variables.rs:514:3:516:3 | enter fn bar | variables.rs:514:15:514:18 | self | | +| variables.rs:514:3:516:3 | exit fn bar (normal) | variables.rs:514:3:516:3 | exit fn bar | | +| variables.rs:514:10:514:18 | SelfParam | variables.rs:515:5:515:32 | ExprStmt | | +| variables.rs:514:15:514:18 | self | variables.rs:514:10:514:18 | SelfParam | | +| variables.rs:514:21:516:3 | { ... } | variables.rs:514:3:516:3 | exit fn bar (normal) | | +| variables.rs:515:5:515:9 | * ... | variables.rs:515:29:515:29 | 3 | | +| variables.rs:515:5:515:31 | ... = ... | variables.rs:514:21:516:3 | { ... } | | +| variables.rs:515:5:515:32 | ExprStmt | variables.rs:515:6:515:9 | self | | +| variables.rs:515:6:515:9 | self | variables.rs:515:5:515:9 | * ... | | +| variables.rs:515:13:515:31 | MyStruct {...} | variables.rs:515:5:515:31 | ... = ... | | +| variables.rs:515:29:515:29 | 3 | variables.rs:515:13:515:31 | MyStruct {...} | | +| variables.rs:519:1:524:1 | enter fn ref_methodcall_receiver | variables.rs:520:3:520:34 | let ... = ... | | +| variables.rs:519:1:524:1 | exit fn ref_methodcall_receiver (normal) | variables.rs:519:1:524:1 | exit fn ref_methodcall_receiver | | +| variables.rs:519:30:524:1 | { ... } | variables.rs:519:1:524:1 | exit fn ref_methodcall_receiver (normal) | | +| variables.rs:520:3:520:34 | let ... = ... | variables.rs:520:31:520:31 | 1 | | +| variables.rs:520:7:520:11 | a | variables.rs:521:3:521:10 | ExprStmt | match | +| variables.rs:520:15:520:33 | MyStruct {...} | variables.rs:520:7:520:11 | a | | +| variables.rs:520:31:520:31 | 1 | variables.rs:520:15:520:33 | MyStruct {...} | | +| variables.rs:521:3:521:3 | a | variables.rs:521:3:521:9 | ... .bar(...) | | +| variables.rs:521:3:521:9 | ... .bar(...) | variables.rs:523:3:523:19 | ExprStmt | | +| variables.rs:521:3:521:10 | ExprStmt | variables.rs:521:3:521:3 | a | | +| variables.rs:523:3:523:11 | print_i64 | variables.rs:523:13:523:13 | a | | +| variables.rs:523:3:523:18 | print_i64(...) | variables.rs:519:30:524:1 | { ... } | | +| variables.rs:523:3:523:19 | ExprStmt | variables.rs:523:3:523:11 | print_i64 | | +| variables.rs:523:13:523:13 | a | variables.rs:523:13:523:17 | a.val | | +| variables.rs:523:13:523:17 | a.val | variables.rs:523:3:523:18 | print_i64(...) | | +| variables.rs:526:1:560:1 | enter fn main | variables.rs:527:5:527:25 | ExprStmt | | +| variables.rs:526:1:560:1 | exit fn main (normal) | variables.rs:526:1:560:1 | exit fn main | | +| variables.rs:526:11:560:1 | { ... } | variables.rs:526:1:560:1 | exit fn main (normal) | | +| variables.rs:527:5:527:22 | immutable_variable | variables.rs:527:5:527:24 | immutable_variable(...) | | +| variables.rs:527:5:527:24 | immutable_variable(...) | variables.rs:528:5:528:23 | ExprStmt | | +| variables.rs:527:5:527:25 | ExprStmt | variables.rs:527:5:527:22 | immutable_variable | | +| variables.rs:528:5:528:20 | mutable_variable | variables.rs:528:5:528:22 | mutable_variable(...) | | +| variables.rs:528:5:528:22 | mutable_variable(...) | variables.rs:529:5:529:40 | ExprStmt | | +| variables.rs:528:5:528:23 | ExprStmt | variables.rs:528:5:528:20 | mutable_variable | | +| variables.rs:529:5:529:37 | mutable_variable_immutable_borrow | variables.rs:529:5:529:39 | mutable_variable_immutable_borrow(...) | | +| variables.rs:529:5:529:39 | mutable_variable_immutable_borrow(...) | variables.rs:530:5:530:23 | ExprStmt | | +| variables.rs:529:5:529:40 | ExprStmt | variables.rs:529:5:529:37 | mutable_variable_immutable_borrow | | +| variables.rs:530:5:530:20 | variable_shadow1 | variables.rs:530:5:530:22 | variable_shadow1(...) | | +| variables.rs:530:5:530:22 | variable_shadow1(...) | variables.rs:531:5:531:23 | ExprStmt | | +| variables.rs:530:5:530:23 | ExprStmt | variables.rs:530:5:530:20 | variable_shadow1 | | +| variables.rs:531:5:531:20 | variable_shadow2 | variables.rs:531:5:531:22 | variable_shadow2(...) | | +| variables.rs:531:5:531:22 | variable_shadow2(...) | variables.rs:532:5:532:19 | ExprStmt | | +| variables.rs:531:5:531:23 | ExprStmt | variables.rs:531:5:531:20 | variable_shadow2 | | +| variables.rs:532:5:532:16 | let_pattern1 | variables.rs:532:5:532:18 | let_pattern1(...) | | +| variables.rs:532:5:532:18 | let_pattern1(...) | variables.rs:533:5:533:19 | ExprStmt | | +| variables.rs:532:5:532:19 | ExprStmt | variables.rs:532:5:532:16 | let_pattern1 | | +| variables.rs:533:5:533:16 | let_pattern2 | variables.rs:533:5:533:18 | let_pattern2(...) | | +| variables.rs:533:5:533:18 | let_pattern2(...) | variables.rs:534:5:534:19 | ExprStmt | | +| variables.rs:533:5:533:19 | ExprStmt | variables.rs:533:5:533:16 | let_pattern2 | | +| variables.rs:534:5:534:16 | let_pattern3 | variables.rs:534:5:534:18 | let_pattern3(...) | | +| variables.rs:534:5:534:18 | let_pattern3(...) | variables.rs:535:5:535:19 | ExprStmt | | +| variables.rs:534:5:534:19 | ExprStmt | variables.rs:534:5:534:16 | let_pattern3 | | +| variables.rs:535:5:535:16 | let_pattern4 | variables.rs:535:5:535:18 | let_pattern4(...) | | +| variables.rs:535:5:535:18 | let_pattern4(...) | variables.rs:536:5:536:21 | ExprStmt | | +| variables.rs:535:5:535:19 | ExprStmt | variables.rs:535:5:535:16 | let_pattern4 | | +| variables.rs:536:5:536:18 | match_pattern1 | variables.rs:536:5:536:20 | match_pattern1(...) | | +| variables.rs:536:5:536:20 | match_pattern1(...) | variables.rs:537:5:537:21 | ExprStmt | | +| variables.rs:536:5:536:21 | ExprStmt | variables.rs:536:5:536:18 | match_pattern1 | | +| variables.rs:537:5:537:18 | match_pattern2 | variables.rs:537:5:537:20 | match_pattern2(...) | | +| variables.rs:537:5:537:20 | match_pattern2(...) | variables.rs:538:5:538:21 | ExprStmt | | +| variables.rs:537:5:537:21 | ExprStmt | variables.rs:537:5:537:18 | match_pattern2 | | +| variables.rs:538:5:538:18 | match_pattern3 | variables.rs:538:5:538:20 | match_pattern3(...) | | +| variables.rs:538:5:538:20 | match_pattern3(...) | variables.rs:539:5:539:21 | ExprStmt | | +| variables.rs:538:5:538:21 | ExprStmt | variables.rs:538:5:538:18 | match_pattern3 | | +| variables.rs:539:5:539:18 | match_pattern4 | variables.rs:539:5:539:20 | match_pattern4(...) | | +| variables.rs:539:5:539:20 | match_pattern4(...) | variables.rs:540:5:540:21 | ExprStmt | | +| variables.rs:539:5:539:21 | ExprStmt | variables.rs:539:5:539:18 | match_pattern4 | | +| variables.rs:540:5:540:18 | match_pattern5 | variables.rs:540:5:540:20 | match_pattern5(...) | | +| variables.rs:540:5:540:20 | match_pattern5(...) | variables.rs:541:5:541:21 | ExprStmt | | +| variables.rs:540:5:540:21 | ExprStmt | variables.rs:540:5:540:18 | match_pattern5 | | +| variables.rs:541:5:541:18 | match_pattern6 | variables.rs:541:5:541:20 | match_pattern6(...) | | +| variables.rs:541:5:541:20 | match_pattern6(...) | variables.rs:542:5:542:21 | ExprStmt | | +| variables.rs:541:5:541:21 | ExprStmt | variables.rs:541:5:541:18 | match_pattern6 | | +| variables.rs:542:5:542:18 | match_pattern7 | variables.rs:542:5:542:20 | match_pattern7(...) | | +| variables.rs:542:5:542:20 | match_pattern7(...) | variables.rs:543:5:543:21 | ExprStmt | | +| variables.rs:542:5:542:21 | ExprStmt | variables.rs:542:5:542:18 | match_pattern7 | | +| variables.rs:543:5:543:18 | match_pattern8 | variables.rs:543:5:543:20 | match_pattern8(...) | | +| variables.rs:543:5:543:20 | match_pattern8(...) | variables.rs:544:5:544:21 | ExprStmt | | +| variables.rs:543:5:543:21 | ExprStmt | variables.rs:543:5:543:18 | match_pattern8 | | +| variables.rs:544:5:544:18 | match_pattern9 | variables.rs:544:5:544:20 | match_pattern9(...) | | +| variables.rs:544:5:544:20 | match_pattern9(...) | variables.rs:545:5:545:36 | ExprStmt | | +| variables.rs:544:5:544:21 | ExprStmt | variables.rs:544:5:544:18 | match_pattern9 | | +| variables.rs:545:5:545:18 | param_pattern1 | variables.rs:545:20:545:22 | "a" | | +| variables.rs:545:5:545:35 | param_pattern1(...) | variables.rs:546:5:546:37 | ExprStmt | | +| variables.rs:545:5:545:36 | ExprStmt | variables.rs:545:5:545:18 | param_pattern1 | | +| variables.rs:545:20:545:22 | "a" | variables.rs:545:26:545:28 | "b" | | +| variables.rs:545:25:545:34 | TupleExpr | variables.rs:545:5:545:35 | param_pattern1(...) | | +| variables.rs:545:26:545:28 | "b" | variables.rs:545:31:545:33 | "c" | | +| variables.rs:545:31:545:33 | "c" | variables.rs:545:25:545:34 | TupleExpr | | +| variables.rs:546:5:546:18 | param_pattern2 | variables.rs:546:20:546:31 | ...::Left | | +| variables.rs:546:5:546:36 | param_pattern2(...) | variables.rs:547:5:547:26 | ExprStmt | | +| variables.rs:546:5:546:37 | ExprStmt | variables.rs:546:5:546:18 | param_pattern2 | | +| variables.rs:546:20:546:31 | ...::Left | variables.rs:546:33:546:34 | 45 | | +| variables.rs:546:20:546:35 | ...::Left(...) | variables.rs:546:5:546:36 | param_pattern2(...) | | +| variables.rs:546:33:546:34 | 45 | variables.rs:546:20:546:35 | ...::Left(...) | | +| variables.rs:547:5:547:23 | destruct_assignment | variables.rs:547:5:547:25 | destruct_assignment(...) | | +| variables.rs:547:5:547:25 | destruct_assignment(...) | variables.rs:548:5:548:23 | ExprStmt | | +| variables.rs:547:5:547:26 | ExprStmt | variables.rs:547:5:547:23 | destruct_assignment | | +| variables.rs:548:5:548:20 | closure_variable | variables.rs:548:5:548:22 | closure_variable(...) | | +| variables.rs:548:5:548:22 | closure_variable(...) | variables.rs:549:5:549:19 | ExprStmt | | +| variables.rs:548:5:548:23 | ExprStmt | variables.rs:548:5:548:20 | closure_variable | | +| variables.rs:549:5:549:16 | for_variable | variables.rs:549:5:549:18 | for_variable(...) | | +| variables.rs:549:5:549:18 | for_variable(...) | variables.rs:550:5:550:17 | ExprStmt | | +| variables.rs:549:5:549:19 | ExprStmt | variables.rs:549:5:549:16 | for_variable | | +| variables.rs:550:5:550:14 | add_assign | variables.rs:550:5:550:16 | add_assign(...) | | +| variables.rs:550:5:550:16 | add_assign(...) | variables.rs:551:5:551:13 | ExprStmt | | +| variables.rs:550:5:550:17 | ExprStmt | variables.rs:550:5:550:14 | add_assign | | +| variables.rs:551:5:551:10 | mutate | variables.rs:551:5:551:12 | mutate(...) | | +| variables.rs:551:5:551:12 | mutate(...) | variables.rs:552:5:552:17 | ExprStmt | | +| variables.rs:551:5:551:13 | ExprStmt | variables.rs:551:5:551:10 | mutate | | +| variables.rs:552:5:552:14 | mutate_arg | variables.rs:552:5:552:16 | mutate_arg(...) | | +| variables.rs:552:5:552:16 | mutate_arg(...) | variables.rs:553:5:553:12 | ExprStmt | | +| variables.rs:552:5:552:17 | ExprStmt | variables.rs:552:5:552:14 | mutate_arg | | +| variables.rs:553:5:553:9 | alias | variables.rs:553:5:553:11 | alias(...) | | +| variables.rs:553:5:553:11 | alias(...) | variables.rs:554:5:554:18 | ExprStmt | | +| variables.rs:553:5:553:12 | ExprStmt | variables.rs:553:5:553:9 | alias | | +| variables.rs:554:5:554:15 | capture_mut | variables.rs:554:5:554:17 | capture_mut(...) | | +| variables.rs:554:5:554:17 | capture_mut(...) | variables.rs:555:5:555:20 | ExprStmt | | +| variables.rs:554:5:554:18 | ExprStmt | variables.rs:554:5:554:15 | capture_mut | | +| variables.rs:555:5:555:17 | capture_immut | variables.rs:555:5:555:19 | capture_immut(...) | | +| variables.rs:555:5:555:19 | capture_immut(...) | variables.rs:556:5:556:26 | ExprStmt | | +| variables.rs:555:5:555:20 | ExprStmt | variables.rs:555:5:555:17 | capture_immut | | +| variables.rs:556:5:556:23 | async_block_capture | variables.rs:556:5:556:25 | async_block_capture(...) | | +| variables.rs:556:5:556:25 | async_block_capture(...) | variables.rs:557:5:557:14 | ExprStmt | | +| variables.rs:556:5:556:26 | ExprStmt | variables.rs:556:5:556:23 | async_block_capture | | +| variables.rs:557:5:557:11 | structs | variables.rs:557:5:557:13 | structs(...) | | +| variables.rs:557:5:557:13 | structs(...) | variables.rs:558:5:558:14 | ExprStmt | | +| variables.rs:557:5:557:14 | ExprStmt | variables.rs:557:5:557:11 | structs | | +| variables.rs:558:5:558:11 | ref_arg | variables.rs:558:5:558:13 | ref_arg(...) | | +| variables.rs:558:5:558:13 | ref_arg(...) | variables.rs:559:5:559:30 | ExprStmt | | +| variables.rs:558:5:558:14 | ExprStmt | variables.rs:558:5:558:11 | ref_arg | | +| variables.rs:559:5:559:27 | ref_methodcall_receiver | variables.rs:559:5:559:29 | ref_methodcall_receiver(...) | | +| variables.rs:559:5:559:29 | ref_methodcall_receiver(...) | variables.rs:526:11:560:1 | { ... } | | +| variables.rs:559:5:559:30 | ExprStmt | variables.rs:559:5:559:27 | ref_methodcall_receiver | | breakTarget continueTarget diff --git a/rust/ql/test/library-tests/variables/Ssa.expected b/rust/ql/test/library-tests/variables/Ssa.expected index af3c96d95030..832b105837c4 100644 --- a/rust/ql/test/library-tests/variables/Ssa.expected +++ b/rust/ql/test/library-tests/variables/Ssa.expected @@ -5,8 +5,8 @@ nonSsaVariable | variables.rs:379:13:379:13 | z | | variables.rs:392:13:392:13 | x | | variables.rs:426:13:426:13 | z | -| variables.rs:488:13:488:13 | a | -| variables.rs:516:11:516:11 | a | +| variables.rs:492:13:492:13 | a | +| variables.rs:520:11:520:11 | a | definition | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | | variables.rs:7:14:7:14 | i | variables.rs:7:14:7:14 | i | @@ -134,8 +134,8 @@ definition | variables.rs:461:13:461:14 | b1 | variables.rs:461:13:461:14 | b1 | | variables.rs:461:24:461:25 | b2 | variables.rs:461:24:461:25 | b2 | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | -| variables.rs:497:9:497:9 | x | variables.rs:497:9:497:9 | x | -| variables.rs:501:9:501:9 | z | variables.rs:501:9:501:9 | z | +| variables.rs:501:9:501:9 | x | variables.rs:501:9:501:9 | x | +| variables.rs:505:9:505:9 | z | variables.rs:505:9:505:9 | z | read | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | variables.rs:4:20:4:20 | s | | variables.rs:7:14:7:14 | i | variables.rs:7:14:7:14 | i | variables.rs:8:20:8:20 | i | @@ -257,7 +257,7 @@ read | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:466:19:466:19 | x | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:470:19:470:19 | x | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:472:19:472:19 | x | -| variables.rs:497:9:497:9 | x | variables.rs:497:9:497:9 | x | variables.rs:499:15:499:15 | x | +| variables.rs:501:9:501:9 | x | variables.rs:501:9:501:9 | x | variables.rs:503:15:503:15 | x | firstRead | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | variables.rs:4:20:4:20 | s | | variables.rs:7:14:7:14 | i | variables.rs:7:14:7:14 | i | variables.rs:8:20:8:20 | i | @@ -356,7 +356,7 @@ firstRead | variables.rs:461:24:461:25 | b2 | variables.rs:461:24:461:25 | b2 | variables.rs:469:8:469:9 | b2 | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:464:19:464:19 | x | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:466:19:466:19 | x | -| variables.rs:497:9:497:9 | x | variables.rs:497:9:497:9 | x | variables.rs:499:15:499:15 | x | +| variables.rs:501:9:501:9 | x | variables.rs:501:9:501:9 | x | variables.rs:503:15:503:15 | x | lastRead | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | variables.rs:4:20:4:20 | s | | variables.rs:7:14:7:14 | i | variables.rs:7:14:7:14 | i | variables.rs:8:20:8:20 | i | @@ -456,7 +456,7 @@ lastRead | variables.rs:461:24:461:25 | b2 | variables.rs:461:24:461:25 | b2 | variables.rs:469:8:469:9 | b2 | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:470:19:470:19 | x | | variables.rs:462:9:462:9 | x | variables.rs:462:9:462:9 | x | variables.rs:472:19:472:19 | x | -| variables.rs:497:9:497:9 | x | variables.rs:497:9:497:9 | x | variables.rs:499:15:499:15 | x | +| variables.rs:501:9:501:9 | x | variables.rs:501:9:501:9 | x | variables.rs:503:15:503:15 | x | adjacentReads | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:36:15:36:16 | x3 | variables.rs:38:9:38:10 | x3 | | variables.rs:43:9:43:10 | x4 | variables.rs:43:9:43:10 | x4 | variables.rs:44:15:44:16 | x4 | variables.rs:49:15:49:16 | x4 | diff --git a/rust/ql/test/library-tests/variables/variables.expected b/rust/ql/test/library-tests/variables/variables.expected index d888734f3dc4..df9cc5e1644b 100644 --- a/rust/ql/test/library-tests/variables/variables.expected +++ b/rust/ql/test/library-tests/variables/variables.expected @@ -95,10 +95,10 @@ variable | variables.rs:461:13:461:14 | b1 | | variables.rs:461:24:461:25 | b2 | | variables.rs:462:9:462:9 | x | -| variables.rs:488:13:488:13 | a | -| variables.rs:497:9:497:9 | x | -| variables.rs:501:9:501:9 | z | -| variables.rs:516:11:516:11 | a | +| variables.rs:492:13:492:13 | a | +| variables.rs:501:9:501:9 | x | +| variables.rs:505:9:505:9 | z | +| variables.rs:520:11:520:11 | a | variableAccess | variables.rs:4:20:4:20 | s | variables.rs:3:14:3:14 | s | | variables.rs:8:20:8:20 | i | variables.rs:7:14:7:14 | i | @@ -246,16 +246,16 @@ variableAccess | variables.rs:469:8:469:9 | b2 | variables.rs:461:24:461:25 | b2 | | variables.rs:470:19:470:19 | x | variables.rs:462:9:462:9 | x | | variables.rs:472:19:472:19 | x | variables.rs:462:9:462:9 | x | -| variables.rs:489:15:489:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:490:5:490:5 | a | variables.rs:488:13:488:13 | a | -| variables.rs:491:15:491:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:492:5:492:5 | a | variables.rs:488:13:488:13 | a | -| variables.rs:493:15:493:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:498:20:498:20 | x | variables.rs:497:9:497:9 | x | -| variables.rs:499:15:499:15 | x | variables.rs:497:9:497:9 | x | -| variables.rs:502:20:502:20 | z | variables.rs:501:9:501:9 | z | -| variables.rs:517:3:517:3 | a | variables.rs:516:11:516:11 | a | -| variables.rs:519:13:519:13 | a | variables.rs:516:11:516:11 | a | +| variables.rs:493:15:493:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:494:5:494:5 | a | variables.rs:492:13:492:13 | a | +| variables.rs:495:15:495:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:496:5:496:5 | a | variables.rs:492:13:492:13 | a | +| variables.rs:497:15:497:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:502:20:502:20 | x | variables.rs:501:9:501:9 | x | +| variables.rs:503:15:503:15 | x | variables.rs:501:9:501:9 | x | +| variables.rs:506:20:506:20 | z | variables.rs:505:9:505:9 | z | +| variables.rs:521:3:521:3 | a | variables.rs:520:11:520:11 | a | +| variables.rs:523:13:523:13 | a | variables.rs:520:11:520:11 | a | variableWriteAccess | variables.rs:23:5:23:6 | x2 | variables.rs:21:13:21:14 | x2 | | variables.rs:30:5:30:5 | x | variables.rs:28:13:28:13 | x | @@ -266,7 +266,7 @@ variableWriteAccess | variables.rs:438:9:438:9 | i | variables.rs:436:13:436:13 | i | | variables.rs:450:9:450:9 | x | variables.rs:446:13:446:13 | x | | variables.rs:454:9:454:9 | x | variables.rs:446:13:446:13 | x | -| variables.rs:492:5:492:5 | a | variables.rs:488:13:488:13 | a | +| variables.rs:496:5:496:5 | a | variables.rs:492:13:492:13 | a | variableReadAccess | variables.rs:4:20:4:20 | s | variables.rs:3:14:3:14 | s | | variables.rs:8:20:8:20 | i | variables.rs:7:14:7:14 | i | @@ -396,13 +396,13 @@ variableReadAccess | variables.rs:469:8:469:9 | b2 | variables.rs:461:24:461:25 | b2 | | variables.rs:470:19:470:19 | x | variables.rs:462:9:462:9 | x | | variables.rs:472:19:472:19 | x | variables.rs:462:9:462:9 | x | -| variables.rs:489:15:489:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:490:5:490:5 | a | variables.rs:488:13:488:13 | a | -| variables.rs:491:15:491:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:493:15:493:15 | a | variables.rs:488:13:488:13 | a | -| variables.rs:499:15:499:15 | x | variables.rs:497:9:497:9 | x | -| variables.rs:517:3:517:3 | a | variables.rs:516:11:516:11 | a | -| variables.rs:519:13:519:13 | a | variables.rs:516:11:516:11 | a | +| variables.rs:493:15:493:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:494:5:494:5 | a | variables.rs:492:13:492:13 | a | +| variables.rs:495:15:495:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:497:15:497:15 | a | variables.rs:492:13:492:13 | a | +| variables.rs:503:15:503:15 | x | variables.rs:501:9:501:9 | x | +| variables.rs:521:3:521:3 | a | variables.rs:520:11:520:11 | a | +| variables.rs:523:13:523:13 | a | variables.rs:520:11:520:11 | a | variableInitializer | variables.rs:16:9:16:10 | x1 | variables.rs:16:14:16:16 | "a" | | variables.rs:21:13:21:14 | x2 | variables.rs:21:18:21:18 | 4 | @@ -450,10 +450,10 @@ variableInitializer | variables.rs:437:9:437:13 | block | variables.rs:437:17:439:5 | { ... } | | variables.rs:446:13:446:13 | x | variables.rs:446:17:446:17 | 1 | | variables.rs:462:9:462:9 | x | variables.rs:462:13:462:13 | 1 | -| variables.rs:488:13:488:13 | a | variables.rs:488:17:488:35 | MyStruct {...} | -| variables.rs:497:9:497:9 | x | variables.rs:497:13:497:14 | 16 | -| variables.rs:501:9:501:9 | z | variables.rs:501:13:501:14 | 17 | -| variables.rs:516:11:516:11 | a | variables.rs:516:15:516:33 | MyStruct {...} | +| variables.rs:492:13:492:13 | a | variables.rs:492:17:492:35 | MyStruct {...} | +| variables.rs:501:9:501:9 | x | variables.rs:501:13:501:14 | 16 | +| variables.rs:505:9:505:9 | z | variables.rs:505:13:505:14 | 17 | +| variables.rs:520:11:520:11 | a | variables.rs:520:15:520:33 | MyStruct {...} | capturedVariable | variables.rs:400:9:400:9 | x | | variables.rs:410:13:410:13 | x | diff --git a/rust/ql/test/library-tests/variables/variables.rs b/rust/ql/test/library-tests/variables/variables.rs index 8dd00c7ebb27..40f26ab0fc88 100644 --- a/rust/ql/test/library-tests/variables/variables.rs +++ b/rust/ql/test/library-tests/variables/variables.rs @@ -117,7 +117,7 @@ fn match_pattern1() { => { print_i64(y1)// $ read_access=y1_2 - } + } None => print_str("NONE"), } @@ -480,7 +480,11 @@ struct MyStruct { impl MyStruct { fn my_get(&mut self) -> i64 { - return self.val; + return self.val; // $ MISSING: read_access=self + } + + fn id(self) -> Self { + self // $ MISSING: read_access=self } } @@ -508,7 +512,7 @@ trait Bar { impl MyStruct { fn bar(&mut self) { - *self = MyStruct { val: 3 }; + *self = MyStruct { val: 3 }; // MISSING: $ read_access=self } }