diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected index e69de29bb2d1d..883d8f2a698c1 100644 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected @@ -0,0 +1 @@ +| gen_arg_list.rs:5:5:5:11 | ArgList | getNumberOfArgs: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected index e69de29bb2d1d..9bbaa63495cd1 100644 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected @@ -0,0 +1 @@ +| gen_arg_list.rs:5:5:5:11 | ArgList | 0 | gen_arg_list.rs:5:5:5:11 | "not yet implemented" | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected index bbe8097850f02..0aaee585a350b 100644 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected @@ -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 | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExpanded.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExpanded.expected new file mode 100644 index 0000000000000..7bdb564985f89 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExpanded.expected @@ -0,0 +1 @@ +| gen_macro_call.rs:5:5:5:11 | MacroCall | gen_macro_call.rs:5:5:5:11 | MacroStmts | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected index d4215cca0724a..d28b8224609ff 100644 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected @@ -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 | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected index 23cbafe4d3041..8b41037f56d28 100644 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected @@ -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 | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected index da8b58acd2d62..d3edb17d535b6 100644 --- a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected @@ -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 | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected index e81802b786353..38207ad292823 100644 --- a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected +++ b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected @@ -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 | diff --git a/rust/ql/test/extractor-tests/utf8/CONSISTENCY/ExtractionConsistency.expected b/rust/ql/test/extractor-tests/utf8/CONSISTENCY/ExtractionConsistency.expected index 23b423a489a18..54fb69c68140b 100644 --- a/rust/ql/test/extractor-tests/utf8/CONSISTENCY/ExtractionConsistency.expected +++ b/rust/ql/test/extractor-tests/utf8/CONSISTENCY/ExtractionConsistency.expected @@ -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 `{`, `[`, `(` | diff --git a/rust/ql/test/library-tests/variables/variables.expected b/rust/ql/test/library-tests/variables/variables.expected index ad85ccfbfcc88..c22009878895a 100644 --- a/rust/ql/test/library-tests/variables/variables.expected +++ b/rust/ql/test/library-tests/variables/variables.expected @@ -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 | @@ -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 | diff --git a/rust/ql/test/library-tests/variables/variables.rs b/rust/ql/test/library-tests/variables/variables.rs index 85fa052a7aa2a..c56ce65719f80 100644 --- a/rust/ql/test/library-tests/variables/variables.rs +++ b/rust/ql/test/library-tests/variables/variables.rs @@ -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() { diff --git a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/ExtractionConsistency.expected b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/ExtractionConsistency.expected index 157aafc878524..39125607e9634 100644 --- a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/ExtractionConsistency.expected +++ b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/ExtractionConsistency.expected @@ -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! | diff --git a/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected index b6aaf7b6d3733..84fc94c78d17b 100644 --- a/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected +++ b/rust/ql/test/query-tests/diagnostics/ExtractionErrors.expected @@ -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 | diff --git a/rust/ql/test/query-tests/diagnostics/SummaryStats.expected b/rust/ql/test/query-tests/diagnostics/SummaryStats.expected index d9142bcadfed4..8367d199669e7 100644 --- a/rust/ql/test/query-tests/diagnostics/SummaryStats.expected +++ b/rust/ql/test/query-tests/diagnostics/SummaryStats.expected @@ -1,4 +1,4 @@ -| Elements extracted | 290 | +| Elements extracted | 380 | | Elements unextracted | 0 | | Files extracted | 7 | | Lines of code extracted | 61 | diff --git a/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected b/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected index fd4b8d3d2b46b..820a8c5e00ea6 100644 --- a/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected +++ b/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected @@ -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. |