Skip to content

Commit

Permalink
Rust: update expected output
Browse files Browse the repository at this point in the history
  • Loading branch information
aibaars committed Oct 3, 2024
1 parent 0439c6f commit 58cf24e
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| gen_arg_list.rs:5:5:5:11 | ArgList | getNumberOfArgs: | 1 |
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| gen_arg_list.rs:5:5:5:11 | ArgList | 0 | gen_arg_list.rs:5:5:5:11 | "not yet implemented" |
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| gen_macro_call.rs:5:5:5:11 | MacroCall | getNumberOfAttrs: | 0 | hasPath: | yes | hasTokenTree: | yes |
| gen_macro_call.rs:5:5:5:11 | MacroCall | getNumberOfAttrs: | 0 | hasPath: | yes | hasTokenTree: | yes | hasExpanded: | yes |
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| gen_macro_call.rs:5:5:5:11 | MacroCall | gen_macro_call.rs:5:5:5:11 | MacroStmts |
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
| gen_name_ref.rs:5:5:5:8 | NameRef | hasText: | yes |
| gen_name_ref.rs:5:5:5:11 | NameRef | hasText: | yes |
| gen_name_ref.rs:5:5:5:11 | NameRef | hasText: | yes |
| gen_name_ref.rs:5:5:5:11 | NameRef | hasText: | yes |
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
| gen_name_ref.rs:5:5:5:8 | NameRef | todo |
| gen_name_ref.rs:5:5:5:11 | NameRef | $crate |
| gen_name_ref.rs:5:5:5:11 | NameRef | panic |
| gen_name_ref.rs:5:5:5:11 | NameRef | panicking |
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
| gen_path_segment.rs:5:5:5:8 | PathSegment | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_segment.rs:5:5:5:11 | PathSegment | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_segment.rs:5:5:5:11 | PathSegment | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_segment.rs:5:5:5:11 | PathSegment | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
| gen_path_segment.rs:5:5:5:8 | PathSegment | gen_path_segment.rs:5:5:5:8 | NameRef |
| gen_path_segment.rs:5:5:5:11 | PathSegment | gen_path_segment.rs:5:5:5:11 | NameRef |
| gen_path_segment.rs:5:5:5:11 | PathSegment | gen_path_segment.rs:5:5:5:11 | NameRef |
| gen_path_segment.rs:5:5:5:11 | PathSegment | gen_path_segment.rs:5:5:5:11 | NameRef |
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
| lib.rs:3:9:3:8 | expected `;` or `{` |
| lib.rs:3:9:3:8 | expected an item |
| lib.rs:3:10:3:21 | macro expansion failed: could not resolve macro 'identifiers' |
| lib.rs:3:21:3:20 | expected BANG |
| lib.rs:3:21:3:20 | expected `{`, `[`, `(` |
4 changes: 4 additions & 0 deletions rust/ql/test/library-tests/variables/variables.expected
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ variable
| variables.rs:319:9:319:9 | v |
| variables.rs:321:9:321:12 | text |
variableAccess
| variables.rs:2:20:2:20 | s | variables.rs:1:14:1:14 | s |
| variables.rs:6:20:6:20 | i | variables.rs:5:14:5:14 | i |
| variables.rs:11:15:11:16 | x1 | variables.rs:10:9:10:10 | x1 |
| variables.rs:16:15:16:16 | x2 | variables.rs:15:13:15:14 | x2 |
| variables.rs:17:5:17:6 | x2 | variables.rs:15:13:15:14 | x2 |
Expand Down Expand Up @@ -156,6 +158,8 @@ variableWriteAccess
| variables.rs:276:9:276:10 | b4 | variables.rs:267:13:267:14 | b4 |
| variables.rs:277:9:277:11 | a10 | variables.rs:266:13:266:15 | a10 |
variableReadAccess
| variables.rs:2:20:2:20 | s | variables.rs:1:14:1:14 | s |
| variables.rs:6:20:6:20 | i | variables.rs:5:14:5:14 | i |
| variables.rs:11:15:11:16 | x1 | variables.rs:10:9:10:10 | x1 |
| variables.rs:16:15:16:16 | x2 | variables.rs:15:13:15:14 | x2 |
| variables.rs:18:15:18:16 | x2 | variables.rs:15:13:15:14 | x2 |
Expand Down
8 changes: 4 additions & 4 deletions rust/ql/test/library-tests/variables/variables.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
fn print_str(s: &str) {
println!("{}", s);
fn print_str(s: &str) { // s
println!("{}", s); // $ access=s
}

fn print_i64(i: i64) {
println!("{}", i);
fn print_i64(i: i64) { // i
println!("{}", i); // $ access=i
}

fn immutable_variable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON |
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON |
| does_not_compile.rs:2:32:2:31 | expected field name or number |
| error.rs:2:5:2:17 | An error! |
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
| does_not_compile.rs:2:32:2:31 | expected field name or number | Extraction failed in does_not_compile.rs with error expected field name or number | 2 |
| error.rs:2:5:2:17 | An error! | Extraction failed in error.rs with error An error! | 2 |
2 changes: 1 addition & 1 deletion rust/ql/test/query-tests/diagnostics/SummaryStats.expected
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| Elements extracted | 290 |
| Elements extracted | 380 |
| Elements unextracted | 0 |
| Files extracted | 7 |
| Lines of code extracted | 61 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
| main.rs:25:9:25:9 | a | Variable is not used. |
| main.rs:90:13:90:13 | d | Variable is not used. |
| main.rs:114:9:114:9 | k | Variable is not used. |
| main.rs:141:5:141:5 | y | Variable is not used. |
| main.rs:164:9:164:9 | x | Variable is not used. |
| main.rs:169:9:169:9 | x | Variable is not used. |
| main.rs:174:9:174:9 | x | Variable is not used. |
| main.rs:195:17:195:17 | a | Variable is not used. |
| main.rs:203:20:203:22 | val | Variable is not used. |
| main.rs:216:14:216:16 | val | Variable is not used. |
Expand Down

0 comments on commit 58cf24e

Please sign in to comment.