diff --git a/rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected b/rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected index 49bf47841d0..b4427660844 100644 --- a/rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected +++ b/rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected @@ -2,8 +2,8 @@ canonicalPath | anonymous.rs:3:1:32:1 | fn canonicals | test::anonymous::canonicals | | anonymous.rs:34:1:36:1 | fn other | test::anonymous::other | | {EXTERNAL LOCATION} | fn trim | ::trim | -| lib.rs:1:1:1:14 | mod anonymous | test::anonymous | -| lib.rs:2:1:2:12 | mod regular | test::regular | +| lib.rs:1:1:1:18 | mod anonymous | test::anonymous | +| lib.rs:2:1:2:16 | mod regular | test::regular | | regular.rs:1:1:2:18 | struct Struct | test::regular::Struct | | regular.rs:2:12:2:17 | fn eq | ::eq | | regular.rs:2:12:2:17 | impl ...::Eq for Struct::<...> { ... } | | @@ -42,8 +42,8 @@ canonicalPaths | anonymous.rs:26:5:31:5 | fn usage | None | None | | anonymous.rs:34:1:36:1 | fn other | repo::test | crate::anonymous::other | | anonymous.rs:35:5:35:23 | struct OtherStruct | None | None | -| lib.rs:1:1:1:14 | mod anonymous | repo::test | crate::anonymous | -| lib.rs:2:1:2:12 | mod regular | repo::test | crate::regular | +| lib.rs:1:1:1:18 | mod anonymous | repo::test | crate::anonymous | +| lib.rs:2:1:2:16 | mod regular | repo::test | crate::regular | | regular.rs:1:1:2:18 | struct Struct | repo::test | crate::regular::Struct | | regular.rs:2:12:2:17 | fn eq | repo::test | ::eq | | regular.rs:2:12:2:17 | impl ...::Eq for Struct::<...> { ... } | None | None | diff --git a/rust/ql/test/extractor-tests/canonical_path_disabled/canonical_paths.expected b/rust/ql/test/extractor-tests/canonical_path_disabled/canonical_paths.expected index d411ab289c9..905e04abee0 100644 --- a/rust/ql/test/extractor-tests/canonical_path_disabled/canonical_paths.expected +++ b/rust/ql/test/extractor-tests/canonical_path_disabled/canonical_paths.expected @@ -2,8 +2,8 @@ canonicalPath | anonymous.rs:6:1:35:1 | fn canonicals | test::anonymous::canonicals | | anonymous.rs:37:1:39:1 | fn other | test::anonymous::other | | {EXTERNAL LOCATION} | fn trim | ::trim | -| lib.rs:1:1:1:14 | mod anonymous | test::anonymous | -| lib.rs:2:1:2:12 | mod regular | test::regular | +| lib.rs:1:1:1:18 | mod anonymous | test::anonymous | +| lib.rs:2:1:2:16 | mod regular | test::regular | | regular.rs:4:1:5:18 | struct Struct | test::regular::Struct | | regular.rs:5:12:5:17 | fn eq | ::eq | | regular.rs:5:12:5:17 | impl ...::Eq for Struct::<...> { ... } | | @@ -42,8 +42,8 @@ canonicalPaths | anonymous.rs:29:5:34:5 | fn usage | None | None | | anonymous.rs:37:1:39:1 | fn other | None | None | | anonymous.rs:38:5:38:23 | struct OtherStruct | None | None | -| lib.rs:1:1:1:14 | mod anonymous | None | None | -| lib.rs:2:1:2:12 | mod regular | None | None | +| lib.rs:1:1:1:18 | mod anonymous | None | None | +| lib.rs:2:1:2:16 | mod regular | None | None | | regular.rs:4:1:5:18 | struct Struct | None | None | | regular.rs:5:12:5:17 | fn eq | None | None | | regular.rs:5:12:5:17 | impl ...::Eq for Struct::<...> { ... } | None | None | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected index a742b7145d3..9fcf65f5658 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -1,15 +1,15 @@ instances | gen_module.rs:3:1:4:8 | mod foo | | gen_module.rs:5:1:7:1 | mod bar | -| lib.rs:1:1:1:15 | mod gen_module | +| lib.rs:1:1:1:19 | mod gen_module | getExtendedCanonicalPath | gen_module.rs:3:1:4:8 | mod foo | crate::gen_module::foo | | gen_module.rs:5:1:7:1 | mod bar | crate::gen_module::bar | -| lib.rs:1:1:1:15 | mod gen_module | crate::gen_module | +| lib.rs:1:1:1:19 | mod gen_module | crate::gen_module | getCrateOrigin | gen_module.rs:3:1:4:8 | mod foo | repo::test | | gen_module.rs:5:1:7:1 | mod bar | repo::test | -| lib.rs:1:1:1:15 | mod gen_module | repo::test | +| lib.rs:1:1:1:19 | mod gen_module | repo::test | getAttributeMacroExpansion getAttr getItemList @@ -17,5 +17,6 @@ getItemList getName | gen_module.rs:3:1:4:8 | mod foo | gen_module.rs:4:5:4:7 | foo | | gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:5:5:7 | bar | -| lib.rs:1:1:1:15 | mod gen_module | lib.rs:1:5:1:14 | gen_module | +| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:9:1:18 | gen_module | getVisibility +| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:1:1:3 | Visibility | diff --git a/rust/ql/test/extractor-tests/generated/Name/Name.expected b/rust/ql/test/extractor-tests/generated/Name/Name.expected index 2bcd496ef2e..31573920458 100644 --- a/rust/ql/test/extractor-tests/generated/Name/Name.expected +++ b/rust/ql/test/extractor-tests/generated/Name/Name.expected @@ -1,8 +1,8 @@ instances | gen_name.rs:3:4:3:12 | test_name | | gen_name.rs:7:9:7:11 | foo | -| lib.rs:1:5:1:12 | gen_name | +| lib.rs:1:9:1:16 | gen_name | getText | gen_name.rs:3:4:3:12 | test_name | test_name | | gen_name.rs:7:9:7:11 | foo | foo | -| lib.rs:1:5:1:12 | gen_name | gen_name | +| lib.rs:1:9:1:16 | gen_name | gen_name | diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected index e308c26daa8..240161f481b 100644 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected @@ -1,7 +1,7 @@ instances | gen_source_file.rs:1:1:9:2 | SourceFile | -| lib.rs:1:1:1:20 | SourceFile | +| lib.rs:1:1:1:24 | SourceFile | getAttr getItem | gen_source_file.rs:1:1:9:2 | SourceFile | 0 | gen_source_file.rs:3:1:9:1 | fn test_source_file | -| lib.rs:1:1:1:20 | SourceFile | 0 | lib.rs:1:1:1:20 | mod gen_source_file | +| lib.rs:1:1:1:24 | SourceFile | 0 | lib.rs:1:1:1:24 | mod gen_source_file | diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected index daae8776ad7..4bc7fefe4c1 100644 --- a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected @@ -1,3 +1,4 @@ instances | gen_visibility.rs:7:7:7:9 | Visibility | +| lib.rs:1:1:1:3 | Visibility | getPath diff --git a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected index 5119e69d043..79576902a43 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected @@ -146,8 +146,10 @@ lib.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Module] mod call # 1| getName(): [Name] call +# 1| getVisibility(): [Visibility] Visibility # 2| getItem(1): [Module] mod macro_expansion # 2| getName(): [Name] macro_expansion +# 2| getVisibility(): [Visibility] Visibility macro_expansion.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Use] use proc_macro::{...} diff --git a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected index a8e2990dab4..04c5f5f28f3 100644 --- a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected @@ -60,57 +60,3 @@ proc_macro.rs: # 5| getSegment(): [PathSegment] TokenStream # 5| getIdentifier(): [NameRef] TokenStream # 5| getVisibility(): [Visibility] Visibility -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/allocator-api2-0.2.21/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cfg-if-1.0.0/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getopts-0.2.21/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.2/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.95/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.40/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_core-0.9.0/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_xorshift-0.4.0/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustc-demangle-0.1.24/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.104/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.18/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-width-0.1.14/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zerocopy-0.8.17/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_unwind/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/proc_macro/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/stdarch/crates/std_detect/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crates/home/redsun82/.rustup/toolchains/1.86-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind/src/lib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/crateslib.rs: -# 1| [SourceFile] SourceFile -resolved/macro-in-library.testproj/trap/rust/cratesproc_macro.rs: -# 1| [SourceFile] SourceFile diff --git a/rust/ql/test/extractor-tests/utf8/ast.expected b/rust/ql/test/extractor-tests/utf8/ast.expected index a37eed8e264..7fe2a9bd4ee 100644 --- a/rust/ql/test/extractor-tests/utf8/ast.expected +++ b/rust/ql/test/extractor-tests/utf8/ast.expected @@ -1,6 +1,7 @@ -| lib.rs:1:1:1:21 | SourceFile | -| lib.rs:1:1:1:21 | mod utf8_identifiers | -| lib.rs:1:5:1:20 | utf8_identifiers | +| lib.rs:1:1:1:3 | Visibility | +| lib.rs:1:1:1:25 | SourceFile | +| lib.rs:1:1:1:25 | mod utf8_identifiers | +| lib.rs:1:9:1:24 | utf8_identifiers | | utf8_identifiers.rs:1:1:4:6 | fn foo | | utf8_identifiers.rs:1:1:12:2 | SourceFile | | utf8_identifiers.rs:1:4:1:6 | foo | diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.expected b/rust/ql/test/library-tests/path-resolution/path-resolution.expected index 164852626db..c757e29396f 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected @@ -1,5 +1,5 @@ mod -| lib.rs:1:1:1:7 | mod my | +| lib.rs:1:1:1:11 | mod my | | main.rs:1:1:1:7 | mod my | | main.rs:7:1:7:8 | mod my2 | | main.rs:13:1:37:1 | mod m1 |