From 00f6d9b305f78faead99be50e8e5baa762945420 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 10 Apr 2025 17:35:27 +0200
Subject: [PATCH 001/213] Rust: start preparing documentation changes
---
docs/codeql/reusables/supported-versions-compilers.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst
index 7d5a9bdb34a..2e2c6f4d096 100644
--- a/docs/codeql/reusables/supported-versions-compilers.rst
+++ b/docs/codeql/reusables/supported-versions-compilers.rst
@@ -25,6 +25,7 @@
JavaScript,ECMAScript 2022 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhtm``, ``.xhtml``, ``.vue``, ``.hbs``, ``.ejs``, ``.njk``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [7]_"
Python [8]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13",Not applicable,``.py``
Ruby [9]_,"up to 3.3",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``"
+ Rust [13]_,"Rust editions 2021 and 2024","Rust compiler","``.rs``, ``Cargo.toml``"
Swift [10]_,"Swift 5.4-6.0","Swift compiler","``.swift``"
TypeScript [11]_,"2.6-5.8",Standard TypeScript compiler,"``.ts``, ``.tsx``, ``.mts``, ``.cts``"
@@ -42,3 +43,4 @@
.. [10] Support for the analysis of Swift requires macOS.
.. [11] TypeScript analysis is performed by running the JavaScript extractor with TypeScript enabled. This is the default.
.. [12] Support for GitHub Actions is in public preview.
+ .. [13] Support for Rust is in private preview and requires ``rustup`` and ``cargo`` to be installed. Features from nightly toolchains are not supported.
From df427f7de834178b31c546743839602ec98c4daf Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 11 Apr 2025 11:53:27 +0200
Subject: [PATCH 002/213] Rust: add supported frameworks file
---
.../codeql/reusables/supported-frameworks.rst | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst
index 402a3b9ee3d..4ff4d8919fc 100644
--- a/docs/codeql/reusables/supported-frameworks.rst
+++ b/docs/codeql/reusables/supported-frameworks.rst
@@ -306,6 +306,39 @@ and the CodeQL library pack ``codeql/ruby-all`` (`changelog `__, `source `__)
+and the CodeQL library pack ``codeql/rust-all`` (`changelog `__, `source `__).
+All support is experimental.
+
+.. csv-table::
+ :header-rows: 1
+ :class: fullWidthTable
+ :widths: auto
+ :align: left
+
+ Name, Category
+ alloc, Standard library
+ core, Standard library
+ `digest `__, Cryptography library
+ `futures-executor `__, Utility library
+ `hyper `__, HTTP library
+ `hyper-util `__, HTTP library
+ `libc `__, Utility library
+ `log `__, Logging library
+ `md5 `__, Utility library
+ `postgres `__, Database
+ proc_macro, Standard library
+ `regex `__, Utility library
+ `reqwest `__, HTTP client
+ `rusqlite `__, Database
+ std, Standard library
+ `tokio-postgres `__, Database
+ `url `__, Utility library
+
Swift built-in support
================================
From 33c857ce9f4a2fa31a0d086577940740adcdaa23 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 11 Apr 2025 12:01:24 +0200
Subject: [PATCH 003/213] Rust: update supported languages footnote
---
docs/codeql/reusables/supported-versions-compilers.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst
index 2e2c6f4d096..818fe8cfa40 100644
--- a/docs/codeql/reusables/supported-versions-compilers.rst
+++ b/docs/codeql/reusables/supported-versions-compilers.rst
@@ -43,4 +43,4 @@
.. [10] Support for the analysis of Swift requires macOS.
.. [11] TypeScript analysis is performed by running the JavaScript extractor with TypeScript enabled. This is the default.
.. [12] Support for GitHub Actions is in public preview.
- .. [13] Support for Rust is in private preview and requires ``rustup`` and ``cargo`` to be installed. Features from nightly toolchains are not supported.
+ .. [13] Support for Rust is experimental and requires ``rustup`` and ``cargo`` to be installed, as well as `CODEQL_ENABLE_EXPERIMENTAL_FEATURES=true` set in the environment. Features from nightly toolchains are not supported.
From e2a86aaf939afe27adbcc9ba1fc5690b8b3b3829 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 2 May 2025 13:18:56 +0200
Subject: [PATCH 004/213] Rust: update supported libraries
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
---
docs/codeql/reusables/supported-frameworks.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst
index 4ff4d8919fc..5f09ddb17a2 100644
--- a/docs/codeql/reusables/supported-frameworks.rst
+++ b/docs/codeql/reusables/supported-frameworks.rst
@@ -336,6 +336,8 @@ All support is experimental.
`reqwest `__, HTTP client
`rusqlite `__, Database
std, Standard library
+ `sqlx `__, Database
+ `tokio `__, Asynchronous IO
`tokio-postgres `__, Database
`url `__, Utility library
From 00f4bfdd2411e8de794ab56cb17f292d2395ce64 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 2 May 2025 13:20:02 +0200
Subject: [PATCH 005/213] Rust: add some more supported libraries
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
---
docs/codeql/reusables/supported-frameworks.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst
index 5f09ddb17a2..07afdce4de3 100644
--- a/docs/codeql/reusables/supported-frameworks.rst
+++ b/docs/codeql/reusables/supported-frameworks.rst
@@ -330,12 +330,14 @@ All support is experimental.
`libc `__, Utility library
`log `__, Logging library
`md5 `__, Utility library
+ `poem `__, Web framework
`postgres `__, Database
proc_macro, Standard library
`regex `__, Utility library
`reqwest `__, HTTP client
`rusqlite `__, Database
std, Standard library
+ `rust-crypto `__, Cryptography library
`sqlx `__, Database
`tokio `__, Asynchronous IO
`tokio-postgres `__, Database
From 6a1cfb6aefb7f8e39457d4bfca573452d2110602 Mon Sep 17 00:00:00 2001
From: GeekMasher
Date: Tue, 3 Jun 2025 15:55:23 +0100
Subject: [PATCH 006/213] feat(js): Add Axios Instance support and add tests
---
.../javascript/frameworks/ClientRequests.qll | 64 ++++++++++++++++++-
.../ClientRequests/ClientRequests.expected | 9 +++
.../frameworks/ClientRequests/axios.ts | 33 ++++++++++
3 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
diff --git a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
index 673bdf2de33..afd2f4473f5 100644
--- a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
+++ b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
@@ -254,7 +254,7 @@ module ClientRequest {
method = "request" and
result = this.getOptionArgument(0, "data")
or
- method = ["post", "put"] and
+ method = ["post", "put", "patch"] and
result = [this.getArgument(1), this.getOptionArgument(2, "data")]
or
method = ["postForm", "putForm", "patchForm"] and result = this.getArgument(1)
@@ -289,6 +289,68 @@ module ClientRequest {
}
}
+ class AxiosInstanceRequest extends ClientRequest::Range, API::CallNode {
+ string method;
+ API::CallNode instance;
+
+ // Instances of axios, e.g. `axios.create({ ... })`
+ AxiosInstanceRequest() {
+ instance = axios().getMember(["create", "createInstance"]).getACall() and
+ method = [httpMethodName(), "request", "postForm", "putForm", "patchForm", "getUri"] and
+ this = instance.getReturn().getMember(method).getACall()
+ }
+
+ private int getOptionsArgIndex() {
+ (method = "get" or method = "delete" or method = "head") and
+ result = 0
+ or
+ (method = "post" or method = "put" or method = "patch") and
+ result = 1
+ }
+
+ private DataFlow::Node getOptionArgument(string name) {
+ result = this.getOptionArgument(this.getOptionsArgIndex(), name)
+ }
+
+ override DataFlow::Node getUrl() {
+ result = this.getArgument(0) or
+ result = this.getOptionArgument(urlPropertyName())
+ }
+
+ override DataFlow::Node getHost() {
+ result = instance.getOptionArgument(0, "baseURL")
+ }
+
+ override DataFlow::Node getADataNode() {
+ method = ["post", "put", "patch"] and
+ result = [this.getArgument(1), this.getOptionArgument(2, "data")]
+ or
+ method = ["postForm", "putForm", "patchForm"] and result = this.getArgument(1)
+ or
+ result = this.getOptionArgument([0 .. 2], ["headers", "params"])
+ }
+
+ /** Gets the response type from the options passed in. */
+ string getResponseType() {
+ exists(DataFlow::Node option | option = instance.getOptionArgument(0, "responseType") |
+ option.mayHaveStringValue(result)
+ )
+ or
+ not exists(this.getOptionArgument("responseType")) and
+ result = "json"
+ }
+
+ override DataFlow::Node getAResponseDataNode(string responseType, boolean promise) {
+ responseType = this.getResponseType() and
+ promise = true and
+ result = this
+ or
+ responseType = this.getResponseType() and
+ promise = false and
+ result = this.getReturn().getPromisedError().getMember("response").asSource()
+ }
+ }
+
/** An expression that is used as a credential in a request. */
private class AuthorizationHeader extends CredentialsNode {
AuthorizationHeader() {
diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
index f787a7e6060..f84b3c0ca3e 100644
--- a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
+++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
@@ -5,6 +5,8 @@ test_ClientRequest
| apollo.js:17:1:17:34 | new Pre ... yurl"}) |
| apollo.js:20:1:20:77 | createN ... phql'}) |
| apollo.js:23:1:23:31 | new Web ... wsUri}) |
+| axios.ts:13:5:14:37 | api\\n ... repo}`) |
+| axios.ts:25:5:26:45 | api\\n ... , data) |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) |
| puppeteer.ts:6:11:6:42 | page.go ... e.com') |
@@ -111,6 +113,7 @@ test_ClientRequest
| tst.js:349:5:349:30 | axios.g ... url }) |
| tst.js:352:5:352:66 | axiosIn ... text"}) |
test_getADataNode
+| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:26:41:26:44 | data |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:15:18:15:55 | { 'Cont ... json' } |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:16:15:16:35 | {x: 'te ... 'test'} |
| superagent.js:6:5:6:32 | superag ... st(url) | superagent.js:6:39:6:42 | data |
@@ -159,6 +162,8 @@ test_getADataNode
| tst.js:347:5:347:30 | axios.p ... , data) | tst.js:347:26:347:29 | data |
| tst.js:348:5:348:38 | axios.p ... config) | tst.js:348:26:348:29 | data |
test_getHost
+| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:4:14:4:37 | "https: ... ub.com" |
+| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:4:14:4:37 | "https: ... ub.com" |
| tst.js:87:5:87:39 | http.ge ... host}) | tst.js:87:34:87:37 | host |
| tst.js:89:5:89:23 | axios({host: host}) | tst.js:89:18:89:21 | host |
| tst.js:91:5:91:34 | got(rel ... host}) | tst.js:91:29:91:32 | host |
@@ -173,6 +178,8 @@ test_getUrl
| apollo.js:17:1:17:34 | new Pre ... yurl"}) | apollo.js:17:26:17:32 | "myurl" |
| apollo.js:20:1:20:77 | createN ... phql'}) | apollo.js:20:30:20:75 | 'https: ... raphql' |
| apollo.js:23:1:23:31 | new Web ... wsUri}) | apollo.js:23:25:23:29 | wsUri |
+| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:14:12:14:36 | `/repos ... {repo}` |
+| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:26:14:26:38 | `/repos ... {repo}` |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:11:7:5 | {\\n ... ,\\n } |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:6:14:6:16 | url |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:11:17:5 | {\\n ... }\\n } |
@@ -289,6 +296,8 @@ test_getUrl
| tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:19:352:65 | {method ... "text"} |
| tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:40:352:42 | url |
test_getAResponseDataNode
+| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:13:5:14:37 | api\\n ... repo}`) | json | true |
+| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:25:5:26:45 | api\\n ... , data) | json | true |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true |
| superagent.js:4:5:4:26 | superag ... ', url) | superagent.js:4:5:4:26 | superag ... ', url) | stream | true |
diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
new file mode 100644
index 00000000000..c23c5824cd8
--- /dev/null
+++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
@@ -0,0 +1,33 @@
+import axios from "axios";
+
+let api = axios.create({
+ baseURL: "https://api.github.com",
+ timeout: 1000,
+ responseType: "json",
+ headers: { "X-Custom-Header": "foobar" }
+});
+
+export default api;
+
+export async function getRepo(owner: string, repo: string) {
+ api
+ .get(`/repos/${owner}/${repo}`)
+ .then((response) => {
+ console.log("Repository data:", response.data);
+ return response.data;
+ })
+ .catch((error) => {
+ console.error("Error fetching user:", error);
+ });
+}
+
+export async function updateUser(owner: string, repo: string, data: any) {
+ api
+ .patch(`/repos/${owner}/${repo}`, data)
+ .then((response) => {
+ console.log("User updated:", response.data);
+ })
+ .catch((error) => {
+ console.error("Error updating user:", error);
+ });
+}
From 2eb5f10850ca1f131a54c909ea2490f39760b63f Mon Sep 17 00:00:00 2001
From: GeekMasher
Date: Tue, 3 Jun 2025 15:58:49 +0100
Subject: [PATCH 007/213] feat(js): Add Axios instance support change notes
---
.../ql/lib/change-notes/2025-06-03-axios-instance-support.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 javascript/ql/lib/change-notes/2025-06-03-axios-instance-support.md
diff --git a/javascript/ql/lib/change-notes/2025-06-03-axios-instance-support.md b/javascript/ql/lib/change-notes/2025-06-03-axios-instance-support.md
new file mode 100644
index 00000000000..baaf1611b77
--- /dev/null
+++ b/javascript/ql/lib/change-notes/2025-06-03-axios-instance-support.md
@@ -0,0 +1,4 @@
+---
+category: minorAnalysis
+---
+* Added support for Axios instances in the `axios` module.
From 3b64bd48abb755987708d3d232fb80b14df4a20a Mon Sep 17 00:00:00 2001
From: GeekMasher
Date: Tue, 3 Jun 2025 15:59:32 +0100
Subject: [PATCH 008/213] style(js): Update Formatting
---
.../ql/lib/semmle/javascript/frameworks/ClientRequests.qll | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
index afd2f4473f5..7476133b0b5 100644
--- a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
+++ b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
@@ -317,9 +317,7 @@ module ClientRequest {
result = this.getOptionArgument(urlPropertyName())
}
- override DataFlow::Node getHost() {
- result = instance.getOptionArgument(0, "baseURL")
- }
+ override DataFlow::Node getHost() { result = instance.getOptionArgument(0, "baseURL") }
override DataFlow::Node getADataNode() {
method = ["post", "put", "patch"] and
From 79a72fc15bda4c9a7082970762b240e83388591e Mon Sep 17 00:00:00 2001
From: GeekMasher
Date: Tue, 3 Jun 2025 16:37:36 +0100
Subject: [PATCH 009/213] fix(js): Update tests
---
.../ClientRequests/ClientRequests.expected | 18 ++++++-------
.../frameworks/ClientRequests/axios.ts | 25 +++++++++----------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
index f84b3c0ca3e..fbbc8832d72 100644
--- a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
+++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected
@@ -5,8 +5,8 @@ test_ClientRequest
| apollo.js:17:1:17:34 | new Pre ... yurl"}) |
| apollo.js:20:1:20:77 | createN ... phql'}) |
| apollo.js:23:1:23:31 | new Web ... wsUri}) |
-| axios.ts:13:5:14:37 | api\\n ... repo}`) |
-| axios.ts:25:5:26:45 | api\\n ... , data) |
+| axios.ts:14:32:14:65 | api.get ... repo}`) |
+| axios.ts:25:32:25:73 | api.pat ... , data) |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) |
| puppeteer.ts:6:11:6:42 | page.go ... e.com') |
@@ -113,7 +113,7 @@ test_ClientRequest
| tst.js:349:5:349:30 | axios.g ... url }) |
| tst.js:352:5:352:66 | axiosIn ... text"}) |
test_getADataNode
-| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:26:41:26:44 | data |
+| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:69:25:72 | data |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:15:18:15:55 | { 'Cont ... json' } |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:16:15:16:35 | {x: 'te ... 'test'} |
| superagent.js:6:5:6:32 | superag ... st(url) | superagent.js:6:39:6:42 | data |
@@ -162,8 +162,8 @@ test_getADataNode
| tst.js:347:5:347:30 | axios.p ... , data) | tst.js:347:26:347:29 | data |
| tst.js:348:5:348:38 | axios.p ... config) | tst.js:348:26:348:29 | data |
test_getHost
-| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:4:14:4:37 | "https: ... ub.com" |
-| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:4:14:4:37 | "https: ... ub.com" |
+| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:4:14:4:37 | "https: ... ub.com" |
+| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:4:14:4:37 | "https: ... ub.com" |
| tst.js:87:5:87:39 | http.ge ... host}) | tst.js:87:34:87:37 | host |
| tst.js:89:5:89:23 | axios({host: host}) | tst.js:89:18:89:21 | host |
| tst.js:91:5:91:34 | got(rel ... host}) | tst.js:91:29:91:32 | host |
@@ -178,8 +178,8 @@ test_getUrl
| apollo.js:17:1:17:34 | new Pre ... yurl"}) | apollo.js:17:26:17:32 | "myurl" |
| apollo.js:20:1:20:77 | createN ... phql'}) | apollo.js:20:30:20:75 | 'https: ... raphql' |
| apollo.js:23:1:23:31 | new Web ... wsUri}) | apollo.js:23:25:23:29 | wsUri |
-| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:14:12:14:36 | `/repos ... {repo}` |
-| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:26:14:26:38 | `/repos ... {repo}` |
+| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:14:40:14:64 | `/repos ... {repo}` |
+| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:42:25:66 | `/repos ... {repo}` |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:11:7:5 | {\\n ... ,\\n } |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:6:14:6:16 | url |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:11:17:5 | {\\n ... }\\n } |
@@ -296,8 +296,8 @@ test_getUrl
| tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:19:352:65 | {method ... "text"} |
| tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:40:352:42 | url |
test_getAResponseDataNode
-| axios.ts:13:5:14:37 | api\\n ... repo}`) | axios.ts:13:5:14:37 | api\\n ... repo}`) | json | true |
-| axios.ts:25:5:26:45 | api\\n ... , data) | axios.ts:25:5:26:45 | api\\n ... , data) | json | true |
+| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:14:32:14:65 | api.get ... repo}`) | json | true |
+| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:32:25:73 | api.pat ... , data) | json | true |
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true |
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true |
| superagent.js:4:5:4:26 | superag ... ', url) | superagent.js:4:5:4:26 | superag ... ', url) | stream | true |
diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
index c23c5824cd8..7099e3889b9 100644
--- a/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
+++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts
@@ -10,24 +10,23 @@ let api = axios.create({
export default api;
export async function getRepo(owner: string, repo: string) {
- api
- .get(`/repos/${owner}/${repo}`)
- .then((response) => {
+ try {
+ const response = await api.get(`/repos/${owner}/${repo}`);
console.log("Repository data:", response.data);
return response.data;
- })
- .catch((error) => {
- console.error("Error fetching user:", error);
- });
+ } catch (error) {
+ console.error("Error fetching repo:", error);
+ throw error;
+ }
}
export async function updateUser(owner: string, repo: string, data: any) {
- api
- .patch(`/repos/${owner}/${repo}`, data)
- .then((response) => {
+ try {
+ const response = await api.patch(`/repos/${owner}/${repo}`, data);
console.log("User updated:", response.data);
- })
- .catch((error) => {
+ return response.data;
+ } catch (error) {
console.error("Error updating user:", error);
- });
+ throw error;
+ }
}
From 302097ec85ba0ff70a1d67e9dae49589d841f593 Mon Sep 17 00:00:00 2001
From: GeekMasher
Date: Thu, 5 Jun 2025 09:52:25 +0100
Subject: [PATCH 010/213] docs(js): Add AxiosInstanceRequest docs
---
.../ql/lib/semmle/javascript/frameworks/ClientRequests.qll | 3 +++
1 file changed, 3 insertions(+)
diff --git a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
index 7476133b0b5..22db9f24b99 100644
--- a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
+++ b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll
@@ -289,6 +289,9 @@ module ClientRequest {
}
}
+ /**
+ * A model of a `axios` instance request.
+ */
class AxiosInstanceRequest extends ClientRequest::Range, API::CallNode {
string method;
API::CallNode instance;
From 14f50880e973e5dc874e0fca81e1f1782575f44a Mon Sep 17 00:00:00 2001
From: Taus
Date: Tue, 3 Jun 2025 09:44:22 +0000
Subject: [PATCH 011/213] JavaScript: Don't extract files in `tsconfig.json`
`outDir`
---
.../tsconfig/CompilerOptions.java | 13 +++++++++++
.../dependencies/tsconfig/TsConfigJson.java | 13 +++++++++++
.../com/semmle/js/extractor/AutoBuild.java | 22 +++++++++++++++++++
.../js/extractor/test/AutoBuildTests.java | 18 +++++++++++++++
4 files changed, 66 insertions(+)
create mode 100644 javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
create mode 100644 javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java
diff --git a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java b/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
new file mode 100644
index 00000000000..63bec753ac9
--- /dev/null
+++ b/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
@@ -0,0 +1,13 @@
+package com.semmle.js.dependencies.tsconfig;
+
+public class CompilerOptions {
+ private String outDir;
+
+ public String getOutDir() {
+ return outDir;
+ }
+
+ public void setOutDir(String outDir) {
+ this.outDir = outDir;
+ }
+}
diff --git a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java b/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java
new file mode 100644
index 00000000000..08dbe663139
--- /dev/null
+++ b/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java
@@ -0,0 +1,13 @@
+package com.semmle.js.dependencies.tsconfig;
+
+public class TsConfigJson {
+ private CompilerOptions compilerOptions;
+
+ public CompilerOptions getCompilerOptions() {
+ return compilerOptions;
+ }
+
+ public void setCompilerOptions(CompilerOptions compilerOptions) {
+ this.compilerOptions = compilerOptions;
+ }
+}
diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
index 22d008637c9..44fa2f9209a 100644
--- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
@@ -39,6 +39,8 @@ import java.util.stream.Stream;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
+import com.semmle.js.dependencies.tsconfig.TsConfigJson;
+import com.semmle.js.dependencies.tsconfig.CompilerOptions;
import com.semmle.js.dependencies.AsyncFetcher;
import com.semmle.js.dependencies.DependencyResolver;
import com.semmle.js.dependencies.packument.PackageJson;
@@ -745,6 +747,26 @@ public class AutoBuild {
.filter(p -> !isFileTooLarge(p))
.sorted(PATH_ORDERING)
.collect(Collectors.toCollection(() -> new LinkedHashSet<>()));
+ // exclude files in output directories as configured in tsconfig.json
+ final List outDirs = new ArrayList<>();
+ for (Path cfg : tsconfigFiles) {
+ try {
+ String txt = new WholeIO().read(cfg);
+ TsConfigJson root = new Gson().fromJson(txt, TsConfigJson.class);
+ if (root != null && root.getCompilerOptions() != null) {
+ if (root.getCompilerOptions().getOutDir() == null) {
+ // no outDir specified, so skip this tsconfig.json
+ continue;
+ }
+ Path odir = cfg.getParent().resolve(root.getCompilerOptions().getOutDir()).toAbsolutePath().normalize();
+ outDirs.add(odir);
+ }
+ } catch (Exception e) {
+ // ignore malformed tsconfig or missing fields
+ }
+ }
+ // exclude files in output directories as configured in tsconfig.json
+ filesToExtract.removeIf(f -> outDirs.stream().anyMatch(od -> f.startsWith(od)));
DependencyInstallationResult dependencyInstallationResult = DependencyInstallationResult.empty;
if (!tsconfigFiles.isEmpty()) {
diff --git a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
index 0a924d54319..532e29e6e31 100644
--- a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
+++ b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
@@ -203,6 +203,24 @@ public class AutoBuildTests {
runTest();
}
+ @Test
+ public void skipFilesInTsconfigOutDir() throws IOException {
+ envVars.put("LGTM_INDEX_TYPESCRIPT", "basic");
+ // Files under outDir in tsconfig.json should be excluded
+ // Create tsconfig.json with outDir set to "dist"
+ addFile(true, LGTM_SRC, "tsconfig.json");
+ Path config = Paths.get(LGTM_SRC.toString(), "tsconfig.json");
+ Files.write(config,
+ "{\"compilerOptions\":{\"outDir\":\"dist\"}}".getBytes(StandardCharsets.UTF_8));
+ // Add files outside outDir (should be extracted)
+ addFile(true, LGTM_SRC, "src", "app.ts");
+ addFile(true, LGTM_SRC, "main.js");
+ // Add files under dist/outDir (should be skipped)
+ addFile(false, LGTM_SRC, "dist", "generated.js");
+ addFile(false, LGTM_SRC, "dist", "sub", "x.js");
+ runTest();
+ }
+
@Test
public void includeFile() throws IOException {
envVars.put("LGTM_INDEX_INCLUDE", "tst.js");
From 8829f7820a0fd075492cbcf189aa5357f84c4dfe Mon Sep 17 00:00:00 2001
From: Taus
Date: Tue, 3 Jun 2025 09:44:52 +0000
Subject: [PATCH 012/213] JavaScript: Don't extract files with TypeScript
progenitors
---
.../com/semmle/js/extractor/AutoBuild.java | 14 ++++++++++++--
.../js/extractor/test/AutoBuildTests.java | 19 +++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
index 44fa2f9209a..ca69bf06791 100644
--- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
@@ -818,9 +818,19 @@ public class AutoBuild {
*/
private boolean isFileDerivedFromTypeScriptFile(Path path, Set extractedFiles) {
String name = path.getFileName().toString();
- if (!name.endsWith(".js"))
+ // only skip JS variants when a corresponding TS/TSX file was already extracted
+ if (!(name.endsWith(".js")
+ || name.endsWith(".cjs")
+ || name.endsWith(".mjs")
+ || name.endsWith(".jsx")
+ || name.endsWith(".cjsx")
+ || name.endsWith(".mjsx"))) {
return false;
- String stem = name.substring(0, name.length() - ".js".length());
+ }
+ // strip off extension
+ int dot = name.lastIndexOf('.');
+ String stem = dot != -1 ? name.substring(0, dot) : name;
+ // if a TS/TSX file with same base name was extracted, skip this file
for (String ext : FileType.TYPESCRIPT.getExtensions()) {
if (extractedFiles.contains(path.getParent().resolve(stem + ext))) {
return true;
diff --git a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
index 532e29e6e31..4a93a97cc58 100644
--- a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
+++ b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
@@ -203,6 +203,25 @@ public class AutoBuildTests {
runTest();
}
+ @Test
+ public void skipJsFilesDerivedFromTypeScriptFiles() throws IOException {
+ // JS-derived files (.js, .cjs, .mjs, .jsx, .cjsx, .mjsx) should be skipped when TS indexing
+ envVars.put("LGTM_INDEX_TYPESCRIPT", "basic");
+ // Add TypeScript sources
+ addFile(true, LGTM_SRC, "foo.ts");
+ addFile(true, LGTM_SRC, "bar.tsx");
+ // Add derived JS variants (should be skipped)
+ addFile(false, LGTM_SRC, "foo.js");
+ addFile(false, LGTM_SRC, "bar.jsx");
+ addFile(false, LGTM_SRC, "foo.cjs");
+ addFile(false, LGTM_SRC, "foo.mjs");
+ addFile(false, LGTM_SRC, "bar.cjsx");
+ addFile(false, LGTM_SRC, "bar.mjsx");
+ // A normal JS file without TS counterpart should be extracted
+ addFile(true, LGTM_SRC, "normal.js");
+ runTest();
+ }
+
@Test
public void skipFilesInTsconfigOutDir() throws IOException {
envVars.put("LGTM_INDEX_TYPESCRIPT", "basic");
From 619256e03716dabcdead1321ddf9d491cbfc918a Mon Sep 17 00:00:00 2001
From: Taus
Date: Thu, 5 Jun 2025 14:59:40 +0000
Subject: [PATCH 013/213] JavaScript: Fix existing tests and test runner
Fixes two things:
- The basic test should no longer extract `tst.js` (as `tst.ts` is
present)
- The `AutoBuild` mock did not populate `extractedFiles` correctly,
which broke the logic that looks for TypeScript files with the same
basename.
---
.../test/com/semmle/js/extractor/test/AutoBuildTests.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
index 4a93a97cc58..28c8e593dcd 100644
--- a/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
+++ b/javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java
@@ -135,6 +135,7 @@ public class AutoBuildTests {
FileExtractors extractors) {
for (Path f : files) {
actual.add(f.toString());
+ extractedFiles.add(f);
}
}
@@ -175,7 +176,7 @@ public class AutoBuildTests {
@Test
public void basicTest() throws IOException {
- addFile(true, LGTM_SRC, "tst.js");
+ addFile(false, LGTM_SRC, "tst.js");
addFile(true, LGTM_SRC, "tst.ts");
addFile(true, LGTM_SRC, "tst.html");
addFile(true, LGTM_SRC, "tst.xsjs");
From 281ccf7c11f5ee495a97408b292490695ef5dad8 Mon Sep 17 00:00:00 2001
From: Taus
Date: Thu, 5 Jun 2025 15:01:05 +0000
Subject: [PATCH 014/213] JavaScript: Extract `tsconfig.json` also in `basic`
mode
This is needed for the logic that skips files inside the directory
specified in the `tsconfig.json` `outDir` compiler option.
---
javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
index ca69bf06791..b8105db6b39 100644
--- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
@@ -1186,7 +1186,7 @@ protected DependencyInstallationResult preparePackagesAndDependencies(Set
}
// extract TypeScript projects from 'tsconfig.json'
- if (typeScriptMode == TypeScriptMode.FULL
+ if (typeScriptMode != TypeScriptMode.NONE
&& treatAsTSConfig(file.getFileName().toString())
&& !excludes.contains(file)
&& isFileIncluded(file)) {
From b8772bc73603b6dfa1da6dd80f67e659694888db Mon Sep 17 00:00:00 2001
From: Taus
Date: Thu, 5 Jun 2025 15:06:40 +0000
Subject: [PATCH 015/213] JavaScript: Add change note
---
.../change-notes/2025-06-05-skip-obviously-generated-files.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md
diff --git a/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md b/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md
new file mode 100644
index 00000000000..16d81cb4cc3
--- /dev/null
+++ b/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md
@@ -0,0 +1,4 @@
+---
+category: minorAnalysis
+---
+* The JavaScript extractor now skips generated JavaScript files if the original TypeScript files are already present. It also skips any files in the output directory specified in the `compilerOptions` part of the `tsconfig.json` file.
From c70decbe86fa945a445da1c9b1e7267702cf5b39 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 6 Jun 2025 16:18:16 +0200
Subject: [PATCH 016/213] Rust: add `Callable::getParam` and
`CallExprBase::getArg` shortcuts
---
rust/ql/.generated.list | 22 +++++++++++--------
rust/ql/.gitattributes | 4 ++++
.../internal/generated/CfgNodes.qll | 15 +++++++++++++
rust/ql/lib/codeql/rust/elements/Callable.qll | 1 +
.../elements/internal/CallExprBaseImpl.qll | 2 ++
.../rust/elements/internal/CallableImpl.qll | 5 +++--
.../internal/generated/CallExprBase.qll | 16 ++++++++++++++
.../elements/internal/generated/Callable.qll | 16 ++++++++++++++
.../generated/CallExpr/CallExpr.ql | 7 +++---
.../generated/CallExpr/CallExpr_getArg.ql | 7 ++++++
.../generated/ClosureExpr/ClosureExpr.ql | 13 ++++++-----
.../ClosureExpr/ClosureExpr_getParam.ql | 7 ++++++
.../generated/Function/Function.ql | 21 ++++++++++--------
.../generated/Function/Function_getParam.ql | 7 ++++++
.../MethodCallExpr/MethodCallExpr.ql | 13 ++++++-----
.../MethodCallExpr/MethodCallExpr_getArg.ql | 7 ++++++
rust/schema/annotations.py | 1 +
rust/schema/prelude.py | 1 +
18 files changed, 132 insertions(+), 33 deletions(-)
create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list
index eb60dccb3e6..903f91362d3 100644
--- a/rust/ql/.generated.list
+++ b/rust/ql/.generated.list
@@ -1,4 +1,4 @@
-lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll bd01b4d17625ee8c0da93231cf2291deb7e57db2c8aaa2c37968553c3144c47e 6e6ac58e09b84d02f461699a25ee80798a1bdc51c1836d9d75f5b52e93ae7ba6
+lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 6a103a6d04c951ca2f0c2989bed737cdbac56dd5ea9432b858da3416412bbf79 cf2bc67b65a1555de58bbd0a35b834b8867112a2f7c1951307c9416400ce70d0
lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd
lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be
lib/codeql/rust/elements/ArgList.qll 3d2f6f5542340b80a4c6e944ac17aba0d00727588bb66e501453ac0f80c82f83 afd52700bf5a337f19827846667cd0fb1fea5abbbcbc353828e292a727ea58c9
@@ -33,7 +33,7 @@ lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea6
lib/codeql/rust/elements/BreakExpr.qll 7ca3807a20e9a9a988d1fd7abebf240325ed422fcb45c719ba46272f031f94db dffb7379d3f3ba220acfbd05eb7bb6cfd9cfda211e9c8b1f5240ca5fa61be3fc
lib/codeql/rust/elements/CallExpr.qll f336500ca7a611b164d48b90e80edb0c0d3816792b0ececce659ac1ff1ffeb3e f99a9c55466418ef53860c44d9f2d6161af4b492178ddd9e5870dff742b70ae5
lib/codeql/rust/elements/CallExprBase.qll 2846202b5208b541977500286951d96487bf555838c6c16cdd006a71e383745a c789d412bf099c624329379e0c7d94fa0d23ae2edea7a25a2ea0f3c0042ccf62
-lib/codeql/rust/elements/Callable.qll e1ed21a7e6bd2426f6ccd0e46cee506d8ebf90a6fdc4dca0979157da439853aa 02f6c09710116ce82157aec9a5ec706983c38e4d85cc631327baf8d409b018c6
+lib/codeql/rust/elements/Callable.qll 0f7f78c3bfabbe24962f6232b0440d27e51f06d2b8d341fc623ffbfbff173f47 5fd13aaa0eaf76ea0b47fa0641bd23eea20a069f0b3cbc1ee4e290e88321008a
lib/codeql/rust/elements/CastExpr.qll 2fe1f36ba31fa29de309baf0a665cfcae67b61c73345e8f9bbd41e8c235fec45 c5b4c1e9dc24eb2357799defcb2df25989075e3a80e8663b74204a1c1b70e29a
lib/codeql/rust/elements/ClosureBinder.qll 02c8e83bf07deaf7bf0233b76623ec7f1837be8b77fe7e1c23544edc7d85e3c4 2b114d9a6dede694324aebe3dac80a802d139cfacd39beb0f12b5b0a46ee6390
lib/codeql/rust/elements/ClosureExpr.qll 67e2a106e9154c90367b129987e574d2a9ecf5b297536627e43706675d35eaed d6a381132ddd589c5a7ce174f50f9620041ddf690e15a65ebfb05ff7e7c02de7
@@ -492,8 +492,8 @@ lib/codeql/rust/elements/internal/generated/BlockExpr.qll 5a5ddbe34bc478a7bd9b0d
lib/codeql/rust/elements/internal/generated/BoxPat.qll 597bed52f7489e0addce3266f7bee5be7c53d2d1263eceec3a252d041ca0908f b8ccf363ca5f1a988547caf1fd266a55aec7cbf8623578deea99765d264b0151
lib/codeql/rust/elements/internal/generated/BreakExpr.qll 0f428a8b2f4209b134c2ffc3e1c93c30bc6b0e9c9172f140cefa88c1f77d8690 957b39f38ff6befe9061f55bc0b403c2f1c366dd0cf63b874bae6f8216576d76
lib/codeql/rust/elements/internal/generated/CallExpr.qll f1b8dae487077cc9d1dccf8c3cd61fd17afe860585f17ce8b860be4859be7ca4 6034fc03778e38802cdf3a6e460364b74e92912622581b31e6179951022bbbd6
-lib/codeql/rust/elements/internal/generated/CallExprBase.qll cce796e36847249f416629bacf3ea146313084de3374587412e66c10d2917b83 c219aa2174321c161a4a742ca0605521687ca9a5ca32db453a5c62db6f7784cc
-lib/codeql/rust/elements/internal/generated/Callable.qll b0502b5263b7bcd18e740f284f992c0e600e37d68556e3e0ba54a2ac42b94934 bda3e1eea11cacf5a9b932cd72efc2de6105103e8c575880fcd0cd89daadf068
+lib/codeql/rust/elements/internal/generated/CallExprBase.qll 2268e01d65015014c05166161bb28e5a1e78164d525ca16fc1e3106866cf231d b2f9b912153ba4d3e3612df4f74ac0e83077c31d5b31383bd277974081417a56
+lib/codeql/rust/elements/internal/generated/Callable.qll 9a8661aa018fd90a21529760c1dbc46c1ad3649e17b030e59ced0683fbf83f8a 8b573adfc23ec0ac91949da415e6a0c988fa02cbce9534d45ac98a5512d7b1ca
lib/codeql/rust/elements/internal/generated/CastExpr.qll ddc20054b0b339ad4d40298f3461490d25d00af87c876da5ffbc6a11c0832295 f4247307afcd74d80e926f29f8c57e78c50800984483e6b6003a44681e4a71f3
lib/codeql/rust/elements/internal/generated/ClosureBinder.qll ab199df96f525a083a0762fd654cd098802033c79700a593bb204a9a0c69ec01 86b33543e0886715830cfcdaca43b555a242a4f12a4caa18b88732d5afb584bd
lib/codeql/rust/elements/internal/generated/ClosureExpr.qll 34149bf82f107591e65738221e1407ec1dc9cc0dfb10ae7f761116fda45162de fd2fbc9a87fc0773c940db64013cf784d5e4137515cc1020e2076da329f5a952
@@ -578,7 +578,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll eaa0cd4402d3665013d47e
lib/codeql/rust/elements/internal/generated/ParenExpr.qll 812d2ff65079277f39f15c084657a955a960a7c1c0e96dd60472a58d56b945eb eb8c607f43e1fcbb41f37a10de203a1db806690e10ff4f04d48ed874189cb0eb
lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa
lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126
-lib/codeql/rust/elements/internal/generated/ParentChild.qll e2c6aaaa1735113f160c0e178d682bff8e9ebc627632f73c0dd2d1f4f9d692a8 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
+lib/codeql/rust/elements/internal/generated/ParentChild.qll 794df100370be92e8537c2b90431d02558c4eeb783c68ffdc7fc6445629acae2 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll d901fdc8142a5b8847cc98fc2afcfd16428b8ace4fbffb457e761b5fd3901a77 5dbb0aea5a13f937da666ccb042494af8f11e776ade1459d16b70a4dd193f9fb
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd
@@ -730,7 +730,8 @@ test/extractor-tests/generated/BreakExpr/BreakExpr.ql cdde2855d98f658187c60b9edc
test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql c7690a9aab1923bf3c2fb06f0a1d441d480b3c91ee1df3a868bbbd96c4042053 c592dd077fb6e22b2d6ddcaec37da2c5a26ba92d84f5d1ae4c78a615b9013765
test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql 0358f4fe6a66da56177703cf0e991042729c5e34ae8b6dccbb827f95fe936c72 1cb2dd778c50e19fe04c5fdf3a08a502635ea8303e71ff38d03aa7dc53213986
test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql ad83cc0db3c0f959fef6bb7ce0938d241a877e8cf84d15fb63879be2fe47238c 240b2fe2156b763d3a82fc64159615872db65b65ffb9ba2f3fd5d1ebd6c60f34
-test/extractor-tests/generated/CallExpr/CallExpr.ql ffb0cf1cb359a6dcbdf792a570c281e2d300779dca2dbc0f324990652adb972f 978a9e6c82758f9e8b334a682a02d6b893a6bf1db3cd85e9535839a9696b09b4
+test/extractor-tests/generated/CallExpr/CallExpr.ql cd38ec018b1afe9ae32ef94feca62295ad37c770c38b48a47bfb09697e7ee531 f6b0f2128cd5e63715f630c581d07b83678c298f7a7c56e38815e0d2c49ee36e
+test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 7d8d53ee4a0642f85d6bbfee6912fead699b5d117534d2b1803a670550894484 1782b33724b72afc9b7d99e3a52cacd4431ce1e12a7e43a7ac9872aad769b4ee
test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b022e7b6b6db9932e787e37b7760c6a09c91140a0368940374a2c919688e0488 c20849c96b53c96f6f717efff5e8b4c0e900c0ef5d715cfbaf7101c7056ad8f4
test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql 1ace458070875b9ff2c671c2ee18392ea7bf6e51b68ee98d412c8606e8eb8d33 4c35da8255d2975cef4adee15623662441bb8f2e1d73582e4c193d1bc11cc1b5
test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql 060a6c8b5b85c839b14fe96f9e50291a7a0e5662a945f4f337070f782ec76715 e9a1e44433936146d87be939aa160848b9a7d7333c36da601fb7d1a66d71eb59
@@ -740,10 +741,11 @@ test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28
test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql ab6b0a61adc404c89c0e2e1962236a8e703fdc5092512bb4a5d9995af8e13c7b 4e7f6b6f58a1ef34ed45e31e35154dd8dc59054ebedcaa87200c84cc727ef1dd
test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql 42516df87ac28c814d65f6739b2ede6eaa41c505d64756a3b8c7e0ca79895230 8b840f92ec033a4ef5edbe52bed909d8be0fffddf6d3e4bfaf9a8bc174fa2f2c
test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql 71010c43a78a7abe8e63c94353f4b7eb97aca011755d200e7087467c1e3b7a68 2c834328f783ec5032544a692f7e23975bac0228b52b9f8fde46ef46a5f22a5f
-test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql f25f9b32e5c0cd61e4b75053a5af4640a08b115ea5a4310ab95df450f6dfe1c4 9b731218857fa16776e29bce084c2ec1526b24e15f46d4f24047917d77d4646a
+test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 4d5f40935d07b0b24d77b93f56e9cea47666c5a3de84744641f9a4cb5d8d1319 b9a235c0a2d6a254d15f1fd1d0c8fdb6a7af51487b3826f26d8ca7a3b6cbc9b2
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f
+test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql c87b61e80dd62e031e8b310d8a4b781a468ecf2e5e81662be400f18bf33c5862 22abbc976a0e6f33c32c0e93cd0dd567cead13d82d561b9214275ea01b4a0573
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3
test/extractor-tests/generated/Comment/Comment.ql 5428b8417a737f88f0d55d87de45c4693d81f03686f03da11dc5369e163d977b 8948c1860cde198d49cff7c74741f554a9e89f8af97bb94de80f3c62e1e29244
@@ -833,7 +835,7 @@ test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql 27
test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql 634efdffaae4199aa9d95652cf081a8dc26e88224e24678845f8a67dc24ce090 d0302fee5c50403214771d5c6b896ba7c6e52be10c9bea59720ef2bb954e6f40
test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql 0d2140f84d0220b0c72c48c6bd272f4cfe1863d1797eddd16a6e238552a61e4d f4fe9b29697041e30764fa3dea44f125546bfb648f32c3474a1e922a4255c534
test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql 01ef27dd0bfab273e1ddc57ada0e079ece8a2bfd195ce413261006964b444093 acd0161f86010759417015c5b58044467a7f760f288ec4e8525458c54ae9a715
-test/extractor-tests/generated/Function/Function.ql 2efae1916e8f501668b3dbb2237cda788243fdd643683eda41b108dfdc578a90 6ec948518963985ec41b66e2b3b2b953e1da872dcd052a6d8c8f61c25bf09600
+test/extractor-tests/generated/Function/Function.ql b32c49f4371a51b9c217758fa5da2601d58bcbf3b195e7c8adb76bae5180d315 12e55c66a90ee88207c729736f388866cda13af78ea07a5d4e995c4a58a1e378
test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454
test/extractor-tests/generated/Function/Function_getAttr.ql 44067ee11bdec8e91774ff10de0704a8c5c1b60816d587378e86bf3d82e1f660 b4bebf9441bda1f2d1e34e9261e07a7468cbabf53cf8047384f3c8b11869f04e
test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql 17a346a9e5d28af99522520d1af3852db4cae01fb3d290a65c5f84d8d039c345 36fb06b55370828d9bc379cf5fad7f383cdb6f6db6f7377660276943ab0e1ec8
@@ -842,6 +844,7 @@ test/extractor-tests/generated/Function/Function_getCrateOrigin.ql acec761c56b38
test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql 0bcdca25bb92424007cea950409d73ba681e3ffbea53e0508f1d630fccfa8bed ff28c3349f5fc007d5f144e549579bd04870973c0fabef4198edce0fba0ef421
test/extractor-tests/generated/Function/Function_getGenericParamList.ql 0b255791c153b7cb03a64f1b9ab5beccc832984251f37516e1d06ce311e71c2b d200f90d4dd6f8dfd22ce49203423715d5bef27436c56ee553097c668e71c5a1
test/extractor-tests/generated/Function/Function_getName.ql 3d9e0518075d161213485389efe0adf8a9e6352dd1c6233ef0403a9abbcc7ed1 841e644ecefff7e9a82f458bcf14d9976d6a6dbe9191755ead88374d7c086375
+test/extractor-tests/generated/Function/Function_getParam.ql ef0b46453512fef08fbcc2a15bc14ae319bbc4810a4e4ce03a5ca3b1e8859ca7 ce36d3974059c1cd63eb1d6b76111985087f40dd4fe0c716a00aa9a178c712c4
test/extractor-tests/generated/Function/Function_getParamList.ql f888802ab00defb58de59cc39d1e0518e3884db7eaf845f39dfa55befdda58b2 ba0d1a07676f1c987b820a3d126a563ecf9a3d53ac1115b87a5af487a8a03c3e
test/extractor-tests/generated/Function/Function_getRetType.ql b3a1ab90c8ebf0543e5db6a415896e44a02f984321f49bc409aec2657298942b cdfa37772e5026febb19c9bcd0d325688b0fbf2f6e7bba424b73eca38b9b3e38
test/extractor-tests/generated/Function/Function_getVisibility.ql 490b0a369c809a757d4835b97becf617b0399f16a63a2b06258c9a227d5cc415 25ceff15d3cd03821e1cb2c04cb8894bcd101eeca62b66b54d1751b628107818
@@ -965,7 +968,8 @@ test/extractor-tests/generated/Meta/Meta.ql 16f163f00ba2bbaa0a8c6f3f6710c860a8f6
test/extractor-tests/generated/Meta/Meta_getExpr.ql ec9ec61f5be7d65c32775fb5c068daea04f9db7d875293ed99cc1b2481db041f 77a0c52f1cb6ddc8fdb294d637f9eda1b7301ffa3067f0fca6272d894f57d3ee
test/extractor-tests/generated/Meta/Meta_getPath.ql aa9d4145a4e613c51b6e4637d57e3b7d0f66e0bb88f4ce959d598870814c06bb 2087e00686d502c0e2e89c88eae0fb354463576a9ae4101320981d3fd79b9078
test/extractor-tests/generated/Meta/Meta_getTokenTree.ql 1051c27ffd0d9a20436d684fde529b9ff55abe30d50e1d575b0318951e75bd34 983975672d928fb907676628384c949731da9807bf0c781bb7ec749d25733d2d
-test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql d141f5a2ef95019aa64e8cb384ab4a45e7a93c941b84ef2e14c13377f159e4db 47a68fc874af6cc9a4b278a5aab1633a9db17300fd7dbd6dbe193d48d99144bc
+test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 85d3b8c794167f87840469e03d21aa00daf0998c28028f1c8848c7c4bd895db4 fa368ce4543c2544ecd2e636ade8d92849741226599290f59e0138a4a479357c
+test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 10a88c3bf63dfb26f43b9cd1ed7fceef0f436ce2eff4b5a816da369bf5b775d2 ee3b5043719591b4048ec32e21bb5fb3a9f83f0420ef18c338fc0ac28d0e3240
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql 655db9a0501b1ef20d604cc4cd9d708371781291443e8dec97b70ec2914601d2 2fc7df0eca22dcef2f9f5c86d37ee43452d372a4c0f9f4da0194828c82ba93e0
diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes
index 3326912c0ca..5e1382f75bb 100644
--- a/rust/ql/.gitattributes
+++ b/rust/ql/.gitattributes
@@ -733,6 +733,7 @@
/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated
/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated
+/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql linguist-generated
@@ -746,6 +747,7 @@
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated
+/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated
/test/extractor-tests/generated/Comment/Comment.ql linguist-generated
@@ -844,6 +846,7 @@
/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getGenericParamList.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getName.ql linguist-generated
+/test/extractor-tests/generated/Function/Function_getParam.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getParamList.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getRetType.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getVisibility.ql linguist-generated
@@ -968,6 +971,7 @@
/test/extractor-tests/generated/Meta/Meta_getPath.ql linguist-generated
/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated
+/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql linguist-generated
diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
index cfa37ed4539..36dd0fb304f 100644
--- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
+++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
@@ -722,6 +722,21 @@ module MakeCfgNodes Input> {
* Gets the number of attrs of this call expression base.
*/
int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
+
+ /**
+ * Gets the `index`th argument of this call expression base (0-based).
+ */
+ Expr getArg(int index) { result = node.getArg(index) }
+
+ /**
+ * Gets any of the arguments of this call expression base.
+ */
+ Expr getAnArg() { result = this.getArg(_) }
+
+ /**
+ * Gets the number of arguments of this call expression base.
+ */
+ int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) }
}
final private class ParentCastExpr extends ParentAstNode, CastExpr {
diff --git a/rust/ql/lib/codeql/rust/elements/Callable.qll b/rust/ql/lib/codeql/rust/elements/Callable.qll
index c42262a1854..11d029fff7d 100644
--- a/rust/ql/lib/codeql/rust/elements/Callable.qll
+++ b/rust/ql/lib/codeql/rust/elements/Callable.qll
@@ -6,6 +6,7 @@
private import internal.CallableImpl
import codeql.rust.elements.AstNode
import codeql.rust.elements.Attr
+import codeql.rust.elements.Param
import codeql.rust.elements.ParamList
/**
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
index c916b717bf6..b78720b08fa 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
@@ -28,5 +28,7 @@ module Impl {
class CallExprBase extends Generated::CallExprBase {
/** Gets the static target of this call, if any. */
Callable getStaticTarget() { none() } // overridden by subclasses, but cannot be made abstract
+
+ override Expr getArg(int index) { result = this.getArgList().getArg(index) }
}
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
index d604b4d239f..c2a6efb40ab 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
@@ -1,4 +1,3 @@
-// generated by codegen, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `Callable`.
*
@@ -15,5 +14,7 @@ module Impl {
/**
* A callable. Either a `Function` or a `ClosureExpr`.
*/
- class Callable extends Generated::Callable { }
+ class Callable extends Generated::Callable {
+ override Param getParam(int index) { result = this.getParamList().getParam(index) }
+ }
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
index 046558c356d..1d6364fb94f 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
@@ -8,6 +8,7 @@ private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.ArgList
import codeql.rust.elements.Attr
+import codeql.rust.elements.Expr
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
/**
@@ -55,5 +56,20 @@ module Generated {
* Gets the number of attrs of this call expression base.
*/
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
+
+ /**
+ * Gets the `index`th argument of this call expression base (0-based).
+ */
+ Expr getArg(int index) { none() }
+
+ /**
+ * Gets any of the arguments of this call expression base.
+ */
+ final Expr getAnArg() { result = this.getArg(_) }
+
+ /**
+ * Gets the number of arguments of this call expression base.
+ */
+ final int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) }
}
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
index 710cfe2078e..f42f711dcf8 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
@@ -8,6 +8,7 @@ private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl
import codeql.rust.elements.Attr
+import codeql.rust.elements.Param
import codeql.rust.elements.ParamList
/**
@@ -53,5 +54,20 @@ module Generated {
* Gets the number of attrs of this callable.
*/
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
+
+ /**
+ * Gets the `index`th parameter of this callable (0-based).
+ */
+ Param getParam(int index) { none() }
+
+ /**
+ * Gets any of the parameters of this callable.
+ */
+ final Param getAParam() { result = this.getParam(_) }
+
+ /**
+ * Gets the number of parameters of this callable.
+ */
+ final int getNumberOfParams() { result = count(int i | exists(this.getParam(i))) }
}
}
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
index cd043e88d1d..8abf8b2a08e 100644
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
@@ -2,12 +2,13 @@
import codeql.rust.elements
import TestUtils
-from CallExpr x, string hasArgList, int getNumberOfAttrs, string hasFunction
+from CallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs, string hasFunction
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
+ getNumberOfArgs = x.getNumberOfArgs() and
if x.hasFunction() then hasFunction = "yes" else hasFunction = "no"
-select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasFunction:",
- hasFunction
+select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:",
+ getNumberOfArgs, "hasFunction:", hasFunction
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
new file mode 100644
index 00000000000..37483c3e637
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
@@ -0,0 +1,7 @@
+// generated by codegen, do not edit
+import codeql.rust.elements
+import TestUtils
+
+from CallExpr x, int index
+where toBeTested(x) and not x.isUnknown()
+select x, index, x.getArg(index)
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
index b4b3dddc679..6a5536c5be1 100644
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
@@ -3,13 +3,15 @@ import codeql.rust.elements
import TestUtils
from
- ClosureExpr x, string hasParamList, int getNumberOfAttrs, string hasBody, string hasClosureBinder,
- string isAsync, string isConst, string isGen, string isMove, string isStatic, string hasRetType
+ ClosureExpr x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams, string hasBody,
+ string hasClosureBinder, string isAsync, string isConst, string isGen, string isMove,
+ string isStatic, string hasRetType
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
+ getNumberOfParams = x.getNumberOfParams() and
(if x.hasBody() then hasBody = "yes" else hasBody = "no") and
(if x.hasClosureBinder() then hasClosureBinder = "yes" else hasClosureBinder = "no") and
(if x.isAsync() then isAsync = "yes" else isAsync = "no") and
@@ -18,6 +20,7 @@ where
(if x.isMove() then isMove = "yes" else isMove = "no") and
(if x.isStatic() then isStatic = "yes" else isStatic = "no") and
if x.hasRetType() then hasRetType = "yes" else hasRetType = "no"
-select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody,
- "hasClosureBinder:", hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen,
- "isMove:", isMove, "isStatic:", isStatic, "hasRetType:", hasRetType
+select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs,
+ "getNumberOfParams:", getNumberOfParams, "hasBody:", hasBody, "hasClosureBinder:",
+ hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen, "isMove:", isMove,
+ "isStatic:", isStatic, "hasRetType:", hasRetType
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
new file mode 100644
index 00000000000..06cef03f206
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
@@ -0,0 +1,7 @@
+// generated by codegen, do not edit
+import codeql.rust.elements
+import TestUtils
+
+from ClosureExpr x, int index
+where toBeTested(x) and not x.isUnknown()
+select x, index, x.getParam(index)
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.ql b/rust/ql/test/extractor-tests/generated/Function/Function.ql
index 3c368187c29..cd9875a2373 100644
--- a/rust/ql/test/extractor-tests/generated/Function/Function.ql
+++ b/rust/ql/test/extractor-tests/generated/Function/Function.ql
@@ -3,15 +3,17 @@ import codeql.rust.elements
import TestUtils
from
- Function x, string hasParamList, int getNumberOfAttrs, string hasExtendedCanonicalPath,
- string hasCrateOrigin, string hasAttributeMacroExpansion, string hasAbi, string hasBody,
- string hasGenericParamList, string isAsync, string isConst, string isDefault, string isGen,
- string isUnsafe, string hasName, string hasRetType, string hasVisibility, string hasWhereClause
+ Function x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams,
+ string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion,
+ string hasAbi, string hasBody, string hasGenericParamList, string isAsync, string isConst,
+ string isDefault, string isGen, string isUnsafe, string hasName, string hasRetType,
+ string hasVisibility, string hasWhereClause
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
+ getNumberOfParams = x.getNumberOfParams() and
(
if x.hasExtendedCanonicalPath()
then hasExtendedCanonicalPath = "yes"
@@ -36,8 +38,9 @@ where
(if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and
if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no"
select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs,
- "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin,
- "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasAbi:", hasAbi, "hasBody:", hasBody,
- "hasGenericParamList:", hasGenericParamList, "isAsync:", isAsync, "isConst:", isConst,
- "isDefault:", isDefault, "isGen:", isGen, "isUnsafe:", isUnsafe, "hasName:", hasName,
- "hasRetType:", hasRetType, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause
+ "getNumberOfParams:", getNumberOfParams, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath,
+ "hasCrateOrigin:", hasCrateOrigin, "hasAttributeMacroExpansion:", hasAttributeMacroExpansion,
+ "hasAbi:", hasAbi, "hasBody:", hasBody, "hasGenericParamList:", hasGenericParamList, "isAsync:",
+ isAsync, "isConst:", isConst, "isDefault:", isDefault, "isGen:", isGen, "isUnsafe:", isUnsafe,
+ "hasName:", hasName, "hasRetType:", hasRetType, "hasVisibility:", hasVisibility,
+ "hasWhereClause:", hasWhereClause
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
new file mode 100644
index 00000000000..c936ea99da7
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
@@ -0,0 +1,7 @@
+// generated by codegen, do not edit
+import codeql.rust.elements
+import TestUtils
+
+from Function x, int index
+where toBeTested(x) and not x.isUnknown()
+select x, index, x.getParam(index)
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
index d0b082f4523..518d3dee36e 100644
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
@@ -3,13 +3,15 @@ import codeql.rust.elements
import TestUtils
from
- MethodCallExpr x, string hasArgList, int getNumberOfAttrs, string hasResolvedPath,
- string hasResolvedCrateOrigin, string hasGenericArgList, string hasIdentifier, string hasReceiver
+ MethodCallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs,
+ string hasResolvedPath, string hasResolvedCrateOrigin, string hasGenericArgList,
+ string hasIdentifier, string hasReceiver
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
+ getNumberOfArgs = x.getNumberOfArgs() and
(if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and
(
if x.hasResolvedCrateOrigin()
@@ -19,6 +21,7 @@ where
(if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and
(if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and
if x.hasReceiver() then hasReceiver = "yes" else hasReceiver = "no"
-select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasResolvedPath:",
- hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, "hasGenericArgList:",
- hasGenericArgList, "hasIdentifier:", hasIdentifier, "hasReceiver:", hasReceiver
+select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:",
+ getNumberOfArgs, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:",
+ hasResolvedCrateOrigin, "hasGenericArgList:", hasGenericArgList, "hasIdentifier:", hasIdentifier,
+ "hasReceiver:", hasReceiver
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
new file mode 100644
index 00000000000..58529cebfe5
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
@@ -0,0 +1,7 @@
+// generated by codegen, do not edit
+import codeql.rust.elements
+import TestUtils
+
+from MethodCallExpr x, int index
+where toBeTested(x) and not x.isUnknown()
+select x, index, x.getArg(index)
diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py
index c6ab581d7ca..1311522fca0 100644
--- a/rust/schema/annotations.py
+++ b/rust/schema/annotations.py
@@ -226,6 +226,7 @@ class CallExprBase(Expr):
"""
arg_list: optional["ArgList"] | child
attrs: list["Attr"] | child
+ args: list["Expr"] | synth
@annotate(CallExpr, replace_bases={Expr: CallExprBase}, cfg=True)
diff --git a/rust/schema/prelude.py b/rust/schema/prelude.py
index 6d356567d22..62334b2d864 100644
--- a/rust/schema/prelude.py
+++ b/rust/schema/prelude.py
@@ -73,6 +73,7 @@ class Callable(AstNode):
"""
param_list: optional["ParamList"] | child
attrs: list["Attr"] | child
+ params: list["Param"] | synth
class Addressable(AstNode):
From f3e4f94e81ece832577bd0426c9753e98464005f Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 6 Jun 2025 16:19:20 +0200
Subject: [PATCH 017/213] Rust: add documentation
---
.../analyzing-data-flow-in-rust.rst | 300 ++++++++++++++++++
.../codeql-for-rust.rst | 16 +
.../codeql-library-for-rust.rst | 62 ++++
docs/codeql/codeql-language-guides/index.rst | 1 +
docs/codeql/codeql-overview/codeql-tools.rst | 2 +
.../codeql/query-help/codeql-cwe-coverage.rst | 2 +-
docs/codeql/query-help/index.rst | 2 +
docs/codeql/query-help/rust-cwe.md | 7 +
docs/codeql/query-help/rust.rst | 8 +
docs/codeql/reusables/extractors.rst | 8 +-
.../codeql/reusables/rust-further-reading.rst | 2 +
.../about-codeql-queries.rst | 1 +
docs/query-metadata-style-guide.md | 5 +-
13 files changed, 410 insertions(+), 6 deletions(-)
create mode 100644 docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
create mode 100644 docs/codeql/codeql-language-guides/codeql-for-rust.rst
create mode 100644 docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
create mode 100644 docs/codeql/query-help/rust-cwe.md
create mode 100644 docs/codeql/query-help/rust.rst
create mode 100644 docs/codeql/reusables/rust-further-reading.rst
diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
new file mode 100644
index 00000000000..3f6a18e4283
--- /dev/null
+++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
@@ -0,0 +1,300 @@
+.. _analyzing-data-flow-in-rust:
+
+Analyzing data flow in Rust
+=============================
+
+You can use CodeQL to track the flow of data through a Rust program to places where the data is used.
+
+About this article
+------------------
+
+This article describes how data flow analysis is implemented in the CodeQL libraries for Rust and includes examples to help you write your own data flow queries.
+The following sections describe how to use the libraries for local data flow, global data flow, and taint tracking.
+For a more general introduction to modeling data flow, see ":ref:`About data flow analysis `."
+
+.. include:: ../reusables/new-data-flow-api.rst
+
+Local data flow
+---------------
+
+Local data flow tracks the flow of data within a single method or callable. Local data flow is easier, faster, and more precise than global data flow. Before looking at more complex tracking, you should always consider local tracking because it is sufficient for many queries.
+
+Using local data flow
+~~~~~~~~~~~~~~~~~~~~~
+
+You can use the local data flow library by importing the ``codeql.rust.dataflow.DataFlow`` module. The library uses the class ``Node`` to represent any element through which data can flow.
+``Node``\ s are divided into expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``).
+You can map a data flow ``ParameterNode`` to its corresponding ``Parameter`` AST node using the ``asParameter`` member predicate.
+Similarly, you can use the ``asExpr`` member predicate to map a data flow ``ExprNode`` to its corresponding ``ExprCfgNode`` in the control-flow library.
+
+.. code-block:: ql
+
+ class Node {
+ /** Gets the expression corresponding to this node, if any. */
+ CfgNodes::ExprCfgNode asExpr() { ... }
+
+ /** Gets the parameter corresponding to this node, if any. */
+ Parameter asParameter() { ... }
+
+ ...
+ }
+
+You can use the predicates ``exprNode`` and ``parameterNode`` to map from expressions and parameters to their data-flow node:
+
+.. code-block:: ql
+
+ /**
+ * Gets a node corresponding to expression `e`.
+ */
+ ExprNode exprNode(CfgNodes::ExprCfgNode e) { ... }
+
+ /**
+ * Gets the node corresponding to the value of parameter `p` at function entry.
+ */
+ ParameterNode parameterNode(Parameter p) { ... }
+
+Note that since ``asExpr`` and ``exprNode`` map between data-flow and control-flow nodes, you then need to call the ``getExpr`` member predicate on the control-flow node to map to the corresponding AST node,
+for example, by writing ``node.asExpr().getExpr()``.
+A control-flow graph considers every way control can flow through code, consequently, there can be multiple data-flow and control-flow nodes associated with a single expression node in the AST.
+
+The predicate ``localFlowStep(Node nodeFrom, Node nodeTo)`` holds if there is an immediate data flow edge from the node ``nodeFrom`` to the node ``nodeTo``.
+You can apply the predicate recursively, by using the ``+`` and ``*`` operators, or you can use the predefined recursive predicate ``localFlow``.
+
+For example, you can find flow from an expression ``source`` to an expression ``sink`` in zero or more local steps:
+
+.. code-block:: ql
+
+ DataFlow::localFlow(source, sink)
+
+Using local taint tracking
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Local taint tracking extends local data flow to include flow steps where values are not preserved, for example, string manipulation.
+For example:
+
+.. code-block:: rust
+
+ let y: String = "Hello ".to_owned() + x
+
+If ``x`` is a tainted string then ``y`` is also tainted.
+
+The local taint tracking library is in the module ``TaintTracking``.
+Like local data flow, a predicate ``localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo)`` holds if there is an immediate taint propagation edge from the node ``nodeFrom`` to the node ``nodeTo``.
+You can apply the predicate recursively, by using the ``+`` and ``*`` operators, or you can use the predefined recursive predicate ``localTaint``.
+
+For example, you can find taint propagation from an expression ``source`` to an expression ``sink`` in zero or more local steps:
+
+.. code-block:: ql
+
+ TaintTracking::localTaint(source, sink)
+
+
+Using local sources
+~~~~~~~~~~~~~~~~~~~
+
+When exploring local data flow or taint propagation between two expressions as above, you would normally constrain the expressions to be relevant to your investigation.
+The next section gives some concrete examples, but first it's helpful to introduce the concept of a local source.
+
+A local source is a data-flow node with no local data flow into it.
+As such, it is a local origin of data flow, a place where a new value is created.
+This includes parameters (which only receive values from global data flow) and most expressions (because they are not value-preserving).
+The class ``LocalSourceNode`` represents data-flow nodes that are also local sources.
+It comes with a useful member predicate ``flowsTo(DataFlow::Node node)``, which holds if there is local data flow from the local source to ``node``.
+
+Examples of local data flow
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This query finds the argument passed in each call to ``File::create``:
+
+.. code-block:: ql
+
+ import rust
+
+ from CallExpr call
+ where call.getStaticTarget().(Function).getCanonicalPath() = "::create"
+ select call.getArg(0)
+
+Unfortunately this will only give the expression in the argument, not the values which could be passed to it.
+So we use local data flow to find all expressions that flow into the argument:
+
+.. code-block:: ql
+
+ import rust
+ import codeql.rust.dataflow.DataFlow
+
+ from CallExpr call, DataFlow::ExprNode source, DataFlow::ExprNode sink
+ where
+ call.getStaticTarget().(Function).getCanonicalPath() = "::create" and
+ sink.asExpr().getExpr() = call.getArg(0) and
+ DataFlow::localFlow(source, sink)
+ select source, sink
+
+We can vary the source, for example, making the source the parameter of a function rather than an expression. The following query finds where a parameter is used for the file creation:
+
+.. code-block:: ql
+
+ import rust
+ import codeql.rust.dataflow.DataFlow
+
+ from CallExpr call, Method method, ParamDecl sourceParam, Expr sinkExpr
+ where
+ call.getStaticTarget() = method and
+ method.hasQualifiedName("String", "init(format:_:)") and
+ sinkExpr = call.getArgument(0).getExpr() and
+ DataFlow::localFlow(DataFlow::parameterNode(sourceParam), DataFlow::exprNode(sinkExpr))
+ select sourceParam, sinkExpr
+
+The following example finds calls to ``String.init(format:_:)`` where the format string is not a hard-coded string literal:
+
+.. code-block:: ql
+
+ import rust
+ import codeql.rust.dataflow.DataFlow
+
+ from CallExpr call, Method method, DataFlow::Node sinkNode
+ where
+ call.getStaticTarget() = method and
+ method.hasQualifiedName("String", "init(format:_:)") and
+ sinkNode.asExpr() = call.getArgument(0).getExpr() and
+ not exists(StringLiteralExpr sourceLiteral |
+ DataFlow::localFlow(DataFlow::exprNode(sourceLiteral), sinkNode)
+ )
+ select call, "Format argument to " + method.getName() + " isn't hard-coded."
+
+Global data flow
+----------------
+
+Global data flow tracks data flow throughout the entire program, and is therefore more powerful than local data flow.
+However, global data flow is less precise than local data flow, and the analysis typically requires significantly more time and memory to perform.
+
+.. pull-quote:: Note
+
+ .. include:: ../reusables/path-problem.rst
+
+Using global data flow
+~~~~~~~~~~~~~~~~~~~~~~
+
+We can use the global data flow library by implementing the signature ``DataFlow::ConfigSig`` and applying the module ``DataFlow::Global``:
+
+.. code-block:: ql
+
+ import codeql.rust.dataflow.DataFlow
+
+ module MyDataFlowConfiguration implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ ...
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ ...
+ }
+ }
+
+ module MyDataFlow = DataFlow::Global;
+
+These predicates are defined in the configuration:
+
+- ``isSource`` - defines where data may flow from.
+- ``isSink`` - defines where data may flow to.
+- ``isBarrier`` - optional, defines where data flow is blocked.
+- ``isAdditionalFlowStep`` - optional, adds additional flow steps.
+
+The last line (``module MyDataFlow = ...``) instantiates the parameterized module for data flow analysis by passing the configuration to the parameterized module. Data flow analysis can then be performed using ``MyDataFlow::flow(DataFlow::Node source, DataFlow::Node sink)``:
+
+.. code-block:: ql
+
+ from DataFlow::Node source, DataFlow::Node sink
+ where MyDataFlow::flow(source, sink)
+ select source, "Dataflow to $@.", sink, sink.toString()
+
+Using global taint tracking
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Global taint tracking is to global data flow what local taint tracking is to local data flow.
+That is, global taint tracking extends global data flow with additional non-value-preserving steps.
+The global taint tracking library uses the same configuration module as the global data flow library. You can perform taint flow analysis using ``TaintTracking::Global``:
+
+.. code-block:: ql
+
+ module MyTaintFlow = TaintTracking::Global;
+
+ from DataFlow::Node source, DataFlow::Node sink
+ where MyTaintFlow::flow(source, sink)
+ select source, "Taint flow to $@.", sink, sink.toString()
+
+Predefined sources
+~~~~~~~~~~~~~~~~~~
+
+The data flow library module ``codeql.rust.dataflow.FlowSources`` contains a number of predefined sources that you can use to write security queries to track data flow and taint flow.
+
+- The class ``RemoteFlowSource`` represents data flow from remote network inputs and from other applications.
+- The class ``LocalFlowSource`` represents data flow from local user input.
+- The class ``FlowSource`` includes both of the above.
+
+Examples of global data flow
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following global taint-tracking query finds places where a string literal is used in a function call argument named "password".
+ - Since this is a taint-tracking query, the ``TaintTracking::Global`` module is used.
+ - The ``isSource`` predicate defines sources as any ``StringLiteralExpr``.
+ - The ``isSink`` predicate defines sinks as arguments to a ``CallExpr`` called "password".
+ - The sources and sinks may need tuning to a particular use, for example, if passwords are represented by a type other than ``String`` or passed in arguments of a different name than "password".
+
+.. code-block:: ql
+
+ import rust
+ import codeql.rust.dataflow.DataFlow
+ import codeql.rust.dataflow.TaintTracking
+
+ module ConstantPasswordConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node node) { node.asExpr() instanceof StringLiteralExpr }
+
+ predicate isSink(DataFlow::Node node) {
+ // any argument called `password`
+ exists(CallExpr call | call.getArgumentWithLabel("password").getExpr() = node.asExpr())
+ }
+
+ module ConstantPasswordFlow = TaintTracking::Global;
+
+ from DataFlow::Node sourceNode, DataFlow::Node sinkNode
+ where ConstantPasswordFlow::flow(sourceNode, sinkNode)
+ select sinkNode, "The value $@ is used as a constant password.", sourceNode, sourceNode.toString()
+
+
+The following global taint-tracking query finds places where a value from a remote or local user input is used as an argument to the SQLite ``Connection.execute(_:)`` function.
+ - Since this is a taint-tracking query, the ``TaintTracking::Global`` module is used.
+ - The ``isSource`` predicate defines sources as a ``FlowSource`` (remote or local user input).
+ - The ``isSink`` predicate defines sinks as the first argument in any call to ``Connection.execute(_:)``.
+
+.. code-block:: ql
+
+ import rust
+ import codeql.rust.dataflow.DataFlow
+ import codeql.rust.dataflow.TaintTracking
+ import codeql.rust.dataflow.FlowSources
+
+ module SqlInjectionConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node node) { node instanceof FlowSource }
+
+ predicate isSink(DataFlow::Node node) {
+ exists(CallExpr call |
+ call.getStaticTarget().(Method).hasQualifiedName("Connection", "execute(_:)") and
+ call.getArgument(0).getExpr() = node.asExpr()
+ )
+ }
+ }
+
+ module SqlInjectionFlow = TaintTracking::Global;
+
+ from DataFlow::Node sourceNode, DataFlow::Node sinkNode
+ where SqlInjectionFlow::flow(sourceNode, sinkNode)
+ select sinkNode, "This query depends on a $@.", sourceNode, "user-provided value"
+
+Further reading
+---------------
+
+- `Exploring data flow with path queries `__ in the GitHub documentation.
+
+
+.. include:: ../reusables/rust-further-reading.rst
+.. include:: ../reusables/codeql-ref-tools-further-reading.rst
diff --git a/docs/codeql/codeql-language-guides/codeql-for-rust.rst b/docs/codeql/codeql-language-guides/codeql-for-rust.rst
new file mode 100644
index 00000000000..c8262208cf5
--- /dev/null
+++ b/docs/codeql/codeql-language-guides/codeql-for-rust.rst
@@ -0,0 +1,16 @@
+
+.. _codeql-for-rust:
+
+CodeQL for Rust
+=========================
+
+Experiment and learn how to write effective and efficient queries for CodeQL databases generated from Rust code.
+
+.. toctree::
+ :hidden:
+
+ codeql-library-for-rust
+ analyzing-data-flow-in-rust
+
+- :doc:`CodeQL library for Rust `: When you're analyzing Rust code, you can make use of the large collection of classes in the CodeQL library for Rust.
+- :doc:`Analyzing data flow in Ruby `: You can use CodeQL to track the flow of data through a Rust program to places where the data is used.
diff --git a/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst b/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
new file mode 100644
index 00000000000..dd25d769692
--- /dev/null
+++ b/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
@@ -0,0 +1,62 @@
+.. _codeql-library-for-rust:
+
+CodeQL library for Rust
+=================================
+
+When you're analyzing Rust code, you can make use of the large collection of classes in the CodeQL library for Rust.
+
+Overview
+--------
+
+CodeQL ships with a library for analyzing Rust code. The classes in this library present the data from a CodeQL database in an object-oriented form and provide
+abstractions and predicates to help you with common analysis tasks.
+
+The library is implemented as a set of CodeQL modules, that is, files with the extension ``.qll``. The
+module `rust.qll `__ imports most other standard library modules, so you can include the complete
+library by beginning your query with:
+
+.. code-block:: ql
+
+ import rust
+
+The CodeQL libraries model various aspects of Rust code. The above import includes the abstract syntax tree (AST) library, which is used for locating program elements,
+to match syntactic elements in the source code. This can be used for example to find values, patterns and structures.
+
+The control flow graph (CFG) is imported using
+
+.. code-block:: ql
+
+ import codeql.rust.controlflow.ControlFlowGraph
+
+The CFG models the control flow between statements and expressions, for example whether one expression can
+be evaluated before another expression, or whether an expression "dominates" another one, meaning that all paths to an
+expression must flow through another expression first.
+
+The data flow library is imported using
+
+.. code-block:: ql
+
+ import codeql.rust.dataflow.DataFlow
+
+Data flow tracks the flow of data through the program, including through function calls (interprocedural data flow) and between steps in a job or workflow.
+Data flow is particularly useful for security queries, where untrusted data flows to vulnerable parts of the program
+to exploit it. Related to data flow, is the taint-tracking library, which finds how data can *influence* other values
+in a program, even when it is not copied exactly.
+
+To summarize, the main Rust library modules are:
+
+.. list-table:: Main Rust library modules
+ :header-rows: 1
+
+ * - Import
+ - Description
+ * - ``rust``
+ - The standard Rust library
+ * - ``codeql.rust.elements``
+ - The abstract syntax tree library (also imported by `rust.qll`)
+ * - ``codeql.rust.controlflow.ControlFlowGraph``
+ - The control flow graph library
+ * - ``codeql.rust.dataflow.DataFlow``
+ - The data flow library
+ * - ``codeql.rust.dataflow.TaintTracking``
+ - The taint tracking library
diff --git a/docs/codeql/codeql-language-guides/index.rst b/docs/codeql/codeql-language-guides/index.rst
index ca03ebffd75..5ec9a715a4d 100644
--- a/docs/codeql/codeql-language-guides/index.rst
+++ b/docs/codeql/codeql-language-guides/index.rst
@@ -15,4 +15,5 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
codeql-for-javascript
codeql-for-python
codeql-for-ruby
+ codeql-for-rust
codeql-for-swift
diff --git a/docs/codeql/codeql-overview/codeql-tools.rst b/docs/codeql/codeql-overview/codeql-tools.rst
index ada1a75689e..12d13897413 100644
--- a/docs/codeql/codeql-overview/codeql-tools.rst
+++ b/docs/codeql/codeql-overview/codeql-tools.rst
@@ -39,6 +39,8 @@ maintained by GitHub are:
- ``codeql/python-all`` (`changelog `__, `source `__)
- ``codeql/ruby-queries`` (`changelog `__, `source `__)
- ``codeql/ruby-all`` (`changelog `__, `source `__)
+- ``codeql/rust-queries`` (`changelog `__, `source `__)
+- ``codeql/rust-all`` (`changelog `__, `source `__)
- ``codeql/swift-queries`` (`changelog `__, `source `__)
- ``codeql/swift-all`` (`changelog `__, `source `__)
diff --git a/docs/codeql/query-help/codeql-cwe-coverage.rst b/docs/codeql/query-help/codeql-cwe-coverage.rst
index 6236289a9ab..0c0089a576d 100644
--- a/docs/codeql/query-help/codeql-cwe-coverage.rst
+++ b/docs/codeql/query-help/codeql-cwe-coverage.rst
@@ -35,5 +35,5 @@ Note that the CWE coverage includes both "`supported queries `
- :doc:`CodeQL query help for Python `
- :doc:`CodeQL query help for Ruby `
+- :doc:`CodeQL query help for Rust `
- :doc:`CodeQL query help for Swift `
.. pull-quote:: Information
@@ -37,5 +38,6 @@ For a full list of the CWEs covered by these queries, see ":doc:`CodeQL CWE cove
javascript
python
ruby
+ rust
swift
codeql-cwe-coverage
diff --git a/docs/codeql/query-help/rust-cwe.md b/docs/codeql/query-help/rust-cwe.md
new file mode 100644
index 00000000000..6468ff890ac
--- /dev/null
+++ b/docs/codeql/query-help/rust-cwe.md
@@ -0,0 +1,7 @@
+# CWE coverage for Rust
+
+An overview of CWE coverage for Rust in the latest release of CodeQL.
+
+## Overview
+
+
diff --git a/docs/codeql/query-help/rust.rst b/docs/codeql/query-help/rust.rst
new file mode 100644
index 00000000000..b430fd3692e
--- /dev/null
+++ b/docs/codeql/query-help/rust.rst
@@ -0,0 +1,8 @@
+CodeQL query help for Rust
+============================
+
+.. include:: ../reusables/query-help-overview.rst
+
+These queries are published in the CodeQL query pack ``codeql/rust-queries`` (`changelog `__, `source `__).
+
+.. include:: toc-rust.rst
diff --git a/docs/codeql/reusables/extractors.rst b/docs/codeql/reusables/extractors.rst
index 30ccef6e465..c09926666b0 100644
--- a/docs/codeql/reusables/extractors.rst
+++ b/docs/codeql/reusables/extractors.rst
@@ -6,9 +6,9 @@
- Identifier
* - GitHub Actions
- ``actions``
- * - C/C++
+ * - C/C++
- ``cpp``
- * - C#
+ * - C#
- ``csharp``
* - Go
- ``go``
@@ -20,5 +20,7 @@
- ``python``
* - Ruby
- ``ruby``
+ - Rust
+ - ``rust``
* - Swift
- - ``swift``
\ No newline at end of file
+ - ``swift``
diff --git a/docs/codeql/reusables/rust-further-reading.rst b/docs/codeql/reusables/rust-further-reading.rst
new file mode 100644
index 00000000000..a82dee7f28e
--- /dev/null
+++ b/docs/codeql/reusables/rust-further-reading.rst
@@ -0,0 +1,2 @@
+- `CodeQL queries for Rust `__
+- `CodeQL library reference for Rust `__
diff --git a/docs/codeql/writing-codeql-queries/about-codeql-queries.rst b/docs/codeql/writing-codeql-queries/about-codeql-queries.rst
index f4e60b513c9..92e4b963bff 100644
--- a/docs/codeql/writing-codeql-queries/about-codeql-queries.rst
+++ b/docs/codeql/writing-codeql-queries/about-codeql-queries.rst
@@ -79,6 +79,7 @@ When writing your own alert queries, you would typically import the standard lib
- :ref:`CodeQL library guide for JavaScript `
- :ref:`CodeQL library guide for Python `
- :ref:`CodeQL library guide for Ruby `
+- :ref:`CodeQL library guide for Rust `
- :ref:`CodeQL library guide for TypeScript `
There are also libraries containing commonly used predicates, types, and other modules associated with different analyses, including data flow, control flow, and taint-tracking. In order to calculate path graphs, path queries require you to import a data flow library into the query file. For more information, see ":doc:`Creating path queries `."
diff --git a/docs/query-metadata-style-guide.md b/docs/query-metadata-style-guide.md
index f5f2143d8be..6538d207e6a 100644
--- a/docs/query-metadata-style-guide.md
+++ b/docs/query-metadata-style-guide.md
@@ -25,6 +25,7 @@ For examples of query files for the languages supported by CodeQL, visit the fol
* [JavaScript queries](https://codeql.github.com/codeql-query-help/javascript/)
* [Python queries](https://codeql.github.com/codeql-query-help/python/)
* [Ruby queries](https://codeql.github.com/codeql-query-help/ruby/)
+* [Rust queries](https://codeql.github.com/codeql-query-help/rust/)
* [Swift queries](https://codeql.github.com/codeql-query-help/swift/)
## Metadata area
@@ -154,7 +155,7 @@ When you tag a query like this, the associated CWE pages from [MITRE.org](https:
* `@tags maintainability`–for queries that detect patterns that make it harder for developers to make changes to the code.
* `@tags reliability`–for queries that detect issues that affect whether the code will perform as expected during execution.
-Software quality doesn't have as universally-agreed categorization method as security issues like CWE, so we will do our own categorization instead of using tags like CWE.
+Software quality doesn't have as universally-agreed categorization method as security issues like CWE, so we will do our own categorization instead of using tags like CWE.
We'll use two "top-level" categories of quality queries, with sub-categories beneath:
@@ -162,7 +163,7 @@ We'll use two "top-level" categories of quality queries, with sub-categories ben
* `@tags readability`–for queries that detect confusing patterns that make it harder for developers to read the code.
* `@tags useless-code`-for queries that detect functions that are never used and other instances of unused code
* `@tags complexity`-for queries that detect patterns in the code that lead to unnecesary complexity such as unclear control flow, or high cyclomatic complexity
-
+
* `@tags reliability`–for queries that detect issues that affect whether the code will perform as expected during execution.
* `@tags correctness`–for queries that detect incorrect program behavior or couse result in unintended outcomes.
From 9c2fea914ecb595caa59ba6c904fb6e1c2a78ea1 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:30:43 +0200
Subject: [PATCH 018/213] Rust: accept test changes
---
.../generated/CallExpr/CallExpr.expected | 8 ++++----
.../generated/CallExpr/CallExpr_getArg.expected | 4 ++++
.../generated/ClosureExpr/ClosureExpr.expected | 10 +++++-----
.../ClosureExpr/ClosureExpr_getParam.expected | 6 ++++++
.../generated/Function/Function.expected | 4 ++--
.../generated/Function/Function_getParam.expected | 1 +
.../generated/MethodCallExpr/MethodCallExpr.expected | 4 ++--
.../MethodCallExpr/MethodCallExpr_getArg.expected | 2 ++
8 files changed, 26 insertions(+), 13 deletions(-)
create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
create mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
index ebe6eeda104..31824b731a6 100644
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
@@ -1,4 +1,4 @@
-| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
-| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
-| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
-| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
+| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
+| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
+| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
+| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
new file mode 100644
index 00000000000..2bf84953410
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
@@ -0,0 +1,4 @@
+| gen_call_expr.rs:5:5:5:11 | foo(...) | 0 | gen_call_expr.rs:5:9:5:10 | 42 |
+| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | 0 | gen_call_expr.rs:6:21:6:22 | 42 |
+| gen_call_expr.rs:7:5:7:14 | ...(...) | 0 | gen_call_expr.rs:7:12:7:13 | 42 |
+| gen_call_expr.rs:8:5:8:10 | foo(...) | 0 | gen_call_expr.rs:8:9:8:9 | 1 |
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
index 3ea9f463a00..d8a9b33ce0e 100644
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
@@ -1,5 +1,5 @@
-| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes |
-| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no |
+| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes |
+| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 2 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no |
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
new file mode 100644
index 00000000000..29be6ae9ef0
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
@@ -0,0 +1,6 @@
+| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | 0 | gen_closure_expr.rs:5:6:5:6 | ... |
+| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | 0 | gen_closure_expr.rs:6:11:6:16 | ...: i32 |
+| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 0 | gen_closure_expr.rs:7:12:7:17 | ...: i32 |
+| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 1 | gen_closure_expr.rs:7:20:7:20 | ... |
+| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:9:6:9:6 | ... |
+| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:11:14:11:14 | ... |
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.expected b/rust/ql/test/extractor-tests/generated/Function/Function.expected
index d30ef684493..117aad5d293 100644
--- a/rust/ql/test/extractor-tests/generated/Function/Function.expected
+++ b/rust/ql/test/extractor-tests/generated/Function/Function.expected
@@ -1,2 +1,2 @@
-| gen_function.rs:3:1:4:38 | fn foo | hasParamList: | yes | getNumberOfAttrs: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | yes | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no |
-| gen_function.rs:7:5:7:13 | fn bar | hasParamList: | yes | getNumberOfAttrs: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | no | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no |
+| gen_function.rs:3:1:4:38 | fn foo | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | yes | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no |
+| gen_function.rs:7:5:7:13 | fn bar | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | no | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no |
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
new file mode 100644
index 00000000000..6a7340509a7
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
@@ -0,0 +1 @@
+| gen_function.rs:3:1:4:38 | fn foo | 0 | gen_function.rs:4:8:4:13 | ...: u32 |
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
index 5862cd94081..516e47d8b39 100644
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
@@ -1,2 +1,2 @@
-| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasReceiver: | yes |
-| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasIdentifier: | yes | hasReceiver: | yes |
+| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasReceiver: | yes |
+| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasIdentifier: | yes | hasReceiver: | yes |
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
new file mode 100644
index 00000000000..36af4e22c50
--- /dev/null
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
@@ -0,0 +1,2 @@
+| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 |
+| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 |
From f647b3316634cc841273bdecfeedb664003b9e94 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:31:12 +0200
Subject: [PATCH 019/213] Rust: rerun codegen
---
rust/ql/.generated.list | 1 -
rust/ql/.gitattributes | 1 -
rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll | 1 +
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list
index 903f91362d3..d2e2ec8d2d4 100644
--- a/rust/ql/.generated.list
+++ b/rust/ql/.generated.list
@@ -240,7 +240,6 @@ lib/codeql/rust/elements/internal/BlockExprImpl.qll 36ac09e4a6eeeec22919b62b1d00
lib/codeql/rust/elements/internal/BoxPatConstructor.qll 153f110ba25fd6c889092bfd16f73bb610fa60d6e0c8965d5f44d2446fcd48a2 9324cf0d8aa29945551bf8ab64801d598f57aab8cd4e19bcd4e9ef8a4a4e06eb
lib/codeql/rust/elements/internal/BreakExprConstructor.qll 356be043c28e0b34fdf925a119c945632ee883c6f5ebb9a27003c6a8d250afd9 bb77e66b04bb9489340e7506931559b94285c6904b6f9d2f83b214cba4f3cfd5
lib/codeql/rust/elements/internal/CallExprConstructor.qll 742b38e862e2cf82fd1ecc4d4fc5b4782a9c7c07f031452b2bae7aa59d5aa13a cad6e0a8be21d91b20ac2ec16cab9c30eae810b452c0f1992ed87d5c7f4144dc
-lib/codeql/rust/elements/internal/CallableImpl.qll 917a7d298583e15246428f32fba4cde6fc57a1790262731be27a96baddd8cf5e c5c0848024e0fe3fbb775e7750cf1a2c2dfa454a5aef0df55fec3d0a6fe99190
lib/codeql/rust/elements/internal/CastExprConstructor.qll f3d6e10c4731f38a384675aeab3fba47d17b9e15648293787092bb3247ed808d d738a7751dbadb70aa1dcffcf8af7fa61d4cf8029798369a7e8620013afff4ed
lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll 6e376ab9d40308e95bcdaf1cc892472c92099d477720192cd382d2c4e0d9c8a1 60a0efe50203ad5bb97bdfc06d602182edcc48ac9670f2d27a9675bd9fd8e19f
lib/codeql/rust/elements/internal/ClosureBinderImpl.qll 9f6ce7068b5c17df44f00037ebb42e6c8fdbbbd09bf89951221fb04f378fbdf1 6e6e372e151fe0b0f17a5ea0ed774553b6ed0bf53e1d377e5ed24a0f98529735
diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes
index 5e1382f75bb..65c3aae0e9e 100644
--- a/rust/ql/.gitattributes
+++ b/rust/ql/.gitattributes
@@ -242,7 +242,6 @@
/lib/codeql/rust/elements/internal/BoxPatConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/BreakExprConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/CallExprConstructor.qll linguist-generated
-/lib/codeql/rust/elements/internal/CallableImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/CastExprConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll linguist-generated
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
index c2a6efb40ab..37e24a9150c 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
@@ -11,6 +11,7 @@ private import codeql.rust.elements.internal.generated.Callable
* be referenced directly.
*/
module Impl {
+ // the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A callable. Either a `Function` or a `ClosureExpr`.
*/
From 3fe6ba692a6f3ae79147540503207af0a332f5fc Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:42:28 +0200
Subject: [PATCH 020/213] Revert "Rust: add `Callable::getParam` and
`CallExprBase::getArg` shortcuts"
This reverts commit c70decbe86fa945a445da1c9b1e7267702cf5b39.
---
rust/ql/.generated.list | 22 ++++++++-----------
rust/ql/.gitattributes | 4 ----
.../internal/generated/CfgNodes.qll | 15 -------------
rust/ql/lib/codeql/rust/elements/Callable.qll | 1 -
.../elements/internal/CallExprBaseImpl.qll | 2 --
.../rust/elements/internal/CallableImpl.qll | 5 ++---
.../internal/generated/CallExprBase.qll | 16 --------------
.../elements/internal/generated/Callable.qll | 16 --------------
.../generated/CallExpr/CallExpr.ql | 7 +++---
.../generated/CallExpr/CallExpr_getArg.ql | 7 ------
.../generated/ClosureExpr/ClosureExpr.ql | 13 +++++------
.../ClosureExpr/ClosureExpr_getParam.ql | 7 ------
.../generated/Function/Function.ql | 21 ++++++++----------
.../generated/Function/Function_getParam.ql | 7 ------
.../MethodCallExpr/MethodCallExpr.ql | 13 +++++------
.../MethodCallExpr/MethodCallExpr_getArg.ql | 7 ------
rust/schema/annotations.py | 1 -
rust/schema/prelude.py | 1 -
18 files changed, 33 insertions(+), 132 deletions(-)
delete mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
delete mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
delete mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
delete mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list
index d2e2ec8d2d4..47d78780687 100644
--- a/rust/ql/.generated.list
+++ b/rust/ql/.generated.list
@@ -1,4 +1,4 @@
-lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 6a103a6d04c951ca2f0c2989bed737cdbac56dd5ea9432b858da3416412bbf79 cf2bc67b65a1555de58bbd0a35b834b8867112a2f7c1951307c9416400ce70d0
+lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll bd01b4d17625ee8c0da93231cf2291deb7e57db2c8aaa2c37968553c3144c47e 6e6ac58e09b84d02f461699a25ee80798a1bdc51c1836d9d75f5b52e93ae7ba6
lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd
lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be
lib/codeql/rust/elements/ArgList.qll 3d2f6f5542340b80a4c6e944ac17aba0d00727588bb66e501453ac0f80c82f83 afd52700bf5a337f19827846667cd0fb1fea5abbbcbc353828e292a727ea58c9
@@ -33,7 +33,7 @@ lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea6
lib/codeql/rust/elements/BreakExpr.qll 7ca3807a20e9a9a988d1fd7abebf240325ed422fcb45c719ba46272f031f94db dffb7379d3f3ba220acfbd05eb7bb6cfd9cfda211e9c8b1f5240ca5fa61be3fc
lib/codeql/rust/elements/CallExpr.qll f336500ca7a611b164d48b90e80edb0c0d3816792b0ececce659ac1ff1ffeb3e f99a9c55466418ef53860c44d9f2d6161af4b492178ddd9e5870dff742b70ae5
lib/codeql/rust/elements/CallExprBase.qll 2846202b5208b541977500286951d96487bf555838c6c16cdd006a71e383745a c789d412bf099c624329379e0c7d94fa0d23ae2edea7a25a2ea0f3c0042ccf62
-lib/codeql/rust/elements/Callable.qll 0f7f78c3bfabbe24962f6232b0440d27e51f06d2b8d341fc623ffbfbff173f47 5fd13aaa0eaf76ea0b47fa0641bd23eea20a069f0b3cbc1ee4e290e88321008a
+lib/codeql/rust/elements/Callable.qll e1ed21a7e6bd2426f6ccd0e46cee506d8ebf90a6fdc4dca0979157da439853aa 02f6c09710116ce82157aec9a5ec706983c38e4d85cc631327baf8d409b018c6
lib/codeql/rust/elements/CastExpr.qll 2fe1f36ba31fa29de309baf0a665cfcae67b61c73345e8f9bbd41e8c235fec45 c5b4c1e9dc24eb2357799defcb2df25989075e3a80e8663b74204a1c1b70e29a
lib/codeql/rust/elements/ClosureBinder.qll 02c8e83bf07deaf7bf0233b76623ec7f1837be8b77fe7e1c23544edc7d85e3c4 2b114d9a6dede694324aebe3dac80a802d139cfacd39beb0f12b5b0a46ee6390
lib/codeql/rust/elements/ClosureExpr.qll 67e2a106e9154c90367b129987e574d2a9ecf5b297536627e43706675d35eaed d6a381132ddd589c5a7ce174f50f9620041ddf690e15a65ebfb05ff7e7c02de7
@@ -491,8 +491,8 @@ lib/codeql/rust/elements/internal/generated/BlockExpr.qll 5a5ddbe34bc478a7bd9b0d
lib/codeql/rust/elements/internal/generated/BoxPat.qll 597bed52f7489e0addce3266f7bee5be7c53d2d1263eceec3a252d041ca0908f b8ccf363ca5f1a988547caf1fd266a55aec7cbf8623578deea99765d264b0151
lib/codeql/rust/elements/internal/generated/BreakExpr.qll 0f428a8b2f4209b134c2ffc3e1c93c30bc6b0e9c9172f140cefa88c1f77d8690 957b39f38ff6befe9061f55bc0b403c2f1c366dd0cf63b874bae6f8216576d76
lib/codeql/rust/elements/internal/generated/CallExpr.qll f1b8dae487077cc9d1dccf8c3cd61fd17afe860585f17ce8b860be4859be7ca4 6034fc03778e38802cdf3a6e460364b74e92912622581b31e6179951022bbbd6
-lib/codeql/rust/elements/internal/generated/CallExprBase.qll 2268e01d65015014c05166161bb28e5a1e78164d525ca16fc1e3106866cf231d b2f9b912153ba4d3e3612df4f74ac0e83077c31d5b31383bd277974081417a56
-lib/codeql/rust/elements/internal/generated/Callable.qll 9a8661aa018fd90a21529760c1dbc46c1ad3649e17b030e59ced0683fbf83f8a 8b573adfc23ec0ac91949da415e6a0c988fa02cbce9534d45ac98a5512d7b1ca
+lib/codeql/rust/elements/internal/generated/CallExprBase.qll cce796e36847249f416629bacf3ea146313084de3374587412e66c10d2917b83 c219aa2174321c161a4a742ca0605521687ca9a5ca32db453a5c62db6f7784cc
+lib/codeql/rust/elements/internal/generated/Callable.qll b0502b5263b7bcd18e740f284f992c0e600e37d68556e3e0ba54a2ac42b94934 bda3e1eea11cacf5a9b932cd72efc2de6105103e8c575880fcd0cd89daadf068
lib/codeql/rust/elements/internal/generated/CastExpr.qll ddc20054b0b339ad4d40298f3461490d25d00af87c876da5ffbc6a11c0832295 f4247307afcd74d80e926f29f8c57e78c50800984483e6b6003a44681e4a71f3
lib/codeql/rust/elements/internal/generated/ClosureBinder.qll ab199df96f525a083a0762fd654cd098802033c79700a593bb204a9a0c69ec01 86b33543e0886715830cfcdaca43b555a242a4f12a4caa18b88732d5afb584bd
lib/codeql/rust/elements/internal/generated/ClosureExpr.qll 34149bf82f107591e65738221e1407ec1dc9cc0dfb10ae7f761116fda45162de fd2fbc9a87fc0773c940db64013cf784d5e4137515cc1020e2076da329f5a952
@@ -577,7 +577,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll eaa0cd4402d3665013d47e
lib/codeql/rust/elements/internal/generated/ParenExpr.qll 812d2ff65079277f39f15c084657a955a960a7c1c0e96dd60472a58d56b945eb eb8c607f43e1fcbb41f37a10de203a1db806690e10ff4f04d48ed874189cb0eb
lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa
lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126
-lib/codeql/rust/elements/internal/generated/ParentChild.qll 794df100370be92e8537c2b90431d02558c4eeb783c68ffdc7fc6445629acae2 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
+lib/codeql/rust/elements/internal/generated/ParentChild.qll e2c6aaaa1735113f160c0e178d682bff8e9ebc627632f73c0dd2d1f4f9d692a8 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll d901fdc8142a5b8847cc98fc2afcfd16428b8ace4fbffb457e761b5fd3901a77 5dbb0aea5a13f937da666ccb042494af8f11e776ade1459d16b70a4dd193f9fb
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd
@@ -729,8 +729,7 @@ test/extractor-tests/generated/BreakExpr/BreakExpr.ql cdde2855d98f658187c60b9edc
test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql c7690a9aab1923bf3c2fb06f0a1d441d480b3c91ee1df3a868bbbd96c4042053 c592dd077fb6e22b2d6ddcaec37da2c5a26ba92d84f5d1ae4c78a615b9013765
test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql 0358f4fe6a66da56177703cf0e991042729c5e34ae8b6dccbb827f95fe936c72 1cb2dd778c50e19fe04c5fdf3a08a502635ea8303e71ff38d03aa7dc53213986
test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql ad83cc0db3c0f959fef6bb7ce0938d241a877e8cf84d15fb63879be2fe47238c 240b2fe2156b763d3a82fc64159615872db65b65ffb9ba2f3fd5d1ebd6c60f34
-test/extractor-tests/generated/CallExpr/CallExpr.ql cd38ec018b1afe9ae32ef94feca62295ad37c770c38b48a47bfb09697e7ee531 f6b0f2128cd5e63715f630c581d07b83678c298f7a7c56e38815e0d2c49ee36e
-test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 7d8d53ee4a0642f85d6bbfee6912fead699b5d117534d2b1803a670550894484 1782b33724b72afc9b7d99e3a52cacd4431ce1e12a7e43a7ac9872aad769b4ee
+test/extractor-tests/generated/CallExpr/CallExpr.ql ffb0cf1cb359a6dcbdf792a570c281e2d300779dca2dbc0f324990652adb972f 978a9e6c82758f9e8b334a682a02d6b893a6bf1db3cd85e9535839a9696b09b4
test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b022e7b6b6db9932e787e37b7760c6a09c91140a0368940374a2c919688e0488 c20849c96b53c96f6f717efff5e8b4c0e900c0ef5d715cfbaf7101c7056ad8f4
test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql 1ace458070875b9ff2c671c2ee18392ea7bf6e51b68ee98d412c8606e8eb8d33 4c35da8255d2975cef4adee15623662441bb8f2e1d73582e4c193d1bc11cc1b5
test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql 060a6c8b5b85c839b14fe96f9e50291a7a0e5662a945f4f337070f782ec76715 e9a1e44433936146d87be939aa160848b9a7d7333c36da601fb7d1a66d71eb59
@@ -740,11 +739,10 @@ test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28
test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql ab6b0a61adc404c89c0e2e1962236a8e703fdc5092512bb4a5d9995af8e13c7b 4e7f6b6f58a1ef34ed45e31e35154dd8dc59054ebedcaa87200c84cc727ef1dd
test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql 42516df87ac28c814d65f6739b2ede6eaa41c505d64756a3b8c7e0ca79895230 8b840f92ec033a4ef5edbe52bed909d8be0fffddf6d3e4bfaf9a8bc174fa2f2c
test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql 71010c43a78a7abe8e63c94353f4b7eb97aca011755d200e7087467c1e3b7a68 2c834328f783ec5032544a692f7e23975bac0228b52b9f8fde46ef46a5f22a5f
-test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 4d5f40935d07b0b24d77b93f56e9cea47666c5a3de84744641f9a4cb5d8d1319 b9a235c0a2d6a254d15f1fd1d0c8fdb6a7af51487b3826f26d8ca7a3b6cbc9b2
+test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql f25f9b32e5c0cd61e4b75053a5af4640a08b115ea5a4310ab95df450f6dfe1c4 9b731218857fa16776e29bce084c2ec1526b24e15f46d4f24047917d77d4646a
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f
-test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql c87b61e80dd62e031e8b310d8a4b781a468ecf2e5e81662be400f18bf33c5862 22abbc976a0e6f33c32c0e93cd0dd567cead13d82d561b9214275ea01b4a0573
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d
test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3
test/extractor-tests/generated/Comment/Comment.ql 5428b8417a737f88f0d55d87de45c4693d81f03686f03da11dc5369e163d977b 8948c1860cde198d49cff7c74741f554a9e89f8af97bb94de80f3c62e1e29244
@@ -834,7 +832,7 @@ test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql 27
test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql 634efdffaae4199aa9d95652cf081a8dc26e88224e24678845f8a67dc24ce090 d0302fee5c50403214771d5c6b896ba7c6e52be10c9bea59720ef2bb954e6f40
test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql 0d2140f84d0220b0c72c48c6bd272f4cfe1863d1797eddd16a6e238552a61e4d f4fe9b29697041e30764fa3dea44f125546bfb648f32c3474a1e922a4255c534
test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql 01ef27dd0bfab273e1ddc57ada0e079ece8a2bfd195ce413261006964b444093 acd0161f86010759417015c5b58044467a7f760f288ec4e8525458c54ae9a715
-test/extractor-tests/generated/Function/Function.ql b32c49f4371a51b9c217758fa5da2601d58bcbf3b195e7c8adb76bae5180d315 12e55c66a90ee88207c729736f388866cda13af78ea07a5d4e995c4a58a1e378
+test/extractor-tests/generated/Function/Function.ql 2efae1916e8f501668b3dbb2237cda788243fdd643683eda41b108dfdc578a90 6ec948518963985ec41b66e2b3b2b953e1da872dcd052a6d8c8f61c25bf09600
test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454
test/extractor-tests/generated/Function/Function_getAttr.ql 44067ee11bdec8e91774ff10de0704a8c5c1b60816d587378e86bf3d82e1f660 b4bebf9441bda1f2d1e34e9261e07a7468cbabf53cf8047384f3c8b11869f04e
test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql 17a346a9e5d28af99522520d1af3852db4cae01fb3d290a65c5f84d8d039c345 36fb06b55370828d9bc379cf5fad7f383cdb6f6db6f7377660276943ab0e1ec8
@@ -843,7 +841,6 @@ test/extractor-tests/generated/Function/Function_getCrateOrigin.ql acec761c56b38
test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql 0bcdca25bb92424007cea950409d73ba681e3ffbea53e0508f1d630fccfa8bed ff28c3349f5fc007d5f144e549579bd04870973c0fabef4198edce0fba0ef421
test/extractor-tests/generated/Function/Function_getGenericParamList.ql 0b255791c153b7cb03a64f1b9ab5beccc832984251f37516e1d06ce311e71c2b d200f90d4dd6f8dfd22ce49203423715d5bef27436c56ee553097c668e71c5a1
test/extractor-tests/generated/Function/Function_getName.ql 3d9e0518075d161213485389efe0adf8a9e6352dd1c6233ef0403a9abbcc7ed1 841e644ecefff7e9a82f458bcf14d9976d6a6dbe9191755ead88374d7c086375
-test/extractor-tests/generated/Function/Function_getParam.ql ef0b46453512fef08fbcc2a15bc14ae319bbc4810a4e4ce03a5ca3b1e8859ca7 ce36d3974059c1cd63eb1d6b76111985087f40dd4fe0c716a00aa9a178c712c4
test/extractor-tests/generated/Function/Function_getParamList.ql f888802ab00defb58de59cc39d1e0518e3884db7eaf845f39dfa55befdda58b2 ba0d1a07676f1c987b820a3d126a563ecf9a3d53ac1115b87a5af487a8a03c3e
test/extractor-tests/generated/Function/Function_getRetType.ql b3a1ab90c8ebf0543e5db6a415896e44a02f984321f49bc409aec2657298942b cdfa37772e5026febb19c9bcd0d325688b0fbf2f6e7bba424b73eca38b9b3e38
test/extractor-tests/generated/Function/Function_getVisibility.ql 490b0a369c809a757d4835b97becf617b0399f16a63a2b06258c9a227d5cc415 25ceff15d3cd03821e1cb2c04cb8894bcd101eeca62b66b54d1751b628107818
@@ -967,8 +964,7 @@ test/extractor-tests/generated/Meta/Meta.ql 16f163f00ba2bbaa0a8c6f3f6710c860a8f6
test/extractor-tests/generated/Meta/Meta_getExpr.ql ec9ec61f5be7d65c32775fb5c068daea04f9db7d875293ed99cc1b2481db041f 77a0c52f1cb6ddc8fdb294d637f9eda1b7301ffa3067f0fca6272d894f57d3ee
test/extractor-tests/generated/Meta/Meta_getPath.ql aa9d4145a4e613c51b6e4637d57e3b7d0f66e0bb88f4ce959d598870814c06bb 2087e00686d502c0e2e89c88eae0fb354463576a9ae4101320981d3fd79b9078
test/extractor-tests/generated/Meta/Meta_getTokenTree.ql 1051c27ffd0d9a20436d684fde529b9ff55abe30d50e1d575b0318951e75bd34 983975672d928fb907676628384c949731da9807bf0c781bb7ec749d25733d2d
-test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 85d3b8c794167f87840469e03d21aa00daf0998c28028f1c8848c7c4bd895db4 fa368ce4543c2544ecd2e636ade8d92849741226599290f59e0138a4a479357c
-test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 10a88c3bf63dfb26f43b9cd1ed7fceef0f436ce2eff4b5a816da369bf5b775d2 ee3b5043719591b4048ec32e21bb5fb3a9f83f0420ef18c338fc0ac28d0e3240
+test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql d141f5a2ef95019aa64e8cb384ab4a45e7a93c941b84ef2e14c13377f159e4db 47a68fc874af6cc9a4b278a5aab1633a9db17300fd7dbd6dbe193d48d99144bc
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96
test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql 655db9a0501b1ef20d604cc4cd9d708371781291443e8dec97b70ec2914601d2 2fc7df0eca22dcef2f9f5c86d37ee43452d372a4c0f9f4da0194828c82ba93e0
diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes
index 65c3aae0e9e..61c4fdc57e9 100644
--- a/rust/ql/.gitattributes
+++ b/rust/ql/.gitattributes
@@ -732,7 +732,6 @@
/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated
/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated
-/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql linguist-generated
@@ -746,7 +745,6 @@
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated
-/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated
/test/extractor-tests/generated/Comment/Comment.ql linguist-generated
@@ -845,7 +843,6 @@
/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getGenericParamList.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getName.ql linguist-generated
-/test/extractor-tests/generated/Function/Function_getParam.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getParamList.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getRetType.ql linguist-generated
/test/extractor-tests/generated/Function/Function_getVisibility.ql linguist-generated
@@ -970,7 +967,6 @@
/test/extractor-tests/generated/Meta/Meta_getPath.ql linguist-generated
/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated
-/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql linguist-generated
diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
index 36dd0fb304f..cfa37ed4539 100644
--- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
+++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll
@@ -722,21 +722,6 @@ module MakeCfgNodes Input> {
* Gets the number of attrs of this call expression base.
*/
int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
-
- /**
- * Gets the `index`th argument of this call expression base (0-based).
- */
- Expr getArg(int index) { result = node.getArg(index) }
-
- /**
- * Gets any of the arguments of this call expression base.
- */
- Expr getAnArg() { result = this.getArg(_) }
-
- /**
- * Gets the number of arguments of this call expression base.
- */
- int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) }
}
final private class ParentCastExpr extends ParentAstNode, CastExpr {
diff --git a/rust/ql/lib/codeql/rust/elements/Callable.qll b/rust/ql/lib/codeql/rust/elements/Callable.qll
index 11d029fff7d..c42262a1854 100644
--- a/rust/ql/lib/codeql/rust/elements/Callable.qll
+++ b/rust/ql/lib/codeql/rust/elements/Callable.qll
@@ -6,7 +6,6 @@
private import internal.CallableImpl
import codeql.rust.elements.AstNode
import codeql.rust.elements.Attr
-import codeql.rust.elements.Param
import codeql.rust.elements.ParamList
/**
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
index b78720b08fa..c916b717bf6 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll
@@ -28,7 +28,5 @@ module Impl {
class CallExprBase extends Generated::CallExprBase {
/** Gets the static target of this call, if any. */
Callable getStaticTarget() { none() } // overridden by subclasses, but cannot be made abstract
-
- override Expr getArg(int index) { result = this.getArgList().getArg(index) }
}
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
index 37e24a9150c..d10e4caedae 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
@@ -1,3 +1,4 @@
+// generated by codegen, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `Callable`.
*
@@ -15,7 +16,5 @@ module Impl {
/**
* A callable. Either a `Function` or a `ClosureExpr`.
*/
- class Callable extends Generated::Callable {
- override Param getParam(int index) { result = this.getParamList().getParam(index) }
- }
+ class Callable extends Generated::Callable { }
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
index 1d6364fb94f..046558c356d 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll
@@ -8,7 +8,6 @@ private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.ArgList
import codeql.rust.elements.Attr
-import codeql.rust.elements.Expr
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
/**
@@ -56,20 +55,5 @@ module Generated {
* Gets the number of attrs of this call expression base.
*/
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
-
- /**
- * Gets the `index`th argument of this call expression base (0-based).
- */
- Expr getArg(int index) { none() }
-
- /**
- * Gets any of the arguments of this call expression base.
- */
- final Expr getAnArg() { result = this.getArg(_) }
-
- /**
- * Gets the number of arguments of this call expression base.
- */
- final int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) }
}
}
diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
index f42f711dcf8..710cfe2078e 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Callable.qll
@@ -8,7 +8,6 @@ private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl
import codeql.rust.elements.Attr
-import codeql.rust.elements.Param
import codeql.rust.elements.ParamList
/**
@@ -54,20 +53,5 @@ module Generated {
* Gets the number of attrs of this callable.
*/
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
-
- /**
- * Gets the `index`th parameter of this callable (0-based).
- */
- Param getParam(int index) { none() }
-
- /**
- * Gets any of the parameters of this callable.
- */
- final Param getAParam() { result = this.getParam(_) }
-
- /**
- * Gets the number of parameters of this callable.
- */
- final int getNumberOfParams() { result = count(int i | exists(this.getParam(i))) }
}
}
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
index 8abf8b2a08e..cd043e88d1d 100644
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql
@@ -2,13 +2,12 @@
import codeql.rust.elements
import TestUtils
-from CallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs, string hasFunction
+from CallExpr x, string hasArgList, int getNumberOfAttrs, string hasFunction
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
- getNumberOfArgs = x.getNumberOfArgs() and
if x.hasFunction() then hasFunction = "yes" else hasFunction = "no"
-select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:",
- getNumberOfArgs, "hasFunction:", hasFunction
+select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasFunction:",
+ hasFunction
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
deleted file mode 100644
index 37483c3e637..00000000000
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql
+++ /dev/null
@@ -1,7 +0,0 @@
-// generated by codegen, do not edit
-import codeql.rust.elements
-import TestUtils
-
-from CallExpr x, int index
-where toBeTested(x) and not x.isUnknown()
-select x, index, x.getArg(index)
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
index 6a5536c5be1..b4b3dddc679 100644
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql
@@ -3,15 +3,13 @@ import codeql.rust.elements
import TestUtils
from
- ClosureExpr x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams, string hasBody,
- string hasClosureBinder, string isAsync, string isConst, string isGen, string isMove,
- string isStatic, string hasRetType
+ ClosureExpr x, string hasParamList, int getNumberOfAttrs, string hasBody, string hasClosureBinder,
+ string isAsync, string isConst, string isGen, string isMove, string isStatic, string hasRetType
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
- getNumberOfParams = x.getNumberOfParams() and
(if x.hasBody() then hasBody = "yes" else hasBody = "no") and
(if x.hasClosureBinder() then hasClosureBinder = "yes" else hasClosureBinder = "no") and
(if x.isAsync() then isAsync = "yes" else isAsync = "no") and
@@ -20,7 +18,6 @@ where
(if x.isMove() then isMove = "yes" else isMove = "no") and
(if x.isStatic() then isStatic = "yes" else isStatic = "no") and
if x.hasRetType() then hasRetType = "yes" else hasRetType = "no"
-select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs,
- "getNumberOfParams:", getNumberOfParams, "hasBody:", hasBody, "hasClosureBinder:",
- hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen, "isMove:", isMove,
- "isStatic:", isStatic, "hasRetType:", hasRetType
+select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody,
+ "hasClosureBinder:", hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen,
+ "isMove:", isMove, "isStatic:", isStatic, "hasRetType:", hasRetType
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
deleted file mode 100644
index 06cef03f206..00000000000
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql
+++ /dev/null
@@ -1,7 +0,0 @@
-// generated by codegen, do not edit
-import codeql.rust.elements
-import TestUtils
-
-from ClosureExpr x, int index
-where toBeTested(x) and not x.isUnknown()
-select x, index, x.getParam(index)
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.ql b/rust/ql/test/extractor-tests/generated/Function/Function.ql
index cd9875a2373..3c368187c29 100644
--- a/rust/ql/test/extractor-tests/generated/Function/Function.ql
+++ b/rust/ql/test/extractor-tests/generated/Function/Function.ql
@@ -3,17 +3,15 @@ import codeql.rust.elements
import TestUtils
from
- Function x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams,
- string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion,
- string hasAbi, string hasBody, string hasGenericParamList, string isAsync, string isConst,
- string isDefault, string isGen, string isUnsafe, string hasName, string hasRetType,
- string hasVisibility, string hasWhereClause
+ Function x, string hasParamList, int getNumberOfAttrs, string hasExtendedCanonicalPath,
+ string hasCrateOrigin, string hasAttributeMacroExpansion, string hasAbi, string hasBody,
+ string hasGenericParamList, string isAsync, string isConst, string isDefault, string isGen,
+ string isUnsafe, string hasName, string hasRetType, string hasVisibility, string hasWhereClause
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
- getNumberOfParams = x.getNumberOfParams() and
(
if x.hasExtendedCanonicalPath()
then hasExtendedCanonicalPath = "yes"
@@ -38,9 +36,8 @@ where
(if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and
if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no"
select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs,
- "getNumberOfParams:", getNumberOfParams, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath,
- "hasCrateOrigin:", hasCrateOrigin, "hasAttributeMacroExpansion:", hasAttributeMacroExpansion,
- "hasAbi:", hasAbi, "hasBody:", hasBody, "hasGenericParamList:", hasGenericParamList, "isAsync:",
- isAsync, "isConst:", isConst, "isDefault:", isDefault, "isGen:", isGen, "isUnsafe:", isUnsafe,
- "hasName:", hasName, "hasRetType:", hasRetType, "hasVisibility:", hasVisibility,
- "hasWhereClause:", hasWhereClause
+ "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin,
+ "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasAbi:", hasAbi, "hasBody:", hasBody,
+ "hasGenericParamList:", hasGenericParamList, "isAsync:", isAsync, "isConst:", isConst,
+ "isDefault:", isDefault, "isGen:", isGen, "isUnsafe:", isUnsafe, "hasName:", hasName,
+ "hasRetType:", hasRetType, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
deleted file mode 100644
index c936ea99da7..00000000000
--- a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql
+++ /dev/null
@@ -1,7 +0,0 @@
-// generated by codegen, do not edit
-import codeql.rust.elements
-import TestUtils
-
-from Function x, int index
-where toBeTested(x) and not x.isUnknown()
-select x, index, x.getParam(index)
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
index 518d3dee36e..d0b082f4523 100644
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql
@@ -3,15 +3,13 @@ import codeql.rust.elements
import TestUtils
from
- MethodCallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs,
- string hasResolvedPath, string hasResolvedCrateOrigin, string hasGenericArgList,
- string hasIdentifier, string hasReceiver
+ MethodCallExpr x, string hasArgList, int getNumberOfAttrs, string hasResolvedPath,
+ string hasResolvedCrateOrigin, string hasGenericArgList, string hasIdentifier, string hasReceiver
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and
getNumberOfAttrs = x.getNumberOfAttrs() and
- getNumberOfArgs = x.getNumberOfArgs() and
(if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and
(
if x.hasResolvedCrateOrigin()
@@ -21,7 +19,6 @@ where
(if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and
(if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and
if x.hasReceiver() then hasReceiver = "yes" else hasReceiver = "no"
-select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:",
- getNumberOfArgs, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:",
- hasResolvedCrateOrigin, "hasGenericArgList:", hasGenericArgList, "hasIdentifier:", hasIdentifier,
- "hasReceiver:", hasReceiver
+select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasResolvedPath:",
+ hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, "hasGenericArgList:",
+ hasGenericArgList, "hasIdentifier:", hasIdentifier, "hasReceiver:", hasReceiver
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
deleted file mode 100644
index 58529cebfe5..00000000000
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql
+++ /dev/null
@@ -1,7 +0,0 @@
-// generated by codegen, do not edit
-import codeql.rust.elements
-import TestUtils
-
-from MethodCallExpr x, int index
-where toBeTested(x) and not x.isUnknown()
-select x, index, x.getArg(index)
diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py
index 1311522fca0..c6ab581d7ca 100644
--- a/rust/schema/annotations.py
+++ b/rust/schema/annotations.py
@@ -226,7 +226,6 @@ class CallExprBase(Expr):
"""
arg_list: optional["ArgList"] | child
attrs: list["Attr"] | child
- args: list["Expr"] | synth
@annotate(CallExpr, replace_bases={Expr: CallExprBase}, cfg=True)
diff --git a/rust/schema/prelude.py b/rust/schema/prelude.py
index 62334b2d864..6d356567d22 100644
--- a/rust/schema/prelude.py
+++ b/rust/schema/prelude.py
@@ -73,7 +73,6 @@ class Callable(AstNode):
"""
param_list: optional["ParamList"] | child
attrs: list["Attr"] | child
- params: list["Param"] | synth
class Addressable(AstNode):
From b6aa6921b3e07724289d0e9fcaea2f7c1472de8f Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:43:02 +0200
Subject: [PATCH 021/213] Revert "Rust: accept test changes"
This reverts commit 9c2fea914ecb595caa59ba6c904fb6e1c2a78ea1.
---
.../generated/CallExpr/CallExpr.expected | 8 ++++----
.../generated/CallExpr/CallExpr_getArg.expected | 4 ----
.../generated/ClosureExpr/ClosureExpr.expected | 10 +++++-----
.../ClosureExpr/ClosureExpr_getParam.expected | 6 ------
.../generated/Function/Function.expected | 4 ++--
.../generated/Function/Function_getParam.expected | 1 -
.../generated/MethodCallExpr/MethodCallExpr.expected | 4 ++--
.../MethodCallExpr/MethodCallExpr_getArg.expected | 2 --
8 files changed, 13 insertions(+), 26 deletions(-)
delete mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
delete mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
delete mode 100644 rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
delete mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
index 31824b731a6..ebe6eeda104 100644
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected
@@ -1,4 +1,4 @@
-| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
-| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
-| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
-| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes |
+| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
+| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
+| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
+| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasFunction: | yes |
diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
deleted file mode 100644
index 2bf84953410..00000000000
--- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-| gen_call_expr.rs:5:5:5:11 | foo(...) | 0 | gen_call_expr.rs:5:9:5:10 | 42 |
-| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | 0 | gen_call_expr.rs:6:21:6:22 | 42 |
-| gen_call_expr.rs:7:5:7:14 | ...(...) | 0 | gen_call_expr.rs:7:12:7:13 | 42 |
-| gen_call_expr.rs:8:5:8:10 | foo(...) | 0 | gen_call_expr.rs:8:9:8:9 | 1 |
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
index d8a9b33ce0e..3ea9f463a00 100644
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected
@@ -1,5 +1,5 @@
-| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes |
-| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 2 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
-| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no |
+| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes |
+| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no |
+| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no |
diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
deleted file mode 100644
index 29be6ae9ef0..00000000000
--- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | 0 | gen_closure_expr.rs:5:6:5:6 | ... |
-| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | 0 | gen_closure_expr.rs:6:11:6:16 | ...: i32 |
-| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 0 | gen_closure_expr.rs:7:12:7:17 | ...: i32 |
-| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 1 | gen_closure_expr.rs:7:20:7:20 | ... |
-| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:9:6:9:6 | ... |
-| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:11:14:11:14 | ... |
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.expected b/rust/ql/test/extractor-tests/generated/Function/Function.expected
index 117aad5d293..d30ef684493 100644
--- a/rust/ql/test/extractor-tests/generated/Function/Function.expected
+++ b/rust/ql/test/extractor-tests/generated/Function/Function.expected
@@ -1,2 +1,2 @@
-| gen_function.rs:3:1:4:38 | fn foo | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | yes | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no |
-| gen_function.rs:7:5:7:13 | fn bar | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | no | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no |
+| gen_function.rs:3:1:4:38 | fn foo | hasParamList: | yes | getNumberOfAttrs: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | yes | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no |
+| gen_function.rs:7:5:7:13 | fn bar | hasParamList: | yes | getNumberOfAttrs: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | no | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no |
diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
deleted file mode 100644
index 6a7340509a7..00000000000
--- a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected
+++ /dev/null
@@ -1 +0,0 @@
-| gen_function.rs:3:1:4:38 | fn foo | 0 | gen_function.rs:4:8:4:13 | ...: u32 |
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
index 516e47d8b39..5862cd94081 100644
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
+++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected
@@ -1,2 +1,2 @@
-| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasReceiver: | yes |
-| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasIdentifier: | yes | hasReceiver: | yes |
+| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasReceiver: | yes |
+| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasIdentifier: | yes | hasReceiver: | yes |
diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
deleted file mode 100644
index 36af4e22c50..00000000000
--- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 |
-| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 |
From 02c11b10af88a76615a92ec04d413460ed7c67b9 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:43:35 +0200
Subject: [PATCH 022/213] Revert "Rust: rerun codegen"
This reverts commit f647b3316634cc841273bdecfeedb664003b9e94.
---
rust/ql/.generated.list | 1 +
rust/ql/.gitattributes | 1 +
rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll | 1 -
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list
index 47d78780687..eb60dccb3e6 100644
--- a/rust/ql/.generated.list
+++ b/rust/ql/.generated.list
@@ -240,6 +240,7 @@ lib/codeql/rust/elements/internal/BlockExprImpl.qll 36ac09e4a6eeeec22919b62b1d00
lib/codeql/rust/elements/internal/BoxPatConstructor.qll 153f110ba25fd6c889092bfd16f73bb610fa60d6e0c8965d5f44d2446fcd48a2 9324cf0d8aa29945551bf8ab64801d598f57aab8cd4e19bcd4e9ef8a4a4e06eb
lib/codeql/rust/elements/internal/BreakExprConstructor.qll 356be043c28e0b34fdf925a119c945632ee883c6f5ebb9a27003c6a8d250afd9 bb77e66b04bb9489340e7506931559b94285c6904b6f9d2f83b214cba4f3cfd5
lib/codeql/rust/elements/internal/CallExprConstructor.qll 742b38e862e2cf82fd1ecc4d4fc5b4782a9c7c07f031452b2bae7aa59d5aa13a cad6e0a8be21d91b20ac2ec16cab9c30eae810b452c0f1992ed87d5c7f4144dc
+lib/codeql/rust/elements/internal/CallableImpl.qll 917a7d298583e15246428f32fba4cde6fc57a1790262731be27a96baddd8cf5e c5c0848024e0fe3fbb775e7750cf1a2c2dfa454a5aef0df55fec3d0a6fe99190
lib/codeql/rust/elements/internal/CastExprConstructor.qll f3d6e10c4731f38a384675aeab3fba47d17b9e15648293787092bb3247ed808d d738a7751dbadb70aa1dcffcf8af7fa61d4cf8029798369a7e8620013afff4ed
lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll 6e376ab9d40308e95bcdaf1cc892472c92099d477720192cd382d2c4e0d9c8a1 60a0efe50203ad5bb97bdfc06d602182edcc48ac9670f2d27a9675bd9fd8e19f
lib/codeql/rust/elements/internal/ClosureBinderImpl.qll 9f6ce7068b5c17df44f00037ebb42e6c8fdbbbd09bf89951221fb04f378fbdf1 6e6e372e151fe0b0f17a5ea0ed774553b6ed0bf53e1d377e5ed24a0f98529735
diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes
index 61c4fdc57e9..3326912c0ca 100644
--- a/rust/ql/.gitattributes
+++ b/rust/ql/.gitattributes
@@ -242,6 +242,7 @@
/lib/codeql/rust/elements/internal/BoxPatConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/BreakExprConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/CallExprConstructor.qll linguist-generated
+/lib/codeql/rust/elements/internal/CallableImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/CastExprConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll linguist-generated
diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
index d10e4caedae..d604b4d239f 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/CallableImpl.qll
@@ -12,7 +12,6 @@ private import codeql.rust.elements.internal.generated.Callable
* be referenced directly.
*/
module Impl {
- // the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A callable. Either a `Function` or a `ClosureExpr`.
*/
From 902a421c23a193007aa8beb175a5570bbb390343 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 10 Jun 2025 09:47:15 +0200
Subject: [PATCH 023/213] Rust: fix docs with `getArgList` and `getParamList`
---
.../analyzing-data-flow-in-rust.rst | 92 +++++--------------
1 file changed, 25 insertions(+), 67 deletions(-)
diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
index 3f6a18e4283..42eabf710f0 100644
--- a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
+++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
@@ -112,7 +112,7 @@ This query finds the argument passed in each call to ``File::create``:
from CallExpr call
where call.getStaticTarget().(Function).getCanonicalPath() = "::create"
- select call.getArg(0)
+ select call.getArgList().getArg(0)
Unfortunately this will only give the expression in the argument, not the values which could be passed to it.
So we use local data flow to find all expressions that flow into the argument:
@@ -125,7 +125,7 @@ So we use local data flow to find all expressions that flow into the argument:
from CallExpr call, DataFlow::ExprNode source, DataFlow::ExprNode sink
where
call.getStaticTarget().(Function).getCanonicalPath() = "::create" and
- sink.asExpr().getExpr() = call.getArg(0) and
+ sink.asExpr().getExpr() = call.getArgList().getArg(0) and
DataFlow::localFlow(source, sink)
select source, sink
@@ -136,30 +136,12 @@ We can vary the source, for example, making the source the parameter of a functi
import rust
import codeql.rust.dataflow.DataFlow
- from CallExpr call, Method method, ParamDecl sourceParam, Expr sinkExpr
+ from CallExpr call, DataFlow::ParameterNode source, DataFlow::ExprNode sink
where
- call.getStaticTarget() = method and
- method.hasQualifiedName("String", "init(format:_:)") and
- sinkExpr = call.getArgument(0).getExpr() and
- DataFlow::localFlow(DataFlow::parameterNode(sourceParam), DataFlow::exprNode(sinkExpr))
- select sourceParam, sinkExpr
-
-The following example finds calls to ``String.init(format:_:)`` where the format string is not a hard-coded string literal:
-
-.. code-block:: ql
-
- import rust
- import codeql.rust.dataflow.DataFlow
-
- from CallExpr call, Method method, DataFlow::Node sinkNode
- where
- call.getStaticTarget() = method and
- method.hasQualifiedName("String", "init(format:_:)") and
- sinkNode.asExpr() = call.getArgument(0).getExpr() and
- not exists(StringLiteralExpr sourceLiteral |
- DataFlow::localFlow(DataFlow::exprNode(sourceLiteral), sinkNode)
- )
- select call, "Format argument to " + method.getName() + " isn't hard-coded."
+ call.getStaticTarget().(Function).getCanonicalPath() = "::create" and
+ sink.asExpr().getExpr() = call.getArgList().getArg(0) and
+ DataFlow::localFlow(source, sink)
+ select source, sink
Global data flow
----------------
@@ -242,54 +224,30 @@ The following global taint-tracking query finds places where a string literal is
.. code-block:: ql
- import rust
- import codeql.rust.dataflow.DataFlow
- import codeql.rust.dataflow.TaintTracking
+ import rust
+ import codeql.rust.dataflow.DataFlow
+ import codeql.rust.dataflow.TaintTracking
- module ConstantPasswordConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node node) { node.asExpr() instanceof StringLiteralExpr }
+ module ConstantPasswordConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
- predicate isSink(DataFlow::Node node) {
- // any argument called `password`
- exists(CallExpr call | call.getArgumentWithLabel("password").getExpr() = node.asExpr())
- }
+ predicate isSink(DataFlow::Node node) {
+ // any argument going to a parameter called `password`
+ exists(Function f, CallExpr call, int index |
+ call.getArgList().getArg(index) = node.asExpr().getExpr() and
+ call.getStaticTarget() = f and
+ f.getParamList().getParam(index).getPat().(IdentPat).getName().getText() = "password"
+ )
+ }
+ }
- module ConstantPasswordFlow = TaintTracking::Global;
+ module ConstantPasswordFlow = TaintTracking::Global;
- from DataFlow::Node sourceNode, DataFlow::Node sinkNode
- where ConstantPasswordFlow::flow(sourceNode, sinkNode)
- select sinkNode, "The value $@ is used as a constant password.", sourceNode, sourceNode.toString()
+ from DataFlow::Node sourceNode, DataFlow::Node sinkNode
+ where ConstantPasswordFlow::flow(sourceNode, sinkNode)
+ select sinkNode, "The value $@ is used as a constant password.", sourceNode, sourceNode.toString()
-The following global taint-tracking query finds places where a value from a remote or local user input is used as an argument to the SQLite ``Connection.execute(_:)`` function.
- - Since this is a taint-tracking query, the ``TaintTracking::Global`` module is used.
- - The ``isSource`` predicate defines sources as a ``FlowSource`` (remote or local user input).
- - The ``isSink`` predicate defines sinks as the first argument in any call to ``Connection.execute(_:)``.
-
-.. code-block:: ql
-
- import rust
- import codeql.rust.dataflow.DataFlow
- import codeql.rust.dataflow.TaintTracking
- import codeql.rust.dataflow.FlowSources
-
- module SqlInjectionConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node node) { node instanceof FlowSource }
-
- predicate isSink(DataFlow::Node node) {
- exists(CallExpr call |
- call.getStaticTarget().(Method).hasQualifiedName("Connection", "execute(_:)") and
- call.getArgument(0).getExpr() = node.asExpr()
- )
- }
- }
-
- module SqlInjectionFlow = TaintTracking::Global;
-
- from DataFlow::Node sourceNode, DataFlow::Node sinkNode
- where SqlInjectionFlow::flow(sourceNode, sinkNode)
- select sinkNode, "This query depends on a $@.", sourceNode, "user-provided value"
-
Further reading
---------------
From f08c2fa3875a0898e875dbeac327db690934f07a Mon Sep 17 00:00:00 2001
From: Taus
Date: Tue, 10 Jun 2025 12:58:16 +0000
Subject: [PATCH 024/213] JavaScript: Move tsconfig files into
`extractor.tsconfig` package
Also make the indentation in `CompilerOptions.java` more consistent.
---
.../js/dependencies/tsconfig/CompilerOptions.java | 13 -------------
.../src/com/semmle/js/extractor/AutoBuild.java | 4 ++--
.../js/extractor/tsconfig/CompilerOptions.java | 13 +++++++++++++
.../tsconfig/TsConfigJson.java | 2 +-
4 files changed, 16 insertions(+), 16 deletions(-)
delete mode 100644 javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
create mode 100644 javascript/extractor/src/com/semmle/js/extractor/tsconfig/CompilerOptions.java
rename javascript/extractor/src/com/semmle/js/{dependencies => extractor}/tsconfig/TsConfigJson.java (85%)
diff --git a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java b/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
deleted file mode 100644
index 63bec753ac9..00000000000
--- a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/CompilerOptions.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.semmle.js.dependencies.tsconfig;
-
-public class CompilerOptions {
- private String outDir;
-
- public String getOutDir() {
- return outDir;
- }
-
- public void setOutDir(String outDir) {
- this.outDir = outDir;
- }
-}
diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
index b8105db6b39..661f315bf4a 100644
--- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
@@ -39,8 +39,8 @@ import java.util.stream.Stream;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
-import com.semmle.js.dependencies.tsconfig.TsConfigJson;
-import com.semmle.js.dependencies.tsconfig.CompilerOptions;
+import com.semmle.js.extractor.tsconfig.TsConfigJson;
+import com.semmle.js.extractor.tsconfig.CompilerOptions;
import com.semmle.js.dependencies.AsyncFetcher;
import com.semmle.js.dependencies.DependencyResolver;
import com.semmle.js.dependencies.packument.PackageJson;
diff --git a/javascript/extractor/src/com/semmle/js/extractor/tsconfig/CompilerOptions.java b/javascript/extractor/src/com/semmle/js/extractor/tsconfig/CompilerOptions.java
new file mode 100644
index 00000000000..fa7b664f2eb
--- /dev/null
+++ b/javascript/extractor/src/com/semmle/js/extractor/tsconfig/CompilerOptions.java
@@ -0,0 +1,13 @@
+package com.semmle.js.extractor.tsconfig;
+
+public class CompilerOptions {
+ private String outDir;
+
+ public String getOutDir() {
+ return outDir;
+ }
+
+ public void setOutDir(String outDir) {
+ this.outDir = outDir;
+ }
+}
diff --git a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java b/javascript/extractor/src/com/semmle/js/extractor/tsconfig/TsConfigJson.java
similarity index 85%
rename from javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java
rename to javascript/extractor/src/com/semmle/js/extractor/tsconfig/TsConfigJson.java
index 08dbe663139..9e12d5cc0aa 100644
--- a/javascript/extractor/src/com/semmle/js/dependencies/tsconfig/TsConfigJson.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/tsconfig/TsConfigJson.java
@@ -1,4 +1,4 @@
-package com.semmle.js.dependencies.tsconfig;
+package com.semmle.js.extractor.tsconfig;
public class TsConfigJson {
private CompilerOptions compilerOptions;
From e3d9d92f25d23f5d102e7234be09e1c8cf30b9bd Mon Sep 17 00:00:00 2001
From: Taus
Date: Tue, 10 Jun 2025 12:59:03 +0000
Subject: [PATCH 025/213] JavaScript: Fix duplicate comment
---
javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
index 661f315bf4a..f96211bd5c4 100644
--- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
+++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java
@@ -747,7 +747,7 @@ public class AutoBuild {
.filter(p -> !isFileTooLarge(p))
.sorted(PATH_ORDERING)
.collect(Collectors.toCollection(() -> new LinkedHashSet<>()));
- // exclude files in output directories as configured in tsconfig.json
+ // gather all output directories specified in tsconfig.json files
final List outDirs = new ArrayList<>();
for (Path cfg : tsconfigFiles) {
try {
From c8a5418969f0e2542de98ae38a2607818b4f2dea Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 11 Jun 2025 12:03:17 +0100
Subject: [PATCH 026/213] Remove trailing spaces and extra blank lines
---
docs/query-help-style-guide.md | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/query-help-style-guide.md b/docs/query-help-style-guide.md
index 88b9844fc22..12f1b5c3f10 100644
--- a/docs/query-help-style-guide.md
+++ b/docs/query-help-style-guide.md
@@ -16,7 +16,7 @@ When you contribute a new [supported query](supported-queries.md) to this reposi
### Location and file name
-Query help files must have the same base name as the query they describe and must be located in the same directory.
+Query help files must have the same base name as the query they describe and must be located in the same directory.
### File structure and layout
@@ -42,7 +42,6 @@ Section-level elements are used to group the information within the query help f
For further information about the other section-level, block, list and table elements supported by query help files, see [Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/) on codeql.github.com.
-
## English style
You should write the overview and recommendation elements in simple English that is easy to follow. You should:
@@ -98,7 +97,6 @@ If you are citing an academic paper, we recommend adopting the reference style o
>S. R. Chidamber and C. F. Kemerer, _A metrics suite for object-oriented design_. IEEE Transactions on Software Engineering, 20(6):476-493, 1994.
-
### Websites
If you are citing a website, please use the following format, without breadcrumb trails:
@@ -154,13 +152,13 @@ later. For example, it's easy to see at a glance which part of the code is in th
scope of an if statement, and adding more statements to the body of the if
statement is less error-prone.
-You should also ensure that the indentation of the code is consistent with the actual flow of
+
You should also ensure that the indentation of the code is consistent with the actual flow of
control, so that it does not confuse programmers.
-In the example below, the original version of Cart is missing braces. This means
+
In the example below, the original version of Cart is missing braces. This means
that the code triggers a NullPointerException at runtime if i
is null.
From 25adcc8f4abe65ef57efafe0b9bf896894260f9d Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 11 Jun 2025 12:10:29 +0100
Subject: [PATCH 027/213] Add Markdown format to guide
---
docs/query-help-style-guide.md | 138 +++++++++++++++++++++++++++++----
1 file changed, 122 insertions(+), 16 deletions(-)
diff --git a/docs/query-help-style-guide.md b/docs/query-help-style-guide.md
index 12f1b5c3f10..d05abba9404 100644
--- a/docs/query-help-style-guide.md
+++ b/docs/query-help-style-guide.md
@@ -20,7 +20,23 @@ Query help files must have the same base name as the query they describe and mus
### File structure and layout
-Query help files are written using a custom XML format, and stored in a file with a `.qhelp` extension. The basic structure is as follows:
+Query help files can be written in either a custom XML format (with a `.qhelp` extension) or in Markdown (with a `.md` extension). Both formats are supported by the CodeQL documentation tooling.
+
+#### Markdown query help files
+
+A Markdown query help file should use the following structure and section order:
+
+1. **Overview** (level 2 heading, `## Overview`)
+2. **Recommendation** (level 2 heading, `## Recommendation`)
+3. **Example** (level 2 heading, `## Example`)
+4. **Implementation notes** (optional, level 2 heading, `## Implementation notes`)
+5. **References** (level 2 heading, `## References`)
+
+Each section should be clearly marked with the appropriate heading. See the other Markdown files in this repository for examples.
+
+#### XML query help files
+
+Query help files can also be written using a custom XML format, and stored in a file with a `.qhelp` extension. The basic structure is as follows:
```xml
@@ -33,7 +49,7 @@ The header and single top-level `` element are both mandatory.
### Section-level elements
-Section-level elements are used to group the information within the query help file. All query help files should include at least the following section elements, in the order specified:
+Section-level elements are used to group the information within the query help file. For both Markdown and XML formats, the following sections should be included, in the order specified:
1. `overview`—a short summary of the issue that the query identifies, including an explanation of how it could affect the behavior of the program.
2. `recommendation`—information on how to fix the issue highlighted by the query.
@@ -44,7 +60,7 @@ For further information about the other section-level, block, list and table ele
## English style
-You should write the overview and recommendation elements in simple English that is easy to follow. You should:
+You should write the overview and recommendation sections in simple English that is easy to follow. You should:
* Use simple sentence structures and avoid complex or academic language.
* Avoid colloquialisms and contractions.
@@ -56,10 +72,11 @@ You should write the overview and recommendation elements in simple English that
Whenever possible, you should include a code example that helps to explain the issue you are highlighting. Any code examples that you include should adhere to the following guidelines:
* The example should be less than 20 lines, but it should still clearly illustrate the issue that the query identifies. If appropriate, then the example may also be runnable.
-* Put the code example after the recommendation element where possible. Only include an example in the description element if absolutely necessary.
+* Put the code example after the recommendation section where possible. Only include an example in the description section if absolutely necessary.
* If you are using an example to illustrate the solution to a problem, and the change required is minor, avoid repeating the whole example. It is preferable to either describe the change required or to include a smaller snippet of the corrected code.
* Clearly indicate which of the samples is an example of bad coding practice and which is recommended practice.
-* Define the code examples in `src` files. The language is inferred from the file extension:
+* For Markdown files, use fenced code blocks with the appropriate language identifier (for example, ```java ).
+* For XML files, define the code examples in `src` files. The language is inferred from the file extension:
```xml
@@ -73,11 +90,11 @@ Whenever possible, you should include a code example that helps to explain the i
```
-Note, if any code words are included in the `overview` and `recommendation` sections, they should be formatted with ` ... ` for emphasis.
+Note, if any code words are included in the `overview` and `recommendation` sections, in Markdown they should be formatted with backticks (`...`) and in XML they should be formatted with` ... ` for emphasis.
## Including references
-You should include one or more references, list formatted with ` ... ` for each item, to provide further information about the problem that your query is designed to find. References can be of the following types:
+You should include one or more references, formatted as an unordered list (`- ...` or `* ...`) in Markdown or with ` ... ` for each item in XML, to provide further information about the problem that your query is designed to find. References can be of the following types:
### Books
@@ -89,7 +106,7 @@ For example:
>W. C. Wake, _Refactoring Workbook_, pp. 93 – 94, Addison-Wesley Professional, 2004.
-Note, & symbols need to be replaced by \&. The symbol will be displayed correctly in the HTML files generated from the query help files.
+Note, & symbols need to be replaced by \& in XML. The symbol will be displayed correctly in the HTML files generated from the query help files.
### Academic papers
@@ -111,26 +128,115 @@ For example:
If your query checks code for a CWE weakness, you should use the `@tags` element in the query file to reference the associated CWEs, as explained [here](query-metadata-style-guide.md). When you use these tags, a link to the appropriate entry from the [MITRE.org](https://cwe.mitre.org/scoring/index.html) site will automatically appear as a reference in the output HTML file.
-## Validating qhelp files
+## Validating query help files
-Before making a pull request, please ensure the `.qhelp` files are well-formed and can be generated without errors. This can be done locally with the CodeQL CLI, as shown in the following example:
+Before making a pull request, please ensure the `.qhelp` or `.md` files are well-formed and can be generated without errors. This can be done locally with the CodeQL CLI, as shown in the following example:
```bash
# codeql generate query-help --format=
# For example:
codeql generate query-help ./myCustomQuery.qhelp --format=markdown
+codeql generate query-help ./myCustomQuery.md --format=markdown
```
+Please include the query help files (and any associated code snippets) in your pull request, but do not commit the generated Markdown.
-Please include the `.qhelp` files (and any associated code snippets) in your pull request, but do not commit the generated Markdown.
-
-More information on how to test your `.qhelp` files can be found [within the documentation](https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files)
+More information on how to test your query help files can be found [within the documentation](https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files)
## Query help example
-The following example is a query help file for a query from the standard query suite for Java:
+The following example is a query help file for a query from the standard query suite for Java, shown in both Markdown and XML formats.
-```xml
+### Markdown example
+
+````markdown
+# Overview
+
+A control structure (an `if` statement or a loop) has a body that is either a block
+of statements surrounded by curly braces or a single statement.
+
+If you omit braces, it is particularly important to ensure that the indentation of the code
+matches the control flow of the code.
+
+## Recommendation
+
+It is usually considered good practice to include braces for all control
+structures in Java. This is because it makes it easier to maintain the code
+later. For example, it's easy to see at a glance which part of the code is in the
+scope of an `if` statement, and adding more statements to the body of the `if`
+statement is less error-prone.
+
+You should also ensure that the indentation of the code is consistent with the actual flow of
+control, so that it does not confuse programmers.
+
+## Example
+
+In the example below, the original version of `Cart` is missing braces. This means
+that the code triggers a `NullPointerException` at runtime if `i`
+is `null`.
+
+```java
+class Cart {
+ Map items = ...
+ public void addItem(Item i) {
+ // No braces and misleading indentation.
+ if (i != null)
+ log("Adding item: " + i);
+ // Indentation suggests that the following statements
+ // are in the body of the 'if'.
+ Integer curQuantity = items.get(i.getID());
+ if (curQuantity == null) curQuantity = 0;
+ items.put(i.getID(), curQuantity+1);
+ }
+}
+```
+
+The corrected version of `Cart` does include braces, so
+that the code executes as the indentation suggests.
+
+```java
+class Cart {
+ Map items = ...
+ public void addItem(Item i) {
+ // Braces included.
+ if (i != null) {
+ log("Adding item: " + i);
+ Integer curQuantity = items.get(i.getID());
+ if (curQuantity == null) curQuantity = 0;
+ items.put(i.getID(), curQuantity+1);
+ }
+ }
+}
+```
+
+In the following example the indentation may or may not be misleading depending on your tab width
+settings. As such, mixing tabs and spaces in this way is not recommended, since what looks fine in
+one context can be very misleading in another.
+
+```java
+// Tab width 8
+ if (b) // Indentation: 1 tab
+ f(); // Indentation: 2 tabs
+ g(); // Indentation: 8 spaces
+
+// Tab width 4
+ if (b) // Indentation: 1 tab
+ f(); // Indentation: 2 tabs
+ g(); // Indentation: 8 spaces
+```
+
+If you mix tabs and spaces in this way, then you might get seemingly false positives, since your
+tab width settings cannot be taken into account.
+
+## References
+
+* Java SE Documentation: [Compound Statements](https://www.oracle.com/java/technologies/javase/codeconventions-statements.html#15395)
+* Wikipedia: [Indentation style](https://en.wikipedia.org/wiki/Indentation_style)
+````
+
+### XML example
+
+````xml
@@ -196,4 +302,4 @@ tab width settings cannot be taken into account.
-```
+````
From 7292a76ee485d5a203bd68854403f3bdcf1819f2 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 12 Jun 2025 13:38:48 +0200
Subject: [PATCH 028/213] JS: add test cases for false positives in
`loop-iteration-skipped-due-to-shifting`
---
...LoopIterationSkippedDueToShifting.expected | 3 +++
.../LoopIterationSkippedDueToShifting/tst.js | 25 +++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
index 4b7becd8e16..a11ea4d7d40 100644
--- a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
+++ b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
@@ -1,3 +1,6 @@
| tst.js:4:27:4:44 | parts.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
| tst.js:13:29:13:46 | parts.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
| tst.js:24:9:24:26 | parts.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
+| tst.js:128:11:128:33 | pending ... e(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
+| tst.js:136:32:136:47 | toc.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
+| tst.js:143:10:143:25 | toc.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
diff --git a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
index 68c50516da0..1f23604d76a 100644
--- a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
+++ b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
@@ -121,3 +121,28 @@ function inspectNextElement(string) {
}
return parts.join('/');
}
+
+function withTryCatch(pendingCSS) {
+ for (let i = 0; i < pendingCSS.length; ++i) {
+ try {
+ pendingCSS.splice(i, 1); // $ SPURIOUS:Alert
+ i -= 1;
+ } catch (ex) {}
+ }
+}
+
+function andOperand(toc) {
+ for (let i = 0; i < toc.length; i++) {
+ toc[i].ignoreSubHeading && toc.splice(i, 1) && i--; // $ SPURIOUS:Alert
+ }
+}
+
+function ifStatement(toc) {
+ for (let i = 0; i < toc.length; i++) {
+ if(toc[i].ignoreSubHeading){
+ if(toc.splice(i, 1)){ // $ SPURIOUS:Alert
+ i--;
+ }
+ }
+ }
+}
From 66d66fe87d58496354010faf3372792769522ee8 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 12 Jun 2025 14:51:10 +0200
Subject: [PATCH 029/213] JS: fix false positives for splice with conditional
index decrement
---
.../LoopIterationSkippedDueToShifting.ql | 7 ++++++-
.../LoopIterationSkippedDueToShifting.expected | 3 +--
.../LoopIterationSkippedDueToShifting/tst.js | 14 ++++++++++++--
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql b/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
index 08ed9077746..35e632a17fb 100644
--- a/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
+++ b/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
@@ -146,7 +146,12 @@ class ArrayIterationLoop extends ForStmt {
or
this.hasPathThrough(splice, cfg.getAPredecessor()) and
this.getLoopEntry().dominates(cfg.getBasicBlock()) and
- not this.hasIndexingManipulation(cfg)
+ not this.hasIndexingManipulation(cfg) and
+ // Don't continue through a branch that tests the splice call's return value
+ not exists(ConditionGuardNode guard | cfg = guard |
+ guard.getTest() = splice.asExpr() and
+ guard.getOutcome() = false
+ )
}
}
diff --git a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
index a11ea4d7d40..cfe2b5f4f58 100644
--- a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
+++ b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/LoopIterationSkippedDueToShifting.expected
@@ -2,5 +2,4 @@
| tst.js:13:29:13:46 | parts.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
| tst.js:24:9:24:26 | parts.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
| tst.js:128:11:128:33 | pending ... e(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
-| tst.js:136:32:136:47 | toc.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
-| tst.js:143:10:143:25 | toc.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
+| tst.js:153:11:153:26 | toc.splice(i, 1) | Removing an array item without adjusting the loop index 'i' causes the subsequent array item to be skipped. |
diff --git a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
index 1f23604d76a..01f046d1c1e 100644
--- a/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
+++ b/javascript/ql/test/query-tests/Statements/LoopIterationSkippedDueToShifting/tst.js
@@ -133,16 +133,26 @@ function withTryCatch(pendingCSS) {
function andOperand(toc) {
for (let i = 0; i < toc.length; i++) {
- toc[i].ignoreSubHeading && toc.splice(i, 1) && i--; // $ SPURIOUS:Alert
+ toc[i].ignoreSubHeading && toc.splice(i, 1) && i--;
}
}
function ifStatement(toc) {
for (let i = 0; i < toc.length; i++) {
if(toc[i].ignoreSubHeading){
- if(toc.splice(i, 1)){ // $ SPURIOUS:Alert
+ if(toc.splice(i, 1)){
i--;
}
}
}
}
+
+function ifStatement2(toc) {
+ for (let i = 0; i < toc.length; i++) {
+ if(toc[i].ignoreSubHeading){
+ if(!toc.splice(i, 1)){ // $Alert
+ i--;
+ }
+ }
+ }
+}
From 885e8369aa817c115b486e76a0386ddd2f326a80 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 12 Jun 2025 15:18:26 +0200
Subject: [PATCH 030/213] JS: add `quality` and `reliability` tags to
`loop-iteration-skipped-due-to-shifting`
---
.../query-suite/javascript-code-quality.qls.expected | 1 +
.../ql/src/Statements/LoopIterationSkippedDueToShifting.ql | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
index 451a8b4bf27..bbb98b7fa81 100644
--- a/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
+++ b/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
@@ -5,3 +5,4 @@ ql/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
ql/javascript/ql/src/Quality/UnhandledErrorInStreamPipeline.ql
ql/javascript/ql/src/RegExp/DuplicateCharacterInCharacterClass.ql
ql/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
+ql/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
diff --git a/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql b/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
index 35e632a17fb..d36884e15a3 100644
--- a/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
+++ b/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/loop-iteration-skipped-due-to-shifting
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
From 10d10286f7d849d4b4ab1a0c64b06808cffabdc1 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 12 Jun 2025 15:23:31 +0200
Subject: [PATCH 031/213] JS: add change notes
---
.../ql/src/change-notes/2025-06-12-loop-iteration-fix.md | 4 ++++
javascript/ql/src/change-notes/2025-06-12-loop-iteration.md | 4 ++++
2 files changed, 8 insertions(+)
create mode 100644 javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
create mode 100644 javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
new file mode 100644
index 00000000000..c34e91360af
--- /dev/null
+++ b/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
@@ -0,0 +1,4 @@
+---
+category: minorAnalysis
+---
+* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when `splice` is used as a condition that adjusts the loop counter.
diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
new file mode 100644
index 00000000000..1458ccdbb8e
--- /dev/null
+++ b/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
@@ -0,0 +1,4 @@
+---
+category: minorAnalysis
+---
+* The `js/loop-iteration-skipped-due-to-shifting` query has been updated with `reliability` tag.
From 7db31b06d14677a2cf1c88b15b2fab60ff19b1bf Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Wed, 11 Jun 2025 16:39:39 +0200
Subject: [PATCH 032/213] MaD generator: tweak the scripts
* fix a bug where the order of model generation was determined by the
order in the `download.json` file of the experiment rather than the
order in the config file
* allow configuring `--ram` and `--threads` in the MaD generator scripts
* use no `--ram` and `--threads=0` by default in the bulk generator
(single generator defaults are left unchanged)
* allow to pass `--dca` multiple times, taking DBs from experiments
listed last. This allows to run a subset of the sources in a "fixup"
experiment and use it to "patch" a previous run without rerunning
everything.
---
.../models-as-data/bulk_generate_mad.py | 88 +++++++++----------
misc/scripts/models-as-data/generate_mad.py | 10 ++-
2 files changed, 51 insertions(+), 47 deletions(-)
diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py
index dfccf087803..a00dc31b05e 100755
--- a/misc/scripts/models-as-data/bulk_generate_mad.py
+++ b/misc/scripts/models-as-data/bulk_generate_mad.py
@@ -225,7 +225,7 @@ def build_database(
return database_dir
-def generate_models(config, project: Project, database_dir: str) -> None:
+def generate_models(config, args, project: Project, database_dir: str) -> None:
"""
Generate models for a project.
@@ -243,6 +243,8 @@ def generate_models(config, project: Project, database_dir: str) -> None:
generator.generateSources = should_generate_sources(project)
generator.generateSummaries = should_generate_summaries(project)
generator.setenvironment(database=database_dir, folder=name)
+ generator.threads = args.codeql_threads
+ generator.ram = args.codeql_ram
generator.run()
@@ -333,43 +335,44 @@ def pretty_name_from_artifact_name(artifact_name: str) -> str:
def download_dca_databases(
language: str,
- experiment_name: str,
+ experiment_names: list[str],
pat: str,
projects: List[Project],
) -> List[tuple[Project, str | None]]:
"""
Download databases from a DCA experiment.
Args:
- experiment_name: The name of the DCA experiment to download databases from.
+ experiment_names: The names of the DCA experiments to download databases from.
pat: Personal Access Token for GitHub API authentication.
projects: List of projects to download databases for.
Returns:
List of (project_name, database_dir) pairs, where database_dir is None if the download failed.
"""
print("\n=== Finding projects ===")
- response = get_json_from_github(
- f"https://raw.githubusercontent.com/github/codeql-dca-main/data/{experiment_name}/reports/downloads.json",
- pat,
- )
- targets = response["targets"]
project_map = {project["name"]: project for project in projects}
analyzed_databases = {}
- for data in targets.values():
- downloads = data["downloads"]
- analyzed_database = downloads["analyzed_database"]
- artifact_name = analyzed_database["artifact_name"]
- pretty_name = pretty_name_from_artifact_name(artifact_name)
+ for experiment_name in experiment_names:
+ response = get_json_from_github(
+ f"https://raw.githubusercontent.com/github/codeql-dca-main/data/{experiment_name}/reports/downloads.json",
+ pat,
+ )
+ targets = response["targets"]
+ for data in targets.values():
+ downloads = data["downloads"]
+ analyzed_database = downloads["analyzed_database"]
+ artifact_name = analyzed_database["artifact_name"]
+ pretty_name = pretty_name_from_artifact_name(artifact_name)
- if not pretty_name in project_map:
- print(f"Skipping {pretty_name} as it is not in the list of projects")
- continue
+ if not pretty_name in project_map:
+ print(f"Skipping {pretty_name} as it is not in the list of projects")
+ continue
- if pretty_name in analyzed_databases:
- print(
- f"Skipping previous database {analyzed_databases[pretty_name]['artifact_name']} for {pretty_name}"
- )
+ if pretty_name in analyzed_databases:
+ print(
+ f"Skipping previous database {analyzed_databases[pretty_name]['artifact_name']} for {pretty_name}"
+ )
- analyzed_databases[pretty_name] = analyzed_database
+ analyzed_databases[pretty_name] = analyzed_database
def download_and_decompress(analyzed_database: dict) -> str:
artifact_name = analyzed_database["artifact_name"]
@@ -450,23 +453,6 @@ def main(config, args) -> None:
if not os.path.exists(build_dir):
os.makedirs(build_dir)
- # Check if any of the MaD directories contain working directory changes in git
- for project in projects:
- mad_dir = get_mad_destination_for_project(config, project["name"])
- if os.path.exists(mad_dir):
- git_status_output = subprocess.check_output(
- ["git", "status", "-s", mad_dir], text=True
- ).strip()
- if git_status_output:
- print(
- f"""ERROR: Working directory changes detected in {mad_dir}.
-
-Before generating new models, the existing models are deleted.
-
-To avoid loss of data, please commit your changes."""
- )
- sys.exit(1)
-
database_results = []
match get_strategy(config):
case "repo":
@@ -477,8 +463,8 @@ To avoid loss of data, please commit your changes."""
projects,
)
case "dca":
- experiment_name = args.dca
- if experiment_name is None:
+ experiment_names = args.dca
+ if experiment_names is None:
print("ERROR: --dca argument is required for DCA strategy")
sys.exit(1)
@@ -492,7 +478,7 @@ To avoid loss of data, please commit your changes."""
pat = f.read().strip()
database_results = download_dca_databases(
language,
- experiment_name,
+ experiment_names,
pat,
projects,
)
@@ -518,7 +504,7 @@ To avoid loss of data, please commit your changes."""
for project, database_dir in database_results:
if database_dir is not None:
- generate_models(config, project, database_dir)
+ generate_models(config, args, project, database_dir)
if __name__ == "__main__":
@@ -529,14 +515,26 @@ if __name__ == "__main__":
parser.add_argument(
"--dca",
type=str,
- help="Name of a DCA run that built all the projects",
- required=False,
+ help="Name of a DCA run that built all the projects. Can be repeated, with sources taken from all provided runs, "
+ "the last provided ones having priority",
+ action="append",
)
parser.add_argument(
"--pat",
type=str,
help="Path to a file containing the PAT token required to grab DCA databases (the same as the one you use for DCA)",
- required=False,
+ )
+ parser.add_argument(
+ "--codeql-ram",
+ type=int,
+ help="What `--ram` value to pass to `codeql` while generating models (by default the flag is not passed)",
+ default=None,
+ )
+ parser.add_argument(
+ "--codeql-threads",
+ type=int,
+ help="What `--threads` value to pass to `codeql` (default %(default)s)",
+ default=0,
)
args = parser.parse_args()
diff --git a/misc/scripts/models-as-data/generate_mad.py b/misc/scripts/models-as-data/generate_mad.py
index a5f8ffc8fa0..c0d2bdf38f1 100755
--- a/misc/scripts/models-as-data/generate_mad.py
+++ b/misc/scripts/models-as-data/generate_mad.py
@@ -62,6 +62,8 @@ class Generator:
self.generateTypeBasedSummaries = False
self.dryRun = False
self.dirname = "modelgenerator"
+ self.ram = 2**15
+ self.threads = 8
def setenvironment(self, database, folder):
@@ -138,8 +140,12 @@ class Generator:
queryFile = os.path.join(self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query)
resultBqrs = os.path.join(self.workDir, "out.bqrs")
- helpers.run_cmd(['codeql', 'query', 'run', queryFile, '--database',
- self.database, '--output', resultBqrs, '--threads', '8', '--ram', '32768'], "Failed to generate " + query)
+ cmd = ['codeql', 'query', 'run', queryFile, '--database', self.database, '--output', resultBqrs]
+ if self.threads is not None:
+ cmd += ["--threads", str(self.threads)]
+ if self.ram is not None:
+ cmd += ["--ram", str(self.ram)]
+ helpers.run_cmd(cmd, "Failed to generate " + query)
return helpers.readData(self.workDir, resultBqrs)
From 39a3623b18801ff2490efa8003054693ea9bcee7 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 12 Jun 2025 16:48:24 +0200
Subject: [PATCH 033/213] MaD generator: change default thread and ram
The standalone MaD generator now uses `0` for threads and throttles the
RAM to use 2GB per thread by default.
Also, replaced the hand-written argument parsing with `argparse`.
---
.../models-as-data/bulk_generate_mad.py | 4 +-
misc/scripts/models-as-data/generate_mad.py | 133 +++++++-----------
2 files changed, 49 insertions(+), 88 deletions(-)
diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py
index a00dc31b05e..04baba14485 100755
--- a/misc/scripts/models-as-data/bulk_generate_mad.py
+++ b/misc/scripts/models-as-data/bulk_generate_mad.py
@@ -242,9 +242,9 @@ def generate_models(config, args, project: Project, database_dir: str) -> None:
generator.generateSinks = should_generate_sinks(project)
generator.generateSources = should_generate_sources(project)
generator.generateSummaries = should_generate_summaries(project)
- generator.setenvironment(database=database_dir, folder=name)
generator.threads = args.codeql_threads
generator.ram = args.codeql_ram
+ generator.setenvironment(database=database_dir, folder=name)
generator.run()
@@ -527,7 +527,7 @@ if __name__ == "__main__":
parser.add_argument(
"--codeql-ram",
type=int,
- help="What `--ram` value to pass to `codeql` while generating models (by default the flag is not passed)",
+ help="What `--ram` value to pass to `codeql` while generating models (by default 2048 MB per thread)",
default=None,
)
parser.add_argument(
diff --git a/misc/scripts/models-as-data/generate_mad.py b/misc/scripts/models-as-data/generate_mad.py
index c0d2bdf38f1..55c7d995b48 100755
--- a/misc/scripts/models-as-data/generate_mad.py
+++ b/misc/scripts/models-as-data/generate_mad.py
@@ -7,6 +7,7 @@ import subprocess
import sys
import tempfile
import re
+import argparse
def quote_if_needed(row):
if row != "true" and row != "false":
@@ -26,112 +27,76 @@ def parseData(data):
return rows
-def printHelp():
- print(f"""Usage:
-python3 generate_mad.py [DIR] --language LANGUAGE [--with-sinks] [--with-sources] [--with-summaries] [--with-neutrals] [--with-typebased-summaries] [--dry-run]
-
+description = """\
This generates summary, source, sink and neutral models for the code in the database.
-The files will be placed in `LANGUAGE/ql/lib/ext/generated/DIR`
-
-Which models are generated is controlled by the flags:
- --with-sinks
- --with-sources
- --with-summaries
- --with-neutrals
- --with-typebased-summaries (Experimental)
-If none of these flags are specified, all models are generated except for the type based models.
-
- --dry-run: Only run the queries, but don't write to file.
+The files will be placed in `LANGUAGE/ql/lib/ext/generated/DIR`"""
+epilog = """\
Example invocations:
$ python3 generate_mad.py /tmp/dbs/my_library_db
$ python3 generate_mad.py /tmp/dbs/my_library_db --with-sinks
$ python3 generate_mad.py /tmp/dbs/my_library_db --with-sinks my_directory
-
-Requirements: `codeql` should appear on your path.
- """)
+Requirements: `codeql` should appear on your path."""
class Generator:
- def __init__(self, language):
+ generateSinks = False
+ generateSources = False
+ generateSummaries = False
+ generateNeutrals = False
+ generateTypeBasedSummaries = False
+ dryRun = False
+ dirname = "modelgenerator"
+ ram = None
+ threads = 0
+ folder = ""
+
+ def __init__(self, language=None):
self.language = language
- self.generateSinks = False
- self.generateSources = False
- self.generateSummaries = False
- self.generateNeutrals = False
- self.generateTypeBasedSummaries = False
- self.dryRun = False
- self.dirname = "modelgenerator"
- self.ram = 2**15
- self.threads = 8
-
- def setenvironment(self, database, folder):
+ def setenvironment(self, database=None, folder=None):
self.codeQlRoot = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
- self.database = database
+ self.database = database or self.database
+ self.folder = folder or self.folder
self.generatedFrameworks = os.path.join(
- self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{folder}")
+ self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{self.folder}")
self.workDir = tempfile.mkdtemp()
+ if self.ram is None:
+ threads = self.threads if self.threads > 0 else os.cpu_count()
+ self.ram = 2048 * threads
os.makedirs(self.generatedFrameworks, exist_ok=True)
@staticmethod
def make():
- # Create a generator instance based on command line arguments.
- if any(s == "--help" for s in sys.argv):
- printHelp()
- sys.exit(0)
-
- if "--language" in sys.argv:
- language = sys.argv[sys.argv.index("--language") + 1]
- sys.argv.remove("--language")
- sys.argv.remove(language)
- else:
- printHelp()
- sys.exit(0)
-
- generator = Generator(language=language)
-
- if "--with-sinks" in sys.argv:
- sys.argv.remove("--with-sinks")
- generator.generateSinks = True
-
- if "--with-sources" in sys.argv:
- sys.argv.remove("--with-sources")
- generator.generateSources = True
-
- if "--with-summaries" in sys.argv:
- sys.argv.remove("--with-summaries")
- generator.generateSummaries = True
-
- if "--with-neutrals" in sys.argv:
- sys.argv.remove("--with-neutrals")
- generator.generateNeutrals = True
-
- if "--with-typebased-summaries" in sys.argv:
- sys.argv.remove("--with-typebased-summaries")
- generator.generateTypeBasedSummaries = True
-
- if "--dry-run" in sys.argv:
- sys.argv.remove("--dry-run")
- generator.dryRun = True
+ p = argparse.ArgumentParser(
+ description=description,
+ formatter_class=argparse.RawTextHelpFormatter,
+ epilog=epilog)
+ p.add_argument("database", help="Path to the CodeQL database")
+ p.add_argument("folder", nargs="?", default="", help="Optional folder to place the generated files in")
+ p.add_argument("--language", required=True, help="The language for which to generate models")
+ p.add_argument("--with-sinks", action="store_true", help="Generate sink models", dest="generateSinks")
+ p.add_argument("--with-sources", action="store_true", help="Generate source models", dest="generateSources")
+ p.add_argument("--with-summaries", action="store_true", help="Generate summary models", dest="generateSummaries")
+ p.add_argument("--with-neutrals", action="store_true", help="Generate neutral models", dest="generateNeutrals")
+ p.add_argument("--with-typebased-summaries", action="store_true", help="Generate type-based summary models (experimental)", dest="generateTypeBasedSummaries")
+ p.add_argument("--dry-run", action="store_true", help="Do not write the generated files, just print them to stdout", dest="dryRun")
+ p.add_argument("--threads", type=int, default=Generator.threads, help="Number of threads to use for CodeQL queries (default %(default)s). `0` means use all available threads.")
+ p.add_argument("--ram", type=int, help="Amount of RAM to use for CodeQL queries in MB. Default is to use 2048 MB per thread.")
+ generator = p.parse_args(namespace=Generator())
if (not generator.generateSinks and
not generator.generateSources and
not generator.generateSummaries and
not generator.generateNeutrals and
not generator.generateTypeBasedSummaries):
- generator.generateSinks = generator.generateSources = generator.generateSummaries = generator.generateNeutrals = True
-
- n = len(sys.argv)
- if n < 2:
- printHelp()
- sys.exit(1)
- elif n == 2:
- generator.setenvironment(sys.argv[1], "")
- else:
- generator.setenvironment(sys.argv[1], sys.argv[2])
+ generator.generateSinks = True
+ generator.generateSources = True
+ generator.generateSummaries = True
+ generator.generateNeutrals = True
+ generator.setenvironment()
return generator
@@ -140,11 +105,7 @@ class Generator:
queryFile = os.path.join(self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query)
resultBqrs = os.path.join(self.workDir, "out.bqrs")
- cmd = ['codeql', 'query', 'run', queryFile, '--database', self.database, '--output', resultBqrs]
- if self.threads is not None:
- cmd += ["--threads", str(self.threads)]
- if self.ram is not None:
- cmd += ["--ram", str(self.ram)]
+ cmd = ['codeql', 'query', 'run', queryFile, '--database', self.database, '--output', resultBqrs, "--threads", str(self.threads), "--ram", str(self.ram)]
helpers.run_cmd(cmd, "Failed to generate " + query)
return helpers.readData(self.workDir, resultBqrs)
@@ -220,4 +181,4 @@ extensions:
self.save(typeBasedContent, ".typebased.model.yml")
if __name__ == '__main__':
- Generator.make().run()
\ No newline at end of file
+ Generator.make().run()
From ae3bbb0a9bb76e8e3f6a36310adcb08a0941792f Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 12 Jun 2025 16:52:29 +0200
Subject: [PATCH 034/213] MaD generator: run `black` formatter`
---
misc/scripts/models-as-data/generate_mad.py | 171 +++++++++++++++-----
1 file changed, 129 insertions(+), 42 deletions(-)
diff --git a/misc/scripts/models-as-data/generate_mad.py b/misc/scripts/models-as-data/generate_mad.py
index 55c7d995b48..2f2b74cf3f7 100755
--- a/misc/scripts/models-as-data/generate_mad.py
+++ b/misc/scripts/models-as-data/generate_mad.py
@@ -9,20 +9,22 @@ import tempfile
import re
import argparse
+
def quote_if_needed(row):
if row != "true" and row != "false":
- return "\"" + row + "\""
+ return '"' + row + '"'
# subtypes column
return row[0].upper() + row[1:]
+
def parseData(data):
- rows = { }
+ rows = {}
for row in data:
- d = row[0].split(';')
+ d = row[0].split(";")
namespace = d[0]
d = map(quote_if_needed, d)
- helpers.insert_update(rows, namespace, " - [" + ', '.join(d) + ']\n')
+ helpers.insert_update(rows, namespace, " - [" + ", ".join(d) + "]\n")
return rows
@@ -39,6 +41,7 @@ $ python3 generate_mad.py /tmp/dbs/my_library_db --with-sinks my_directory
Requirements: `codeql` should appear on your path."""
+
class Generator:
generateSinks = False
generateSources = False
@@ -55,42 +58,97 @@ class Generator:
self.language = language
def setenvironment(self, database=None, folder=None):
- self.codeQlRoot = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
+ self.codeQlRoot = (
+ subprocess.check_output(["git", "rev-parse", "--show-toplevel"])
+ .decode("utf-8")
+ .strip()
+ )
self.database = database or self.database
self.folder = folder or self.folder
self.generatedFrameworks = os.path.join(
- self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{self.folder}")
+ self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{self.folder}"
+ )
self.workDir = tempfile.mkdtemp()
if self.ram is None:
threads = self.threads if self.threads > 0 else os.cpu_count()
self.ram = 2048 * threads
os.makedirs(self.generatedFrameworks, exist_ok=True)
-
@staticmethod
def make():
p = argparse.ArgumentParser(
description=description,
formatter_class=argparse.RawTextHelpFormatter,
- epilog=epilog)
+ epilog=epilog,
+ )
p.add_argument("database", help="Path to the CodeQL database")
- p.add_argument("folder", nargs="?", default="", help="Optional folder to place the generated files in")
- p.add_argument("--language", required=True, help="The language for which to generate models")
- p.add_argument("--with-sinks", action="store_true", help="Generate sink models", dest="generateSinks")
- p.add_argument("--with-sources", action="store_true", help="Generate source models", dest="generateSources")
- p.add_argument("--with-summaries", action="store_true", help="Generate summary models", dest="generateSummaries")
- p.add_argument("--with-neutrals", action="store_true", help="Generate neutral models", dest="generateNeutrals")
- p.add_argument("--with-typebased-summaries", action="store_true", help="Generate type-based summary models (experimental)", dest="generateTypeBasedSummaries")
- p.add_argument("--dry-run", action="store_true", help="Do not write the generated files, just print them to stdout", dest="dryRun")
- p.add_argument("--threads", type=int, default=Generator.threads, help="Number of threads to use for CodeQL queries (default %(default)s). `0` means use all available threads.")
- p.add_argument("--ram", type=int, help="Amount of RAM to use for CodeQL queries in MB. Default is to use 2048 MB per thread.")
+ p.add_argument(
+ "folder",
+ nargs="?",
+ default="",
+ help="Optional folder to place the generated files in",
+ )
+ p.add_argument(
+ "--language",
+ required=True,
+ help="The language for which to generate models",
+ )
+ p.add_argument(
+ "--with-sinks",
+ action="store_true",
+ help="Generate sink models",
+ dest="generateSinks",
+ )
+ p.add_argument(
+ "--with-sources",
+ action="store_true",
+ help="Generate source models",
+ dest="generateSources",
+ )
+ p.add_argument(
+ "--with-summaries",
+ action="store_true",
+ help="Generate summary models",
+ dest="generateSummaries",
+ )
+ p.add_argument(
+ "--with-neutrals",
+ action="store_true",
+ help="Generate neutral models",
+ dest="generateNeutrals",
+ )
+ p.add_argument(
+ "--with-typebased-summaries",
+ action="store_true",
+ help="Generate type-based summary models (experimental)",
+ dest="generateTypeBasedSummaries",
+ )
+ p.add_argument(
+ "--dry-run",
+ action="store_true",
+ help="Do not write the generated files, just print them to stdout",
+ dest="dryRun",
+ )
+ p.add_argument(
+ "--threads",
+ type=int,
+ default=Generator.threads,
+ help="Number of threads to use for CodeQL queries (default %(default)s). `0` means use all available threads.",
+ )
+ p.add_argument(
+ "--ram",
+ type=int,
+ help="Amount of RAM to use for CodeQL queries in MB. Default is to use 2048 MB per thread.",
+ )
generator = p.parse_args(namespace=Generator())
- if (not generator.generateSinks and
- not generator.generateSources and
- not generator.generateSummaries and
- not generator.generateNeutrals and
- not generator.generateTypeBasedSummaries):
+ if (
+ not generator.generateSinks
+ and not generator.generateSources
+ and not generator.generateSummaries
+ and not generator.generateNeutrals
+ and not generator.generateTypeBasedSummaries
+ ):
generator.generateSinks = True
generator.generateSources = True
generator.generateSummaries = True
@@ -99,22 +157,37 @@ class Generator:
generator.setenvironment()
return generator
-
def runQuery(self, query):
print("########## Querying " + query + "...")
- queryFile = os.path.join(self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query)
+ queryFile = os.path.join(
+ self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query
+ )
resultBqrs = os.path.join(self.workDir, "out.bqrs")
- cmd = ['codeql', 'query', 'run', queryFile, '--database', self.database, '--output', resultBqrs, "--threads", str(self.threads), "--ram", str(self.ram)]
+ cmd = [
+ "codeql",
+ "query",
+ "run",
+ queryFile,
+ "--database",
+ self.database,
+ "--output",
+ resultBqrs,
+ "--threads",
+ str(self.threads),
+ "--ram",
+ str(self.ram),
+ ]
helpers.run_cmd(cmd, "Failed to generate " + query)
return helpers.readData(self.workDir, resultBqrs)
-
def asAddsTo(self, rows, predicate):
- extensions = { }
+ extensions = {}
for key in rows:
- extensions[key] = helpers.addsToTemplate.format(f"codeql/{self.language}-all", predicate, rows[key])
+ extensions[key] = helpers.addsToTemplate.format(
+ f"codeql/{self.language}-all", predicate, rows[key]
+ )
return extensions
def getAddsTo(self, query, predicate):
@@ -125,27 +198,37 @@ class Generator:
def makeContent(self):
summaryAddsTo = {}
if self.generateSummaries:
- summaryAddsTo = self.getAddsTo("CaptureSummaryModels.ql", helpers.summaryModelPredicate)
+ summaryAddsTo = self.getAddsTo(
+ "CaptureSummaryModels.ql", helpers.summaryModelPredicate
+ )
sinkAddsTo = {}
if self.generateSinks:
- sinkAddsTo = self.getAddsTo("CaptureSinkModels.ql", helpers.sinkModelPredicate)
+ sinkAddsTo = self.getAddsTo(
+ "CaptureSinkModels.ql", helpers.sinkModelPredicate
+ )
sourceAddsTo = {}
if self.generateSources:
- sourceAddsTo = self.getAddsTo("CaptureSourceModels.ql", helpers.sourceModelPredicate)
+ sourceAddsTo = self.getAddsTo(
+ "CaptureSourceModels.ql", helpers.sourceModelPredicate
+ )
neutralAddsTo = {}
if self.generateNeutrals:
- neutralAddsTo = self.getAddsTo("CaptureNeutralModels.ql", helpers.neutralModelPredicate)
+ neutralAddsTo = self.getAddsTo(
+ "CaptureNeutralModels.ql", helpers.neutralModelPredicate
+ )
return helpers.merge(summaryAddsTo, sinkAddsTo, sourceAddsTo, neutralAddsTo)
def makeTypeBasedContent(self):
if self.generateTypeBasedSummaries:
- typeBasedSummaryAddsTo = self.getAddsTo("CaptureTypeBasedSummaryModels.ql", helpers.summaryModelPredicate)
+ typeBasedSummaryAddsTo = self.getAddsTo(
+ "CaptureTypeBasedSummaryModels.ql", helpers.summaryModelPredicate
+ )
else:
- typeBasedSummaryAddsTo = { }
+ typeBasedSummaryAddsTo = {}
return typeBasedSummaryAddsTo
@@ -156,13 +239,14 @@ extensions:
{0}"""
for entry in extensions:
# Replace problematic characters with dashes, and collapse multiple dashes.
- sanitizedEntry = re.sub(r'-+', '-', entry.replace('/', '-').replace(':', '-'))
+ sanitizedEntry = re.sub(
+ r"-+", "-", entry.replace("/", "-").replace(":", "-")
+ )
target = os.path.join(self.generatedFrameworks, sanitizedEntry + extension)
with open(target, "w") as f:
f.write(extensionTemplate.format(extensions[entry]))
print("Models as data extensions written to " + target)
-
def run(self):
content = self.makeContent()
typeBasedContent = self.makeTypeBasedContent()
@@ -171,14 +255,17 @@ extensions:
print("Models as data extensions generated, but not written to file.")
sys.exit(0)
- if (self.generateSinks or
- self.generateSources or
- self.generateSummaries or
- self.generateNeutrals):
+ if (
+ self.generateSinks
+ or self.generateSources
+ or self.generateSummaries
+ or self.generateNeutrals
+ ):
self.save(content, ".model.yml")
if self.generateTypeBasedSummaries:
self.save(typeBasedContent, ".typebased.model.yml")
-if __name__ == '__main__':
+
+if __name__ == "__main__":
Generator.make().run()
From c56a32580d8414cd053c2b0926e3878621c388ec Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 12 Jun 2025 17:35:00 +0200
Subject: [PATCH 035/213] Rust: remove now unneeded `get(Arg|Param)List` in the
dataflow guide
---
.../analyzing-data-flow-in-rust.rst | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
index 42eabf710f0..3eab09126f3 100644
--- a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
+++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
@@ -112,7 +112,7 @@ This query finds the argument passed in each call to ``File::create``:
from CallExpr call
where call.getStaticTarget().(Function).getCanonicalPath() = "::create"
- select call.getArgList().getArg(0)
+ select call.getArg(0)
Unfortunately this will only give the expression in the argument, not the values which could be passed to it.
So we use local data flow to find all expressions that flow into the argument:
@@ -125,7 +125,7 @@ So we use local data flow to find all expressions that flow into the argument:
from CallExpr call, DataFlow::ExprNode source, DataFlow::ExprNode sink
where
call.getStaticTarget().(Function).getCanonicalPath() = "::create" and
- sink.asExpr().getExpr() = call.getArgList().getArg(0) and
+ sink.asExpr().getExpr() = call.getArg(0) and
DataFlow::localFlow(source, sink)
select source, sink
@@ -139,7 +139,7 @@ We can vary the source, for example, making the source the parameter of a functi
from CallExpr call, DataFlow::ParameterNode source, DataFlow::ExprNode sink
where
call.getStaticTarget().(Function).getCanonicalPath() = "::create" and
- sink.asExpr().getExpr() = call.getArgList().getArg(0) and
+ sink.asExpr().getExpr() = call.getArg(0) and
DataFlow::localFlow(source, sink)
select source, sink
@@ -234,9 +234,9 @@ The following global taint-tracking query finds places where a string literal is
predicate isSink(DataFlow::Node node) {
// any argument going to a parameter called `password`
exists(Function f, CallExpr call, int index |
- call.getArgList().getArg(index) = node.asExpr().getExpr() and
+ call.getArg(index) = node.asExpr().getExpr() and
call.getStaticTarget() = f and
- f.getParamList().getParam(index).getPat().(IdentPat).getName().getText() = "password"
+ f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
)
}
}
From 1a36374718548c83806ef0f96717a023ddb70ff3 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 13 Jun 2025 08:45:55 +0200
Subject: [PATCH 036/213] MaD generator: really fix ordering problem
---
misc/scripts/models-as-data/bulk_generate_mad.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py
index 475c8e29462..c9218048f1c 100755
--- a/misc/scripts/models-as-data/bulk_generate_mad.py
+++ b/misc/scripts/models-as-data/bulk_generate_mad.py
@@ -236,7 +236,6 @@ def generate_models(config, args, project: Project, database_dir: str) -> None:
language = config["language"]
generator = mad.Generator(language)
- # Note: The argument parser converts with-sinks to with_sinks, etc.
generator.generateSinks = should_generate_sinks(project)
generator.generateSources = should_generate_sources(project)
generator.generateSummaries = should_generate_summaries(project)
@@ -348,7 +347,7 @@ def download_dca_databases(
"""
print("\n=== Finding projects ===")
project_map = {project["name"]: project for project in projects}
- analyzed_databases = {}
+ analyzed_databases = {n: None for n in project_map}
for experiment_name in experiment_names:
response = get_json_from_github(
f"https://raw.githubusercontent.com/github/codeql-dca-main/data/{experiment_name}/reports/downloads.json",
@@ -361,17 +360,24 @@ def download_dca_databases(
artifact_name = analyzed_database["artifact_name"]
pretty_name = pretty_name_from_artifact_name(artifact_name)
- if not pretty_name in project_map:
+ if not pretty_name in analyzed_databases:
print(f"Skipping {pretty_name} as it is not in the list of projects")
continue
- if pretty_name in analyzed_databases:
+ if analyzed_databases[pretty_name] is not None:
print(
f"Skipping previous database {analyzed_databases[pretty_name]['artifact_name']} for {pretty_name}"
)
analyzed_databases[pretty_name] = analyzed_database
+ not_found = [name for name, db in analyzed_databases.items() if db is None]
+ if not_found:
+ print(
+ f"ERROR: The following projects were not found in the DCA experiments: {', '.join(not_found)}"
+ )
+ sys.exit(1)
+
def download_and_decompress(analyzed_database: dict) -> str:
artifact_name = analyzed_database["artifact_name"]
repository = analyzed_database["repository"]
From 5df292c286a3d685eceb60e9ec595fbb118c0035 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 13 Jun 2025 08:47:07 +0200
Subject: [PATCH 037/213] MaD generator: apply black formatting to all sources
---
.pre-commit-config.yaml | 2 +-
.../models-as-data/convert_extensions.py | 59 +++++++++++++------
misc/scripts/models-as-data/helpers.py | 26 ++++++--
3 files changed, 63 insertions(+), 24 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bc07fb78987..d048b40e2c0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -18,7 +18,7 @@ repos:
rev: 25.1.0
hooks:
- id: black
- files: ^(misc/codegen/.*|misc/scripts/models-as-data/bulk_generate_mad)\.py$
+ files: ^(misc/codegen/.*|misc/scripts/models-as-data/.*)\.py$
- repo: local
hooks:
diff --git a/misc/scripts/models-as-data/convert_extensions.py b/misc/scripts/models-as-data/convert_extensions.py
index 28a7b7349bc..01a10dae5ff 100644
--- a/misc/scripts/models-as-data/convert_extensions.py
+++ b/misc/scripts/models-as-data/convert_extensions.py
@@ -7,65 +7,86 @@ import subprocess
import sys
import tempfile
+
def quote_if_needed(v):
# string columns
if type(v) is str:
- return "\"" + v + "\""
+ return '"' + v + '"'
# bool column
return str(v)
+
def parseData(data):
- rows = [{ }, { }]
+ rows = [{}, {}]
for row in data:
d = map(quote_if_needed, row)
provenance = row[-1]
targetRows = rows[1] if provenance.endswith("generated") else rows[0]
- helpers.insert_update(targetRows, row[0], " - [" + ', '.join(d) + ']\n')
+ helpers.insert_update(targetRows, row[0], " - [" + ", ".join(d) + "]\n")
return rows
+
class Converter:
def __init__(self, language, dbDir):
self.language = language
self.dbDir = dbDir
- self.codeQlRoot = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
+ self.codeQlRoot = (
+ subprocess.check_output(["git", "rev-parse", "--show-toplevel"])
+ .decode("utf-8")
+ .strip()
+ )
self.extDir = os.path.join(self.codeQlRoot, f"{self.language}/ql/lib/ext/")
self.dirname = "modelconverter"
self.modelFileExtension = ".model.yml"
self.workDir = tempfile.mkdtemp()
-
def runQuery(self, query):
- print('########## Querying: ', query)
- queryFile = os.path.join(self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query)
+ print("########## Querying: ", query)
+ queryFile = os.path.join(
+ self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query
+ )
resultBqrs = os.path.join(self.workDir, "out.bqrs")
- helpers.run_cmd(['codeql', 'query', 'run', queryFile, '--database', self.dbDir, '--output', resultBqrs], "Failed to generate " + query)
+ helpers.run_cmd(
+ [
+ "codeql",
+ "query",
+ "run",
+ queryFile,
+ "--database",
+ self.dbDir,
+ "--output",
+ resultBqrs,
+ ],
+ "Failed to generate " + query,
+ )
return helpers.readData(self.workDir, resultBqrs)
-
def asAddsTo(self, rows, predicate):
- extensions = [{ }, { }]
+ extensions = [{}, {}]
for i in range(2):
for key in rows[i]:
- extensions[i][key] = helpers.addsToTemplate.format(f"codeql/{self.language}-all", predicate, rows[i][key])
-
- return extensions
+ extensions[i][key] = helpers.addsToTemplate.format(
+ f"codeql/{self.language}-all", predicate, rows[i][key]
+ )
+ return extensions
def getAddsTo(self, query, predicate):
data = self.runQuery(query)
rows = parseData(data)
return self.asAddsTo(rows, predicate)
-
def makeContent(self):
summaries = self.getAddsTo("ExtractSummaries.ql", helpers.summaryModelPredicate)
sources = self.getAddsTo("ExtractSources.ql", helpers.sourceModelPredicate)
sinks = self.getAddsTo("ExtractSinks.ql", helpers.sinkModelPredicate)
neutrals = self.getAddsTo("ExtractNeutrals.ql", helpers.neutralModelPredicate)
- return [helpers.merge(sources[0], sinks[0], summaries[0], neutrals[0]), helpers.merge(sources[1], sinks[1], summaries[1], neutrals[1])]
-
+ return [
+ helpers.merge(sources[0], sinks[0], summaries[0], neutrals[0]),
+ helpers.merge(sources[1], sinks[1], summaries[1], neutrals[1]),
+ ]
def save(self, extensions):
# Create directory if it doesn't exist
@@ -77,9 +98,11 @@ class Converter:
for entry in extensions[0]:
with open(self.extDir + "/" + entry + self.modelFileExtension, "w") as f:
f.write(extensionTemplate.format(extensions[0][entry]))
-
+
for entry in extensions[1]:
- with open(self.extDir + "/generated/" + entry + self.modelFileExtension, "w") as f:
+ with open(
+ self.extDir + "/generated/" + entry + self.modelFileExtension, "w"
+ ) as f:
f.write(extensionTemplate.format(extensions[1][entry]))
def run(self):
diff --git a/misc/scripts/models-as-data/helpers.py b/misc/scripts/models-as-data/helpers.py
index 49cccb35cb6..f165caf62dc 100644
--- a/misc/scripts/models-as-data/helpers.py
+++ b/misc/scripts/models-as-data/helpers.py
@@ -14,37 +14,53 @@ addsToTemplate = """ - addsTo:
data:
{2}"""
+
def remove_dir(dirName):
if os.path.isdir(dirName):
shutil.rmtree(dirName)
print("Removed directory:", dirName)
+
def run_cmd(cmd, msg="Failed to run command"):
- print('Running ' + ' '.join(cmd))
+ print("Running " + " ".join(cmd))
if subprocess.check_call(cmd):
print(msg)
exit(1)
+
def readData(workDir, bqrsFile):
generatedJson = os.path.join(workDir, "out.json")
- print('Decoding BQRS to JSON.')
- run_cmd(['codeql', 'bqrs', 'decode', bqrsFile, '--output', generatedJson, '--format=json'], "Failed to decode BQRS.")
+ print("Decoding BQRS to JSON.")
+ run_cmd(
+ [
+ "codeql",
+ "bqrs",
+ "decode",
+ bqrsFile,
+ "--output",
+ generatedJson,
+ "--format=json",
+ ],
+ "Failed to decode BQRS.",
+ )
with open(generatedJson) as f:
results = json.load(f)
try:
- return results['#select']['tuples']
+ return results["#select"]["tuples"]
except KeyError:
- print('Unexpected JSON output - no tuples found')
+ print("Unexpected JSON output - no tuples found")
exit(1)
+
def insert_update(rows, key, value):
if key in rows:
rows[key] += value
else:
rows[key] = value
+
def merge(*dicts):
merged = {}
for d in dicts:
From cae4a0459bd568b1aee54a493c2d743e1d0ce0f9 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 13 Jun 2025 12:38:33 +0200
Subject: [PATCH 038/213] Rust: update `supported-frameworks.rst`
---
docs/codeql/reusables/supported-frameworks.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst
index 115c3326ee1..3d89a663004 100644
--- a/docs/codeql/reusables/supported-frameworks.rst
+++ b/docs/codeql/reusables/supported-frameworks.rst
@@ -322,7 +322,9 @@ All support is experimental.
:align: left
Name, Category
+ `actix-web `__, Web framework
alloc, Standard library
+ `clap `__, Utility library
core, Standard library
`digest `__, Cryptography library
`futures-executor `__, Utility library
@@ -331,14 +333,20 @@ All support is experimental.
`libc `__, Utility library
`log `__, Logging library
`md5 `__, Utility library
+ `memchr `__, Utility library
+ `once_cell `__, Utility library
`poem `__, Web framework
`postgres `__, Database
proc_macro, Standard library
+ `rand `__, Utility library
`regex `__, Utility library
`reqwest `__, HTTP client
+ `rocket `__, Web framework
`rusqlite `__, Database
std, Standard library
`rust-crypto `__, Cryptography library
+ `serde `__, Serialization
+ `smallvec `__, Utility library
`sqlx `__, Database
`tokio `__, Asynchronous IO
`tokio-postgres `__, Database
From ad3a5d777dda26abb9ead1930dda575258052387 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Fri, 13 Jun 2025 13:03:39 +0200
Subject: [PATCH 039/213] Rust: add public preview change notes
---
rust/ql/lib/change-notes/2025-06-13-public-preview.md | 4 ++++
rust/ql/src/change-notes/2025-06-13-public-preview.md | 4 ++++
2 files changed, 8 insertions(+)
create mode 100644 rust/ql/lib/change-notes/2025-06-13-public-preview.md
create mode 100644 rust/ql/src/change-notes/2025-06-13-public-preview.md
diff --git a/rust/ql/lib/change-notes/2025-06-13-public-preview.md b/rust/ql/lib/change-notes/2025-06-13-public-preview.md
new file mode 100644
index 00000000000..d60dc3315b8
--- /dev/null
+++ b/rust/ql/lib/change-notes/2025-06-13-public-preview.md
@@ -0,0 +1,4 @@
+---
+category: feature
+---
+* Initial public preview release.
diff --git a/rust/ql/src/change-notes/2025-06-13-public-preview.md b/rust/ql/src/change-notes/2025-06-13-public-preview.md
new file mode 100644
index 00000000000..ab2250e3b58
--- /dev/null
+++ b/rust/ql/src/change-notes/2025-06-13-public-preview.md
@@ -0,0 +1,4 @@
+---
+category: newQuery
+---
+* Initial public preview release.
From 840ef5ce92030d67c65415053083fefdb1773e91 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 12 Jun 2025 14:14:45 +0100
Subject: [PATCH 040/213] Rust: Add test cases for type inference in loops.
---
.../test/library-tests/type-inference/main.rs | 89 +++++++++++
.../type-inference/type-inference.expected | 148 +++++++++++++++++-
2 files changed, 232 insertions(+), 5 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index fa3ca445b6b..0b6666ddedc 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1805,6 +1805,94 @@ mod indexers {
}
}
+mod loops {
+ struct MyCallable {
+ }
+
+ impl MyCallable {
+ fn new() -> Self {
+ MyCallable {}
+ }
+
+ fn call(&self) -> i64 {
+ 1
+ }
+ }
+
+ pub fn f() {
+ // for loops with arrays
+
+ for i in [1, 2, 3] { } // $ MISSING: type=i:i32
+ for i in [1, 2, 3].map(|x| x + 1) { } // $ MISSING: type=i:i32
+ for i in [1, 2, 3].into_iter() { } // $ MISSING: type=i:i32
+
+ let vals1 = [1u8, 2, 3]; // $ MISSING: type=vals1:[u8; 3]
+ for u in vals1 { } // $ MISSING: type=u:u8
+
+ let vals2 = [1u16; 3]; // $ MISSING: type=vals2:[u16; 3]
+ for u in vals2 { } // $ MISSING: type=u:u16
+
+ let vals3: [u32; 3] = [1, 2, 3]; // $ MISSING: type=vals3:[u32; 3]
+ for u in vals3 { } // $ MISSING: type=u:u32
+
+ let vals4: [u64; 3] = [1; 3]; // $ MISSING: type=vals4:[u64; 3]
+ for u in vals4 { } // $ MISSING: type=u:u64
+
+ let mut strings1 = ["foo", "bar", "baz"]; // $ MISSING: type=strings1:[&str; 3]
+ for s in &strings1 { } // $ MISSING: type=s:&str
+ for s in &mut strings1 { } // $ MISSING: type=s:&str
+ for s in strings1 { } // $ MISSING: type=s:str
+
+ let strings2 = [String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings2:[String; 3]
+ for s in strings2 { } // $ MISSING: type=s:String
+
+ let strings3 = &[String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings3:&[String; 3]
+ for s in strings3 { } // $ MISSING: type=s:String
+
+ let callables = [MyCallable::new(), MyCallable::new(), MyCallable::new()]; // $ MISSING: type=callables:[MyCallable; 3]
+ for c in callables { // $ MISSING: type=c:MyCallable
+ let result = c.call(); // $ MISSING: type=result:i64 method=call
+ }
+
+ // for loops with ranges
+
+ for i in 0..10 { } // $ MISSING: type=i:i32
+ for u in [0u8 .. 10] { } // $ MISSING: type=u:u8
+
+ let range1 = std::ops::Range { start: 0u16, end: 10u16 }; // $ MISSING: type=range:std::ops::Range
+ for u in range1 { } // $ MISSING: type=i:u16
+
+ // for loops with containers
+
+ let vals3 = vec![1, 2, 3]; // MISSING: type=vals:Vec
+ for i in vals3 { } // $ MISSING: type=i:i32
+
+ let vals4 : Vec<&u64> = [1u64, 2, 3].iter().collect();
+ for u in vals4 { } // $ MISSING: type=u:&u64
+
+ let matrix1 = vec![vec![1, 2], vec![3, 4]]; // $ MISSING: type=vals5:Vec>
+ for row in matrix1 { // $ MISSING: type=row:Vec
+ for cell in row { // $ MISSING: type=cell:i32
+ }
+ }
+
+ let mut map1 = std::collections::HashMap::new(); // $ MISSING: type=map1:std::collections::HashMap<_, _>
+ map1.insert(1, Box::new("one")); // $ method=insert
+ map1.insert(2, Box::new("two")); // $ method=insert
+ for key in map1.keys() { } // $ method=keys MISSING: type=key:i32
+ for value in map1.values() { } // $ method=values MISSING: type=value:Box<&str>
+ for (key, value) in map1.iter() { } // $ method=iter MISSING: type=key:i32 type=value:Box<&str>
+ for (key, value) in &map1 { } // $ MISSING: type=key:i32 type=value:Box<&str>
+
+ // while loops
+
+ let mut a: i64 = 0; // $ type=a:i64
+ while a < 10 { // $ method=lt MISSING: type=a:i64m
+ a += 1; // $ type=a:i64 method=add_assign
+ }
+ }
+}
+
fn main() {
field_access::f();
method_impl::f();
@@ -1827,4 +1915,5 @@ fn main() {
async_::f();
impl_trait::f();
indexers::f();
+ loops::f();
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index c559584307d..031b6c16178 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2610,9 +2610,147 @@ inferType
| main.rs:1804:24:1804:25 | xs | | file://:0:0:0:0 | [] |
| main.rs:1804:24:1804:25 | xs | [T;...] | main.rs:1759:5:1760:13 | S |
| main.rs:1804:24:1804:25 | xs | [T] | main.rs:1759:5:1760:13 | S |
-| main.rs:1810:5:1810:20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
-| main.rs:1811:5:1811:60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
-| main.rs:1811:20:1811:38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
-| main.rs:1811:41:1811:59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
-| main.rs:1827:5:1827:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1813:26:1815:9 | { ... } | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1814:13:1814:25 | MyCallable {...} | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1817:17:1817:21 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1817:17:1817:21 | SelfParam | &T | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1817:31:1819:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1817:31:1819:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1818:13:1818:13 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1818:13:1818:13 | 1 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1825:19:1825:19 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1825:22:1825:22 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1825:25:1825:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1826:19:1826:19 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1826:22:1826:22 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1826:25:1826:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1826:40:1826:40 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1827:19:1827:19 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1827:22:1827:22 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1827:25:1827:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1829:22:1829:24 | 1u8 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1829:27:1829:27 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1829:30:1829:30 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1832:22:1832:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1832:28:1832:28 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1835:13:1835:17 | vals3 | | file://:0:0:0:0 | [] |
+| main.rs:1835:13:1835:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1835:26:1835:26 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1835:31:1835:39 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1835:31:1835:39 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1835:32:1835:32 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1835:35:1835:35 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1835:38:1835:38 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1836:18:1836:22 | vals3 | | file://:0:0:0:0 | [] |
+| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1838:13:1838:17 | vals4 | | file://:0:0:0:0 | [] |
+| main.rs:1838:13:1838:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1838:26:1838:26 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1838:31:1838:36 | [1; 3] | | file://:0:0:0:0 | [] |
+| main.rs:1838:31:1838:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1838:32:1838:32 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1838:35:1838:35 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1839:18:1839:22 | vals4 | | file://:0:0:0:0 | [] |
+| main.rs:1839:18:1839:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1841:29:1841:33 | "foo" | | {EXTERNAL LOCATION} | str |
+| main.rs:1841:36:1841:40 | "bar" | | {EXTERNAL LOCATION} | str |
+| main.rs:1841:43:1841:47 | "baz" | | {EXTERNAL LOCATION} | str |
+| main.rs:1842:18:1842:26 | &strings1 | | file://:0:0:0:0 | & |
+| main.rs:1843:18:1843:30 | &mut strings1 | | file://:0:0:0:0 | & |
+| main.rs:1846:25:1846:43 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1846:38:1846:42 | "foo" | | {EXTERNAL LOCATION} | str |
+| main.rs:1846:46:1846:64 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1846:59:1846:63 | "bar" | | {EXTERNAL LOCATION} | str |
+| main.rs:1846:67:1846:85 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1846:80:1846:84 | "baz" | | {EXTERNAL LOCATION} | str |
+| main.rs:1849:13:1849:20 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1849:24:1849:87 | &... | | file://:0:0:0:0 | & |
+| main.rs:1849:26:1849:44 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1849:39:1849:43 | "foo" | | {EXTERNAL LOCATION} | str |
+| main.rs:1849:47:1849:65 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1849:60:1849:64 | "bar" | | {EXTERNAL LOCATION} | str |
+| main.rs:1849:68:1849:86 | ...::from(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1849:81:1849:85 | "baz" | | {EXTERNAL LOCATION} | str |
+| main.rs:1850:18:1850:25 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1852:26:1852:42 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1852:45:1852:61 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1852:64:1852:80 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1859:18:1859:18 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1859:21:1859:22 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1860:19:1860:21 | 0u8 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1860:26:1860:27 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1862:13:1862:18 | range1 | | {EXTERNAL LOCATION} | Range |
+| main.rs:1862:13:1862:18 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1862:22:1862:64 | ...::Range {...} | | {EXTERNAL LOCATION} | Range |
+| main.rs:1862:22:1862:64 | ...::Range {...} | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1862:47:1862:50 | 0u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1862:58:1862:62 | 10u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1863:18:1863:23 | range1 | | {EXTERNAL LOCATION} | Range |
+| main.rs:1863:18:1863:23 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1867:26:1867:26 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1867:29:1867:29 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1867:32:1867:32 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1870:13:1870:17 | vals4 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1870:13:1870:17 | vals4 | T | file://:0:0:0:0 | & |
+| main.rs:1870:13:1870:17 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1870:33:1870:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1870:33:1870:61 | ... .collect() | T | file://:0:0:0:0 | & |
+| main.rs:1870:33:1870:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1870:34:1870:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1870:40:1870:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1870:43:1870:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1871:18:1871:22 | vals4 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1871:18:1871:22 | vals4 | T | file://:0:0:0:0 | & |
+| main.rs:1871:18:1871:22 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1873:33:1873:33 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1873:36:1873:36 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1873:45:1873:45 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1873:48:1873:48 | 4 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1879:13:1879:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1879:13:1879:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1879:24:1879:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1879:24:1879:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1880:9:1880:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1880:9:1880:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1880:9:1880:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1880:21:1880:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1880:24:1880:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1880:33:1880:37 | "one" | | {EXTERNAL LOCATION} | str |
+| main.rs:1881:9:1881:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1881:9:1881:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1881:9:1881:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1881:21:1881:21 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1881:24:1881:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1881:33:1881:37 | "two" | | {EXTERNAL LOCATION} | str |
+| main.rs:1882:20:1882:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1882:20:1882:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1882:20:1882:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
+| main.rs:1883:22:1883:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1883:22:1883:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1883:22:1883:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
+| main.rs:1884:29:1884:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1884:29:1884:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1884:29:1884:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
+| main.rs:1885:29:1885:33 | &map1 | | file://:0:0:0:0 | & |
+| main.rs:1885:29:1885:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1885:29:1885:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1885:30:1885:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1885:30:1885:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1889:13:1889:17 | mut a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1889:13:1889:17 | mut a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1889:26:1889:26 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1889:26:1889:26 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1890:15:1890:15 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1890:15:1890:15 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1890:15:1890:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1890:19:1890:20 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1891:13:1891:13 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1891:13:1891:13 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1891:13:1891:18 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1891:18:1891:18 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1898:5:1898:20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
+| main.rs:1899:5:1899:60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
+| main.rs:1899:20:1899:38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
+| main.rs:1899:41:1899:59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
+| main.rs:1915:5:1915:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From f76b56291b9a8e361e4623418fbc27ee2afe2db6 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 12 Jun 2025 17:05:20 +0100
Subject: [PATCH 041/213] Rust: Implement type inference for 'for' loops on
arrays.
---
.../lib/codeql/rust/internal/TypeInference.qll | 16 ++++++++++++++++
.../ql/test/library-tests/type-inference/main.rs | 4 ++--
.../type-inference/type-inference.expected | 2 ++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 3c36b077b3e..2742af07a7c 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1180,6 +1180,20 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) {
)
}
+pragma[nomagic]
+private Type inferForLoopExprType(AstNode n, TypePath path) {
+ // type of iterable -> type of pattern (loop variable)
+ exists(ForExpr fe, Type iterableType, TypePath iterablePath |
+ n = fe.getPat() and
+ iterableType = inferType(fe.getIterable(), iterablePath) and
+ (
+ iterablePath.isCons(any(ArrayTypeParameter tp), path) and
+ result = iterableType
+ // TODO: iterables (containers, ranges etc)
+ )
+ )
+}
+
private module MethodCall {
/** An expression that calls a method. */
abstract private class MethodCallImpl extends Expr {
@@ -1541,6 +1555,8 @@ private module Cached {
result = inferAwaitExprType(n, path)
or
result = inferIndexExprType(n, path)
+ or
+ result = inferForLoopExprType(n, path)
}
}
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 0b6666ddedc..919b001e9d4 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1833,10 +1833,10 @@ mod loops {
for u in vals2 { } // $ MISSING: type=u:u16
let vals3: [u32; 3] = [1, 2, 3]; // $ MISSING: type=vals3:[u32; 3]
- for u in vals3 { } // $ MISSING: type=u:u32
+ for u in vals3 { } // $ type=u:u32
let vals4: [u64; 3] = [1; 3]; // $ MISSING: type=vals4:[u64; 3]
- for u in vals4 { } // $ MISSING: type=u:u64
+ for u in vals4 { } // $ type=u:u64
let mut strings1 = ["foo", "bar", "baz"]; // $ MISSING: type=strings1:[&str; 3]
for s in &strings1 { } // $ MISSING: type=s:&str
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 031b6c16178..a0f5163ba96 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2641,6 +2641,7 @@ inferType
| main.rs:1835:32:1835:32 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:35:1835:35 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:38:1835:38 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1836:13:1836:13 | u | | {EXTERNAL LOCATION} | u32 |
| main.rs:1836:18:1836:22 | vals3 | | file://:0:0:0:0 | [] |
| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1838:13:1838:17 | vals4 | | file://:0:0:0:0 | [] |
@@ -2650,6 +2651,7 @@ inferType
| main.rs:1838:31:1838:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1838:32:1838:32 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1838:35:1838:35 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1839:13:1839:13 | u | | {EXTERNAL LOCATION} | u64 |
| main.rs:1839:18:1839:22 | vals4 | | file://:0:0:0:0 | [] |
| main.rs:1839:18:1839:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1841:29:1841:33 | "foo" | | {EXTERNAL LOCATION} | str |
From 51343a5c037f920648274c152ea5d9c3dcf97c85 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Fri, 13 Jun 2025 10:01:59 +0100
Subject: [PATCH 042/213] Rust: Implement type inference for ArrayListExprs.
---
.../codeql/rust/internal/TypeInference.qll | 11 ++++++
.../test/library-tests/type-inference/main.rs | 12 +++----
.../type-inference/type-inference.expected | 36 +++++++++++++++++++
3 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 2742af07a7c..7297205a782 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1180,6 +1180,15 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) {
)
}
+pragma[nomagic]
+private Type inferArrayListExprType(/*ArrayExpr*/ArrayListExpr ale, TypePath path) {
+ exists(Type type0, TypePath path0 |
+ type0 = inferType(ale.getExpr(0), path0) and
+ result = type0 and
+ path = TypePath::cons(any(ArrayTypeParameter tp), path0)
+ )
+}
+
pragma[nomagic]
private Type inferForLoopExprType(AstNode n, TypePath path) {
// type of iterable -> type of pattern (loop variable)
@@ -1556,6 +1565,8 @@ private module Cached {
or
result = inferIndexExprType(n, path)
or
+ result = inferArrayListExprType(n, path)
+ or
result = inferForLoopExprType(n, path)
}
}
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 919b001e9d4..cf3d4700d2b 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1822,12 +1822,12 @@ mod loops {
pub fn f() {
// for loops with arrays
- for i in [1, 2, 3] { } // $ MISSING: type=i:i32
+ for i in [1, 2, 3] { } // $ type=i:i32
for i in [1, 2, 3].map(|x| x + 1) { } // $ MISSING: type=i:i32
for i in [1, 2, 3].into_iter() { } // $ MISSING: type=i:i32
let vals1 = [1u8, 2, 3]; // $ MISSING: type=vals1:[u8; 3]
- for u in vals1 { } // $ MISSING: type=u:u8
+ for u in vals1 { } // $ type=u:u8
let vals2 = [1u16; 3]; // $ MISSING: type=vals2:[u16; 3]
for u in vals2 { } // $ MISSING: type=u:u16
@@ -1841,17 +1841,17 @@ mod loops {
let mut strings1 = ["foo", "bar", "baz"]; // $ MISSING: type=strings1:[&str; 3]
for s in &strings1 { } // $ MISSING: type=s:&str
for s in &mut strings1 { } // $ MISSING: type=s:&str
- for s in strings1 { } // $ MISSING: type=s:str
+ for s in strings1 { } // $ type=s:str
let strings2 = [String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings2:[String; 3]
- for s in strings2 { } // $ MISSING: type=s:String
+ for s in strings2 { } // $ type=s:String
let strings3 = &[String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings3:&[String; 3]
for s in strings3 { } // $ MISSING: type=s:String
let callables = [MyCallable::new(), MyCallable::new(), MyCallable::new()]; // $ MISSING: type=callables:[MyCallable; 3]
- for c in callables { // $ MISSING: type=c:MyCallable
- let result = c.call(); // $ MISSING: type=result:i64 method=call
+ for c in callables { // $ type=c:MyCallable
+ let result = c.call(); // $ type=result:i64 method=call
}
// for loops with ranges
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index a0f5163ba96..0b0c3adbeb1 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2618,31 +2618,43 @@ inferType
| main.rs:1817:31:1819:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
| main.rs:1818:13:1818:13 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1818:13:1818:13 | 1 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1825:13:1825:13 | i | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1825:18:1825:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1825:19:1825:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1825:22:1825:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1825:25:1825:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1826:18:1826:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1826:19:1826:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1826:22:1826:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1826:25:1826:25 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1826:40:1826:40 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1827:18:1827:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1827:19:1827:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1827:22:1827:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1827:25:1827:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1829:13:1829:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1829:21:1829:31 | [...] | [T;...] | {EXTERNAL LOCATION} | u8 |
| main.rs:1829:22:1829:24 | 1u8 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1829:27:1829:27 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1829:30:1829:30 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1830:13:1830:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1830:18:1830:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
| main.rs:1832:22:1832:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
| main.rs:1832:28:1832:28 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:13:1835:17 | vals3 | | file://:0:0:0:0 | [] |
+| main.rs:1835:13:1835:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:13:1835:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1835:26:1835:26 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:31:1835:39 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1835:31:1835:39 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:31:1835:39 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1835:32:1835:32 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:35:1835:35 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:38:1835:38 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1836:13:1836:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1836:13:1836:13 | u | | {EXTERNAL LOCATION} | u32 |
| main.rs:1836:18:1836:22 | vals3 | | file://:0:0:0:0 | [] |
+| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1838:13:1838:17 | vals4 | | file://:0:0:0:0 | [] |
| main.rs:1838:13:1838:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
@@ -2654,19 +2666,34 @@ inferType
| main.rs:1839:13:1839:13 | u | | {EXTERNAL LOCATION} | u64 |
| main.rs:1839:18:1839:22 | vals4 | | file://:0:0:0:0 | [] |
| main.rs:1839:18:1839:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1841:13:1841:24 | mut strings1 | [T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1841:28:1841:48 | [...] | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1841:29:1841:33 | "foo" | | {EXTERNAL LOCATION} | str |
| main.rs:1841:36:1841:40 | "bar" | | {EXTERNAL LOCATION} | str |
| main.rs:1841:43:1841:47 | "baz" | | {EXTERNAL LOCATION} | str |
| main.rs:1842:18:1842:26 | &strings1 | | file://:0:0:0:0 | & |
+| main.rs:1842:18:1842:26 | &strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1842:19:1842:26 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1843:18:1843:30 | &mut strings1 | | file://:0:0:0:0 | & |
+| main.rs:1843:18:1843:30 | &mut strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1843:23:1843:30 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1844:13:1844:13 | s | | {EXTERNAL LOCATION} | str |
+| main.rs:1844:18:1844:25 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1846:13:1846:20 | strings2 | [T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1846:24:1846:86 | [...] | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1846:25:1846:43 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1846:38:1846:42 | "foo" | | {EXTERNAL LOCATION} | str |
| main.rs:1846:46:1846:64 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1846:59:1846:63 | "bar" | | {EXTERNAL LOCATION} | str |
| main.rs:1846:67:1846:85 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1846:80:1846:84 | "baz" | | {EXTERNAL LOCATION} | str |
+| main.rs:1847:13:1847:13 | s | | {EXTERNAL LOCATION} | String |
+| main.rs:1847:18:1847:25 | strings2 | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1849:13:1849:20 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1849:13:1849:20 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1849:24:1849:87 | &... | | file://:0:0:0:0 | & |
+| main.rs:1849:24:1849:87 | &... | &T.[T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1849:25:1849:87 | [...] | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1849:26:1849:44 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1849:39:1849:43 | "foo" | | {EXTERNAL LOCATION} | str |
| main.rs:1849:47:1849:65 | ...::from(...) | | {EXTERNAL LOCATION} | String |
@@ -2674,9 +2701,17 @@ inferType
| main.rs:1849:68:1849:86 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1849:81:1849:85 | "baz" | | {EXTERNAL LOCATION} | str |
| main.rs:1850:18:1850:25 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1850:18:1850:25 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1852:13:1852:21 | callables | [T;...] | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1852:25:1852:81 | [...] | [T;...] | main.rs:1809:5:1810:5 | MyCallable |
| main.rs:1852:26:1852:42 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
| main.rs:1852:45:1852:61 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
| main.rs:1852:64:1852:80 | ...::new(...) | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1853:13:1853:13 | c | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1853:18:1853:26 | callables | [T;...] | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1854:17:1854:22 | result | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1854:26:1854:26 | c | | main.rs:1809:5:1810:5 | MyCallable |
+| main.rs:1854:26:1854:33 | c.call() | | {EXTERNAL LOCATION} | i64 |
| main.rs:1859:18:1859:18 | 0 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1859:21:1859:22 | 10 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1860:19:1860:21 | 0u8 | | {EXTERNAL LOCATION} | u8 |
@@ -2695,6 +2730,7 @@ inferType
| main.rs:1870:13:1870:17 | vals4 | | {EXTERNAL LOCATION} | Vec |
| main.rs:1870:13:1870:17 | vals4 | T | file://:0:0:0:0 | & |
| main.rs:1870:13:1870:17 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1870:33:1870:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1870:33:1870:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
| main.rs:1870:33:1870:61 | ... .collect() | T | file://:0:0:0:0 | & |
| main.rs:1870:33:1870:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
From b89d6d3402b4aee435dc3966aec15e6b13639b6a Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Fri, 13 Jun 2025 10:22:17 +0100
Subject: [PATCH 043/213] Rust: Implement type inference for ArrayRepeatExprs.
---
rust/ql/lib/codeql/rust/internal/TypeInference.qll | 14 +++++++++++---
rust/ql/test/library-tests/type-inference/main.rs | 2 +-
.../type-inference/type-inference.expected | 8 ++++++++
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 7297205a782..dc2fe6fcf56 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1181,9 +1181,17 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) {
}
pragma[nomagic]
-private Type inferArrayListExprType(/*ArrayExpr*/ArrayListExpr ale, TypePath path) {
+private Type inferArrayExprType(ArrayExpr ae, TypePath path) {
+ // an array list expression (`[1, 2, 3]`) has the type of the first (any) element
exists(Type type0, TypePath path0 |
- type0 = inferType(ale.getExpr(0), path0) and
+ type0 = inferType(ae.(ArrayListExpr).getExpr(0), path0) and
+ result = type0 and
+ path = TypePath::cons(any(ArrayTypeParameter tp), path0)
+ )
+ or
+ // an array repeat expression (`[1; 3]`) has the type of the repeat operand
+ exists(Type type0, TypePath path0 |
+ type0 = inferType(ae.(ArrayRepeatExpr).getRepeatOperand(), path0) and
result = type0 and
path = TypePath::cons(any(ArrayTypeParameter tp), path0)
)
@@ -1565,7 +1573,7 @@ private module Cached {
or
result = inferIndexExprType(n, path)
or
- result = inferArrayListExprType(n, path)
+ result = inferArrayExprType(n, path)
or
result = inferForLoopExprType(n, path)
}
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index cf3d4700d2b..79037b8afc5 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1830,7 +1830,7 @@ mod loops {
for u in vals1 { } // $ type=u:u8
let vals2 = [1u16; 3]; // $ MISSING: type=vals2:[u16; 3]
- for u in vals2 { } // $ MISSING: type=u:u16
+ for u in vals2 { } // $ type=u:u16
let vals3: [u32; 3] = [1, 2, 3]; // $ MISSING: type=vals3:[u32; 3]
for u in vals3 { } // $ type=u:u32
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 0b0c3adbeb1..77f1c4cae04 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2639,8 +2639,12 @@ inferType
| main.rs:1829:30:1829:30 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1830:13:1830:13 | u | | {EXTERNAL LOCATION} | u8 |
| main.rs:1830:18:1830:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1832:13:1832:17 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1832:21:1832:29 | [1u16; 3] | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1832:22:1832:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
| main.rs:1832:28:1832:28 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1833:13:1833:13 | u | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1833:18:1833:22 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1835:13:1835:17 | vals3 | | file://:0:0:0:0 | [] |
| main.rs:1835:13:1835:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:13:1835:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
@@ -2657,14 +2661,18 @@ inferType
| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1836:18:1836:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1838:13:1838:17 | vals4 | | file://:0:0:0:0 | [] |
+| main.rs:1838:13:1838:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1838:13:1838:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1838:26:1838:26 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1838:31:1838:36 | [1; 3] | | file://:0:0:0:0 | [] |
+| main.rs:1838:31:1838:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1838:31:1838:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1838:32:1838:32 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1838:35:1838:35 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1839:13:1839:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1839:13:1839:13 | u | | {EXTERNAL LOCATION} | u64 |
| main.rs:1839:18:1839:22 | vals4 | | file://:0:0:0:0 | [] |
+| main.rs:1839:18:1839:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1839:18:1839:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1841:13:1841:24 | mut strings1 | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1841:28:1841:48 | [...] | [T;...] | {EXTERNAL LOCATION} | str |
From 6194676b7dc9de14bcaaa3869aa95980709a033b Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Fri, 13 Jun 2025 13:51:01 +0100
Subject: [PATCH 044/213] Rust: Accept consistency failures (for now).
---
.../PathResolutionConsistency.expected | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected
diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected
new file mode 100644
index 00000000000..9f291a9eb3e
--- /dev/null
+++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected
@@ -0,0 +1,37 @@
+multiplePathResolutions
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:25:1851:36 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:46:1851:57 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1851:67:1851:78 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:26:1854:37 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:47:1854:58 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
+| main.rs:1854:68:1854:79 | ...::from | file://:0:0:0:0 | fn from |
From 0c31838aa51bb52b12f9b73739f923afe7333c6b Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 13:15:12 +0200
Subject: [PATCH 045/213] JS: mass add missing quality related tags to relevant
queries
---
.../javascript-code-quality.qls.expected | 89 +++++++++++++++++++
.../ql/src/AngularJS/DependencyMismatch.ql | 3 +-
.../ql/src/AngularJS/DuplicateDependency.ql | 4 +-
.../ql/src/AngularJS/IncompatibleService.ql | 4 +-
.../src/AngularJS/MissingExplicitInjection.ql | 5 +-
.../ql/src/AngularJS/RepeatedInjection.ql | 4 +-
javascript/ql/src/AngularJS/UseNgSrc.ql | 4 +-
javascript/ql/src/DOM/DuplicateAttributes.ql | 3 +-
javascript/ql/src/DOM/MalformedIdAttribute.ql | 3 +-
javascript/ql/src/DOM/PseudoEval.ql | 6 +-
.../ql/src/Declarations/ArgumentsRedefined.ql | 5 +-
.../ql/src/Declarations/AssignmentToConst.ql | 3 +-
.../ql/src/Declarations/ClobberingVarInit.ql | 3 +-
.../src/Declarations/ConflictingFunctions.ql | 3 +-
.../ql/src/Declarations/DeadStoreOfLocal.ql | 4 +-
.../src/Declarations/DeadStoreOfProperty.ql | 4 +-
.../ql/src/Declarations/DeclBeforeUse.ql | 3 +-
...DefaultArgumentReferencesNestedFunction.ql | 3 +-
.../ql/src/Declarations/DuplicateVarDecl.ql | 4 +-
.../Declarations/IneffectiveParameterType.ql | 5 +-
.../src/Declarations/MissingThisQualifier.ql | 5 +-
.../ql/src/Declarations/MissingVarDecl.ql | 5 +-
.../MixedStaticInstanceThisAccess.ql | 4 +-
.../ql/src/Declarations/TemporalDeadZone.ql | 4 +-
.../src/Declarations/UniqueParameterNames.ql | 3 +-
.../src/Declarations/UniquePropertyNames.ql | 3 +-
.../UnreachableMethodOverloads.ql | 4 +-
.../ql/src/Declarations/UnusedVariable.ql | 4 +-
.../ql/src/Expressions/ComparisonWithNaN.ql | 3 +-
.../ql/src/Expressions/DuplicateCondition.ql | 5 +-
.../ql/src/Expressions/DuplicateProperty.ql | 4 +-
.../ql/src/Expressions/DuplicateSwitchCase.ql | 3 +-
.../ql/src/Expressions/ExprHasNoEffect.ql | 3 +-
.../Expressions/HeterogeneousComparison.ql | 3 +-
.../Expressions/ImplicitOperandConversion.ql | 5 +-
javascript/ql/src/Expressions/MissingAwait.ql | 5 +-
.../MissingDotLengthInComparison.ql | 4 +-
.../src/Expressions/MissingSpaceInAppend.ql | 4 +-
.../src/Expressions/MisspelledVariableName.ql | 4 +-
.../ql/src/Expressions/RedundantExpression.ql | 3 +-
.../ql/src/Expressions/SelfAssignment.ql | 3 +-
.../ql/src/Expressions/ShiftOutOfRange.ql | 3 +-
.../src/Expressions/StringInsteadOfRegex.ql | 4 +-
.../src/Expressions/SuspiciousInvocation.ql | 4 +-
.../src/Expressions/SuspiciousPropAccess.ql | 4 +-
.../UnboundEventHandlerReceiver.ql | 4 +-
.../Expressions/UnclearOperatorPrecedence.ql | 5 +-
.../ql/src/Expressions/UnknownDirective.ql | 4 +-
.../UnneededDefensiveProgramming.ql | 4 +-
.../WhitespaceContradictsPrecedence.ql | 5 +-
.../ql/src/LanguageFeatures/BadTypeof.ql | 3 +-
.../LanguageFeatures/ConditionalComments.ql | 4 +-
.../ql/src/LanguageFeatures/DeleteVar.ql | 5 +-
.../LanguageFeatures/ExpressionClosures.ql | 4 +-
.../ForInComprehensionBlocks.ql | 4 +-
.../src/LanguageFeatures/IllegalInvocation.ql | 4 +-
.../src/LanguageFeatures/InconsistentNew.ql | 3 +-
.../src/LanguageFeatures/InvalidPrototype.ql | 4 +-
.../LengthComparisonOffByOne.ql | 4 +-
.../src/LanguageFeatures/NonLinearPattern.ql | 3 +-
.../PropertyWriteOnPrimitive.ql | 4 +-
.../LanguageFeatures/SemicolonInsertion.ql | 4 +-
.../ql/src/LanguageFeatures/SetterReturn.ql | 4 +-
.../src/LanguageFeatures/SpuriousArguments.ql | 4 +-
.../StrictModeCallStackIntrospection.ql | 4 +-
.../ql/src/LanguageFeatures/SyntaxError.ql | 3 +-
.../src/LanguageFeatures/ThisBeforeSuper.ql | 4 +-
.../LanguageFeatures/UnusedIndexVariable.ql | 4 +-
.../ql/src/LanguageFeatures/WithStatement.ql | 4 +-
.../LanguageFeatures/YieldInNonGenerator.ql | 4 +-
javascript/ql/src/NodeJS/InvalidExport.ql | 4 +-
javascript/ql/src/NodeJS/MissingExports.ql | 4 +-
.../ql/src/React/DirectStateMutation.ql | 4 +-
.../ql/src/React/InconsistentStateUpdate.ql | 4 +-
...UnsupportedStateUpdateInLifecycleMethod.ql | 4 +-
.../React/UnusedOrUndefinedStateProperty.ql | 3 +-
.../ql/src/RegExp/BackrefBeforeGroup.ql | 3 +-
.../RegExp/BackrefIntoNegativeLookahead.ql | 3 +-
.../ql/src/RegExp/EmptyCharacterClass.ql | 3 +-
.../ql/src/RegExp/RegExpAlwaysMatches.ql | 5 +-
javascript/ql/src/RegExp/UnboundBackref.ql | 3 +-
javascript/ql/src/RegExp/UnmatchableCaret.ql | 3 +-
javascript/ql/src/RegExp/UnmatchableDollar.ql | 3 +-
javascript/ql/src/Statements/DanglingElse.ql | 4 +-
.../ql/src/Statements/IgnoreArrayResult.ql | 3 +-
.../Statements/InconsistentLoopOrientation.ql | 4 +-
javascript/ql/src/Statements/LabelInCase.ql | 3 +-
.../MisleadingIndentationAfterControlStmt.ql | 4 +-
.../ql/src/Statements/ReturnAssignsLocal.ql | 3 +-
.../SuspiciousUnusedLoopIterationVariable.ql | 5 +-
.../ql/src/Statements/UnreachableStatement.ql | 5 +-
.../src/Statements/UseOfReturnlessFunction.ql | 3 +-
.../src/Statements/UselessComparisonTest.ql | 4 +-
.../ql/src/Statements/UselessConditional.ql | 4 +-
.../ql/src/Vue/ArrowMethodOnVueInstance.ql | 4 +-
95 files changed, 337 insertions(+), 112 deletions(-)
diff --git a/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
index bf646822ddc..0ee4ff2cf9c 100644
--- a/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
+++ b/javascript/ql/integration-tests/query-suite/javascript-code-quality.qls.expected
@@ -1,9 +1,98 @@
+ql/javascript/ql/src/AngularJS/DependencyMismatch.ql
+ql/javascript/ql/src/AngularJS/DuplicateDependency.ql
+ql/javascript/ql/src/AngularJS/IncompatibleService.ql
+ql/javascript/ql/src/AngularJS/MissingExplicitInjection.ql
+ql/javascript/ql/src/AngularJS/RepeatedInjection.ql
+ql/javascript/ql/src/AngularJS/UseNgSrc.ql
+ql/javascript/ql/src/DOM/DuplicateAttributes.ql
+ql/javascript/ql/src/DOM/MalformedIdAttribute.ql
+ql/javascript/ql/src/DOM/PseudoEval.ql
+ql/javascript/ql/src/Declarations/ArgumentsRedefined.ql
+ql/javascript/ql/src/Declarations/AssignmentToConst.ql
+ql/javascript/ql/src/Declarations/ClobberingVarInit.ql
+ql/javascript/ql/src/Declarations/ConflictingFunctions.ql
+ql/javascript/ql/src/Declarations/DeadStoreOfLocal.ql
+ql/javascript/ql/src/Declarations/DeadStoreOfProperty.ql
+ql/javascript/ql/src/Declarations/DeclBeforeUse.ql
+ql/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql
+ql/javascript/ql/src/Declarations/DuplicateVarDecl.ql
ql/javascript/ql/src/Declarations/IneffectiveParameterType.ql
+ql/javascript/ql/src/Declarations/MissingThisQualifier.ql
+ql/javascript/ql/src/Declarations/MissingVarDecl.ql
+ql/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql
ql/javascript/ql/src/Declarations/SuspiciousMethodNameDeclaration.ql
+ql/javascript/ql/src/Declarations/TemporalDeadZone.ql
+ql/javascript/ql/src/Declarations/UniqueParameterNames.ql
+ql/javascript/ql/src/Declarations/UniquePropertyNames.ql
+ql/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql
+ql/javascript/ql/src/Declarations/UnusedVariable.ql
+ql/javascript/ql/src/Expressions/ComparisonWithNaN.ql
+ql/javascript/ql/src/Expressions/DuplicateCondition.ql
+ql/javascript/ql/src/Expressions/DuplicateProperty.ql
+ql/javascript/ql/src/Expressions/DuplicateSwitchCase.ql
ql/javascript/ql/src/Expressions/ExprHasNoEffect.ql
+ql/javascript/ql/src/Expressions/HeterogeneousComparison.ql
+ql/javascript/ql/src/Expressions/ImplicitOperandConversion.ql
ql/javascript/ql/src/Expressions/MissingAwait.ql
+ql/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql
+ql/javascript/ql/src/Expressions/MissingSpaceInAppend.ql
+ql/javascript/ql/src/Expressions/MisspelledVariableName.ql
+ql/javascript/ql/src/Expressions/RedundantExpression.ql
+ql/javascript/ql/src/Expressions/SelfAssignment.ql
+ql/javascript/ql/src/Expressions/ShiftOutOfRange.ql
+ql/javascript/ql/src/Expressions/StringInsteadOfRegex.ql
+ql/javascript/ql/src/Expressions/SuspiciousInvocation.ql
+ql/javascript/ql/src/Expressions/SuspiciousPropAccess.ql
+ql/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql
+ql/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql
+ql/javascript/ql/src/Expressions/UnknownDirective.ql
+ql/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql
+ql/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql
+ql/javascript/ql/src/LanguageFeatures/BadTypeof.ql
+ql/javascript/ql/src/LanguageFeatures/ConditionalComments.ql
+ql/javascript/ql/src/LanguageFeatures/DeleteVar.ql
+ql/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql
+ql/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql
+ql/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql
+ql/javascript/ql/src/LanguageFeatures/InconsistentNew.ql
+ql/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql
+ql/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql
+ql/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql
+ql/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql
+ql/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql
+ql/javascript/ql/src/LanguageFeatures/SetterReturn.ql
ql/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
+ql/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql
+ql/javascript/ql/src/LanguageFeatures/SyntaxError.ql
ql/javascript/ql/src/LanguageFeatures/TemplateSyntaxInStringLiteral.ql
+ql/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql
+ql/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql
+ql/javascript/ql/src/LanguageFeatures/WithStatement.ql
+ql/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql
+ql/javascript/ql/src/NodeJS/InvalidExport.ql
+ql/javascript/ql/src/NodeJS/MissingExports.ql
ql/javascript/ql/src/Quality/UnhandledErrorInStreamPipeline.ql
+ql/javascript/ql/src/React/DirectStateMutation.ql
+ql/javascript/ql/src/React/InconsistentStateUpdate.ql
+ql/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql
+ql/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql
+ql/javascript/ql/src/RegExp/BackrefBeforeGroup.ql
+ql/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql
ql/javascript/ql/src/RegExp/DuplicateCharacterInCharacterClass.ql
+ql/javascript/ql/src/RegExp/EmptyCharacterClass.ql
ql/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
+ql/javascript/ql/src/RegExp/UnboundBackref.ql
+ql/javascript/ql/src/RegExp/UnmatchableCaret.ql
+ql/javascript/ql/src/RegExp/UnmatchableDollar.ql
+ql/javascript/ql/src/Statements/DanglingElse.ql
+ql/javascript/ql/src/Statements/IgnoreArrayResult.ql
+ql/javascript/ql/src/Statements/InconsistentLoopOrientation.ql
+ql/javascript/ql/src/Statements/LabelInCase.ql
+ql/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql
+ql/javascript/ql/src/Statements/ReturnAssignsLocal.ql
+ql/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql
+ql/javascript/ql/src/Statements/UnreachableStatement.ql
+ql/javascript/ql/src/Statements/UseOfReturnlessFunction.ql
+ql/javascript/ql/src/Statements/UselessComparisonTest.ql
+ql/javascript/ql/src/Statements/UselessConditional.ql
+ql/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql
diff --git a/javascript/ql/src/AngularJS/DependencyMismatch.ql b/javascript/ql/src/AngularJS/DependencyMismatch.ql
index 83f9b1cb73a..5518653795b 100644
--- a/javascript/ql/src/AngularJS/DependencyMismatch.ql
+++ b/javascript/ql/src/AngularJS/DependencyMismatch.ql
@@ -7,8 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id js/angular/dependency-injection-mismatch
- * @tags correctness
+ * @tags quality
* maintainability
+ * readability
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/AngularJS/DuplicateDependency.ql b/javascript/ql/src/AngularJS/DuplicateDependency.ql
index 12036e03339..38f46d8acf9 100644
--- a/javascript/ql/src/AngularJS/DuplicateDependency.ql
+++ b/javascript/ql/src/AngularJS/DuplicateDependency.ql
@@ -5,7 +5,9 @@
* @problem.severity warning
* @precision very-high
* @id js/angular/duplicate-dependency
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/AngularJS/IncompatibleService.ql b/javascript/ql/src/AngularJS/IncompatibleService.ql
index c22eccc2dd4..511f5c72cdc 100644
--- a/javascript/ql/src/AngularJS/IncompatibleService.ql
+++ b/javascript/ql/src/AngularJS/IncompatibleService.ql
@@ -5,7 +5,9 @@
* @problem.severity error
* @precision high
* @id js/angular/incompatible-service
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/AngularJS/MissingExplicitInjection.ql b/javascript/ql/src/AngularJS/MissingExplicitInjection.ql
index f7ff51fb547..4b007974bcf 100644
--- a/javascript/ql/src/AngularJS/MissingExplicitInjection.ql
+++ b/javascript/ql/src/AngularJS/MissingExplicitInjection.ql
@@ -6,8 +6,9 @@
* @problem.severity warning
* @precision high
* @id js/angular/missing-explicit-injection
- * @tags correctness
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/AngularJS/RepeatedInjection.ql b/javascript/ql/src/AngularJS/RepeatedInjection.ql
index 27fb0dc2f62..8c1d1379893 100644
--- a/javascript/ql/src/AngularJS/RepeatedInjection.ql
+++ b/javascript/ql/src/AngularJS/RepeatedInjection.ql
@@ -5,7 +5,9 @@
* @problem.severity warning
* @precision high
* @id js/angular/repeated-dependency-injection
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/AngularJS/UseNgSrc.ql b/javascript/ql/src/AngularJS/UseNgSrc.ql
index 333b36722f5..51255af8071 100644
--- a/javascript/ql/src/AngularJS/UseNgSrc.ql
+++ b/javascript/ql/src/AngularJS/UseNgSrc.ql
@@ -7,7 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id js/angular/expression-in-url-attribute
- * @tags maintainability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/angularjs
*/
diff --git a/javascript/ql/src/DOM/DuplicateAttributes.ql b/javascript/ql/src/DOM/DuplicateAttributes.ql
index 77c1ddea93b..a6f73982f73 100644
--- a/javascript/ql/src/DOM/DuplicateAttributes.ql
+++ b/javascript/ql/src/DOM/DuplicateAttributes.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity warning
* @id js/duplicate-html-attribute
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* @precision very-high
*/
diff --git a/javascript/ql/src/DOM/MalformedIdAttribute.ql b/javascript/ql/src/DOM/MalformedIdAttribute.ql
index d9a99aa1937..dea9d25f917 100644
--- a/javascript/ql/src/DOM/MalformedIdAttribute.ql
+++ b/javascript/ql/src/DOM/MalformedIdAttribute.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity warning
* @id js/malformed-html-id
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-758
* @precision very-high
diff --git a/javascript/ql/src/DOM/PseudoEval.ql b/javascript/ql/src/DOM/PseudoEval.ql
index c6bed6ed75b..d2255cf594d 100644
--- a/javascript/ql/src/DOM/PseudoEval.ql
+++ b/javascript/ql/src/DOM/PseudoEval.ql
@@ -5,8 +5,10 @@
* @kind problem
* @problem.severity recommendation
* @id js/eval-like-call
- * @tags maintainability
- * external/cwe/cwe-676
+ * @tags quality
+ * maintainability
+ * readability
+ * external/cwe/cwe-67
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/ArgumentsRedefined.ql b/javascript/ql/src/Declarations/ArgumentsRedefined.ql
index dc1ca153062..01d0451d6f4 100644
--- a/javascript/ql/src/Declarations/ArgumentsRedefined.ql
+++ b/javascript/ql/src/Declarations/ArgumentsRedefined.ql
@@ -6,8 +6,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/arguments-redefinition
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/AssignmentToConst.ql b/javascript/ql/src/Declarations/AssignmentToConst.ql
index f2a24832c6a..2aebfad0054 100644
--- a/javascript/ql/src/Declarations/AssignmentToConst.ql
+++ b/javascript/ql/src/Declarations/AssignmentToConst.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/assignment-to-constant
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/ClobberingVarInit.ql b/javascript/ql/src/Declarations/ClobberingVarInit.ql
index 2ae7a891035..5a3fe406d7e 100644
--- a/javascript/ql/src/Declarations/ClobberingVarInit.ql
+++ b/javascript/ql/src/Declarations/ClobberingVarInit.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/variable-initialization-conflict
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-563
* @precision very-high
diff --git a/javascript/ql/src/Declarations/ConflictingFunctions.ql b/javascript/ql/src/Declarations/ConflictingFunctions.ql
index 60f3200c369..e15f49acd93 100644
--- a/javascript/ql/src/Declarations/ConflictingFunctions.ql
+++ b/javascript/ql/src/Declarations/ConflictingFunctions.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/function-declaration-conflict
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-563
* @precision high
diff --git a/javascript/ql/src/Declarations/DeadStoreOfLocal.ql b/javascript/ql/src/Declarations/DeadStoreOfLocal.ql
index 70b3ba0e2e2..b09e1435739 100644
--- a/javascript/ql/src/Declarations/DeadStoreOfLocal.ql
+++ b/javascript/ql/src/Declarations/DeadStoreOfLocal.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/useless-assignment-to-local
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
* external/cwe/cwe-563
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/DeadStoreOfProperty.ql b/javascript/ql/src/Declarations/DeadStoreOfProperty.ql
index c8cb0d8536e..8930a13dfa4 100644
--- a/javascript/ql/src/Declarations/DeadStoreOfProperty.ql
+++ b/javascript/ql/src/Declarations/DeadStoreOfProperty.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/useless-assignment-to-property
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
* @precision high
*/
diff --git a/javascript/ql/src/Declarations/DeclBeforeUse.ql b/javascript/ql/src/Declarations/DeclBeforeUse.ql
index b58fab9e465..ddf715cefdb 100644
--- a/javascript/ql/src/Declarations/DeclBeforeUse.ql
+++ b/javascript/ql/src/Declarations/DeclBeforeUse.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity warning
* @id js/use-before-declaration
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql b/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql
index cd13314095c..934d2d6ddd3 100644
--- a/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql
+++ b/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/nested-function-reference-in-default-parameter
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/DuplicateVarDecl.ql b/javascript/ql/src/Declarations/DuplicateVarDecl.ql
index 4a1c1bdb38f..03dd4bb7517 100644
--- a/javascript/ql/src/Declarations/DuplicateVarDecl.ql
+++ b/javascript/ql/src/Declarations/DuplicateVarDecl.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/duplicate-variable-declaration
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/IneffectiveParameterType.ql b/javascript/ql/src/Declarations/IneffectiveParameterType.ql
index 18899bd0c4e..58480a84bf2 100644
--- a/javascript/ql/src/Declarations/IneffectiveParameterType.ql
+++ b/javascript/ql/src/Declarations/IneffectiveParameterType.ql
@@ -5,9 +5,10 @@
* @problem.severity warning
* @id js/ineffective-parameter-type
* @precision high
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* typescript
- * quality
*/
import javascript
diff --git a/javascript/ql/src/Declarations/MissingThisQualifier.ql b/javascript/ql/src/Declarations/MissingThisQualifier.ql
index 0d41cf19b19..f5e50df9aa7 100644
--- a/javascript/ql/src/Declarations/MissingThisQualifier.ql
+++ b/javascript/ql/src/Declarations/MissingThisQualifier.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity error
* @id js/missing-this-qualifier
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * readability
* methods
* @precision high
*/
diff --git a/javascript/ql/src/Declarations/MissingVarDecl.ql b/javascript/ql/src/Declarations/MissingVarDecl.ql
index 8dd40cb064a..390fc0af51c 100644
--- a/javascript/ql/src/Declarations/MissingVarDecl.ql
+++ b/javascript/ql/src/Declarations/MissingVarDecl.ql
@@ -5,8 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/missing-variable-declaration
- * @tags reliability
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql b/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql
index a8f771706f1..5941e51d3b0 100644
--- a/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql
+++ b/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity error
* @id js/mixed-static-instance-this-access
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* methods
* @precision high
*/
diff --git a/javascript/ql/src/Declarations/TemporalDeadZone.ql b/javascript/ql/src/Declarations/TemporalDeadZone.ql
index dbb5f7275d3..f51303ee392 100644
--- a/javascript/ql/src/Declarations/TemporalDeadZone.ql
+++ b/javascript/ql/src/Declarations/TemporalDeadZone.ql
@@ -5,8 +5,10 @@
* @kind problem
* @problem.severity error
* @id js/variable-use-in-temporal-dead-zone
- * @tags portability
+ * @tags quality
+ * reliability
* correctness
+ * portability
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/UniqueParameterNames.ql b/javascript/ql/src/Declarations/UniqueParameterNames.ql
index bb595cbe607..53b3657b966 100644
--- a/javascript/ql/src/Declarations/UniqueParameterNames.ql
+++ b/javascript/ql/src/Declarations/UniqueParameterNames.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/duplicate-parameter-name
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* @precision very-high
*/
diff --git a/javascript/ql/src/Declarations/UniquePropertyNames.ql b/javascript/ql/src/Declarations/UniquePropertyNames.ql
index e98857945ad..f168b46c54e 100644
--- a/javascript/ql/src/Declarations/UniquePropertyNames.ql
+++ b/javascript/ql/src/Declarations/UniquePropertyNames.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/overwritten-property
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-563
* @precision very-high
diff --git a/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql b/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql
index 23406eb0b72..a68617ea2f1 100644
--- a/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql
+++ b/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql
@@ -7,7 +7,9 @@
* @problem.severity warning
* @id js/unreachable-method-overloads
* @precision high
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* typescript
*/
diff --git a/javascript/ql/src/Declarations/UnusedVariable.ql b/javascript/ql/src/Declarations/UnusedVariable.ql
index 7346b58c049..66e15cdbf81 100644
--- a/javascript/ql/src/Declarations/UnusedVariable.ql
+++ b/javascript/ql/src/Declarations/UnusedVariable.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/unused-local-variable
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/ComparisonWithNaN.ql b/javascript/ql/src/Expressions/ComparisonWithNaN.ql
index 82a45a3a562..1fb61b48965 100644
--- a/javascript/ql/src/Expressions/ComparisonWithNaN.ql
+++ b/javascript/ql/src/Expressions/ComparisonWithNaN.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/comparison-with-nan
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-570
* external/cwe/cwe-571
diff --git a/javascript/ql/src/Expressions/DuplicateCondition.ql b/javascript/ql/src/Expressions/DuplicateCondition.ql
index a13a0f15810..75f020d382a 100644
--- a/javascript/ql/src/Expressions/DuplicateCondition.ql
+++ b/javascript/ql/src/Expressions/DuplicateCondition.ql
@@ -5,8 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/duplicate-condition
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * readability
* external/cwe/cwe-561
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/DuplicateProperty.ql b/javascript/ql/src/Expressions/DuplicateProperty.ql
index af518842a61..febdfe5b882 100644
--- a/javascript/ql/src/Expressions/DuplicateProperty.ql
+++ b/javascript/ql/src/Expressions/DuplicateProperty.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/duplicate-property
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* external/cwe/cwe-563
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/DuplicateSwitchCase.ql b/javascript/ql/src/Expressions/DuplicateSwitchCase.ql
index 56cb848dba1..1ef8aa76a4b 100644
--- a/javascript/ql/src/Expressions/DuplicateSwitchCase.ql
+++ b/javascript/ql/src/Expressions/DuplicateSwitchCase.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity warning
* @id js/duplicate-switch-case
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-561
* @precision very-high
diff --git a/javascript/ql/src/Expressions/ExprHasNoEffect.ql b/javascript/ql/src/Expressions/ExprHasNoEffect.ql
index 9cdb22b8ecf..fd613d3aa9f 100644
--- a/javascript/ql/src/Expressions/ExprHasNoEffect.ql
+++ b/javascript/ql/src/Expressions/ExprHasNoEffect.ql
@@ -7,10 +7,9 @@
* @id js/useless-expression
* @tags quality
* maintainability
- * correctness
+ * useless-code
* external/cwe/cwe-480
* external/cwe/cwe-561
- * useless-code
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/HeterogeneousComparison.ql b/javascript/ql/src/Expressions/HeterogeneousComparison.ql
index 3b4c59f08b6..e99adad21cd 100644
--- a/javascript/ql/src/Expressions/HeterogeneousComparison.ql
+++ b/javascript/ql/src/Expressions/HeterogeneousComparison.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity warning
* @id js/comparison-between-incompatible-types
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-570
* external/cwe/cwe-571
diff --git a/javascript/ql/src/Expressions/ImplicitOperandConversion.ql b/javascript/ql/src/Expressions/ImplicitOperandConversion.ql
index 5d3f16e0eb8..eda12e9d98b 100644
--- a/javascript/ql/src/Expressions/ImplicitOperandConversion.ql
+++ b/javascript/ql/src/Expressions/ImplicitOperandConversion.ql
@@ -5,8 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/implicit-operand-conversion
- * @tags reliability
- * readability
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-704
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/MissingAwait.ql b/javascript/ql/src/Expressions/MissingAwait.ql
index a16d31ee2a5..a537156da01 100644
--- a/javascript/ql/src/Expressions/MissingAwait.ql
+++ b/javascript/ql/src/Expressions/MissingAwait.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/missing-await
- * @tags correctness
- * quality
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql b/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql
index 705b3eedfc0..1d16bb346fc 100644
--- a/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql
+++ b/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql
@@ -6,7 +6,9 @@
* @problem.severity warning
* @id js/missing-dot-length-in-comparison
* @precision high
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
*/
import javascript
diff --git a/javascript/ql/src/Expressions/MissingSpaceInAppend.ql b/javascript/ql/src/Expressions/MissingSpaceInAppend.ql
index 7589c0d54f3..d4c2bcb18ac 100644
--- a/javascript/ql/src/Expressions/MissingSpaceInAppend.ql
+++ b/javascript/ql/src/Expressions/MissingSpaceInAppend.ql
@@ -7,7 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id js/missing-space-in-concatenation
- * @tags readability
+ * @tags quality
+ * maintainability
+ * readability
*/
import javascript
diff --git a/javascript/ql/src/Expressions/MisspelledVariableName.ql b/javascript/ql/src/Expressions/MisspelledVariableName.ql
index b6f0ad88e3e..7444ba3a5d9 100644
--- a/javascript/ql/src/Expressions/MisspelledVariableName.ql
+++ b/javascript/ql/src/Expressions/MisspelledVariableName.ql
@@ -6,8 +6,8 @@
* @kind problem
* @problem.severity warning
* @id js/misspelled-variable-name
- * @tags maintainability
- * readability
+ * @tags quality
+ * reliability
* correctness
* @precision very-high
*/
diff --git a/javascript/ql/src/Expressions/RedundantExpression.ql b/javascript/ql/src/Expressions/RedundantExpression.ql
index bf668bd649f..35b86a9f025 100644
--- a/javascript/ql/src/Expressions/RedundantExpression.ql
+++ b/javascript/ql/src/Expressions/RedundantExpression.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity warning
* @id js/redundant-operation
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-480
* external/cwe/cwe-561
diff --git a/javascript/ql/src/Expressions/SelfAssignment.ql b/javascript/ql/src/Expressions/SelfAssignment.ql
index 784f01fa742..603762b5952 100644
--- a/javascript/ql/src/Expressions/SelfAssignment.ql
+++ b/javascript/ql/src/Expressions/SelfAssignment.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity warning
* @id js/redundant-assignment
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-480
* external/cwe/cwe-561
diff --git a/javascript/ql/src/Expressions/ShiftOutOfRange.ql b/javascript/ql/src/Expressions/ShiftOutOfRange.ql
index ec8b801cbe6..395baaff11f 100644
--- a/javascript/ql/src/Expressions/ShiftOutOfRange.ql
+++ b/javascript/ql/src/Expressions/ShiftOutOfRange.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/shift-out-of-range
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* external/cwe/cwe-197
* @precision very-high
diff --git a/javascript/ql/src/Expressions/StringInsteadOfRegex.ql b/javascript/ql/src/Expressions/StringInsteadOfRegex.ql
index c00088abcd9..44d07ee98e6 100644
--- a/javascript/ql/src/Expressions/StringInsteadOfRegex.ql
+++ b/javascript/ql/src/Expressions/StringInsteadOfRegex.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/string-instead-of-regex
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/SuspiciousInvocation.ql b/javascript/ql/src/Expressions/SuspiciousInvocation.ql
index ca7281eba5c..1472e2dbe2f 100644
--- a/javascript/ql/src/Expressions/SuspiciousInvocation.ql
+++ b/javascript/ql/src/Expressions/SuspiciousInvocation.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/call-to-non-callable
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-476
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/SuspiciousPropAccess.ql b/javascript/ql/src/Expressions/SuspiciousPropAccess.ql
index f51674a0418..88ce9dda7c4 100644
--- a/javascript/ql/src/Expressions/SuspiciousPropAccess.ql
+++ b/javascript/ql/src/Expressions/SuspiciousPropAccess.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/property-access-on-non-object
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-476
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql b/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql
index fa10e4786c4..4cc94c5852b 100644
--- a/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql
+++ b/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity error
* @id js/unbound-event-handler-receiver
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql b/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql
index 869971f5f1f..104e7188e7e 100644
--- a/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql
+++ b/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql
@@ -5,8 +5,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/unclear-operator-precedence
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * readability
* statistical
* non-attributable
* external/cwe/cwe-783
diff --git a/javascript/ql/src/Expressions/UnknownDirective.ql b/javascript/ql/src/Expressions/UnknownDirective.ql
index 331b61cafda..be91cf5ff89 100644
--- a/javascript/ql/src/Expressions/UnknownDirective.ql
+++ b/javascript/ql/src/Expressions/UnknownDirective.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/unknown-directive
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql b/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql
index 8e5cd8cf431..3b06187a207 100644
--- a/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql
+++ b/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/unneeded-defensive-code
- * @tags correctness
+ * @tags quality
+ * maintainability
+ * useless-code
* external/cwe/cwe-570
* external/cwe/cwe-571
* @precision very-high
diff --git a/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql b/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql
index 36d9f773708..b8711db8fab 100644
--- a/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql
+++ b/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql
@@ -5,8 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/whitespace-contradicts-precedence
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * readability
* statistical
* non-attributable
* external/cwe/cwe-783
diff --git a/javascript/ql/src/LanguageFeatures/BadTypeof.ql b/javascript/ql/src/LanguageFeatures/BadTypeof.ql
index d287a0a1b6d..97492d3562a 100644
--- a/javascript/ql/src/LanguageFeatures/BadTypeof.ql
+++ b/javascript/ql/src/LanguageFeatures/BadTypeof.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/useless-type-test
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* language-features
* external/cwe/cwe-570
diff --git a/javascript/ql/src/LanguageFeatures/ConditionalComments.ql b/javascript/ql/src/LanguageFeatures/ConditionalComments.ql
index 255415c0564..607fc47c38d 100644
--- a/javascript/ql/src/LanguageFeatures/ConditionalComments.ql
+++ b/javascript/ql/src/LanguageFeatures/ConditionalComments.ql
@@ -4,8 +4,10 @@
* @kind problem
* @problem.severity warning
* @id js/conditional-comment
- * @tags portability
+ * @tags quality
* maintainability
+ * readability
+ * portability
* language-features
* external/cwe/cwe-758
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/DeleteVar.ql b/javascript/ql/src/LanguageFeatures/DeleteVar.ql
index ed3940a1c70..715f314381b 100644
--- a/javascript/ql/src/LanguageFeatures/DeleteVar.ql
+++ b/javascript/ql/src/LanguageFeatures/DeleteVar.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/deletion-of-non-property
- * @tags reliability
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* external/cwe/cwe-480
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql b/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql
index db33566a758..2e67bfb6e2b 100644
--- a/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql
+++ b/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql
@@ -5,8 +5,10 @@
* @kind problem
* @problem.severity warning
* @id js/non-standard-language-feature
- * @tags portability
+ * @tags quality
* maintainability
+ * readability
+ * portability
* language-features
* external/cwe/cwe-758
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql b/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql
index 0c13ff72437..c5f5e8bfe12 100644
--- a/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql
+++ b/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql
@@ -5,8 +5,10 @@
* @kind problem
* @problem.severity error
* @id js/for-in-comprehension
- * @tags portability
+ * @tags quality
* maintainability
+ * readability
+ * portability
* language-features
* external/cwe/cwe-758
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql b/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql
index 4c8939c4180..06f50bb60dc 100644
--- a/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql
+++ b/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql
@@ -6,7 +6,9 @@
* @kind problem
* @problem.severity error
* @id js/illegal-invocation
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* @precision high
*/
diff --git a/javascript/ql/src/LanguageFeatures/InconsistentNew.ql b/javascript/ql/src/LanguageFeatures/InconsistentNew.ql
index 8a14dbe37c1..9044e851496 100644
--- a/javascript/ql/src/LanguageFeatures/InconsistentNew.ql
+++ b/javascript/ql/src/LanguageFeatures/InconsistentNew.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity warning
* @id js/inconsistent-use-of-new
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* language-features
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql b/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql
index 89dc7535c60..8770d8dc271 100644
--- a/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql
+++ b/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/invalid-prototype-value
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* external/cwe/cwe-704
* @precision high
diff --git a/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql b/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql
index e3935386289..4f3815d6fc6 100644
--- a/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql
+++ b/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql
@@ -5,9 +5,11 @@
* @kind problem
* @problem.severity warning
* @id js/index-out-of-bounds
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
+ * language-features
* external/cwe/cwe-193
* @precision high
*/
diff --git a/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql b/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql
index 9e3c4235350..090f6b07845 100644
--- a/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql
+++ b/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/non-linear-pattern
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* language-features
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql b/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql
index 19d372f6529..cb544625648 100644
--- a/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql
+++ b/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/property-assignment-on-primitive
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* external/cwe/cwe-704
* @precision high
diff --git a/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql b/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql
index 3f99062112d..17a9da64cc0 100644
--- a/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql
+++ b/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity recommendation
* @id js/automatic-semicolon-insertion
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* language-features
* statistical
* non-attributable
diff --git a/javascript/ql/src/LanguageFeatures/SetterReturn.ql b/javascript/ql/src/LanguageFeatures/SetterReturn.ql
index 0333246a439..b90541d3912 100644
--- a/javascript/ql/src/LanguageFeatures/SetterReturn.ql
+++ b/javascript/ql/src/LanguageFeatures/SetterReturn.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/setter-return
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
* language-features
* @precision very-high
*/
diff --git a/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql b/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
index fd493a247a4..82c69a1732a 100644
--- a/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
+++ b/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
@@ -4,10 +4,10 @@
* @kind problem
* @problem.severity warning
* @id js/superfluous-trailing-arguments
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* language-features
- * quality
* external/cwe/cwe-685
* @precision very-high
*/
diff --git a/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql b/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql
index b29844d90b9..7c285c45ec7 100644
--- a/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql
+++ b/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql
@@ -6,7 +6,9 @@
* @kind problem
* @problem.severity error
* @id js/strict-mode-call-stack-introspection
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* @precision high
*/
diff --git a/javascript/ql/src/LanguageFeatures/SyntaxError.ql b/javascript/ql/src/LanguageFeatures/SyntaxError.ql
index d4428c75774..0c9a69490f7 100644
--- a/javascript/ql/src/LanguageFeatures/SyntaxError.ql
+++ b/javascript/ql/src/LanguageFeatures/SyntaxError.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity recommendation
* @id js/syntax-error
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* language-features
* @precision very-high
diff --git a/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql b/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql
index 77ce3e5e858..e93700bdccf 100644
--- a/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql
+++ b/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/incomplete-object-initialization
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* @precision high
*/
diff --git a/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql b/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql
index ba39738a777..7a8f3bdf948 100644
--- a/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql
+++ b/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql
@@ -6,7 +6,9 @@
* @problem.severity warning
* @id js/unused-index-variable
* @precision high
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
*/
import javascript
diff --git a/javascript/ql/src/LanguageFeatures/WithStatement.ql b/javascript/ql/src/LanguageFeatures/WithStatement.ql
index cb2cfc728d8..25f6c4e8fc4 100644
--- a/javascript/ql/src/LanguageFeatures/WithStatement.ql
+++ b/javascript/ql/src/LanguageFeatures/WithStatement.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/with-statement
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * complexity
* language-features
* @precision very-high
*/
diff --git a/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql b/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql
index 4f9241e7303..8cd18991d02 100644
--- a/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql
+++ b/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity error
* @id js/yield-outside-generator
- * @tags maintainability
+ * @tags quality
+ * reliability
+ * correctness
* language-features
* external/cwe/cwe-758
* @precision very-high
diff --git a/javascript/ql/src/NodeJS/InvalidExport.ql b/javascript/ql/src/NodeJS/InvalidExport.ql
index e0b4a73fd69..f7858102e75 100644
--- a/javascript/ql/src/NodeJS/InvalidExport.ql
+++ b/javascript/ql/src/NodeJS/InvalidExport.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/node/assignment-to-exports-variable
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* frameworks/node.js
* external/cwe/cwe-563
* @precision very-high
diff --git a/javascript/ql/src/NodeJS/MissingExports.ql b/javascript/ql/src/NodeJS/MissingExports.ql
index 15badce359f..c606ce14eb2 100644
--- a/javascript/ql/src/NodeJS/MissingExports.ql
+++ b/javascript/ql/src/NodeJS/MissingExports.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity error
* @id js/node/missing-exports-qualifier
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* frameworks/node.js
* @precision high
*/
diff --git a/javascript/ql/src/React/DirectStateMutation.ql b/javascript/ql/src/React/DirectStateMutation.ql
index 6e3d63a5214..a00f55524cd 100644
--- a/javascript/ql/src/React/DirectStateMutation.ql
+++ b/javascript/ql/src/React/DirectStateMutation.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/react/direct-state-mutation
- * @tags reliability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/react
* @precision very-high
*/
diff --git a/javascript/ql/src/React/InconsistentStateUpdate.ql b/javascript/ql/src/React/InconsistentStateUpdate.ql
index 31625b2187a..f46427b9c59 100644
--- a/javascript/ql/src/React/InconsistentStateUpdate.ql
+++ b/javascript/ql/src/React/InconsistentStateUpdate.ql
@@ -6,7 +6,9 @@
* @kind problem
* @problem.severity warning
* @id js/react/inconsistent-state-update
- * @tags reliability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/react
* @precision very-high
*/
diff --git a/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql b/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql
index e14b880b1b1..da49bd43ab9 100644
--- a/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql
+++ b/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/react/unsupported-state-update-in-lifecycle-method
- * @tags reliability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/react
* @precision high
*/
diff --git a/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql b/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql
index 721d6639ac7..24d5590185b 100644
--- a/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql
+++ b/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/react/unused-or-undefined-state-property
- * @tags correctness
+ * @tags quality
* reliability
+ * correctness
* frameworks/react
* @precision high
*/
diff --git a/javascript/ql/src/RegExp/BackrefBeforeGroup.ql b/javascript/ql/src/RegExp/BackrefBeforeGroup.ql
index abbc95e40b9..3572bf2cbc6 100644
--- a/javascript/ql/src/RegExp/BackrefBeforeGroup.ql
+++ b/javascript/ql/src/RegExp/BackrefBeforeGroup.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/regex/back-reference-before-group
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* @precision very-high
diff --git a/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql b/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql
index b2ad4722011..6a5e1528d6d 100644
--- a/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql
+++ b/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity error
* @id js/regex/back-reference-to-negative-lookahead
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* @precision very-high
diff --git a/javascript/ql/src/RegExp/EmptyCharacterClass.ql b/javascript/ql/src/RegExp/EmptyCharacterClass.ql
index f991de9759d..fb336c3fbe8 100644
--- a/javascript/ql/src/RegExp/EmptyCharacterClass.ql
+++ b/javascript/ql/src/RegExp/EmptyCharacterClass.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity warning
* @id js/regex/empty-character-class
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* @precision very-high
diff --git a/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql b/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
index 1d063534903..0a9a37120d7 100644
--- a/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
+++ b/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
@@ -4,9 +4,10 @@
* @kind problem
* @problem.severity warning
* @id js/regex/always-matches
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* regular-expressions
- * quality
* @precision high
*/
diff --git a/javascript/ql/src/RegExp/UnboundBackref.ql b/javascript/ql/src/RegExp/UnboundBackref.ql
index 00cc9536f12..026c5472fb5 100644
--- a/javascript/ql/src/RegExp/UnboundBackref.ql
+++ b/javascript/ql/src/RegExp/UnboundBackref.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity warning
* @id js/regex/unbound-back-reference
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* @precision very-high
diff --git a/javascript/ql/src/RegExp/UnmatchableCaret.ql b/javascript/ql/src/RegExp/UnmatchableCaret.ql
index 4dd5a6dc26b..401b8db73c5 100644
--- a/javascript/ql/src/RegExp/UnmatchableCaret.ql
+++ b/javascript/ql/src/RegExp/UnmatchableCaret.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/regex/unmatchable-caret
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* external/cwe/cwe-561
diff --git a/javascript/ql/src/RegExp/UnmatchableDollar.ql b/javascript/ql/src/RegExp/UnmatchableDollar.ql
index 59005b45410..c5b8cd9781f 100644
--- a/javascript/ql/src/RegExp/UnmatchableDollar.ql
+++ b/javascript/ql/src/RegExp/UnmatchableDollar.ql
@@ -6,7 +6,8 @@
* @kind problem
* @problem.severity error
* @id js/regex/unmatchable-dollar
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* regular-expressions
* external/cwe/cwe-561
diff --git a/javascript/ql/src/Statements/DanglingElse.ql b/javascript/ql/src/Statements/DanglingElse.ql
index bd9ea782db7..fdea5f67a86 100644
--- a/javascript/ql/src/Statements/DanglingElse.ql
+++ b/javascript/ql/src/Statements/DanglingElse.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/misleading-indentation-of-dangling-else
- * @tags readability
+ * @tags quality
+ * maintainability
+ * readability
* statistical
* non-attributable
* external/cwe/cwe-483
diff --git a/javascript/ql/src/Statements/IgnoreArrayResult.ql b/javascript/ql/src/Statements/IgnoreArrayResult.ql
index 9123b520f6f..dbf035cdb64 100644
--- a/javascript/ql/src/Statements/IgnoreArrayResult.ql
+++ b/javascript/ql/src/Statements/IgnoreArrayResult.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity warning
* @id js/ignore-array-result
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* @precision high
*/
diff --git a/javascript/ql/src/Statements/InconsistentLoopOrientation.ql b/javascript/ql/src/Statements/InconsistentLoopOrientation.ql
index 7692a9d3d20..42d8912e015 100644
--- a/javascript/ql/src/Statements/InconsistentLoopOrientation.ql
+++ b/javascript/ql/src/Statements/InconsistentLoopOrientation.ql
@@ -8,7 +8,9 @@
* @kind problem
* @problem.severity error
* @id js/inconsistent-loop-direction
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-835
* @precision very-high
*/
diff --git a/javascript/ql/src/Statements/LabelInCase.ql b/javascript/ql/src/Statements/LabelInCase.ql
index e88d366136f..b401e89d0fa 100644
--- a/javascript/ql/src/Statements/LabelInCase.ql
+++ b/javascript/ql/src/Statements/LabelInCase.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity warning
* @id js/label-in-switch
- * @tags reliability
+ * @tags quality
+ * maintainability
* readability
* @precision very-high
*/
diff --git a/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql b/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql
index 91ee1bd4c00..abfd9cde4ac 100644
--- a/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql
+++ b/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/misleading-indentation-after-control-statement
- * @tags correctness
+ * @tags quality
+ * maintainability
+ * readability
* statistical
* non-attributable
* external/cwe/cwe-483
diff --git a/javascript/ql/src/Statements/ReturnAssignsLocal.ql b/javascript/ql/src/Statements/ReturnAssignsLocal.ql
index 6056914fd80..7ac1fa7fd5f 100644
--- a/javascript/ql/src/Statements/ReturnAssignsLocal.ql
+++ b/javascript/ql/src/Statements/ReturnAssignsLocal.ql
@@ -5,7 +5,8 @@
* @kind problem
* @problem.severity warning
* @id js/useless-assignment-in-return
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* external/cwe/cwe-563
* @precision very-high
diff --git a/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql b/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql
index ba0d523ae75..308c5412d9b 100644
--- a/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql
+++ b/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity error
* @id js/unused-loop-variable
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * readability
* @precision high
*/
diff --git a/javascript/ql/src/Statements/UnreachableStatement.ql b/javascript/ql/src/Statements/UnreachableStatement.ql
index 092189609c0..7ffd585563e 100644
--- a/javascript/ql/src/Statements/UnreachableStatement.ql
+++ b/javascript/ql/src/Statements/UnreachableStatement.ql
@@ -4,8 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/unreachable-statement
- * @tags maintainability
- * correctness
+ * @tags quality
+ * maintainability
+ * useless-code
* external/cwe/cwe-561
* @precision very-high
*/
diff --git a/javascript/ql/src/Statements/UseOfReturnlessFunction.ql b/javascript/ql/src/Statements/UseOfReturnlessFunction.ql
index 818f0d922d4..4a381f4c2df 100644
--- a/javascript/ql/src/Statements/UseOfReturnlessFunction.ql
+++ b/javascript/ql/src/Statements/UseOfReturnlessFunction.ql
@@ -4,7 +4,8 @@
* @kind problem
* @problem.severity warning
* @id js/use-of-returnless-function
- * @tags maintainability
+ * @tags quality
+ * reliability
* correctness
* @precision high
*/
diff --git a/javascript/ql/src/Statements/UselessComparisonTest.ql b/javascript/ql/src/Statements/UselessComparisonTest.ql
index 6066d7c4329..dd87ed42b14 100644
--- a/javascript/ql/src/Statements/UselessComparisonTest.ql
+++ b/javascript/ql/src/Statements/UselessComparisonTest.ql
@@ -5,7 +5,9 @@
* @kind problem
* @problem.severity warning
* @id js/useless-comparison-test
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* @precision high
*/
diff --git a/javascript/ql/src/Statements/UselessConditional.ql b/javascript/ql/src/Statements/UselessConditional.ql
index cc70defa7b2..210f27bb1db 100644
--- a/javascript/ql/src/Statements/UselessConditional.ql
+++ b/javascript/ql/src/Statements/UselessConditional.ql
@@ -6,7 +6,9 @@
* @kind problem
* @problem.severity warning
* @id js/trivial-conditional
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-570
* external/cwe/cwe-571
* @precision very-high
diff --git a/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql b/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql
index 828ee373696..c7c97173d8b 100644
--- a/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql
+++ b/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql
@@ -4,7 +4,9 @@
* @kind problem
* @problem.severity warning
* @id js/vue/arrow-method-on-vue-instance
- * @tags reliability
+ * @tags quality
+ * reliability
+ * correctness
* frameworks/vue
* @precision high
*/
From b14b661cd18b29a6e355e6e6ca4860820d79a8da Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 14:12:39 +0200
Subject: [PATCH 046/213] JS: add change note
---
javascript/ql/src/change-notes/2025-06-16-mass-promotion.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 javascript/ql/src/change-notes/2025-06-16-mass-promotion.md
diff --git a/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md b/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md
new file mode 100644
index 00000000000..dedaba09d1d
--- /dev/null
+++ b/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md
@@ -0,0 +1,4 @@
+---
+category: queryMetadata
+---
+* The `quality` tag has been added to multiple JavaScript quality queries, with tags for `reliability` or `maintainability` categories and their sub-categories. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories.
From 67aac7abfab8af3731ba7c06a1eb16d7f6bb6206 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 16:23:40 +0200
Subject: [PATCH 047/213] JS: add test cases for middleware property assignment
tracking
---
.../Security/CWE-918/RequestForgery.expected | 14 ++++++++++
.../Security/CWE-918/serverSide2.js | 27 +++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
index dde72095df1..b562fcd8992 100644
--- a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
+++ b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
@@ -6,6 +6,8 @@
| apollo.serverSide.ts:8:39:8:64 | get(fil ... => {}) | apollo.serverSide.ts:7:36:7:44 | { files } | apollo.serverSide.ts:8:43:8:50 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:8:43:8:50 | file.url | URL | apollo.serverSide.ts:7:36:7:44 | { files } | user-provided value |
| apollo.serverSide.ts:18:37:18:62 | get(fil ... => {}) | apollo.serverSide.ts:17:34:17:42 | { files } | apollo.serverSide.ts:18:41:18:48 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:18:41:18:48 | file.url | URL | apollo.serverSide.ts:17:34:17:42 | { files } | user-provided value |
| axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | The $@ of this request depends on a $@. | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | endpoint | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | user-provided value |
+| serverSide2.js:23:29:23:49 | axios.g ... etUrl2) | serverSide2.js:22:24:22:30 | req.url | serverSide2.js:23:39:23:48 | targetUrl2 | The $@ of this request depends on a $@. | serverSide2.js:23:39:23:48 | targetUrl2 | URL | serverSide2.js:22:24:22:30 | req.url | user-provided value |
+| serverSide2.js:26:29:26:49 | axios.g ... etUrl3) | serverSide2.js:11:24:11:30 | req.url | serverSide2.js:26:39:26:48 | targetUrl3 | The $@ of this request depends on a $@. | serverSide2.js:26:39:26:48 | targetUrl3 | URL | serverSide2.js:11:24:11:30 | req.url | user-provided value |
| serverSide.js:18:5:18:20 | request(tainted) | serverSide.js:14:29:14:35 | req.url | serverSide.js:18:13:18:19 | tainted | The $@ of this request depends on a $@. | serverSide.js:18:13:18:19 | tainted | URL | serverSide.js:14:29:14:35 | req.url | user-provided value |
| serverSide.js:20:5:20:24 | request.get(tainted) | serverSide.js:14:29:14:35 | req.url | serverSide.js:20:17:20:23 | tainted | The $@ of this request depends on a $@. | serverSide.js:20:17:20:23 | tainted | URL | serverSide.js:14:29:14:35 | req.url | user-provided value |
| serverSide.js:24:5:24:20 | request(options) | serverSide.js:14:29:14:35 | req.url | serverSide.js:23:19:23:25 | tainted | The $@ of this request depends on a $@. | serverSide.js:23:19:23:25 | tainted | URL | serverSide.js:14:29:14:35 | req.url | user-provided value |
@@ -61,6 +63,11 @@ edges
| axiosInterceptors.serverSide.js:19:21:19:28 | req.body | axiosInterceptors.serverSide.js:19:11:19:17 | { url } | provenance | |
| axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | provenance | |
| axiosInterceptors.serverSide.js:20:23:20:25 | url | axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | provenance | |
+| serverSide2.js:11:24:11:30 | req.url | serverSide2.js:25:24:25:41 | req.SomeObject.url | provenance | |
+| serverSide2.js:22:11:22:36 | targetUrl2 | serverSide2.js:23:39:23:48 | targetUrl2 | provenance | |
+| serverSide2.js:22:24:22:30 | req.url | serverSide2.js:22:11:22:36 | targetUrl2 | provenance | |
+| serverSide2.js:25:11:25:47 | targetUrl3 | serverSide2.js:26:39:26:48 | targetUrl3 | provenance | |
+| serverSide2.js:25:24:25:41 | req.SomeObject.url | serverSide2.js:25:11:25:47 | targetUrl3 | provenance | |
| serverSide.js:14:9:14:52 | tainted | serverSide.js:18:13:18:19 | tainted | provenance | |
| serverSide.js:14:9:14:52 | tainted | serverSide.js:20:17:20:23 | tainted | provenance | |
| serverSide.js:14:9:14:52 | tainted | serverSide.js:23:19:23:25 | tainted | provenance | |
@@ -153,6 +160,13 @@ nodes
| axiosInterceptors.serverSide.js:19:21:19:28 | req.body | semmle.label | req.body |
| axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | semmle.label | userProvidedUrl |
| axiosInterceptors.serverSide.js:20:23:20:25 | url | semmle.label | url |
+| serverSide2.js:11:24:11:30 | req.url | semmle.label | req.url |
+| serverSide2.js:22:11:22:36 | targetUrl2 | semmle.label | targetUrl2 |
+| serverSide2.js:22:24:22:30 | req.url | semmle.label | req.url |
+| serverSide2.js:23:39:23:48 | targetUrl2 | semmle.label | targetUrl2 |
+| serverSide2.js:25:11:25:47 | targetUrl3 | semmle.label | targetUrl3 |
+| serverSide2.js:25:24:25:41 | req.SomeObject.url | semmle.label | req.SomeObject.url |
+| serverSide2.js:26:39:26:48 | targetUrl3 | semmle.label | targetUrl3 |
| serverSide.js:14:9:14:52 | tainted | semmle.label | tainted |
| serverSide.js:14:19:14:42 | url.par ... , true) | semmle.label | url.par ... , true) |
| serverSide.js:14:29:14:35 | req.url | semmle.label | req.url |
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
new file mode 100644
index 00000000000..9f813c5b2c1
--- /dev/null
+++ b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
@@ -0,0 +1,27 @@
+const express = require('express');
+const axios = require('axios');
+const qs = require('qs');
+
+const app = express();
+const PORT = 3000;
+
+app.use((req, res, next) => {
+ req.parsedQueryFromParsedUrl = qs.parse(req._parsedUrl.query); // $MISSING:Source[js/request-forgery]
+ req.parsedQuery.url = req.url || {}; // $MISSING:Source[js/request-forgery]
+ req.SomeObject.url = req.url; // $Source[js/request-forgery]
+ next();
+});
+
+app.get('/proxy', async (req, res) => {
+ const targetUrl = req.parsedQuery.url;
+ const response = await axios.get(targetUrl); // $MISSING:Alert[js/request-forgery]
+
+ const targetUrl1 = req.parsedQueryFromParsedUrl.url;
+ const response1 = await axios.get(targetUrl1); // $MISSING:Alert[js/request-forgery]
+
+ const targetUrl2 = req.url || {}; // $Source[js/request-forgery]
+ const response2 = await axios.get(targetUrl2); // $Alert[js/request-forgery]
+
+ const targetUrl3 = req.SomeObject.url || {};
+ const response3 = await axios.get(targetUrl3); // $Alert[js/request-forgery]
+});
From da21a064ac27c8a34b8426de367561c5ce29249b Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 16:28:30 +0200
Subject: [PATCH 048/213] JS: add `_parsedUrl` as remote input source
---
.../ql/lib/semmle/javascript/frameworks/Express.qll | 2 +-
.../Security/CWE-918/RequestForgery.expected | 10 ++++++++++
.../test/query-tests/Security/CWE-918/serverSide2.js | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/javascript/ql/lib/semmle/javascript/frameworks/Express.qll b/javascript/ql/lib/semmle/javascript/frameworks/Express.qll
index ffeee7df73e..dac9fe0f118 100644
--- a/javascript/ql/lib/semmle/javascript/frameworks/Express.qll
+++ b/javascript/ql/lib/semmle/javascript/frameworks/Express.qll
@@ -620,7 +620,7 @@ module Express {
or
// `req.path`
kind = "url" and
- this = ref.getAPropertyRead("path")
+ this = ref.getAPropertyRead(["path", "_parsedUrl"])
)
}
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
index b562fcd8992..bd1638abe44 100644
--- a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
+++ b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
@@ -6,6 +6,7 @@
| apollo.serverSide.ts:8:39:8:64 | get(fil ... => {}) | apollo.serverSide.ts:7:36:7:44 | { files } | apollo.serverSide.ts:8:43:8:50 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:8:43:8:50 | file.url | URL | apollo.serverSide.ts:7:36:7:44 | { files } | user-provided value |
| apollo.serverSide.ts:18:37:18:62 | get(fil ... => {}) | apollo.serverSide.ts:17:34:17:42 | { files } | apollo.serverSide.ts:18:41:18:48 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:18:41:18:48 | file.url | URL | apollo.serverSide.ts:17:34:17:42 | { files } | user-provided value |
| axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | The $@ of this request depends on a $@. | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | endpoint | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | user-provided value |
+| serverSide2.js:20:29:20:49 | axios.g ... etUrl1) | serverSide2.js:9:43:9:56 | req._parsedUrl | serverSide2.js:20:39:20:48 | targetUrl1 | The $@ of this request depends on a $@. | serverSide2.js:20:39:20:48 | targetUrl1 | URL | serverSide2.js:9:43:9:56 | req._parsedUrl | user-provided value |
| serverSide2.js:23:29:23:49 | axios.g ... etUrl2) | serverSide2.js:22:24:22:30 | req.url | serverSide2.js:23:39:23:48 | targetUrl2 | The $@ of this request depends on a $@. | serverSide2.js:23:39:23:48 | targetUrl2 | URL | serverSide2.js:22:24:22:30 | req.url | user-provided value |
| serverSide2.js:26:29:26:49 | axios.g ... etUrl3) | serverSide2.js:11:24:11:30 | req.url | serverSide2.js:26:39:26:48 | targetUrl3 | The $@ of this request depends on a $@. | serverSide2.js:26:39:26:48 | targetUrl3 | URL | serverSide2.js:11:24:11:30 | req.url | user-provided value |
| serverSide.js:18:5:18:20 | request(tainted) | serverSide.js:14:29:14:35 | req.url | serverSide.js:18:13:18:19 | tainted | The $@ of this request depends on a $@. | serverSide.js:18:13:18:19 | tainted | URL | serverSide.js:14:29:14:35 | req.url | user-provided value |
@@ -63,7 +64,11 @@ edges
| axiosInterceptors.serverSide.js:19:21:19:28 | req.body | axiosInterceptors.serverSide.js:19:11:19:17 | { url } | provenance | |
| axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | provenance | |
| axiosInterceptors.serverSide.js:20:23:20:25 | url | axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | provenance | |
+| serverSide2.js:9:34:9:63 | qs.pars ... .query) | serverSide2.js:19:24:19:51 | req.par ... rsedUrl | provenance | |
+| serverSide2.js:9:43:9:56 | req._parsedUrl | serverSide2.js:9:34:9:63 | qs.pars ... .query) | provenance | |
| serverSide2.js:11:24:11:30 | req.url | serverSide2.js:25:24:25:41 | req.SomeObject.url | provenance | |
+| serverSide2.js:19:11:19:55 | targetUrl1 | serverSide2.js:20:39:20:48 | targetUrl1 | provenance | |
+| serverSide2.js:19:24:19:51 | req.par ... rsedUrl | serverSide2.js:19:11:19:55 | targetUrl1 | provenance | |
| serverSide2.js:22:11:22:36 | targetUrl2 | serverSide2.js:23:39:23:48 | targetUrl2 | provenance | |
| serverSide2.js:22:24:22:30 | req.url | serverSide2.js:22:11:22:36 | targetUrl2 | provenance | |
| serverSide2.js:25:11:25:47 | targetUrl3 | serverSide2.js:26:39:26:48 | targetUrl3 | provenance | |
@@ -160,7 +165,12 @@ nodes
| axiosInterceptors.serverSide.js:19:21:19:28 | req.body | semmle.label | req.body |
| axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | semmle.label | userProvidedUrl |
| axiosInterceptors.serverSide.js:20:23:20:25 | url | semmle.label | url |
+| serverSide2.js:9:34:9:63 | qs.pars ... .query) | semmle.label | qs.pars ... .query) |
+| serverSide2.js:9:43:9:56 | req._parsedUrl | semmle.label | req._parsedUrl |
| serverSide2.js:11:24:11:30 | req.url | semmle.label | req.url |
+| serverSide2.js:19:11:19:55 | targetUrl1 | semmle.label | targetUrl1 |
+| serverSide2.js:19:24:19:51 | req.par ... rsedUrl | semmle.label | req.par ... rsedUrl |
+| serverSide2.js:20:39:20:48 | targetUrl1 | semmle.label | targetUrl1 |
| serverSide2.js:22:11:22:36 | targetUrl2 | semmle.label | targetUrl2 |
| serverSide2.js:22:24:22:30 | req.url | semmle.label | req.url |
| serverSide2.js:23:39:23:48 | targetUrl2 | semmle.label | targetUrl2 |
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
index 9f813c5b2c1..8c96f895f49 100644
--- a/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
+++ b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
@@ -6,7 +6,7 @@ const app = express();
const PORT = 3000;
app.use((req, res, next) => {
- req.parsedQueryFromParsedUrl = qs.parse(req._parsedUrl.query); // $MISSING:Source[js/request-forgery]
+ req.parsedQueryFromParsedUrl = qs.parse(req._parsedUrl.query); // $Source[js/request-forgery]
req.parsedQuery.url = req.url || {}; // $MISSING:Source[js/request-forgery]
req.SomeObject.url = req.url; // $Source[js/request-forgery]
next();
@@ -17,7 +17,7 @@ app.get('/proxy', async (req, res) => {
const response = await axios.get(targetUrl); // $MISSING:Alert[js/request-forgery]
const targetUrl1 = req.parsedQueryFromParsedUrl.url;
- const response1 = await axios.get(targetUrl1); // $MISSING:Alert[js/request-forgery]
+ const response1 = await axios.get(targetUrl1); // $Alert[js/request-forgery]
const targetUrl2 = req.url || {}; // $Source[js/request-forgery]
const response2 = await axios.get(targetUrl2); // $Alert[js/request-forgery]
From 060b98d36cecc0ad9eea1423452753bdc19e1ce3 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 16:31:17 +0200
Subject: [PATCH 049/213] JS: enchance middleware taint tracking via local
source
---
javascript/ql/lib/semmle/javascript/Routing.qll | 2 +-
.../query-tests/Security/CWE-918/RequestForgery.expected | 8 ++++++++
.../ql/test/query-tests/Security/CWE-918/serverSide2.js | 4 ++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/javascript/ql/lib/semmle/javascript/Routing.qll b/javascript/ql/lib/semmle/javascript/Routing.qll
index 530322a2d2c..8fe9f79d862 100644
--- a/javascript/ql/lib/semmle/javascript/Routing.qll
+++ b/javascript/ql/lib/semmle/javascript/Routing.qll
@@ -925,7 +925,7 @@ module Routing {
private DataFlow::Node getAnAccessPathRhs(Node base, int n, string path) {
// Assigned in the body of a route handler function, which is a middleware
exists(RouteHandler handler | base = handler |
- result = AccessPath::getAnAssignmentTo(handler.getParameter(n).ref(), path) and
+ result = AccessPath::getAnAssignmentTo(handler.getParameter(n).ref(), path).getALocalSource() and
(
exists(handler.getAContinuationInvocation())
or
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
index bd1638abe44..8f340596bab 100644
--- a/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
+++ b/javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected
@@ -6,6 +6,7 @@
| apollo.serverSide.ts:8:39:8:64 | get(fil ... => {}) | apollo.serverSide.ts:7:36:7:44 | { files } | apollo.serverSide.ts:8:43:8:50 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:8:43:8:50 | file.url | URL | apollo.serverSide.ts:7:36:7:44 | { files } | user-provided value |
| apollo.serverSide.ts:18:37:18:62 | get(fil ... => {}) | apollo.serverSide.ts:17:34:17:42 | { files } | apollo.serverSide.ts:18:41:18:48 | file.url | The $@ of this request depends on a $@. | apollo.serverSide.ts:18:41:18:48 | file.url | URL | apollo.serverSide.ts:17:34:17:42 | { files } | user-provided value |
| axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | The $@ of this request depends on a $@. | axiosInterceptors.serverSide.js:11:26:11:40 | userProvidedUrl | endpoint | axiosInterceptors.serverSide.js:19:21:19:28 | req.body | user-provided value |
+| serverSide2.js:17:28:17:47 | axios.get(targetUrl) | serverSide2.js:10:25:10:31 | req.url | serverSide2.js:17:38:17:46 | targetUrl | The $@ of this request depends on a $@. | serverSide2.js:17:38:17:46 | targetUrl | URL | serverSide2.js:10:25:10:31 | req.url | user-provided value |
| serverSide2.js:20:29:20:49 | axios.g ... etUrl1) | serverSide2.js:9:43:9:56 | req._parsedUrl | serverSide2.js:20:39:20:48 | targetUrl1 | The $@ of this request depends on a $@. | serverSide2.js:20:39:20:48 | targetUrl1 | URL | serverSide2.js:9:43:9:56 | req._parsedUrl | user-provided value |
| serverSide2.js:23:29:23:49 | axios.g ... etUrl2) | serverSide2.js:22:24:22:30 | req.url | serverSide2.js:23:39:23:48 | targetUrl2 | The $@ of this request depends on a $@. | serverSide2.js:23:39:23:48 | targetUrl2 | URL | serverSide2.js:22:24:22:30 | req.url | user-provided value |
| serverSide2.js:26:29:26:49 | axios.g ... etUrl3) | serverSide2.js:11:24:11:30 | req.url | serverSide2.js:26:39:26:48 | targetUrl3 | The $@ of this request depends on a $@. | serverSide2.js:26:39:26:48 | targetUrl3 | URL | serverSide2.js:11:24:11:30 | req.url | user-provided value |
@@ -66,7 +67,10 @@ edges
| axiosInterceptors.serverSide.js:20:23:20:25 | url | axiosInterceptors.serverSide.js:20:5:20:25 | userProvidedUrl | provenance | |
| serverSide2.js:9:34:9:63 | qs.pars ... .query) | serverSide2.js:19:24:19:51 | req.par ... rsedUrl | provenance | |
| serverSide2.js:9:43:9:56 | req._parsedUrl | serverSide2.js:9:34:9:63 | qs.pars ... .query) | provenance | |
+| serverSide2.js:10:25:10:31 | req.url | serverSide2.js:16:23:16:41 | req.parsedQuery.url | provenance | |
| serverSide2.js:11:24:11:30 | req.url | serverSide2.js:25:24:25:41 | req.SomeObject.url | provenance | |
+| serverSide2.js:16:11:16:41 | targetUrl | serverSide2.js:17:38:17:46 | targetUrl | provenance | |
+| serverSide2.js:16:23:16:41 | req.parsedQuery.url | serverSide2.js:16:11:16:41 | targetUrl | provenance | |
| serverSide2.js:19:11:19:55 | targetUrl1 | serverSide2.js:20:39:20:48 | targetUrl1 | provenance | |
| serverSide2.js:19:24:19:51 | req.par ... rsedUrl | serverSide2.js:19:11:19:55 | targetUrl1 | provenance | |
| serverSide2.js:22:11:22:36 | targetUrl2 | serverSide2.js:23:39:23:48 | targetUrl2 | provenance | |
@@ -167,7 +171,11 @@ nodes
| axiosInterceptors.serverSide.js:20:23:20:25 | url | semmle.label | url |
| serverSide2.js:9:34:9:63 | qs.pars ... .query) | semmle.label | qs.pars ... .query) |
| serverSide2.js:9:43:9:56 | req._parsedUrl | semmle.label | req._parsedUrl |
+| serverSide2.js:10:25:10:31 | req.url | semmle.label | req.url |
| serverSide2.js:11:24:11:30 | req.url | semmle.label | req.url |
+| serverSide2.js:16:11:16:41 | targetUrl | semmle.label | targetUrl |
+| serverSide2.js:16:23:16:41 | req.parsedQuery.url | semmle.label | req.parsedQuery.url |
+| serverSide2.js:17:38:17:46 | targetUrl | semmle.label | targetUrl |
| serverSide2.js:19:11:19:55 | targetUrl1 | semmle.label | targetUrl1 |
| serverSide2.js:19:24:19:51 | req.par ... rsedUrl | semmle.label | req.par ... rsedUrl |
| serverSide2.js:20:39:20:48 | targetUrl1 | semmle.label | targetUrl1 |
diff --git a/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
index 8c96f895f49..7743d0eec38 100644
--- a/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
+++ b/javascript/ql/test/query-tests/Security/CWE-918/serverSide2.js
@@ -7,14 +7,14 @@ const PORT = 3000;
app.use((req, res, next) => {
req.parsedQueryFromParsedUrl = qs.parse(req._parsedUrl.query); // $Source[js/request-forgery]
- req.parsedQuery.url = req.url || {}; // $MISSING:Source[js/request-forgery]
+ req.parsedQuery.url = req.url || {}; // $Source[js/request-forgery]
req.SomeObject.url = req.url; // $Source[js/request-forgery]
next();
});
app.get('/proxy', async (req, res) => {
const targetUrl = req.parsedQuery.url;
- const response = await axios.get(targetUrl); // $MISSING:Alert[js/request-forgery]
+ const response = await axios.get(targetUrl); // $Alert[js/request-forgery]
const targetUrl1 = req.parsedQueryFromParsedUrl.url;
const response1 = await axios.get(targetUrl1); // $Alert[js/request-forgery]
From 72528749f2e291e360e678bdcf41e9f0812783ba Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Mon, 16 Jun 2025 16:35:39 +0200
Subject: [PATCH 050/213] JS: add change note
---
.../ql/lib/change-notes/2025-06-16-middleware-express.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 javascript/ql/lib/change-notes/2025-06-16-middleware-express.md
diff --git a/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md b/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md
new file mode 100644
index 00000000000..600aad8bafc
--- /dev/null
+++ b/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md
@@ -0,0 +1,5 @@
+---
+category: minorAnalysis
+---
+* Improved data flow tracking through middleware to handle default value and similar patterns.
+* Added `req._parsedUrl` as a remote input source.
From e9a071032cd3cbd2e6e265e0056b5c0f7bcab6f6 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Tue, 17 Jun 2025 11:19:59 +0200
Subject: [PATCH 051/213] Rust: address review on docs
---
.../analyzing-data-flow-in-rust.rst | 49 ++++++-------------
.../codeql-for-rust.rst | 2 +-
.../codeql-library-for-rust.rst | 6 +--
3 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
index 3eab09126f3..a68dc08a22b 100644
--- a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
+++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
@@ -23,10 +23,9 @@ Using local data flow
~~~~~~~~~~~~~~~~~~~~~
You can use the local data flow library by importing the ``codeql.rust.dataflow.DataFlow`` module. The library uses the class ``Node`` to represent any element through which data can flow.
-``Node``\ s are divided into expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``).
-You can map a data flow ``ParameterNode`` to its corresponding ``Parameter`` AST node using the ``asParameter`` member predicate.
-Similarly, you can use the ``asExpr`` member predicate to map a data flow ``ExprNode`` to its corresponding ``ExprCfgNode`` in the control-flow library.
-
+Common ``Node`` types include expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``).
+You can use the ``asExpr`` member predicate to map a data flow ``ExprNode`` to its corresponding ``ExprCfgNode`` in the control-flow library.
+Similarly, you can map a data flow ``ParameterNode`` to its corresponding ``Parameter`` AST node using the ``asParameter`` member predicate.
.. code-block:: ql
class Node {
@@ -39,22 +38,8 @@ Similarly, you can use the ``asExpr`` member predicate to map a data flow ``Expr
...
}
-You can use the predicates ``exprNode`` and ``parameterNode`` to map from expressions and parameters to their data-flow node:
-
-.. code-block:: ql
-
- /**
- * Gets a node corresponding to expression `e`.
- */
- ExprNode exprNode(CfgNodes::ExprCfgNode e) { ... }
-
- /**
- * Gets the node corresponding to the value of parameter `p` at function entry.
- */
- ParameterNode parameterNode(Parameter p) { ... }
-
-Note that since ``asExpr`` and ``exprNode`` map between data-flow and control-flow nodes, you then need to call the ``getExpr`` member predicate on the control-flow node to map to the corresponding AST node,
-for example, by writing ``node.asExpr().getExpr()``.
+Note that since ``asExpr`` maps from data-flow to control-flow nodes, you then need to call the ``getExpr`` member predicate on the control-flow node to map to the corresponding AST node,
+for example by writing ``node.asExpr().getExpr()``.
A control-flow graph considers every way control can flow through code, consequently, there can be multiple data-flow and control-flow nodes associated with a single expression node in the AST.
The predicate ``localFlowStep(Node nodeFrom, Node nodeTo)`` holds if there is an immediate data flow edge from the node ``nodeFrom`` to the node ``nodeTo``.
@@ -207,11 +192,7 @@ The global taint tracking library uses the same configuration module as the glob
Predefined sources
~~~~~~~~~~~~~~~~~~
-The data flow library module ``codeql.rust.dataflow.FlowSources`` contains a number of predefined sources that you can use to write security queries to track data flow and taint flow.
-
-- The class ``RemoteFlowSource`` represents data flow from remote network inputs and from other applications.
-- The class ``LocalFlowSource`` represents data flow from local user input.
-- The class ``FlowSource`` includes both of the above.
+The library module ``codeql.rust.Concepts`` contains a number of predefined sources and sinks that you can use to write security queries to track data flow and taint flow.
Examples of global data flow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -229,16 +210,16 @@ The following global taint-tracking query finds places where a string literal is
import codeql.rust.dataflow.TaintTracking
module ConstantPasswordConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
+ predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
- predicate isSink(DataFlow::Node node) {
- // any argument going to a parameter called `password`
- exists(Function f, CallExpr call, int index |
- call.getArg(index) = node.asExpr().getExpr() and
- call.getStaticTarget() = f and
- f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
- )
- }
+ predicate isSink(DataFlow::Node node) {
+ // any argument going to a parameter called `password`
+ exists(Function f, CallExpr call, int index |
+ call.getArg(index) = node.asExpr().getExpr() and
+ call.getStaticTarget() = f and
+ f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
+ )
+ }
}
module ConstantPasswordFlow = TaintTracking::Global;
diff --git a/docs/codeql/codeql-language-guides/codeql-for-rust.rst b/docs/codeql/codeql-language-guides/codeql-for-rust.rst
index c8262208cf5..a2c5bb98724 100644
--- a/docs/codeql/codeql-language-guides/codeql-for-rust.rst
+++ b/docs/codeql/codeql-language-guides/codeql-for-rust.rst
@@ -13,4 +13,4 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
analyzing-data-flow-in-rust
- :doc:`CodeQL library for Rust `: When you're analyzing Rust code, you can make use of the large collection of classes in the CodeQL library for Rust.
-- :doc:`Analyzing data flow in Ruby `: You can use CodeQL to track the flow of data through a Rust program to places where the data is used.
+- :doc:`Analyzing data flow in Rust `: You can use CodeQL to track the flow of data through a Rust program to places where the data is used.
diff --git a/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst b/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
index dd25d769692..348490e22dd 100644
--- a/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
+++ b/docs/codeql/codeql-language-guides/codeql-library-for-rust.rst
@@ -12,14 +12,14 @@ CodeQL ships with a library for analyzing Rust code. The classes in this library
abstractions and predicates to help you with common analysis tasks.
The library is implemented as a set of CodeQL modules, that is, files with the extension ``.qll``. The
-module `rust.qll `__ imports most other standard library modules, so you can include the complete
-library by beginning your query with:
+module `rust.qll `__ imports most other standard library modules, so you can include them
+by beginning your query with:
.. code-block:: ql
import rust
-The CodeQL libraries model various aspects of Rust code. The above import includes the abstract syntax tree (AST) library, which is used for locating program elements,
+The CodeQL libraries model various aspects of Rust code. The above import includes the abstract syntax tree (AST) library, which is used for locating program elements
to match syntactic elements in the source code. This can be used for example to find values, patterns and structures.
The control flow graph (CFG) is imported using
From 69da4e746271700aa179a6bf7f13711771068d9f Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Tue, 17 Jun 2025 10:45:57 +0100
Subject: [PATCH 052/213] Rust: Move inferArrayExprType logic into typeEquality
predicate.
---
.../codeql/rust/internal/TypeInference.qll | 29 +++++++------------
.../type-inference/type-inference.expected | 2 ++
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index e8ff8bcc9da..0456113fff5 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -287,6 +287,16 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
prefix2.isEmpty()
)
)
+ or
+ // an array list expression (`[1, 2, 3]`) has the type of the first (any) element
+ n1.(ArrayListExpr).getExpr(0) = n2 and
+ prefix1 = TypePath::singleton(TArrayTypeParameter()) and
+ prefix2.isEmpty()
+ or
+ // an array repeat expression (`[1; 3]`) has the type of the repeat operand
+ n1.(ArrayRepeatExpr).getRepeatOperand() = n2 and
+ prefix1 = TypePath::singleton(TArrayTypeParameter()) and
+ prefix2.isEmpty()
}
pragma[nomagic]
@@ -1124,23 +1134,6 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) {
)
}
-pragma[nomagic]
-private Type inferArrayExprType(ArrayExpr ae, TypePath path) {
- // an array list expression (`[1, 2, 3]`) has the type of the first (any) element
- exists(Type type0, TypePath path0 |
- type0 = inferType(ae.(ArrayListExpr).getExpr(0), path0) and
- result = type0 and
- path = TypePath::cons(any(ArrayTypeParameter tp), path0)
- )
- or
- // an array repeat expression (`[1; 3]`) has the type of the repeat operand
- exists(Type type0, TypePath path0 |
- type0 = inferType(ae.(ArrayRepeatExpr).getRepeatOperand(), path0) and
- result = type0 and
- path = TypePath::cons(any(ArrayTypeParameter tp), path0)
- )
-}
-
pragma[nomagic]
private Type inferForLoopExprType(AstNode n, TypePath path) {
// type of iterable -> type of pattern (loop variable)
@@ -1470,8 +1463,6 @@ private module Cached {
or
result = inferIndexExprType(n, path)
or
- result = inferArrayExprType(n, path)
- or
result = inferForLoopExprType(n, path)
}
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 36f43dc8864..322bb74c64f 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2685,6 +2685,7 @@ inferType
| main.rs:1840:31:1840:39 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1840:31:1840:39 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1840:32:1840:32 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1840:32:1840:32 | 1 | | {EXTERNAL LOCATION} | u32 |
| main.rs:1840:35:1840:35 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1840:38:1840:38 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1841:13:1841:13 | u | | {EXTERNAL LOCATION} | i32 |
@@ -2700,6 +2701,7 @@ inferType
| main.rs:1843:31:1843:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1843:31:1843:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1843:32:1843:32 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1843:32:1843:32 | 1 | | {EXTERNAL LOCATION} | u64 |
| main.rs:1843:35:1843:35 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1844:13:1844:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1844:13:1844:13 | u | | {EXTERNAL LOCATION} | u64 |
From 66d6770c3f4a569fb18a3c5e6cc28ac6548d5896 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Tue, 17 Jun 2025 10:46:46 +0100
Subject: [PATCH 053/213] Rust: If we're inferring both ways, it should really
be to any element.
---
rust/ql/lib/codeql/rust/internal/TypeInference.qll | 2 +-
.../type-inference/type-inference.expected | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 0456113fff5..2205adbc980 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -289,7 +289,7 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
)
or
// an array list expression (`[1, 2, 3]`) has the type of the first (any) element
- n1.(ArrayListExpr).getExpr(0) = n2 and
+ n1.(ArrayListExpr).getExpr(_) = n2 and
prefix1 = TypePath::singleton(TArrayTypeParameter()) and
prefix2.isEmpty()
or
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 322bb74c64f..d7fa6457135 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2664,12 +2664,19 @@ inferType
| main.rs:1832:19:1832:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1832:22:1832:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1832:25:1832:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1834:13:1834:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1834:13:1834:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1834:21:1834:31 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1834:21:1834:31 | [...] | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1834:22:1834:24 | 1u8 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1834:22:1834:24 | 1u8 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1834:27:1834:27 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1834:27:1834:27 | 2 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1834:30:1834:30 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1834:30:1834:30 | 3 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1835:13:1835:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:13:1835:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1835:18:1835:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1835:18:1835:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
| main.rs:1837:13:1837:17 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1837:21:1837:29 | [1u16; 3] | [T;...] | {EXTERNAL LOCATION} | u16 |
@@ -2687,7 +2694,9 @@ inferType
| main.rs:1840:32:1840:32 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1840:32:1840:32 | 1 | | {EXTERNAL LOCATION} | u32 |
| main.rs:1840:35:1840:35 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1840:35:1840:35 | 2 | | {EXTERNAL LOCATION} | u32 |
| main.rs:1840:38:1840:38 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1840:38:1840:38 | 3 | | {EXTERNAL LOCATION} | u32 |
| main.rs:1841:13:1841:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1841:13:1841:13 | u | | {EXTERNAL LOCATION} | u32 |
| main.rs:1841:18:1841:22 | vals3 | | file://:0:0:0:0 | [] |
@@ -2772,13 +2781,17 @@ inferType
| main.rs:1875:13:1875:17 | vals4 | | {EXTERNAL LOCATION} | Vec |
| main.rs:1875:13:1875:17 | vals4 | T | file://:0:0:0:0 | & |
| main.rs:1875:13:1875:17 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1875:33:1875:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1875:33:1875:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1875:33:1875:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
| main.rs:1875:33:1875:61 | ... .collect() | T | file://:0:0:0:0 | & |
| main.rs:1875:33:1875:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1875:34:1875:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1875:34:1875:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
| main.rs:1875:40:1875:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:40:1875:40 | 2 | | {EXTERNAL LOCATION} | u64 |
| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | u64 |
| main.rs:1876:18:1876:22 | vals4 | | {EXTERNAL LOCATION} | Vec |
| main.rs:1876:18:1876:22 | vals4 | T | file://:0:0:0:0 | & |
| main.rs:1876:18:1876:22 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
From 4292b03b5cb7f08cd510c9ae4311b6564ca02c18 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Tue, 17 Jun 2025 10:58:26 +0100
Subject: [PATCH 054/213] Rust: Add logic for Vecs and slices.
---
rust/ql/lib/codeql/rust/internal/TypeInference.qll | 13 ++++++++++---
.../type-inference/type-inference.expected | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 2205adbc980..6bfbf6bee8c 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1140,10 +1140,17 @@ private Type inferForLoopExprType(AstNode n, TypePath path) {
exists(ForExpr fe, Type iterableType, TypePath iterablePath |
n = fe.getPat() and
iterableType = inferType(fe.getIterable(), iterablePath) and
+ result = iterableType and
(
- iterablePath.isCons(any(ArrayTypeParameter tp), path) and
- result = iterableType
- // TODO: iterables (containers, ranges etc)
+ iterablePath.isCons(any(Vec v).getElementTypeParameter(), path)
+ or
+ iterablePath.isCons(any(ArrayTypeParameter tp), path)
+ or
+ exists(TypePath path0 |
+ iterablePath.isCons(any(RefTypeParameter tp), path0) and
+ path0.isCons(any(SliceTypeParameter tp), path)
+ )
+ // TODO: iterables (general case for containers, ranges etc)
)
)
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index d7fa6457135..8b820ef1ef7 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2792,6 +2792,8 @@ inferType
| main.rs:1875:40:1875:40 | 2 | | {EXTERNAL LOCATION} | u64 |
| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1876:13:1876:13 | u | | file://:0:0:0:0 | & |
+| main.rs:1876:13:1876:13 | u | &T | {EXTERNAL LOCATION} | u64 |
| main.rs:1876:18:1876:22 | vals4 | | {EXTERNAL LOCATION} | Vec |
| main.rs:1876:18:1876:22 | vals4 | T | file://:0:0:0:0 | & |
| main.rs:1876:18:1876:22 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
From 942a980dac888246cd6585755e07222fb5d82462 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Tue, 17 Jun 2025 14:21:36 +0100
Subject: [PATCH 055/213] Rust: Update PoemHandlerParam from getResolvedPath ->
getCanonicalPath.
---
rust/ql/lib/codeql/rust/frameworks/Poem.qll | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/frameworks/Poem.qll b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
index 66c01a415a1..dbc510b63d8 100644
--- a/rust/ql/lib/codeql/rust/frameworks/Poem.qll
+++ b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
@@ -5,16 +5,19 @@
private import rust
private import codeql.rust.Concepts
private import codeql.rust.dataflow.DataFlow
+private import codeql.rust.internal.TypeInference
+private import codeql.rust.internal.Type
/**
* Parameters of a handler function
*/
private class PoemHandlerParam extends RemoteSource::Range {
PoemHandlerParam() {
- exists(TupleStructPat param |
- param.getResolvedPath() = ["crate::web::query::Query", "crate::web::path::Path"]
- |
- this.asPat().getPat() = param.getAField()
+ exists(TupleStructPat param, Type t |
+ this.asPat().getPat() = param.getAField() and
+ t = inferType(param) and
+ t.(StructType).asItemNode().(Addressable).getCanonicalPath() =
+ ["poem::web::query::Query", "poem::web::path::Path"]
)
}
}
From dec0deb4d19dd4fd02fd89784f9f983ce1ac77b6 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Tue, 17 Jun 2025 23:07:32 +0100
Subject: [PATCH 056/213] Rust: Add some more test cases for type inference on
Vecs.
---
.../test/library-tests/type-inference/main.rs | 16 +-
.../type-inference/type-inference.expected | 168 ++++++++++--------
2 files changed, 111 insertions(+), 73 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index d1d900b9d41..e8361d1da56 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1869,11 +1869,21 @@ mod loops {
// for loops with containers
- let vals3 = vec![1, 2, 3]; // MISSING: type=vals:Vec
+ let vals3 = vec![1, 2, 3]; // $ MISSING: type=vals3:Vec
for i in vals3 { } // $ MISSING: type=i:i32
- let vals4 : Vec<&u64> = [1u64, 2, 3].iter().collect();
- for u in vals4 { } // $ MISSING: type=u:&u64
+ let vals4 = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4:Vec
+ for u in vals4 { } // $ MISSING: type=u:u16
+
+ let vals5 = Vec::from([1u32, 2, 3]); // $ MISSING: type=vals5:Vec
+ for u in vals5 { } // $ MISSING: type=u:u32
+
+ let vals6 : Vec<&u64> = [1u64, 2, 3].iter().collect(); // $ MISSING: type=vals6:Vec<&u64>
+ for u in vals6 { } // $ MISSING: type=u:&u64
+
+ let mut vals7 = Vec::new(); // $ MISSING: type=vals7:Vec
+ vals7.push(1u8); // $ method=push
+ for u in vals7 { } // $ MISSING: type=u:u8
let matrix1 = vec![vec![1, 2], vec![3, 4]]; // $ MISSING: type=vals5:Vec>
for row in matrix1 { // $ MISSING: type=row:Vec
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 8b820ef1ef7..889f3ab8b1f 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2778,74 +2778,102 @@ inferType
| main.rs:1872:26:1872:26 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1872:29:1872:29 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1872:32:1872:32 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1875:13:1875:17 | vals4 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1875:13:1875:17 | vals4 | T | file://:0:0:0:0 | & |
-| main.rs:1875:13:1875:17 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1875:33:1875:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1875:33:1875:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
-| main.rs:1875:33:1875:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1875:33:1875:61 | ... .collect() | T | file://:0:0:0:0 | & |
-| main.rs:1875:33:1875:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1875:34:1875:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1875:34:1875:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1875:40:1875:40 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1875:40:1875:40 | 2 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1875:43:1875:43 | 3 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1876:13:1876:13 | u | | file://:0:0:0:0 | & |
-| main.rs:1876:13:1876:13 | u | &T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1876:18:1876:22 | vals4 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1876:18:1876:22 | vals4 | T | file://:0:0:0:0 | & |
-| main.rs:1876:18:1876:22 | vals4 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1878:33:1878:33 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1878:36:1878:36 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1878:45:1878:45 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1878:48:1878:48 | 4 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1884:13:1884:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1884:13:1884:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1884:24:1884:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1884:24:1884:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1885:9:1885:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1885:9:1885:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1885:9:1885:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1885:21:1885:21 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1885:24:1885:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1885:33:1885:37 | "one" | | {EXTERNAL LOCATION} | str |
-| main.rs:1886:9:1886:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1886:9:1886:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1886:9:1886:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1886:21:1886:21 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1886:24:1886:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1886:33:1886:37 | "two" | | {EXTERNAL LOCATION} | str |
-| main.rs:1887:20:1887:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1887:20:1887:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1887:20:1887:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
-| main.rs:1888:22:1888:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1888:22:1888:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1888:22:1888:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
-| main.rs:1889:29:1889:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1889:29:1889:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1889:29:1889:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
-| main.rs:1890:29:1890:33 | &map1 | | file://:0:0:0:0 | & |
-| main.rs:1890:29:1890:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1890:29:1890:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1890:30:1890:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1890:30:1890:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1894:13:1894:17 | mut a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1894:13:1894:17 | mut a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1894:26:1894:26 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1894:26:1894:26 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1895:15:1895:15 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1895:15:1895:15 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1895:15:1895:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1895:19:1895:20 | 10 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1896:13:1896:13 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1896:13:1896:13 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1896:13:1896:18 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1896:18:1896:18 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1903:5:1903:20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
-| main.rs:1904:5:1904:60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
-| main.rs:1904:20:1904:38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
-| main.rs:1904:41:1904:59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
-| main.rs:1920:5:1920:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1875:21:1875:32 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:21:1875:32 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1875:22:1875:25 | 1u16 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:22:1875:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1875:28:1875:28 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:28:1875:28 | 2 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1875:31:1875:31 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:31:1875:31 | 3 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1878:13:1878:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1878:13:1878:17 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1878:21:1878:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1878:21:1878:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1878:31:1878:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1878:31:1878:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1878:32:1878:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1878:32:1878:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1878:38:1878:38 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1878:38:1878:38 | 2 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1878:41:1878:41 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1878:41:1878:41 | 3 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1879:13:1879:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1879:18:1879:22 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1879:18:1879:22 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1881:13:1881:17 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1881:13:1881:17 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1881:13:1881:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1881:33:1881:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1881:33:1881:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1881:33:1881:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1881:33:1881:61 | ... .collect() | T | file://:0:0:0:0 | & |
+| main.rs:1881:33:1881:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1881:34:1881:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1881:34:1881:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1881:40:1881:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1881:40:1881:40 | 2 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1881:43:1881:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1881:43:1881:43 | 3 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1882:13:1882:13 | u | | file://:0:0:0:0 | & |
+| main.rs:1882:13:1882:13 | u | &T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1882:18:1882:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1882:18:1882:22 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1882:18:1882:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1884:13:1884:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1884:25:1884:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1885:9:1885:13 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1885:20:1885:22 | 1u8 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1886:18:1886:22 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1888:33:1888:33 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1888:36:1888:36 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1888:45:1888:45 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1888:48:1888:48 | 4 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1894:13:1894:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1894:13:1894:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1894:24:1894:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1894:24:1894:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1895:9:1895:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1895:9:1895:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1895:9:1895:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1895:21:1895:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1895:24:1895:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1895:33:1895:37 | "one" | | {EXTERNAL LOCATION} | str |
+| main.rs:1896:9:1896:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1896:9:1896:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1896:9:1896:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1896:21:1896:21 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1896:24:1896:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1896:33:1896:37 | "two" | | {EXTERNAL LOCATION} | str |
+| main.rs:1897:20:1897:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1897:20:1897:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1897:20:1897:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
+| main.rs:1898:22:1898:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1898:22:1898:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1898:22:1898:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
+| main.rs:1899:29:1899:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1899:29:1899:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1899:29:1899:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
+| main.rs:1900:29:1900:33 | &map1 | | file://:0:0:0:0 | & |
+| main.rs:1900:29:1900:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1900:29:1900:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1900:30:1900:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1900:30:1900:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1904:13:1904:17 | mut a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1904:13:1904:17 | mut a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1904:26:1904:26 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1904:26:1904:26 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1905:15:1905:15 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1905:15:1905:15 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1905:15:1905:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1905:19:1905:20 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1906:13:1906:13 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1906:13:1906:13 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1906:13:1906:18 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1906:18:1906:18 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1913:5:1913:20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
+| main.rs:1914:5:1914:60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
+| main.rs:1914:20:1914:38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
+| main.rs:1914:41:1914:59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
+| main.rs:1930:5:1930:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From 9c3e362594b5bcbe2ba88ec6b02204ab8f4bf6b9 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Wed, 18 Jun 2025 09:28:29 +0100
Subject: [PATCH 057/213] Rust: Add TupleStructPat.getStruct.
---
.../lib/codeql/rust/elements/internal/TupleStructPatImpl.qll | 5 +++++
rust/ql/lib/codeql/rust/frameworks/Poem.qll | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll
index d7d4f02f81e..38259efadb7 100644
--- a/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll
+++ b/rust/ql/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll
@@ -34,6 +34,11 @@ module Impl {
exists(this.getField(pragma[only_bind_into](pos)))
}
+ /**
+ * Gets the struct matched by this pattern.
+ */
+ Struct getStruct() { result = PathResolution::resolvePath(this.getPath()) }
+
/** Gets the tuple field that matches the `pos`th pattern of this pattern. */
pragma[nomagic]
TupleField getTupleField(int pos) {
diff --git a/rust/ql/lib/codeql/rust/frameworks/Poem.qll b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
index dbc510b63d8..70b2aeb88e6 100644
--- a/rust/ql/lib/codeql/rust/frameworks/Poem.qll
+++ b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
@@ -16,8 +16,7 @@ private class PoemHandlerParam extends RemoteSource::Range {
exists(TupleStructPat param, Type t |
this.asPat().getPat() = param.getAField() and
t = inferType(param) and
- t.(StructType).asItemNode().(Addressable).getCanonicalPath() =
- ["poem::web::query::Query", "poem::web::path::Path"]
+ param.getStruct().getCanonicalPath() = ["poem::web::query::Query", "poem::web::path::Path"]
)
}
}
From 01c6966cef68d15112a324689e63da01e4c39267 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Wed, 18 Jun 2025 13:22:51 +0100
Subject: [PATCH 058/213] Rust: Remove redundant code and imports.
---
rust/ql/lib/codeql/rust/frameworks/Poem.qll | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/frameworks/Poem.qll b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
index 70b2aeb88e6..2554d845293 100644
--- a/rust/ql/lib/codeql/rust/frameworks/Poem.qll
+++ b/rust/ql/lib/codeql/rust/frameworks/Poem.qll
@@ -4,18 +4,14 @@
private import rust
private import codeql.rust.Concepts
-private import codeql.rust.dataflow.DataFlow
-private import codeql.rust.internal.TypeInference
-private import codeql.rust.internal.Type
/**
* Parameters of a handler function
*/
private class PoemHandlerParam extends RemoteSource::Range {
PoemHandlerParam() {
- exists(TupleStructPat param, Type t |
+ exists(TupleStructPat param |
this.asPat().getPat() = param.getAField() and
- t = inferType(param) and
param.getStruct().getCanonicalPath() = ["poem::web::query::Query", "poem::web::path::Path"]
)
}
From e0114753fe33307a23498e843eb1ef1a2b1c7bb3 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Wed, 18 Jun 2025 15:24:20 +0200
Subject: [PATCH 059/213] Rust: fix formatting in doc snippet
---
.../analyzing-data-flow-in-rust.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
index a68dc08a22b..3337dde2faa 100644
--- a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
+++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst
@@ -210,16 +210,16 @@ The following global taint-tracking query finds places where a string literal is
import codeql.rust.dataflow.TaintTracking
module ConstantPasswordConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
+ predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
- predicate isSink(DataFlow::Node node) {
- // any argument going to a parameter called `password`
- exists(Function f, CallExpr call, int index |
- call.getArg(index) = node.asExpr().getExpr() and
- call.getStaticTarget() = f and
- f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
- )
- }
+ predicate isSink(DataFlow::Node node) {
+ // any argument going to a parameter called `password`
+ exists(Function f, CallExpr call, int index |
+ call.getArg(index) = node.asExpr().getExpr() and
+ call.getStaticTarget() = f and
+ f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
+ )
+ }
}
module ConstantPasswordFlow = TaintTracking::Global;
From a253b319d56495166b22cb466a63d7d8db36b885 Mon Sep 17 00:00:00 2001
From: Arthur Baars
Date: Mon, 16 Jun 2025 11:59:09 +0200
Subject: [PATCH 060/213] Rust: limit number of diagnostics to 100 per trap
file
---
rust/extractor/src/main.rs | 1 +
rust/extractor/src/translate/base.rs | 34 ++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs
index bae83c99fbf..6832019870c 100644
--- a/rust/extractor/src/main.rs
+++ b/rust/extractor/src/main.rs
@@ -103,6 +103,7 @@ impl<'a> Extractor<'a> {
}
}
translator.emit_source_file(&ast);
+ translator.emit_truncated_diagnostics_message();
translator.trap.commit().unwrap_or_else(|err| {
error!(
"Failed to write trap file for: {}: {}",
diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs
index 9e9123c4570..7154a5659cb 100644
--- a/rust/extractor/src/translate/base.rs
+++ b/rust/extractor/src/translate/base.rs
@@ -123,11 +123,14 @@ pub struct Translator<'a> {
resolve_paths: bool,
source_kind: SourceKind,
macro_context_depth: usize,
+ diagnostic_count: usize,
}
const UNKNOWN_LOCATION: (LineCol, LineCol) =
(LineCol { line: 0, col: 0 }, LineCol { line: 0, col: 0 });
+const DIAGNOSTIC_LIMIT_PER_FILE: usize = 100;
+
impl<'a> Translator<'a> {
pub fn new(
trap: TrapFile,
@@ -148,6 +151,7 @@ impl<'a> Translator<'a> {
resolve_paths: resolve_paths == ResolvePaths::Yes,
source_kind,
macro_context_depth: 0,
+ diagnostic_count: 0,
}
}
fn location(&self, range: TextRange) -> Option<(LineCol, LineCol)> {
@@ -234,6 +238,36 @@ impl<'a> Translator<'a> {
} else {
severity
};
+ if severity > DiagnosticSeverity::Debug {
+ self.diagnostic_count += 1;
+ if self.diagnostic_count > DIAGNOSTIC_LIMIT_PER_FILE {
+ return;
+ }
+ }
+ self.emit_diagnostic_unchecked(severity, tag, message, full_message, location);
+ }
+ pub fn emit_truncated_diagnostics_message(&mut self) {
+ if self.diagnostic_count > DIAGNOSTIC_LIMIT_PER_FILE {
+ let count = self.diagnostic_count - DIAGNOSTIC_LIMIT_PER_FILE;
+ self.emit_diagnostic_unchecked(
+ DiagnosticSeverity::Warning,
+ "diagnostics".to_owned(),
+ "Too many diagnostic messages".to_owned(),
+ format!(
+ "Too many diagnostic messages, {count} diagnostic messages were suppressed"
+ ),
+ UNKNOWN_LOCATION,
+ );
+ }
+ }
+ fn emit_diagnostic_unchecked(
+ &mut self,
+ severity: DiagnosticSeverity,
+ tag: String,
+ message: String,
+ full_message: String,
+ location: (LineCol, LineCol),
+ ) {
let (start, end) = location;
dispatch_to_tracing!(
severity,
From 5c71e3a9226a5ada710bc8ba3d4d530234505264 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 18 Jun 2025 16:27:40 +0100
Subject: [PATCH 061/213] State differences between XML and Markdown formats
---
docs/query-help-style-guide.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/docs/query-help-style-guide.md b/docs/query-help-style-guide.md
index d05abba9404..45cac9c7e0b 100644
--- a/docs/query-help-style-guide.md
+++ b/docs/query-help-style-guide.md
@@ -20,7 +20,7 @@ Query help files must have the same base name as the query they describe and mus
### File structure and layout
-Query help files can be written in either a custom XML format (with a `.qhelp` extension) or in Markdown (with a `.md` extension). Both formats are supported by the CodeQL documentation tooling.
+Query help files can be written in either a custom XML format (with a `.qhelp` extension) or in Markdown (with a `.md` extension). Both formats are supported by the CodeQL documentation tooling. There are a few minor differences, noted in the section `Differences between XML and markdown formats` below.
#### Markdown query help files
@@ -126,7 +126,7 @@ For example:
### Referencing potential security weaknesses
-If your query checks code for a CWE weakness, you should use the `@tags` element in the query file to reference the associated CWEs, as explained [here](query-metadata-style-guide.md). When you use these tags, a link to the appropriate entry from the [MITRE.org](https://cwe.mitre.org/scoring/index.html) site will automatically appear as a reference in the output HTML file.
+If your query checks code for a CWE weakness, you should use the `@tags` element in the query file to reference the associated CWEs, as explained [here](query-metadata-style-guide.md). When you use these tags in a query help file in the custom XML format, a link to the appropriate entry from the [MITRE.org](https://cwe.mitre.org/scoring/index.html) site will automatically appear as a reference in the output HTML file.
## Validating query help files
@@ -143,6 +143,11 @@ Please include the query help files (and any associated code snippets) in your p
More information on how to test your query help files can be found [within the documentation](https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/testing-query-help-files)
+## Differences between XML and markdown formats
+
+1. The XML format allows for the contents of other files to be included in the output generated by processing the file, as mentioned in the section `Code examples`. This is not possible with the Markdown format.
+2. When using the XML format, references are added to the output HTML file based on CWE tags, as mentioned in the section `Referencing potential security weaknesses`.
+
## Query help example
The following example is a query help file for a query from the standard query suite for Java, shown in both Markdown and XML formats.
From 97dceb3a1c84891140d93863bd2681bd08d65bf9 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Tue, 17 Jun 2025 11:51:57 +0100
Subject: [PATCH 062/213] Tag with `quality` and sub-category
---
.../src/Advisory/Declarations/MissingOverrideAnnotation.ql | 4 +++-
.../Deprecated Code/AvoidDeprecatedCallableAccess.ql | 4 +++-
.../src/Advisory/Documentation/ImpossibleJavadocThrows.ql | 4 +++-
java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql | 4 +++-
java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql | 4 +++-
java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql | 4 +++-
java/ql/src/DeadCode/UselessParameter.ql | 3 ++-
java/ql/src/Language Abuse/ChainedInstanceof.ql | 4 +++-
java/ql/src/Language Abuse/IterableIterator.ql | 3 ++-
java/ql/src/Language Abuse/UselessNullCheck.ql | 3 ++-
java/ql/src/Language Abuse/UselessTypeTest.ql | 4 +++-
java/ql/src/Language Abuse/WrappedIterator.ql | 3 ++-
.../Arithmetic/ConstantExpAppearsNonConstant.ql | 5 +++--
java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql | 4 ++--
.../Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql | 4 +++-
.../Arithmetic/WhitespaceContradictsPrecedence.ql | 5 +++--
.../src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql | 3 ++-
.../ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql | 3 ++-
java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql | 6 +++---
java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql | 3 ++-
java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql | 4 ++--
.../src/Likely Bugs/Comparison/CompareIdenticalValues.ql | 3 ++-
java/ql/src/Likely Bugs/Comparison/EqualsArray.ql | 3 ++-
java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql | 3 ++-
java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql | 5 +++--
.../Likely Bugs/Comparison/InconsistentEqualsHashCode.ql | 4 ++--
.../Likely Bugs/Comparison/MissingInstanceofInEquals.ql | 4 ++--
java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql | 4 ++--
.../ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql | 4 +++-
java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql | 4 +++-
java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql | 4 ++--
.../ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql | 4 ++--
.../Concurrency/DoubleCheckedLockingWithInitRace.ql | 4 ++--
.../src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql | 4 ++--
java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql | 4 ++--
java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql | 4 ++--
.../src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql | 3 ++-
.../src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql | 3 ++-
.../Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql | 5 +++--
java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql | 4 +++-
java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql | 4 +++-
java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql | 3 ++-
.../src/Likely Bugs/Likely Typos/StringBufferCharInit.ql | 5 +++--
.../src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql | 5 +++--
java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql | 3 ++-
java/ql/src/Likely Bugs/Nullness/NullAlways.ql | 3 ++-
java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql | 3 ++-
java/ql/src/Likely Bugs/Nullness/NullMaybe.ql | 3 ++-
java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql | 7 ++++---
java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql | 4 +++-
java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql | 7 ++++---
java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql | 4 +++-
java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql | 3 ++-
java/ql/src/Likely Bugs/Statements/UseBraces.ql | 4 +++-
.../src/Likely Bugs/Termination/ConstantLoopCondition.ql | 4 +++-
java/ql/src/Performance/InefficientEmptyStringTest.ql | 5 +++--
java/ql/src/Performance/InefficientKeySetIterator.ql | 5 +++--
java/ql/src/Performance/InefficientOutputStream.ql | 5 ++++-
java/ql/src/Performance/InefficientPrimConstructor.ql | 6 ++++--
java/ql/src/Performance/InnerClassCouldBeStatic.ql | 6 ++++--
java/ql/src/Performance/NewStringString.ql | 6 ++++--
.../Boxed Types/BoxedVariable.ql | 4 +++-
.../Violations of Best Practice/Dead Code/DeadRefTypes.ql | 3 ++-
.../Dead Code/InterfaceCannotBeImplemented.ql | 3 ++-
.../Violations of Best Practice/Dead Code/UnreadLocal.ql | 3 ++-
.../Violations of Best Practice/Dead Code/UnusedLabel.ql | 3 ++-
.../Declarations/NoConstantsOnly.ql | 4 +++-
.../Exception Handling/IgnoreExceptionalReturn.ql | 5 +++--
.../Exception Handling/NumberFormatException.ql | 4 +++-
.../Implementation Hiding/AbstractToConcreteCollection.ql | 3 ++-
.../Implementation Hiding/ExposeRepresentation.ql | 5 +++--
.../Naming Conventions/AmbiguousOuterSuper.ql | 3 ++-
.../Naming Conventions/ConfusingMethodNames.ql | 3 ++-
.../Naming Conventions/ConfusingOverloading.ql | 3 ++-
.../Naming Conventions/LocalShadowsFieldConfusing.ql | 3 ++-
.../Naming Conventions/SameNameAsSuper.ql | 3 ++-
.../Undesirable Calls/CallsToStringToString.ql | 4 +++-
.../Undesirable Calls/DefaultToString.ql | 5 +++--
.../Undesirable Calls/PrintLnArray.ql | 4 +++-
79 files changed, 204 insertions(+), 110 deletions(-)
diff --git a/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql b/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql
index 0fd91f67178..26160c90fdf 100644
--- a/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql
+++ b/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/missing-override-annotation
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql b/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql
index f20be6d7f34..95403ffac0b 100644
--- a/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql
+++ b/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/deprecated-call
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* non-attributable
* external/cwe/cwe-477
*/
diff --git a/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql b/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql
index 7f8f4d4f983..0a8529d91d1 100644
--- a/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql
+++ b/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/inconsistent-javadoc-throws
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql b/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
index 43afd978f01..fb6375d44de 100644
--- a/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
+++ b/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision very-high
* @id java/unknown-javadoc-parameter
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql b/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
index 352af0ecb66..9eddcb64a14 100644
--- a/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
+++ b/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/jdk-internal-api-access
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql b/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
index 1d04f0f0d37..9bfda3e3140 100644
--- a/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
+++ b/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/underscore-identifier
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/DeadCode/UselessParameter.ql b/java/ql/src/DeadCode/UselessParameter.ql
index 3d29c8faf10..e9f996583f3 100644
--- a/java/ql/src/DeadCode/UselessParameter.ql
+++ b/java/ql/src/DeadCode/UselessParameter.ql
@@ -5,7 +5,8 @@
* @problem.severity recommendation
* @precision high
* @id java/unused-parameter
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Language Abuse/ChainedInstanceof.ql b/java/ql/src/Language Abuse/ChainedInstanceof.ql
index bb646eeee78..d9b5a297b46 100644
--- a/java/ql/src/Language Abuse/ChainedInstanceof.ql
+++ b/java/ql/src/Language Abuse/ChainedInstanceof.ql
@@ -5,7 +5,9 @@
* @problem.severity recommendation
* @precision high
* @id java/chained-type-tests
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * complexity
* language-features
*/
diff --git a/java/ql/src/Language Abuse/IterableIterator.ql b/java/ql/src/Language Abuse/IterableIterator.ql
index fd5c5107e2d..72dfbcd9965 100644
--- a/java/ql/src/Language Abuse/IterableIterator.ql
+++ b/java/ql/src/Language Abuse/IterableIterator.ql
@@ -7,8 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id java/iterator-implements-iterable
- * @tags correctness
+ * @tags quality
* reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Language Abuse/UselessNullCheck.ql b/java/ql/src/Language Abuse/UselessNullCheck.ql
index 93e5a92c307..1ad1c4c8e1e 100644
--- a/java/ql/src/Language Abuse/UselessNullCheck.ql
+++ b/java/ql/src/Language Abuse/UselessNullCheck.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision very-high
* @id java/useless-null-check
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Language Abuse/UselessTypeTest.ql b/java/ql/src/Language Abuse/UselessTypeTest.ql
index 48ba740cbe8..dc727485bda 100644
--- a/java/ql/src/Language Abuse/UselessTypeTest.ql
+++ b/java/ql/src/Language Abuse/UselessTypeTest.ql
@@ -5,7 +5,9 @@
* @problem.severity warning
* @precision very-high
* @id java/useless-type-test
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
* language-features
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Language Abuse/WrappedIterator.ql b/java/ql/src/Language Abuse/WrappedIterator.ql
index 10dd8472fc4..a2479a2bad3 100644
--- a/java/ql/src/Language Abuse/WrappedIterator.ql
+++ b/java/ql/src/Language Abuse/WrappedIterator.ql
@@ -6,8 +6,9 @@
* @problem.severity warning
* @precision very-high
* @id java/iterable-wraps-iterator
- * @tags correctness
+ * @tags quality
* reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql b/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
index e54c470de43..50f50862631 100644
--- a/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
+++ b/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
@@ -5,8 +5,9 @@
* @problem.severity warning
* @precision very-high
* @id java/evaluation-to-constant
- * @tags maintainability
- * useless-code
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql b/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
index 026096b63a7..37340bc7975 100644
--- a/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
+++ b/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
@@ -6,10 +6,10 @@
* @problem.severity warning
* @precision very-high
* @id java/integer-multiplication-cast-to-long
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* types
- * quality
* external/cwe/cwe-190
* external/cwe/cwe-192
* external/cwe/cwe-197
diff --git a/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql b/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql
index f3c0b220080..57a05b0ac39 100644
--- a/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql
+++ b/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql
@@ -5,7 +5,9 @@
* @problem.severity warning
* @precision very-high
* @id java/lshift-larger-than-type-width
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql b/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql
index b0508b8eb38..52a5850e7d1 100644
--- a/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql
+++ b/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql
@@ -6,8 +6,9 @@
* @problem.severity warning
* @precision very-high
* @id java/whitespace-contradicts-precedence
- * @tags maintainability
- * readability
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-783
*/
diff --git a/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql b/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql
index c94801189b3..ecd83e39719 100644
--- a/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql
+++ b/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql
@@ -6,7 +6,8 @@
* @problem.severity error
* @precision high
* @id java/index-out-of-bounds
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* exceptions
* external/cwe/cwe-193
diff --git a/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql b/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql
index e1137b111bf..d1a398d1322 100644
--- a/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql
+++ b/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql
@@ -7,7 +7,8 @@
* @problem.severity error
* @precision very-high
* @id java/type-mismatch-access
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql b/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql
index 5b90341660b..2951f97d65f 100644
--- a/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql
+++ b/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql
@@ -5,9 +5,9 @@
* @problem.severity error
* @precision very-high
* @id java/empty-container
- * @tags reliability
- * maintainability
- * useless-code
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql b/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql
index 08a8da88484..54548b122e4 100644
--- a/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql
+++ b/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql
@@ -7,7 +7,8 @@
* @problem.severity error
* @precision very-high
* @id java/type-mismatch-modification
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql b/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql
index 1f4ebb3403d..589000df5d4 100644
--- a/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql
+++ b/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql
@@ -5,9 +5,9 @@
* @problem.severity error
* @precision very-high
* @id java/unused-container
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
- * quality
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql b/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql
index 4b52e937af2..e46dd7c5f79 100644
--- a/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql
+++ b/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql
@@ -6,7 +6,8 @@
* @problem.severity error
* @precision very-high
* @id java/comparison-of-identical-expressions
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql b/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql
index 2b04d871154..e206d9c89c5 100644
--- a/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql
+++ b/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql
@@ -6,7 +6,8 @@
* @problem.severity error
* @precision very-high
* @id java/equals-on-arrays
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql b/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql
index 6d3c4ce2821..f8b1cd85552 100644
--- a/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql
+++ b/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql
@@ -6,7 +6,8 @@
* @problem.severity error
* @precision very-high
* @id java/hashing-without-hashcode
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql b/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql
index f5019373b65..cf75399caf4 100644
--- a/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql
+++ b/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql
@@ -6,9 +6,10 @@
* @problem.severity error
* @precision very-high
* @id java/equals-on-unrelated-types
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
- * quality
+ * external/cwe/cwe-571
*/
import java
diff --git a/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql b/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql
index 2fce3397346..80153123b29 100644
--- a/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql
+++ b/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql
@@ -6,9 +6,9 @@
* @problem.severity error
* @precision very-high
* @id java/inconsistent-equals-and-hashcode
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
- * quality
* external/cwe/cwe-581
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql b/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql
index 413a88bb008..7cd495f9073 100644
--- a/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql
+++ b/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql
@@ -6,9 +6,9 @@
* @problem.severity error
* @precision high
* @id java/unchecked-cast-in-equals
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
- * quality
*/
import java
diff --git a/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql b/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql
index 811edd9e2d7..6ea867b3481 100644
--- a/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql
+++ b/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql
@@ -6,9 +6,9 @@
* @problem.severity error
* @precision very-high
* @id java/reference-equality-of-boxed-types
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
- * quality
* external/cwe/cwe-595
*/
diff --git a/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql b/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql
index b4076bee00b..e60c65953d1 100644
--- a/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql
+++ b/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql
@@ -7,7 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id java/constant-comparison
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* logic
* external/cwe/cwe-570
* external/cwe/cwe-571
diff --git a/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql b/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql
index b5ebc3a951c..1656eab1218 100644
--- a/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql
+++ b/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql
@@ -6,7 +6,9 @@
* @problem.severity error
* @precision very-high
* @id java/comparison-with-nan
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql b/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql
index c31ef996225..a6ff029557c 100644
--- a/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql
@@ -6,8 +6,8 @@
* @problem.severity recommendation
* @precision high
* @id java/call-to-thread-run
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* external/cwe/cwe-572
*/
diff --git a/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql b/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql
index 21b8c805cbb..ee7a807d4da 100644
--- a/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql
@@ -6,8 +6,8 @@
* @problem.severity error
* @precision high
* @id java/unsafe-double-checked-locking
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* external/cwe/cwe-609
*/
diff --git a/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql b/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql
index 17b9fc93d21..6a480bd3f8d 100644
--- a/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql
@@ -8,8 +8,8 @@
* @problem.severity warning
* @precision high
* @id java/unsafe-double-checked-locking-init-order
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* external/cwe/cwe-609
*/
diff --git a/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql b/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql
index a2e41c9bd05..3dcd44a5273 100644
--- a/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql
@@ -6,8 +6,8 @@
* @problem.severity warning
* @precision very-high
* @id java/non-sync-override
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* language-features
* external/cwe/cwe-820
diff --git a/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql b/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql
index a217d019f32..aa13c652e00 100644
--- a/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql
@@ -7,8 +7,8 @@
* @problem.severity error
* @precision very-high
* @id java/sync-on-boxed-types
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* language-features
* external/cwe/cwe-662
diff --git a/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql b/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql
index f631ab145ed..642a3f5e46f 100644
--- a/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql
+++ b/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql
@@ -7,8 +7,8 @@
* @problem.severity error
* @precision very-high
* @id java/unsynchronized-getter
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
* concurrency
* language-features
* external/cwe/cwe-413
diff --git a/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql b/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql
index 61816053897..606daac9c08 100644
--- a/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql
+++ b/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql
@@ -6,7 +6,8 @@
* @problem.severity error
* @precision very-high
* @id java/non-final-call-in-constructor
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql b/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
index 01f0ceac56c..dea4426b2a1 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
@@ -5,7 +5,8 @@
* @problem.severity warning
* @precision very-high
* @id java/test-for-negative-container-size
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql b/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql
index a8ff61f481d..e48eb1f5ce6 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql
@@ -7,9 +7,10 @@
* @problem.severity error
* @precision very-high
* @id java/contradictory-type-checks
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* logic
- * quality
*/
import java
diff --git a/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql b/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql
index 2297873be82..4d9ec329ba3 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql
@@ -6,7 +6,9 @@
* @problem.severity error
* @precision very-high
* @id java/missing-format-argument
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-685
*/
diff --git a/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql b/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql
index f9f2c08f0b8..67cc13424fa 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql
@@ -7,7 +7,9 @@
* @problem.severity recommendation
* @precision very-high
* @id java/missing-space-in-concatenation
- * @tags readability
+ * @tags quality
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql b/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql
index 83eb99d7498..8116a906910 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql
@@ -5,7 +5,8 @@
* @problem.severity error
* @precision very-high
* @id java/redundant-assignment
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql b/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql
index 3eb9ee38e57..a7bc5e23fd4 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql
@@ -6,8 +6,9 @@
* @problem.severity error
* @precision very-high
* @id java/string-buffer-char-init
- * @tags reliability
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql b/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql
index 9e24a3b7b4e..1e97c4250d9 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql
@@ -5,8 +5,9 @@
* @problem.severity warning
* @precision high
* @id java/suspicious-date-format
- * @tags correctness
- * quality
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql b/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql
index 286c731b5b8..e87a4b50440 100644
--- a/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql
+++ b/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql
@@ -7,7 +7,8 @@
* @problem.severity warning
* @precision very-high
* @id java/unused-format-argument
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-685
*/
diff --git a/java/ql/src/Likely Bugs/Nullness/NullAlways.ql b/java/ql/src/Likely Bugs/Nullness/NullAlways.ql
index c52c43acc55..e0fe795d5a7 100644
--- a/java/ql/src/Likely Bugs/Nullness/NullAlways.ql
+++ b/java/ql/src/Likely Bugs/Nullness/NullAlways.ql
@@ -5,7 +5,8 @@
* @problem.severity error
* @precision very-high
* @id java/dereferenced-value-is-always-null
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* exceptions
* external/cwe/cwe-476
diff --git a/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql b/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql
index 7929c839a41..59e7ebd5ae0 100644
--- a/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql
+++ b/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision high
* @id java/dereferenced-expr-may-be-null
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* exceptions
* external/cwe/cwe-476
diff --git a/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql b/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql
index eedb2907f46..2202f1eb454 100644
--- a/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql
+++ b/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision high
* @id java/dereferenced-value-may-be-null
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* exceptions
* external/cwe/cwe-476
diff --git a/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql b/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql
index d210581d20c..0c7681d5a52 100644
--- a/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql
+++ b/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql
@@ -6,10 +6,11 @@
* @problem.severity warning
* @precision high
* @id java/input-resource-leak
- * @tags efficiency
- * correctness
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
* resources
- * quality
* external/cwe/cwe-404
* external/cwe/cwe-772
*/
diff --git a/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql b/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql
index e7584aba67d..bf310d34123 100644
--- a/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql
+++ b/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql
@@ -5,7 +5,9 @@
* @problem.severity warning
* @precision high
* @id java/database-resource-leak
- * @tags correctness
+ * @tags quality
+ * reliability
+ * performance
* resources
* external/cwe/cwe-404
* external/cwe/cwe-772
diff --git a/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql b/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql
index fe23286b2e0..988df777321 100644
--- a/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql
+++ b/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql
@@ -6,10 +6,11 @@
* @problem.severity warning
* @precision high
* @id java/output-resource-leak
- * @tags efficiency
- * correctness
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
* resources
- * quality
* external/cwe/cwe-404
* external/cwe/cwe-772
*/
diff --git a/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql b/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql
index b99f64a1e4d..754602aa799 100644
--- a/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql
+++ b/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql
@@ -8,7 +8,9 @@
* @id java/continue-in-false-loop
* @problem.severity warning
* @precision high
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql b/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql
index e3e9e45cc64..eb5c2d380c6 100644
--- a/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql
+++ b/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision high
* @id java/unreachable-catch-clause
- * @tags reliability
+ * @tags quality
+ * reliability
* correctness
* exceptions
* external/cwe/cwe-561
diff --git a/java/ql/src/Likely Bugs/Statements/UseBraces.ql b/java/ql/src/Likely Bugs/Statements/UseBraces.ql
index e9c8a082f3f..c82bfc2c36f 100644
--- a/java/ql/src/Likely Bugs/Statements/UseBraces.ql
+++ b/java/ql/src/Likely Bugs/Statements/UseBraces.ql
@@ -6,7 +6,9 @@
* @problem.severity warning
* @precision very-high
* @id java/misleading-indentation
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* correctness
* logic
*/
diff --git a/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql b/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql
index 9cf8ab9b61f..d4fbc480e1b 100644
--- a/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql
+++ b/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql
@@ -7,7 +7,9 @@
* @problem.severity warning
* @precision very-high
* @id java/constant-loop-condition
- * @tags correctness
+ * @tags quality
+ * reliability
+ * correctness
* external/cwe/cwe-835
*/
diff --git a/java/ql/src/Performance/InefficientEmptyStringTest.ql b/java/ql/src/Performance/InefficientEmptyStringTest.ql
index 0033bcf1284..e909f717953 100644
--- a/java/ql/src/Performance/InefficientEmptyStringTest.ql
+++ b/java/ql/src/Performance/InefficientEmptyStringTest.ql
@@ -5,8 +5,9 @@
* @problem.severity recommendation
* @precision high
* @id java/inefficient-empty-string-test
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
*/
import java
diff --git a/java/ql/src/Performance/InefficientKeySetIterator.ql b/java/ql/src/Performance/InefficientKeySetIterator.ql
index 2dbe8831cb1..79641b36140 100644
--- a/java/ql/src/Performance/InefficientKeySetIterator.ql
+++ b/java/ql/src/Performance/InefficientKeySetIterator.ql
@@ -5,8 +5,9 @@
* @problem.severity recommendation
* @precision high
* @id java/inefficient-key-set-iterator
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
*/
import java
diff --git a/java/ql/src/Performance/InefficientOutputStream.ql b/java/ql/src/Performance/InefficientOutputStream.ql
index 5ddf568b79a..feb9ae5e5c4 100644
--- a/java/ql/src/Performance/InefficientOutputStream.ql
+++ b/java/ql/src/Performance/InefficientOutputStream.ql
@@ -6,7 +6,10 @@
* @problem.severity warning
* @precision very-high
* @id java/inefficient-output-stream
- * @tags efficiency
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
*/
import java
diff --git a/java/ql/src/Performance/InefficientPrimConstructor.ql b/java/ql/src/Performance/InefficientPrimConstructor.ql
index e8992b017f9..4c3284d93dd 100644
--- a/java/ql/src/Performance/InefficientPrimConstructor.ql
+++ b/java/ql/src/Performance/InefficientPrimConstructor.ql
@@ -5,8 +5,10 @@
* @problem.severity recommendation
* @precision high
* @id java/inefficient-boxed-constructor
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
*/
import java
diff --git a/java/ql/src/Performance/InnerClassCouldBeStatic.ql b/java/ql/src/Performance/InnerClassCouldBeStatic.ql
index 95d3057c962..8edc7fd458a 100644
--- a/java/ql/src/Performance/InnerClassCouldBeStatic.ql
+++ b/java/ql/src/Performance/InnerClassCouldBeStatic.ql
@@ -6,8 +6,10 @@
* @problem.severity recommendation
* @precision high
* @id java/non-static-nested-class
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
*/
import java
diff --git a/java/ql/src/Performance/NewStringString.ql b/java/ql/src/Performance/NewStringString.ql
index b2f26069ea2..9ffdbd44a27 100644
--- a/java/ql/src/Performance/NewStringString.ql
+++ b/java/ql/src/Performance/NewStringString.ql
@@ -6,8 +6,10 @@
* @problem.severity recommendation
* @precision high
* @id java/inefficient-string-constructor
- * @tags efficiency
- * maintainability
+ * @tags quality
+ * reliability
+ * performance
+ * efficiency
*/
import java
diff --git a/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql b/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql
index 1749dc2ffa4..fec9a2e8e44 100644
--- a/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql
+++ b/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql
@@ -6,7 +6,9 @@
* @problem.severity warning
* @precision very-high
* @id java/non-null-boxed-variable
- * @tags readability
+ * @tags quality
+ * maintainability
+ * readability
* types
*/
diff --git a/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql b/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql
index 3688ca21536..d211351c25d 100644
--- a/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql
+++ b/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql
@@ -6,7 +6,8 @@
* @problem.severity recommendation
* @precision high
* @id java/unused-reference-type
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql b/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql
index 892ebf9fdb1..1ca906d5bb8 100644
--- a/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql
+++ b/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision very-high
* @id java/unimplementable-interface
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
*/
diff --git a/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql b/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql
index 31697e561ed..ae85f546613 100644
--- a/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql
+++ b/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql
@@ -5,7 +5,8 @@
* @problem.severity recommendation
* @precision high
* @id java/local-variable-is-never-read
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql b/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql
index cc453f1334e..950486950cc 100644
--- a/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql
+++ b/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql
@@ -6,7 +6,8 @@
* @problem.severity recommendation
* @precision high
* @id java/unused-label
- * @tags maintainability
+ * @tags quality
+ * maintainability
* useless-code
* external/cwe/cwe-561
*/
diff --git a/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql b/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
index fb0482413d1..a268c6a8aee 100644
--- a/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
+++ b/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/constants-only-interface
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * readability
* modularity
*/
diff --git a/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql b/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql
index 2e95c087ed5..83b1c235aa8 100644
--- a/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql
+++ b/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql
@@ -6,8 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/ignored-error-status-of-call
- * @tags reliability
- * correctness
+ * @tags quality
+ * reliability
+ * error-handling
* external/cwe/cwe-391
*/
diff --git a/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql b/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql
index 6a7928b4561..a49d92bd630 100644
--- a/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql
+++ b/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/uncaught-number-format-exception
- * @tags reliability
+ * @tags quality
+ * reliability
+ * error-handling
* external/cwe/cwe-248
*/
diff --git a/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql b/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql
index 670156cfccb..dce4d9e46e6 100644
--- a/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql
+++ b/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql
@@ -6,8 +6,9 @@
* @problem.severity warning
* @precision very-high
* @id java/abstract-to-concrete-cast
- * @tags reliability
+ * @tags quality
* maintainability
+ * complexity
* modularity
* external/cwe/cwe-485
*/
diff --git a/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql b/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql
index 98c1e1a2fbe..b5d27655f8d 100644
--- a/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql
+++ b/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql
@@ -6,8 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/internal-representation-exposure
- * @tags reliability
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
* modularity
* external/cwe/cwe-485
*/
diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql b/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
index a52a6d81688..c9c5dd85878 100644
--- a/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
+++ b/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
@@ -6,7 +6,8 @@
* @problem.severity warning
* @precision very-high
* @id java/subtle-inherited-call
- * @tags reliability
+ * @tags quality
+ * maintainability
* readability
*/
diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql b/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql
index 1c44dad78cc..ef98cd1c3bc 100644
--- a/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql
+++ b/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql
@@ -6,7 +6,8 @@
* @problem.severity recommendation
* @precision high
* @id java/confusing-method-name
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* naming
*/
diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql b/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql
index 96188c534ff..ca002fc654a 100644
--- a/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql
+++ b/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql
@@ -7,7 +7,8 @@
* @problem.severity recommendation
* @precision high
* @id java/confusing-method-signature
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* naming
*/
diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql b/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql
index f686e18f2ee..f0c68ed9a80 100644
--- a/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql
+++ b/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql
@@ -6,7 +6,8 @@
* @problem.severity recommendation
* @precision high
* @id java/local-shadows-field
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
*/
diff --git a/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql b/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql
index a9f99658f94..ee3e3990ccb 100644
--- a/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql
+++ b/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql
@@ -5,7 +5,8 @@
* @problem.severity recommendation
* @precision high
* @id java/class-name-matches-super-class
- * @tags maintainability
+ * @tags quality
+ * maintainability
* readability
* naming
*/
diff --git a/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql b/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql
index 9b1bcb9877c..abefc73dab1 100644
--- a/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql
+++ b/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql
@@ -5,7 +5,9 @@
* @problem.severity recommendation
* @precision high
* @id java/useless-tostring-call
- * @tags maintainability
+ * @tags quality
+ * maintainability
+ * useless-code
*/
import java
diff --git a/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql b/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql
index d404e4a929a..e2b7824ffbf 100644
--- a/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql
+++ b/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql
@@ -6,8 +6,9 @@
* @problem.severity recommendation
* @precision high
* @id java/call-to-object-tostring
- * @tags reliability
- * maintainability
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
diff --git a/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql b/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql
index f356aa635d4..46642ce6149 100644
--- a/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql
+++ b/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql
@@ -6,7 +6,9 @@
* @problem.severity recommendation
* @precision very-high
* @id java/print-array
- * @tags maintainability
+ * @tags quality
+ * reliability
+ * correctness
*/
import java
From 72a6280482c67aaec9cc6910db6be048d6443f51 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Tue, 17 Jun 2025 15:21:59 +0100
Subject: [PATCH 063/213] Add change note
---
.../2025-06-17-add-tags-to-quality-queries.md | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
diff --git a/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md b/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
new file mode 100644
index 00000000000..cb6baa2927f
--- /dev/null
+++ b/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
@@ -0,0 +1,17 @@
+---
+category: queryMetadata
+---
+* The tag `quality` has been added to multiple Java quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories.
+* The tag `external/cwe/cwe-571` has been added to `java/equals-on-unrelated-types`.
+* The tag `readability` has been added to `java/missing-override-annotation`, `java/deprecated-call`, `java/inconsistent-javadoc-throws`, `java/unknown-javadoc-parameter`, `java/jdk-internal-api-access`, `java/underscore-identifier`, `java/misleading-indentation`, `java/constants-only-interface` and .
+* The tag `useless-code` has been added to `java/useless-type-test`, and `java/useless-tostring-call`.
+* The tag `complexity` has been added to `java/chained-type-tests`, and `java/abstract-to-concrete-cast`.
+* The tag `error-handling` has been added to `java/ignored-error-status-of-call`, and `java/uncaught-number-format-exception`.
+* The tag `correctness` has been added to `java/evaluation-to-constant`, `java/whitespace-contradicts-precedence`, `java/empty-container`, `java/string-buffer-char-init`, `java/call-to-object-tostring`, `java/print-array` and `java/internal-representation-exposure`.
+* The tag `performance` has been added to `java/input-resource-leak`, `java/database-resource-leak`, `java/output-resource-leak`, `java/inefficient-empty-string-test`, `java/inefficient-key-set-iterator`, `java/inefficient-output-stream`, `java/inefficient-boxed-constructor`, `java/non-static-nested-class`, and `java/inefficient-string-constructor`.
+* The tag `correctness` has been removed from `java/call-to-thread-run`, `java/unsafe-double-checked-locking`, `java/unsafe-double-checked-locking-init-order`, `java/non-sync-override`, `java/sync-on-boxed-types`, `java/unsynchronized-getter`, `java/input-resource-leak`, `java/output-resource-leak`, `java/database-resource-leak`, and `java/ignored-error-status-of-call`.
+* The tags `maintainability` has been removed from `java/string-buffer-char-init`, `java/inefficient-key-set-iterator`, `java/inefficient-boxed-constructor`, `java/non-static-nested-class`, `java/inefficient-string-constructor`, `java/internal-representation-exposure`, and `java/inefficient-empty-string-test`.
+* The tags `reliability` has been removed from `java/subtle-inherited-call`, `java/print-array`, and `java/call-to-object-tostring`.
+* The tags `maintainability` and `useless-code` have been removed from `java/evaluation-to-constant`.
+* The tags `maintainability` and `readability` have been removed from `java/whitespace-contradicts-precedence`.
+* The tags `maintainability` and `useless-code` have been removed from `java/empty-container`.
From 9cfa6fe59c46f9dadeeefba5a0efdbea10d70d89 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Tue, 17 Jun 2025 15:45:34 +0100
Subject: [PATCH 064/213] Update expected quality queries
---
.../java-code-quality.qls.expected | 69 +++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
index 4af6a4dd5db..777ca3dffc1 100644
--- a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
+++ b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
@@ -1,13 +1,82 @@
+ql/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql
+ql/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql
+ql/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql
+ql/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
+ql/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
+ql/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
+ql/java/ql/src/DeadCode/UselessParameter.ql
+ql/java/ql/src/Language Abuse/ChainedInstanceof.ql
+ql/java/ql/src/Language Abuse/IterableIterator.ql
+ql/java/ql/src/Language Abuse/UselessNullCheck.ql
+ql/java/ql/src/Language Abuse/UselessTypeTest.ql
+ql/java/ql/src/Language Abuse/WrappedIterator.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
ql/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql
+ql/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql
+ql/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql
+ql/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql
+ql/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql
ql/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql
+ql/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql
+ql/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql
+ql/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql
ql/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql
ql/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql
ql/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql
ql/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql
+ql/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql
+ql/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql
+ql/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql
+ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql
+ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql
+ql/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql
+ql/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql
+ql/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql
ql/java/ql/src/Likely Bugs/Frameworks/JUnit/JUnit5MissingNestedAnnotation.ql
+ql/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
ql/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql
ql/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullAlways.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql
ql/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql
+ql/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql
ql/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql
+ql/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql
+ql/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql
+ql/java/ql/src/Likely Bugs/Statements/UseBraces.ql
+ql/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql
+ql/java/ql/src/Performance/InefficientEmptyStringTest.ql
+ql/java/ql/src/Performance/InefficientKeySetIterator.ql
+ql/java/ql/src/Performance/InefficientOutputStream.ql
+ql/java/ql/src/Performance/InefficientPrimConstructor.ql
+ql/java/ql/src/Performance/InnerClassCouldBeStatic.ql
+ql/java/ql/src/Performance/NewStringString.ql
ql/java/ql/src/Performance/StringReplaceAllWithNonRegex.ql
+ql/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql
+ql/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
+ql/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql
+ql/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql
+ql/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql
+ql/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql
ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DoNotCallFinalize.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql
From d3eb4f8eb650a674d8418857b20bb6f6e23901d0 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 18 Jun 2025 11:56:58 +0100
Subject: [PATCH 065/213] Remove query with hard-coded threshold
---
java/ql/src/Language Abuse/ChainedInstanceof.ql | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/java/ql/src/Language Abuse/ChainedInstanceof.ql b/java/ql/src/Language Abuse/ChainedInstanceof.ql
index d9b5a297b46..c5cd39565d0 100644
--- a/java/ql/src/Language Abuse/ChainedInstanceof.ql
+++ b/java/ql/src/Language Abuse/ChainedInstanceof.ql
@@ -5,8 +5,7 @@
* @problem.severity recommendation
* @precision high
* @id java/chained-type-tests
- * @tags quality
- * maintainability
+ * @tags maintainability
* complexity
* language-features
*/
From b8a694c9fe6323190eb4f6b43d86cf1417f1c5ce Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 18 Jun 2025 12:23:35 +0100
Subject: [PATCH 066/213] Address review comments
---
java/ql/src/Performance/InefficientEmptyStringTest.ql | 4 ++--
java/ql/src/Performance/InnerClassCouldBeStatic.ql | 5 ++---
java/ql/src/Performance/NewStringString.ql | 5 ++---
.../change-notes/2025-06-17-add-tags-to-quality-queries.md | 6 +++---
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/java/ql/src/Performance/InefficientEmptyStringTest.ql b/java/ql/src/Performance/InefficientEmptyStringTest.ql
index e909f717953..95f5bc0760b 100644
--- a/java/ql/src/Performance/InefficientEmptyStringTest.ql
+++ b/java/ql/src/Performance/InefficientEmptyStringTest.ql
@@ -6,8 +6,8 @@
* @precision high
* @id java/inefficient-empty-string-test
* @tags quality
- * reliability
- * performance
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Performance/InnerClassCouldBeStatic.ql b/java/ql/src/Performance/InnerClassCouldBeStatic.ql
index 8edc7fd458a..dfc577282ca 100644
--- a/java/ql/src/Performance/InnerClassCouldBeStatic.ql
+++ b/java/ql/src/Performance/InnerClassCouldBeStatic.ql
@@ -7,9 +7,8 @@
* @precision high
* @id java/non-static-nested-class
* @tags quality
- * reliability
- * performance
- * efficiency
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/Performance/NewStringString.ql b/java/ql/src/Performance/NewStringString.ql
index 9ffdbd44a27..4dde1c4edd2 100644
--- a/java/ql/src/Performance/NewStringString.ql
+++ b/java/ql/src/Performance/NewStringString.ql
@@ -7,9 +7,8 @@
* @precision high
* @id java/inefficient-string-constructor
* @tags quality
- * reliability
- * performance
- * efficiency
+ * maintainability
+ * readability
*/
import java
diff --git a/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md b/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
index cb6baa2927f..a8c07fb3560 100644
--- a/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
+++ b/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md
@@ -3,14 +3,14 @@ category: queryMetadata
---
* The tag `quality` has been added to multiple Java quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories.
* The tag `external/cwe/cwe-571` has been added to `java/equals-on-unrelated-types`.
-* The tag `readability` has been added to `java/missing-override-annotation`, `java/deprecated-call`, `java/inconsistent-javadoc-throws`, `java/unknown-javadoc-parameter`, `java/jdk-internal-api-access`, `java/underscore-identifier`, `java/misleading-indentation`, `java/constants-only-interface` and .
+* The tag `readability` has been added to `java/missing-override-annotation`, `java/deprecated-call`, `java/inconsistent-javadoc-throws`, `java/unknown-javadoc-parameter`, `java/jdk-internal-api-access`, `java/underscore-identifier`, `java/misleading-indentation`, `java/inefficient-empty-string-test`, `java/non-static-nested-class`, `inefficient-string-constructor`, and `java/constants-only-interface`.
* The tag `useless-code` has been added to `java/useless-type-test`, and `java/useless-tostring-call`.
* The tag `complexity` has been added to `java/chained-type-tests`, and `java/abstract-to-concrete-cast`.
* The tag `error-handling` has been added to `java/ignored-error-status-of-call`, and `java/uncaught-number-format-exception`.
* The tag `correctness` has been added to `java/evaluation-to-constant`, `java/whitespace-contradicts-precedence`, `java/empty-container`, `java/string-buffer-char-init`, `java/call-to-object-tostring`, `java/print-array` and `java/internal-representation-exposure`.
-* The tag `performance` has been added to `java/input-resource-leak`, `java/database-resource-leak`, `java/output-resource-leak`, `java/inefficient-empty-string-test`, `java/inefficient-key-set-iterator`, `java/inefficient-output-stream`, `java/inefficient-boxed-constructor`, `java/non-static-nested-class`, and `java/inefficient-string-constructor`.
+* The tag `performance` has been added to `java/input-resource-leak`, `java/database-resource-leak`, `java/output-resource-leak`, `java/inefficient-key-set-iterator`, `java/inefficient-output-stream`, and `java/inefficient-boxed-constructor`.
* The tag `correctness` has been removed from `java/call-to-thread-run`, `java/unsafe-double-checked-locking`, `java/unsafe-double-checked-locking-init-order`, `java/non-sync-override`, `java/sync-on-boxed-types`, `java/unsynchronized-getter`, `java/input-resource-leak`, `java/output-resource-leak`, `java/database-resource-leak`, and `java/ignored-error-status-of-call`.
-* The tags `maintainability` has been removed from `java/string-buffer-char-init`, `java/inefficient-key-set-iterator`, `java/inefficient-boxed-constructor`, `java/non-static-nested-class`, `java/inefficient-string-constructor`, `java/internal-representation-exposure`, and `java/inefficient-empty-string-test`.
+* The tags `maintainability` has been removed from `java/string-buffer-char-init`, `java/inefficient-key-set-iterator`, `java/inefficient-boxed-constructor`, and `java/internal-representation-exposure`.
* The tags `reliability` has been removed from `java/subtle-inherited-call`, `java/print-array`, and `java/call-to-object-tostring`.
* The tags `maintainability` and `useless-code` have been removed from `java/evaluation-to-constant`.
* The tags `maintainability` and `readability` have been removed from `java/whitespace-contradicts-precedence`.
From 7a502984924a0a42e2b0fea4e2c6cc72b59646e5 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 18 Jun 2025 13:52:06 +0100
Subject: [PATCH 067/213] Update query suite test expectation
---
.../java-code-quality-extended.qls.expected | 68 +++++++++++++++++++
.../java-code-quality.qls.expected | 1 -
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected
index 8a10ff68c4f..dd15d7f3bdd 100644
--- a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected
+++ b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected
@@ -1,15 +1,83 @@
+ql/java/ql/src/Advisory/Declarations/MissingOverrideAnnotation.ql
+ql/java/ql/src/Advisory/Deprecated Code/AvoidDeprecatedCallableAccess.ql
+ql/java/ql/src/Advisory/Documentation/ImpossibleJavadocThrows.ql
+ql/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
+ql/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
+ql/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
+ql/java/ql/src/DeadCode/UselessParameter.ql
ql/java/ql/src/Language Abuse/EmptyMethod.ql
+ql/java/ql/src/Language Abuse/IterableIterator.ql
ql/java/ql/src/Language Abuse/TypeVariableHidesType.ql
+ql/java/ql/src/Language Abuse/UselessNullCheck.ql
+ql/java/ql/src/Language Abuse/UselessTypeTest.ql
+ql/java/ql/src/Language Abuse/WrappedIterator.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
ql/java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/LShiftLargerThanTypeWidth.ql
+ql/java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql
+ql/java/ql/src/Likely Bugs/Collections/ArrayIndexOutOfBounds.ql
+ql/java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql
+ql/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql
+ql/java/ql/src/Likely Bugs/Collections/RemoveTypeMismatch.ql
ql/java/ql/src/Likely Bugs/Collections/WriteOnlyContainer.ql
+ql/java/ql/src/Likely Bugs/Comparison/CompareIdenticalValues.ql
+ql/java/ql/src/Likely Bugs/Comparison/EqualsArray.ql
+ql/java/ql/src/Likely Bugs/Comparison/HashedButNoHash.ql
ql/java/ql/src/Likely Bugs/Comparison/IncomparableEquals.ql
ql/java/ql/src/Likely Bugs/Comparison/InconsistentEqualsHashCode.ql
ql/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql
ql/java/ql/src/Likely Bugs/Comparison/RefEqBoxed.ql
+ql/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql
+ql/java/ql/src/Likely Bugs/Comparison/WrongNanComparison.ql
+ql/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql
+ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql
+ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql
+ql/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql
+ql/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql
+ql/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql
ql/java/ql/src/Likely Bugs/Frameworks/JUnit/JUnit5MissingNestedAnnotation.ql
+ql/java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
ql/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/MissingFormatArg.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/MissingSpaceTypo.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/SelfAssignment.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/StringBufferCharInit.ql
ql/java/ql/src/Likely Bugs/Likely Typos/SuspiciousDateFormat.ql
+ql/java/ql/src/Likely Bugs/Likely Typos/UnusedFormatArg.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullAlways.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullExprDeref.ql
+ql/java/ql/src/Likely Bugs/Nullness/NullMaybe.ql
ql/java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql
+ql/java/ql/src/Likely Bugs/Resource Leaks/CloseSql.ql
ql/java/ql/src/Likely Bugs/Resource Leaks/CloseWriter.ql
+ql/java/ql/src/Likely Bugs/Statements/ContinueInFalseLoop.ql
+ql/java/ql/src/Likely Bugs/Statements/PartiallyMaskedCatch.ql
+ql/java/ql/src/Likely Bugs/Statements/UseBraces.ql
+ql/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql
+ql/java/ql/src/Performance/InefficientEmptyStringTest.ql
+ql/java/ql/src/Performance/InefficientKeySetIterator.ql
+ql/java/ql/src/Performance/InefficientOutputStream.ql
+ql/java/ql/src/Performance/InefficientPrimConstructor.ql
+ql/java/ql/src/Performance/InnerClassCouldBeStatic.ql
+ql/java/ql/src/Performance/NewStringString.ql
ql/java/ql/src/Performance/StringReplaceAllWithNonRegex.ql
+ql/java/ql/src/Violations of Best Practice/Boxed Types/BoxedVariable.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/DeadRefTypes.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/InterfaceCannotBeImplemented.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/UnreadLocal.ql
+ql/java/ql/src/Violations of Best Practice/Dead Code/UnusedLabel.ql
+ql/java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
+ql/java/ql/src/Violations of Best Practice/Exception Handling/IgnoreExceptionalReturn.ql
+ql/java/ql/src/Violations of Best Practice/Exception Handling/NumberFormatException.ql
+ql/java/ql/src/Violations of Best Practice/Implementation Hiding/AbstractToConcreteCollection.ql
+ql/java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingMethodNames.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldConfusing.ql
+ql/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql
ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DoNotCallFinalize.ql
+ql/java/ql/src/Violations of Best Practice/Undesirable Calls/PrintLnArray.ql
diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
index 777ca3dffc1..589041ac7b3 100644
--- a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
+++ b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
@@ -5,7 +5,6 @@ ql/java/ql/src/Advisory/Documentation/SpuriousJavadocParam.ql
ql/java/ql/src/Compatibility/JDK9/JdkInternalAccess.ql
ql/java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql
ql/java/ql/src/DeadCode/UselessParameter.ql
-ql/java/ql/src/Language Abuse/ChainedInstanceof.ql
ql/java/ql/src/Language Abuse/IterableIterator.ql
ql/java/ql/src/Language Abuse/UselessNullCheck.ql
ql/java/ql/src/Language Abuse/UselessTypeTest.ql
From 117a80e8d780ce46b23c793484fd44e26307da98 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Wed, 18 Jun 2025 17:19:55 +0100
Subject: [PATCH 068/213] Rust: Accept consistency check changes.
---
.../PathResolutionConsistency.expected | 43 +++++++++++++------
.../PathResolutionConsistency.expected | 6 +--
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
index 767f3366008..05600781a29 100644
--- a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
+++ b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
@@ -1,30 +1,45 @@
+multipleMethodCallTargets
+| main.rs:187:13:187:43 | ...::System.allocate(...) | file://:0:0:0:0 | fn allocate |
+| main.rs:187:13:187:43 | ...::System.allocate(...) | file://:0:0:0:0 | fn allocate |
+| main.rs:188:13:188:50 | ...::System.allocate_zeroed(...) | file://:0:0:0:0 | fn allocate_zeroed |
+| main.rs:188:13:188:50 | ...::System.allocate_zeroed(...) | file://:0:0:0:0 | fn allocate_zeroed |
+| main.rs:195:13:195:43 | ...::System.allocate(...) | file://:0:0:0:0 | fn allocate |
+| main.rs:195:13:195:43 | ...::System.allocate(...) | file://:0:0:0:0 | fn allocate |
+| main.rs:196:13:196:50 | ...::System.allocate_zeroed(...) | file://:0:0:0:0 | fn allocate_zeroed |
+| main.rs:196:13:196:50 | ...::System.allocate_zeroed(...) | file://:0:0:0:0 | fn allocate_zeroed |
+| main.rs:208:21:208:55 | ...::System.grow(...) | file://:0:0:0:0 | fn grow |
+| main.rs:208:21:208:55 | ...::System.grow(...) | file://:0:0:0:0 | fn grow |
+| main.rs:210:21:210:62 | ...::System.grow_zeroed(...) | file://:0:0:0:0 | fn grow_zeroed |
+| main.rs:210:21:210:62 | ...::System.grow_zeroed(...) | file://:0:0:0:0 | fn grow_zeroed |
+| main.rs:213:17:213:53 | ...::System.shrink(...) | file://:0:0:0:0 | fn shrink |
+| main.rs:213:17:213:53 | ...::System.shrink(...) | file://:0:0:0:0 | fn shrink |
multiplePathResolutions
-| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:218:14:218:25 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:218:14:218:25 | ...::malloc | file://:0:0:0:0 | fn malloc |
-| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:219:13:219:24 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:219:13:219:24 | ...::malloc | file://:0:0:0:0 | fn malloc |
-| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:220:13:220:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:220:13:220:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
-| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:221:13:221:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:221:13:221:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
-| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:222:13:222:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:222:13:222:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
-| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:223:13:223:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:223:13:223:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
-| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.172) |
-| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
+| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| main.rs:224:13:224:25 | ...::realloc | file://:0:0:0:0 | fn realloc |
| main.rs:224:13:224:25 | ...::realloc | file://:0:0:0:0 | fn realloc |
| main.rs:229:13:229:37 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity |
diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
index d326b510db4..24cad838282 100644
--- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
+++ b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
@@ -1,14 +1,14 @@
multiplePathResolutions
| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| deallocation.rs:106:16:106:27 | ...::malloc | file://:0:0:0:0 | fn malloc |
| deallocation.rs:106:16:106:27 | ...::malloc | file://:0:0:0:0 | fn malloc |
| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| deallocation.rs:112:3:112:12 | ...::free | file://:0:0:0:0 | fn free |
| deallocation.rs:112:3:112:12 | ...::free | file://:0:0:0:0 | fn free |
| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
+| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
From 77a92c062b946f5c467c83b475d41bf7aa983f91 Mon Sep 17 00:00:00 2001
From: Tom Hvitved
Date: Wed, 18 Jun 2025 19:55:33 +0200
Subject: [PATCH 069/213] Rust: Add path resolution test
---
.../PathResolutionConsistency.expected | 8 +-
.../library-tests/path-resolution/main.rs | 9 +-
.../path-resolution/path-resolution.expected | 147 +++++++++---------
3 files changed, 85 insertions(+), 79 deletions(-)
diff --git a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected
index d242a227c11..c6d80a4c395 100644
--- a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected
+++ b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected
@@ -3,7 +3,7 @@ multiplePathResolutions
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
| main.rs:626:3:626:12 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) |
| main.rs:626:3:626:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
-| main.rs:631:7:631:16 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) |
-| main.rs:631:7:631:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
-| main.rs:634:7:634:16 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) |
-| main.rs:634:7:634:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
+| main.rs:632:7:632:16 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) |
+| main.rs:632:7:632:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
+| main.rs:635:7:635:16 | proc_macro | file://:0:0:0:0 | Crate(proc_macro@0.0.0) |
+| main.rs:635:7:635:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs
index c8c6f36ac3f..e06f1fce53b 100644
--- a/rust/ql/test/library-tests/path-resolution/main.rs
+++ b/rust/ql/test/library-tests/path-resolution/main.rs
@@ -627,7 +627,8 @@ extern crate self as zelf;
fn z() {} // I122
struct AStruct {} //I123
-impl AStruct { // $ item=I123
+impl AStruct // $ item=I123
+{
#[proc_macro::add_suffix("on_type")] // $ item=add_suffix
pub fn z() {} // I124
@@ -635,6 +636,10 @@ impl AStruct { // $ item=I123
pub fn z(&self) {} // I125
}
+use std::{self as ztd}; // $ item=std
+
+fn use_ztd(x: ztd::string::String) {} // $ MISSING: item=String
+
fn main() {
my::nested::nested1::nested2::f(); // $ item=I4
my::f(); // $ item=I38
@@ -667,6 +672,6 @@ fn main() {
zelf::h(); // $ item=I25
z_changed(); // $ MISSING: item=I122
AStruct::z_on_type(); // $ MISSING: item=I124
- AStruct{} // $ item=I123
+ AStruct {} // $ item=I123
.z_on_instance(); // MISSING: item=I125
}
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 fd712596821..9ab86dc5f04 100644
--- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected
+++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected
@@ -61,7 +61,7 @@ resolvePath
| main.rs:30:17:30:21 | super | main.rs:18:5:36:5 | mod m2 |
| main.rs:30:17:30:24 | ...::f | main.rs:19:9:21:9 | fn f |
| main.rs:33:17:33:17 | f | main.rs:19:9:21:9 | fn f |
-| main.rs:40:9:40:13 | super | main.rs:1:1:672:2 | SourceFile |
+| main.rs:40:9:40:13 | super | main.rs:1:1:677:2 | SourceFile |
| main.rs:40:9:40:17 | ...::m1 | main.rs:13:1:37:1 | mod m1 |
| main.rs:40:9:40:21 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
| main.rs:40:9:40:24 | ...::g | main.rs:23:9:27:9 | fn g |
@@ -73,7 +73,7 @@ resolvePath
| main.rs:61:17:61:19 | Foo | main.rs:59:9:59:21 | struct Foo |
| main.rs:64:13:64:15 | Foo | main.rs:53:5:53:17 | struct Foo |
| main.rs:66:5:66:5 | f | main.rs:55:5:62:5 | fn f |
-| main.rs:68:5:68:8 | self | main.rs:1:1:672:2 | SourceFile |
+| main.rs:68:5:68:8 | self | main.rs:1:1:677:2 | SourceFile |
| main.rs:68:5:68:11 | ...::i | main.rs:71:1:83:1 | fn i |
| main.rs:74:13:74:15 | Foo | main.rs:48:1:48:13 | struct Foo |
| main.rs:78:16:78:18 | i32 | {EXTERNAL LOCATION} | struct i32 |
@@ -88,7 +88,7 @@ resolvePath
| main.rs:87:57:87:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g |
| main.rs:87:80:87:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
| main.rs:100:5:100:22 | f_defined_in_macro | main.rs:99:18:99:42 | fn f_defined_in_macro |
-| main.rs:117:13:117:17 | super | main.rs:1:1:672:2 | SourceFile |
+| main.rs:117:13:117:17 | super | main.rs:1:1:677:2 | SourceFile |
| main.rs:117:13:117:21 | ...::m5 | main.rs:103:1:107:1 | mod m5 |
| main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f |
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
@@ -270,75 +270,76 @@ resolvePath
| main.rs:626:3:626:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
| main.rs:626:3:626:24 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
| main.rs:630:6:630:12 | AStruct | main.rs:629:1:629:17 | struct AStruct |
-| main.rs:631:7:631:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) |
-| main.rs:631:7:631:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
-| main.rs:631:7:631:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
-| main.rs:634:7:634:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) |
-| main.rs:634:7:634:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
-| main.rs:634:7:634:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
-| main.rs:639:5:639:6 | my | main.rs:1:1:1:7 | mod my |
-| main.rs:639:5:639:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
-| main.rs:639:5:639:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
-| main.rs:639:5:639:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
-| main.rs:639:5:639:35 | ...::f | my/nested.rs:3:9:5:9 | fn f |
-| main.rs:640:5:640:6 | my | main.rs:1:1:1:7 | mod my |
-| main.rs:640:5:640:9 | ...::f | my.rs:5:1:7:1 | fn f |
-| main.rs:641:5:641:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
-| main.rs:641:5:641:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
-| main.rs:641:5:641:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
-| main.rs:641:5:641:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
-| main.rs:642:5:642:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
-| main.rs:643:5:643:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
-| main.rs:644:5:644:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) |
-| main.rs:644:5:644:12 | ...::h | main.rs:50:1:69:1 | fn h |
-| main.rs:645:5:645:6 | m1 | main.rs:13:1:37:1 | mod m1 |
-| main.rs:645:5:645:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
-| main.rs:645:5:645:13 | ...::g | main.rs:23:9:27:9 | fn g |
-| main.rs:646:5:646:6 | m1 | main.rs:13:1:37:1 | mod m1 |
-| main.rs:646:5:646:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
-| main.rs:646:5:646:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 |
-| main.rs:646:5:646:17 | ...::h | main.rs:30:27:34:13 | fn h |
-| main.rs:647:5:647:6 | m4 | main.rs:39:1:46:1 | mod m4 |
-| main.rs:647:5:647:9 | ...::i | main.rs:42:5:45:5 | fn i |
-| main.rs:648:5:648:5 | h | main.rs:50:1:69:1 | fn h |
-| main.rs:649:5:649:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f |
-| main.rs:650:5:650:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g |
-| main.rs:651:5:651:5 | j | main.rs:97:1:101:1 | fn j |
-| main.rs:652:5:652:6 | m6 | main.rs:109:1:120:1 | mod m6 |
-| main.rs:652:5:652:9 | ...::g | main.rs:114:5:119:5 | fn g |
-| main.rs:653:5:653:6 | m7 | main.rs:122:1:141:1 | mod m7 |
-| main.rs:653:5:653:9 | ...::f | main.rs:133:5:140:5 | fn f |
-| main.rs:654:5:654:6 | m8 | main.rs:143:1:197:1 | mod m8 |
-| main.rs:654:5:654:9 | ...::g | main.rs:181:5:196:5 | fn g |
-| main.rs:655:5:655:6 | m9 | main.rs:199:1:207:1 | mod m9 |
-| main.rs:655:5:655:9 | ...::f | main.rs:202:5:206:5 | fn f |
-| main.rs:656:5:656:7 | m11 | main.rs:230:1:267:1 | mod m11 |
-| main.rs:656:5:656:10 | ...::f | main.rs:235:5:238:5 | fn f |
-| main.rs:657:5:657:7 | m15 | main.rs:298:1:352:1 | mod m15 |
-| main.rs:657:5:657:10 | ...::f | main.rs:339:5:351:5 | fn f |
-| main.rs:658:5:658:7 | m16 | main.rs:354:1:446:1 | mod m16 |
-| main.rs:658:5:658:10 | ...::f | main.rs:421:5:445:5 | fn f |
-| main.rs:659:5:659:7 | m17 | main.rs:448:1:478:1 | mod m17 |
-| main.rs:659:5:659:10 | ...::f | main.rs:472:5:477:5 | fn f |
-| main.rs:660:5:660:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 |
-| main.rs:660:5:660:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f |
-| main.rs:661:5:661:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
-| main.rs:661:5:661:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f |
-| main.rs:662:5:662:7 | my3 | my2/mod.rs:12:1:12:12 | mod my3 |
-| main.rs:662:5:662:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f |
-| main.rs:663:5:663:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f |
-| main.rs:664:5:664:7 | m18 | main.rs:480:1:498:1 | mod m18 |
-| main.rs:664:5:664:12 | ...::m19 | main.rs:485:5:497:5 | mod m19 |
-| main.rs:664:5:664:17 | ...::m20 | main.rs:490:9:496:9 | mod m20 |
-| main.rs:664:5:664:20 | ...::g | main.rs:491:13:495:13 | fn g |
-| main.rs:665:5:665:7 | m23 | main.rs:527:1:552:1 | mod m23 |
-| main.rs:665:5:665:10 | ...::f | main.rs:547:5:551:5 | fn f |
-| main.rs:666:5:666:7 | m24 | main.rs:554:1:622:1 | mod m24 |
-| main.rs:666:5:666:10 | ...::f | main.rs:608:5:621:5 | fn f |
-| main.rs:667:5:667:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
-| main.rs:667:5:667:11 | ...::h | main.rs:50:1:69:1 | fn h |
-| main.rs:669:5:669:11 | AStruct | main.rs:629:1:629:17 | struct AStruct |
-| main.rs:670:5:670:11 | AStruct | main.rs:629:1:629:17 | struct AStruct |
+| main.rs:632:7:632:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) |
+| main.rs:632:7:632:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
+| main.rs:632:7:632:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
+| main.rs:635:7:635:16 | proc_macro | {EXTERNAL LOCATION} | Crate(proc_macro@0.0.0) |
+| main.rs:635:7:635:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
+| main.rs:635:7:635:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
+| main.rs:639:5:639:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
+| main.rs:644:5:644:6 | my | main.rs:1:1:1:7 | mod my |
+| main.rs:644:5:644:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
+| main.rs:644:5:644:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
+| main.rs:644:5:644:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
+| main.rs:644:5:644:35 | ...::f | my/nested.rs:3:9:5:9 | fn f |
+| main.rs:645:5:645:6 | my | main.rs:1:1:1:7 | mod my |
+| main.rs:645:5:645:9 | ...::f | my.rs:5:1:7:1 | fn f |
+| main.rs:646:5:646:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
+| main.rs:646:5:646:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
+| main.rs:646:5:646:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
+| main.rs:646:5:646:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
+| main.rs:647:5:647:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
+| main.rs:648:5:648:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
+| main.rs:649:5:649:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) |
+| main.rs:649:5:649:12 | ...::h | main.rs:50:1:69:1 | fn h |
+| main.rs:650:5:650:6 | m1 | main.rs:13:1:37:1 | mod m1 |
+| main.rs:650:5:650:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
+| main.rs:650:5:650:13 | ...::g | main.rs:23:9:27:9 | fn g |
+| main.rs:651:5:651:6 | m1 | main.rs:13:1:37:1 | mod m1 |
+| main.rs:651:5:651:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
+| main.rs:651:5:651:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 |
+| main.rs:651:5:651:17 | ...::h | main.rs:30:27:34:13 | fn h |
+| main.rs:652:5:652:6 | m4 | main.rs:39:1:46:1 | mod m4 |
+| main.rs:652:5:652:9 | ...::i | main.rs:42:5:45:5 | fn i |
+| main.rs:653:5:653:5 | h | main.rs:50:1:69:1 | fn h |
+| main.rs:654:5:654:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f |
+| main.rs:655:5:655:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g |
+| main.rs:656:5:656:5 | j | main.rs:97:1:101:1 | fn j |
+| main.rs:657:5:657:6 | m6 | main.rs:109:1:120:1 | mod m6 |
+| main.rs:657:5:657:9 | ...::g | main.rs:114:5:119:5 | fn g |
+| main.rs:658:5:658:6 | m7 | main.rs:122:1:141:1 | mod m7 |
+| main.rs:658:5:658:9 | ...::f | main.rs:133:5:140:5 | fn f |
+| main.rs:659:5:659:6 | m8 | main.rs:143:1:197:1 | mod m8 |
+| main.rs:659:5:659:9 | ...::g | main.rs:181:5:196:5 | fn g |
+| main.rs:660:5:660:6 | m9 | main.rs:199:1:207:1 | mod m9 |
+| main.rs:660:5:660:9 | ...::f | main.rs:202:5:206:5 | fn f |
+| main.rs:661:5:661:7 | m11 | main.rs:230:1:267:1 | mod m11 |
+| main.rs:661:5:661:10 | ...::f | main.rs:235:5:238:5 | fn f |
+| main.rs:662:5:662:7 | m15 | main.rs:298:1:352:1 | mod m15 |
+| main.rs:662:5:662:10 | ...::f | main.rs:339:5:351:5 | fn f |
+| main.rs:663:5:663:7 | m16 | main.rs:354:1:446:1 | mod m16 |
+| main.rs:663:5:663:10 | ...::f | main.rs:421:5:445:5 | fn f |
+| main.rs:664:5:664:7 | m17 | main.rs:448:1:478:1 | mod m17 |
+| main.rs:664:5:664:10 | ...::f | main.rs:472:5:477:5 | fn f |
+| main.rs:665:5:665:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 |
+| main.rs:665:5:665:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f |
+| main.rs:666:5:666:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 |
+| main.rs:666:5:666:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f |
+| main.rs:667:5:667:7 | my3 | my2/mod.rs:12:1:12:12 | mod my3 |
+| main.rs:667:5:667:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f |
+| main.rs:668:5:668:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f |
+| main.rs:669:5:669:7 | m18 | main.rs:480:1:498:1 | mod m18 |
+| main.rs:669:5:669:12 | ...::m19 | main.rs:485:5:497:5 | mod m19 |
+| main.rs:669:5:669:17 | ...::m20 | main.rs:490:9:496:9 | mod m20 |
+| main.rs:669:5:669:20 | ...::g | main.rs:491:13:495:13 | fn g |
+| main.rs:670:5:670:7 | m23 | main.rs:527:1:552:1 | mod m23 |
+| main.rs:670:5:670:10 | ...::f | main.rs:547:5:551:5 | fn f |
+| main.rs:671:5:671:7 | m24 | main.rs:554:1:622:1 | mod m24 |
+| main.rs:671:5:671:10 | ...::f | main.rs:608:5:621:5 | fn f |
+| main.rs:672:5:672:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
+| main.rs:672:5:672:11 | ...::h | main.rs:50:1:69:1 | fn h |
+| main.rs:674:5:674:11 | AStruct | main.rs:629:1:629:17 | struct AStruct |
+| main.rs:675:5:675:11 | AStruct | main.rs:629:1:629:17 | struct AStruct |
| my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
| my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
| my2/mod.rs:5:5:5:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
@@ -354,7 +355,7 @@ resolvePath
| my2/my3/mod.rs:3:5:3:5 | g | my2/mod.rs:3:1:6:1 | fn g |
| my2/my3/mod.rs:4:5:4:5 | h | main.rs:50:1:69:1 | fn h |
| my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:17:30 | SourceFile |
-| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:672:2 | SourceFile |
+| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:677:2 | SourceFile |
| my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:50:1:69:1 | fn h |
| my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:17:30 | SourceFile |
| my2/my3/mod.rs:8:5:8:12 | ...::g | my2/mod.rs:3:1:6:1 | fn g |
From 519e56f7527482a9465e5b51365d0beb73604a7e Mon Sep 17 00:00:00 2001
From: Tom Hvitved
Date: Wed, 18 Jun 2025 19:57:57 +0200
Subject: [PATCH 070/213] Rust: Path resolution for `crate::{self as foo}`
---
rust/ql/lib/codeql/rust/internal/PathResolution.qll | 6 +++++-
rust/ql/test/library-tests/path-resolution/main.rs | 2 +-
.../library-tests/path-resolution/path-resolution.expected | 4 ++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll
index c10cdc0140e..f2c487598de 100644
--- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll
+++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll
@@ -205,7 +205,11 @@ abstract class ItemNode extends Locatable {
else result = this.getImmediateParentModule().getImmediateParentModule()
or
name = "self" and
- if this instanceof Module or this instanceof Enum or this instanceof Struct
+ if
+ this instanceof Module or
+ this instanceof Enum or
+ this instanceof Struct or
+ this instanceof Crate
then result = this
else result = this.getImmediateParentModule()
or
diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs
index e06f1fce53b..cf848ba2687 100644
--- a/rust/ql/test/library-tests/path-resolution/main.rs
+++ b/rust/ql/test/library-tests/path-resolution/main.rs
@@ -638,7 +638,7 @@ impl AStruct // $ item=I123
use std::{self as ztd}; // $ item=std
-fn use_ztd(x: ztd::string::String) {} // $ MISSING: item=String
+fn use_ztd(x: ztd::string::String) {} // $ item=String
fn main() {
my::nested::nested1::nested2::f(); // $ item=I4
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 9ab86dc5f04..164852626db 100644
--- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected
+++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected
@@ -277,6 +277,10 @@ resolvePath
| main.rs:635:7:635:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) |
| main.rs:635:7:635:28 | ...::add_suffix | proc_macro.rs:4:1:12:1 | fn add_suffix |
| main.rs:639:5:639:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
+| main.rs:639:11:639:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
+| main.rs:641:15:641:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
+| main.rs:641:15:641:25 | ...::string | {EXTERNAL LOCATION} | mod string |
+| main.rs:641:15:641:33 | ...::String | {EXTERNAL LOCATION} | struct String |
| main.rs:644:5:644:6 | my | main.rs:1:1:1:7 | mod my |
| main.rs:644:5:644:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
| main.rs:644:5:644:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
From 5bc974afe49ee4d65e463cab9abf1e98e3e8e684 Mon Sep 17 00:00:00 2001
From: Owen Mansel-Chan
Date: Wed, 18 Jun 2025 23:59:04 +0100
Subject: [PATCH 071/213] Address review comments
---
docs/query-help-style-guide.md | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/docs/query-help-style-guide.md b/docs/query-help-style-guide.md
index 45cac9c7e0b..3ed9f439490 100644
--- a/docs/query-help-style-guide.md
+++ b/docs/query-help-style-guide.md
@@ -24,13 +24,19 @@ Query help files can be written in either a custom XML format (with a `.qhelp` e
#### Markdown query help files
-A Markdown query help file should use the following structure and section order:
+A Markdown query help file should use the following structure and section order (note that the `Implementation notes` section is optional):
-1. **Overview** (level 2 heading, `## Overview`)
-2. **Recommendation** (level 2 heading, `## Recommendation`)
-3. **Example** (level 2 heading, `## Example`)
-4. **Implementation notes** (optional, level 2 heading, `## Implementation notes`)
-5. **References** (level 2 heading, `## References`)
+```
+## Overview
+
+## Recommendation
+
+## Example
+
+## Implementation notes
+
+## References
+```
Each section should be clearly marked with the appropriate heading. See the other Markdown files in this repository for examples.
@@ -147,6 +153,7 @@ More information on how to test your query help files can be found [within the d
1. The XML format allows for the contents of other files to be included in the output generated by processing the file, as mentioned in the section `Code examples`. This is not possible with the Markdown format.
2. When using the XML format, references are added to the output HTML file based on CWE tags, as mentioned in the section `Referencing potential security weaknesses`.
+3. For custom queries and custom query packs, only the Markdown format is supported.
## Query help example
From 88f668781dd90e8fed488c11a515206c3cda4cb3 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 19 Jun 2025 10:24:39 +0200
Subject: [PATCH 072/213] Updated extended expected file after merge
---
.../query-suite/javascript-code-quality-extended.qls.expected | 1 +
1 file changed, 1 insertion(+)
diff --git a/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
index bf646822ddc..e1a6cb98325 100644
--- a/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
+++ b/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
@@ -7,3 +7,4 @@ ql/javascript/ql/src/LanguageFeatures/TemplateSyntaxInStringLiteral.ql
ql/javascript/ql/src/Quality/UnhandledErrorInStreamPipeline.ql
ql/javascript/ql/src/RegExp/DuplicateCharacterInCharacterClass.ql
ql/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
+ql/javascript/ql/src/Statements/LoopIterationSkippedDueToShifting.ql
From 8b2bb07140ba82725aebf4b7bfa0a7740fe91c7b Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 19 Jun 2025 10:27:57 +0200
Subject: [PATCH 073/213] Updated quality extended expected file after merge
---
...ascript-code-quality-extended.qls.expected | 89 +++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
index bf646822ddc..0ee4ff2cf9c 100644
--- a/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
+++ b/javascript/ql/integration-tests/query-suite/javascript-code-quality-extended.qls.expected
@@ -1,9 +1,98 @@
+ql/javascript/ql/src/AngularJS/DependencyMismatch.ql
+ql/javascript/ql/src/AngularJS/DuplicateDependency.ql
+ql/javascript/ql/src/AngularJS/IncompatibleService.ql
+ql/javascript/ql/src/AngularJS/MissingExplicitInjection.ql
+ql/javascript/ql/src/AngularJS/RepeatedInjection.ql
+ql/javascript/ql/src/AngularJS/UseNgSrc.ql
+ql/javascript/ql/src/DOM/DuplicateAttributes.ql
+ql/javascript/ql/src/DOM/MalformedIdAttribute.ql
+ql/javascript/ql/src/DOM/PseudoEval.ql
+ql/javascript/ql/src/Declarations/ArgumentsRedefined.ql
+ql/javascript/ql/src/Declarations/AssignmentToConst.ql
+ql/javascript/ql/src/Declarations/ClobberingVarInit.ql
+ql/javascript/ql/src/Declarations/ConflictingFunctions.ql
+ql/javascript/ql/src/Declarations/DeadStoreOfLocal.ql
+ql/javascript/ql/src/Declarations/DeadStoreOfProperty.ql
+ql/javascript/ql/src/Declarations/DeclBeforeUse.ql
+ql/javascript/ql/src/Declarations/DefaultArgumentReferencesNestedFunction.ql
+ql/javascript/ql/src/Declarations/DuplicateVarDecl.ql
ql/javascript/ql/src/Declarations/IneffectiveParameterType.ql
+ql/javascript/ql/src/Declarations/MissingThisQualifier.ql
+ql/javascript/ql/src/Declarations/MissingVarDecl.ql
+ql/javascript/ql/src/Declarations/MixedStaticInstanceThisAccess.ql
ql/javascript/ql/src/Declarations/SuspiciousMethodNameDeclaration.ql
+ql/javascript/ql/src/Declarations/TemporalDeadZone.ql
+ql/javascript/ql/src/Declarations/UniqueParameterNames.ql
+ql/javascript/ql/src/Declarations/UniquePropertyNames.ql
+ql/javascript/ql/src/Declarations/UnreachableMethodOverloads.ql
+ql/javascript/ql/src/Declarations/UnusedVariable.ql
+ql/javascript/ql/src/Expressions/ComparisonWithNaN.ql
+ql/javascript/ql/src/Expressions/DuplicateCondition.ql
+ql/javascript/ql/src/Expressions/DuplicateProperty.ql
+ql/javascript/ql/src/Expressions/DuplicateSwitchCase.ql
ql/javascript/ql/src/Expressions/ExprHasNoEffect.ql
+ql/javascript/ql/src/Expressions/HeterogeneousComparison.ql
+ql/javascript/ql/src/Expressions/ImplicitOperandConversion.ql
ql/javascript/ql/src/Expressions/MissingAwait.ql
+ql/javascript/ql/src/Expressions/MissingDotLengthInComparison.ql
+ql/javascript/ql/src/Expressions/MissingSpaceInAppend.ql
+ql/javascript/ql/src/Expressions/MisspelledVariableName.ql
+ql/javascript/ql/src/Expressions/RedundantExpression.ql
+ql/javascript/ql/src/Expressions/SelfAssignment.ql
+ql/javascript/ql/src/Expressions/ShiftOutOfRange.ql
+ql/javascript/ql/src/Expressions/StringInsteadOfRegex.ql
+ql/javascript/ql/src/Expressions/SuspiciousInvocation.ql
+ql/javascript/ql/src/Expressions/SuspiciousPropAccess.ql
+ql/javascript/ql/src/Expressions/UnboundEventHandlerReceiver.ql
+ql/javascript/ql/src/Expressions/UnclearOperatorPrecedence.ql
+ql/javascript/ql/src/Expressions/UnknownDirective.ql
+ql/javascript/ql/src/Expressions/UnneededDefensiveProgramming.ql
+ql/javascript/ql/src/Expressions/WhitespaceContradictsPrecedence.ql
+ql/javascript/ql/src/LanguageFeatures/BadTypeof.ql
+ql/javascript/ql/src/LanguageFeatures/ConditionalComments.ql
+ql/javascript/ql/src/LanguageFeatures/DeleteVar.ql
+ql/javascript/ql/src/LanguageFeatures/ExpressionClosures.ql
+ql/javascript/ql/src/LanguageFeatures/ForInComprehensionBlocks.ql
+ql/javascript/ql/src/LanguageFeatures/IllegalInvocation.ql
+ql/javascript/ql/src/LanguageFeatures/InconsistentNew.ql
+ql/javascript/ql/src/LanguageFeatures/InvalidPrototype.ql
+ql/javascript/ql/src/LanguageFeatures/LengthComparisonOffByOne.ql
+ql/javascript/ql/src/LanguageFeatures/NonLinearPattern.ql
+ql/javascript/ql/src/LanguageFeatures/PropertyWriteOnPrimitive.ql
+ql/javascript/ql/src/LanguageFeatures/SemicolonInsertion.ql
+ql/javascript/ql/src/LanguageFeatures/SetterReturn.ql
ql/javascript/ql/src/LanguageFeatures/SpuriousArguments.ql
+ql/javascript/ql/src/LanguageFeatures/StrictModeCallStackIntrospection.ql
+ql/javascript/ql/src/LanguageFeatures/SyntaxError.ql
ql/javascript/ql/src/LanguageFeatures/TemplateSyntaxInStringLiteral.ql
+ql/javascript/ql/src/LanguageFeatures/ThisBeforeSuper.ql
+ql/javascript/ql/src/LanguageFeatures/UnusedIndexVariable.ql
+ql/javascript/ql/src/LanguageFeatures/WithStatement.ql
+ql/javascript/ql/src/LanguageFeatures/YieldInNonGenerator.ql
+ql/javascript/ql/src/NodeJS/InvalidExport.ql
+ql/javascript/ql/src/NodeJS/MissingExports.ql
ql/javascript/ql/src/Quality/UnhandledErrorInStreamPipeline.ql
+ql/javascript/ql/src/React/DirectStateMutation.ql
+ql/javascript/ql/src/React/InconsistentStateUpdate.ql
+ql/javascript/ql/src/React/UnsupportedStateUpdateInLifecycleMethod.ql
+ql/javascript/ql/src/React/UnusedOrUndefinedStateProperty.ql
+ql/javascript/ql/src/RegExp/BackrefBeforeGroup.ql
+ql/javascript/ql/src/RegExp/BackrefIntoNegativeLookahead.ql
ql/javascript/ql/src/RegExp/DuplicateCharacterInCharacterClass.ql
+ql/javascript/ql/src/RegExp/EmptyCharacterClass.ql
ql/javascript/ql/src/RegExp/RegExpAlwaysMatches.ql
+ql/javascript/ql/src/RegExp/UnboundBackref.ql
+ql/javascript/ql/src/RegExp/UnmatchableCaret.ql
+ql/javascript/ql/src/RegExp/UnmatchableDollar.ql
+ql/javascript/ql/src/Statements/DanglingElse.ql
+ql/javascript/ql/src/Statements/IgnoreArrayResult.ql
+ql/javascript/ql/src/Statements/InconsistentLoopOrientation.ql
+ql/javascript/ql/src/Statements/LabelInCase.ql
+ql/javascript/ql/src/Statements/MisleadingIndentationAfterControlStmt.ql
+ql/javascript/ql/src/Statements/ReturnAssignsLocal.ql
+ql/javascript/ql/src/Statements/SuspiciousUnusedLoopIterationVariable.ql
+ql/javascript/ql/src/Statements/UnreachableStatement.ql
+ql/javascript/ql/src/Statements/UseOfReturnlessFunction.ql
+ql/javascript/ql/src/Statements/UselessComparisonTest.ql
+ql/javascript/ql/src/Statements/UselessConditional.ql
+ql/javascript/ql/src/Vue/ArrowMethodOnVueInstance.ql
From 4b7c7c1c21a7bc5d2061075a791d6156894b83eb Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 10:22:30 +0100
Subject: [PATCH 074/213] Rust: Accept consistency check changes (again).
---
.../CONSISTENCY/PathResolutionConsistency.expected | 14 +++++++-------
.../CONSISTENCY/PathResolutionConsistency.expected | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
index 05600781a29..739520afcbd 100644
--- a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
+++ b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected
@@ -15,31 +15,31 @@ multipleMethodCallTargets
| main.rs:213:17:213:53 | ...::System.shrink(...) | file://:0:0:0:0 | fn shrink |
multiplePathResolutions
| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:218:14:218:17 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:218:14:218:25 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:218:14:218:25 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:219:13:219:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:219:13:219:24 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:219:13:219:24 | ...::malloc | file://:0:0:0:0 | fn malloc |
| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:220:13:220:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:220:13:220:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:220:13:220:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:221:13:221:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:221:13:221:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:221:13:221:31 | ...::aligned_alloc | file://:0:0:0:0 | fn aligned_alloc |
| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:222:13:222:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:222:13:222:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:222:13:222:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:223:13:223:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:223:13:223:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:223:13:223:24 | ...::calloc | file://:0:0:0:0 | fn calloc |
| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| main.rs:224:13:224:16 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| main.rs:224:13:224:25 | ...::realloc | file://:0:0:0:0 | fn realloc |
| main.rs:224:13:224:25 | ...::realloc | file://:0:0:0:0 | fn realloc |
| main.rs:229:13:229:37 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity |
diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
index 24cad838282..d326b510db4 100644
--- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
+++ b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected
@@ -1,14 +1,14 @@
multiplePathResolutions
| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| deallocation.rs:106:16:106:19 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| deallocation.rs:106:16:106:27 | ...::malloc | file://:0:0:0:0 | fn malloc |
| deallocation.rs:106:16:106:27 | ...::malloc | file://:0:0:0:0 | fn malloc |
| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| deallocation.rs:112:3:112:6 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| deallocation.rs:112:3:112:12 | ...::free | file://:0:0:0:0 | fn free |
| deallocation.rs:112:3:112:12 | ...::free | file://:0:0:0:0 | fn free |
| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.171) |
-| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.174) |
+| deallocation.rs:112:29:112:32 | libc | file://:0:0:0:0 | Crate(libc@0.2.173) |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
| deallocation.rs:260:11:260:22 | ...::from | file://:0:0:0:0 | fn from |
From 2818e6ee17228c96524ef30b612ebd9309e74971 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 19 Jun 2025 11:57:49 +0200
Subject: [PATCH 075/213] MaD generator: switch to snake_case fields
---
.../models-as-data/bulk_generate_mad.py | 6 +-
misc/scripts/models-as-data/generate_mad.py | 64 +++++++++----------
2 files changed, 32 insertions(+), 38 deletions(-)
diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py
index c9218048f1c..3b7465f5173 100755
--- a/misc/scripts/models-as-data/bulk_generate_mad.py
+++ b/misc/scripts/models-as-data/bulk_generate_mad.py
@@ -236,9 +236,9 @@ def generate_models(config, args, project: Project, database_dir: str) -> None:
language = config["language"]
generator = mad.Generator(language)
- generator.generateSinks = should_generate_sinks(project)
- generator.generateSources = should_generate_sources(project)
- generator.generateSummaries = should_generate_summaries(project)
+ generator.with_sinks = should_generate_sinks(project)
+ generator.with_sources = should_generate_sources(project)
+ generator.with_summaries = should_generate_summaries(project)
generator.threads = args.codeql_threads
generator.ram = args.codeql_ram
generator.setenvironment(database=database_dir, folder=name)
diff --git a/misc/scripts/models-as-data/generate_mad.py b/misc/scripts/models-as-data/generate_mad.py
index 2f2b74cf3f7..80e0385da6d 100755
--- a/misc/scripts/models-as-data/generate_mad.py
+++ b/misc/scripts/models-as-data/generate_mad.py
@@ -43,12 +43,12 @@ Requirements: `codeql` should appear on your path."""
class Generator:
- generateSinks = False
- generateSources = False
- generateSummaries = False
- generateNeutrals = False
- generateTypeBasedSummaries = False
- dryRun = False
+ with_sinks = False
+ with_sources = False
+ with_summaries = False
+ with_neutrals = False
+ with_typebased_summaries = False
+ dry_run = False
dirname = "modelgenerator"
ram = None
threads = 0
@@ -65,14 +65,14 @@ class Generator:
)
self.database = database or self.database
self.folder = folder or self.folder
- self.generatedFrameworks = os.path.join(
+ self.generated_frameworks = os.path.join(
self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{self.folder}"
)
self.workDir = tempfile.mkdtemp()
if self.ram is None:
threads = self.threads if self.threads > 0 else os.cpu_count()
self.ram = 2048 * threads
- os.makedirs(self.generatedFrameworks, exist_ok=True)
+ os.makedirs(self.generated_frameworks, exist_ok=True)
@staticmethod
def make():
@@ -97,37 +97,31 @@ class Generator:
"--with-sinks",
action="store_true",
help="Generate sink models",
- dest="generateSinks",
)
p.add_argument(
"--with-sources",
action="store_true",
help="Generate source models",
- dest="generateSources",
)
p.add_argument(
"--with-summaries",
action="store_true",
help="Generate summary models",
- dest="generateSummaries",
)
p.add_argument(
"--with-neutrals",
action="store_true",
help="Generate neutral models",
- dest="generateNeutrals",
)
p.add_argument(
"--with-typebased-summaries",
action="store_true",
help="Generate type-based summary models (experimental)",
- dest="generateTypeBasedSummaries",
)
p.add_argument(
"--dry-run",
action="store_true",
help="Do not write the generated files, just print them to stdout",
- dest="dryRun",
)
p.add_argument(
"--threads",
@@ -143,16 +137,16 @@ class Generator:
generator = p.parse_args(namespace=Generator())
if (
- not generator.generateSinks
- and not generator.generateSources
- and not generator.generateSummaries
- and not generator.generateNeutrals
- and not generator.generateTypeBasedSummaries
+ not generator.with_sinks
+ and not generator.with_sources
+ and not generator.with_summaries
+ and not generator.with_neutrals
+ and not generator.with_typebased_summaries
):
- generator.generateSinks = True
- generator.generateSources = True
- generator.generateSummaries = True
- generator.generateNeutrals = True
+ generator.with_sinks = True
+ generator.with_sources = True
+ generator.with_summaries = True
+ generator.with_neutrals = True
generator.setenvironment()
return generator
@@ -197,25 +191,25 @@ class Generator:
def makeContent(self):
summaryAddsTo = {}
- if self.generateSummaries:
+ if self.with_summaries:
summaryAddsTo = self.getAddsTo(
"CaptureSummaryModels.ql", helpers.summaryModelPredicate
)
sinkAddsTo = {}
- if self.generateSinks:
+ if self.with_sinks:
sinkAddsTo = self.getAddsTo(
"CaptureSinkModels.ql", helpers.sinkModelPredicate
)
sourceAddsTo = {}
- if self.generateSources:
+ if self.with_sources:
sourceAddsTo = self.getAddsTo(
"CaptureSourceModels.ql", helpers.sourceModelPredicate
)
neutralAddsTo = {}
- if self.generateNeutrals:
+ if self.with_neutrals:
neutralAddsTo = self.getAddsTo(
"CaptureNeutralModels.ql", helpers.neutralModelPredicate
)
@@ -223,7 +217,7 @@ class Generator:
return helpers.merge(summaryAddsTo, sinkAddsTo, sourceAddsTo, neutralAddsTo)
def makeTypeBasedContent(self):
- if self.generateTypeBasedSummaries:
+ if self.with_typebased_summaries:
typeBasedSummaryAddsTo = self.getAddsTo(
"CaptureTypeBasedSummaryModels.ql", helpers.summaryModelPredicate
)
@@ -242,7 +236,7 @@ extensions:
sanitizedEntry = re.sub(
r"-+", "-", entry.replace("/", "-").replace(":", "-")
)
- target = os.path.join(self.generatedFrameworks, sanitizedEntry + extension)
+ target = os.path.join(self.generated_frameworks, sanitizedEntry + extension)
with open(target, "w") as f:
f.write(extensionTemplate.format(extensions[entry]))
print("Models as data extensions written to " + target)
@@ -251,19 +245,19 @@ extensions:
content = self.makeContent()
typeBasedContent = self.makeTypeBasedContent()
- if self.dryRun:
+ if self.dry_run:
print("Models as data extensions generated, but not written to file.")
sys.exit(0)
if (
- self.generateSinks
- or self.generateSources
- or self.generateSummaries
- or self.generateNeutrals
+ self.with_sinks
+ or self.with_sources
+ or self.with_summaries
+ or self.with_neutrals
):
self.save(content, ".model.yml")
- if self.generateTypeBasedSummaries:
+ if self.with_typebased_summaries:
self.save(typeBasedContent, ".typebased.model.yml")
From 1622d08624a8dfe760f8572ac5716b8684680172 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 11:12:57 +0100
Subject: [PATCH 076/213] Rust: Add inferArrayExprType.
---
.../codeql/rust/internal/TypeInference.qll | 9 ++++++
.../test/library-tests/type-inference/main.rs | 4 +--
.../type-inference/type-inference.expected | 31 +++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index c0c80a81925..9b2ef173c38 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1102,6 +1102,12 @@ private class Vec extends Struct {
}
}
+/**
+ * Gets the root type of the array expression `ae`.
+ */
+pragma[nomagic]
+private Type inferArrayExprType(ArrayExpr ae) { exists(ae) and result = TArrayType() }
+
/**
* According to [the Rust reference][1]: _"array and slice-typed expressions
* can be indexed with a `usize` index ... For other types an index expression
@@ -1595,6 +1601,9 @@ private module Cached {
or
result = inferAwaitExprType(n, path)
or
+ result = inferArrayExprType(n) and
+ path.isEmpty()
+ or
result = inferIndexExprType(n, path)
or
result = inferForLoopExprType(n, path)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 2b7c91db955..663b560957e 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1890,8 +1890,8 @@ mod loops {
// for loops with arrays
for i in [1, 2, 3] { } // $ type=i:i32
- for i in [1, 2, 3].map(|x| x + 1) { } // $ MISSING: type=i:i32
- for i in [1, 2, 3].into_iter() { } // $ MISSING: type=i:i32
+ for i in [1, 2, 3].map(|x| x + 1) { } // $ method=map MISSING: type=i:i32
+ for i in [1, 2, 3].into_iter() { } // $ method=into_iter MISSING: type=i:i32
let vals1 = [1u8, 2, 3]; // $ MISSING: type=vals1:[u8; 3]
for u in vals1 { } // $ type=u:u8
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 5682e30a1a6..5e049711e0f 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2698,21 +2698,27 @@ inferType
| main.rs:1885:13:1885:13 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1885:13:1885:13 | 1 | | {EXTERNAL LOCATION} | i64 |
| main.rs:1892:13:1892:13 | i | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1892:18:1892:26 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1892:18:1892:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1892:19:1892:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1892:22:1892:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1892:25:1892:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1893:18:1893:26 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1893:18:1893:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1893:18:1893:41 | ... .map(...) | | file://:0:0:0:0 | [] |
| main.rs:1893:19:1893:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1893:22:1893:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1893:25:1893:25 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1893:40:1893:40 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1894:18:1894:26 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1894:18:1894:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1894:19:1894:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1894:22:1894:22 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1894:25:1894:25 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1896:13:1896:17 | vals1 | | file://:0:0:0:0 | [] |
| main.rs:1896:13:1896:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1896:13:1896:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1896:21:1896:31 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1896:21:1896:31 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1896:21:1896:31 | [...] | [T;...] | {EXTERNAL LOCATION} | u8 |
| main.rs:1896:22:1896:24 | 1u8 | | {EXTERNAL LOCATION} | i32 |
@@ -2723,13 +2729,17 @@ inferType
| main.rs:1896:30:1896:30 | 3 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1897:13:1897:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:1897:13:1897:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1897:18:1897:22 | vals1 | | file://:0:0:0:0 | [] |
| main.rs:1897:18:1897:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1897:18:1897:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 |
+| main.rs:1899:13:1899:17 | vals2 | | file://:0:0:0:0 | [] |
| main.rs:1899:13:1899:17 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1899:21:1899:29 | [1u16; 3] | | file://:0:0:0:0 | [] |
| main.rs:1899:21:1899:29 | [1u16; 3] | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1899:22:1899:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
| main.rs:1899:28:1899:28 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1900:13:1900:13 | u | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1900:18:1900:22 | vals2 | | file://:0:0:0:0 | [] |
| main.rs:1900:18:1900:22 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1902:13:1902:17 | vals3 | | file://:0:0:0:0 | [] |
| main.rs:1902:13:1902:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 |
@@ -2764,20 +2774,29 @@ inferType
| main.rs:1906:18:1906:22 | vals4 | | file://:0:0:0:0 | [] |
| main.rs:1906:18:1906:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1906:18:1906:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1908:13:1908:24 | mut strings1 | | file://:0:0:0:0 | [] |
| main.rs:1908:13:1908:24 | mut strings1 | [T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1908:28:1908:48 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1908:28:1908:48 | [...] | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1908:29:1908:33 | "foo" | | {EXTERNAL LOCATION} | str |
| main.rs:1908:36:1908:40 | "bar" | | {EXTERNAL LOCATION} | str |
| main.rs:1908:43:1908:47 | "baz" | | {EXTERNAL LOCATION} | str |
| main.rs:1909:18:1909:26 | &strings1 | | file://:0:0:0:0 | & |
+| main.rs:1909:18:1909:26 | &strings1 | &T | file://:0:0:0:0 | [] |
| main.rs:1909:18:1909:26 | &strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1909:19:1909:26 | strings1 | | file://:0:0:0:0 | [] |
| main.rs:1909:19:1909:26 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1910:18:1910:30 | &mut strings1 | | file://:0:0:0:0 | & |
+| main.rs:1910:18:1910:30 | &mut strings1 | &T | file://:0:0:0:0 | [] |
| main.rs:1910:18:1910:30 | &mut strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1910:23:1910:30 | strings1 | | file://:0:0:0:0 | [] |
| main.rs:1910:23:1910:30 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
| main.rs:1911:13:1911:13 | s | | {EXTERNAL LOCATION} | str |
+| main.rs:1911:18:1911:25 | strings1 | | file://:0:0:0:0 | [] |
| main.rs:1911:18:1911:25 | strings1 | [T;...] | {EXTERNAL LOCATION} | str |
+| main.rs:1913:13:1913:20 | strings2 | | file://:0:0:0:0 | [] |
| main.rs:1913:13:1913:20 | strings2 | [T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1913:24:1913:86 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1913:24:1913:86 | [...] | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1913:25:1913:43 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1913:38:1913:42 | "foo" | | {EXTERNAL LOCATION} | str |
@@ -2786,11 +2805,15 @@ inferType
| main.rs:1913:67:1913:85 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1913:80:1913:84 | "baz" | | {EXTERNAL LOCATION} | str |
| main.rs:1914:13:1914:13 | s | | {EXTERNAL LOCATION} | String |
+| main.rs:1914:18:1914:25 | strings2 | | file://:0:0:0:0 | [] |
| main.rs:1914:18:1914:25 | strings2 | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1916:13:1916:20 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1916:13:1916:20 | strings3 | &T | file://:0:0:0:0 | [] |
| main.rs:1916:13:1916:20 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1916:24:1916:87 | &... | | file://:0:0:0:0 | & |
+| main.rs:1916:24:1916:87 | &... | &T | file://:0:0:0:0 | [] |
| main.rs:1916:24:1916:87 | &... | &T.[T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1916:25:1916:87 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1916:25:1916:87 | [...] | [T;...] | {EXTERNAL LOCATION} | String |
| main.rs:1916:26:1916:44 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1916:39:1916:43 | "foo" | | {EXTERNAL LOCATION} | str |
@@ -2799,19 +2822,24 @@ inferType
| main.rs:1916:68:1916:86 | ...::from(...) | | {EXTERNAL LOCATION} | String |
| main.rs:1916:81:1916:85 | "baz" | | {EXTERNAL LOCATION} | str |
| main.rs:1917:18:1917:25 | strings3 | | file://:0:0:0:0 | & |
+| main.rs:1917:18:1917:25 | strings3 | &T | file://:0:0:0:0 | [] |
| main.rs:1917:18:1917:25 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String |
+| main.rs:1919:13:1919:21 | callables | | file://:0:0:0:0 | [] |
| main.rs:1919:13:1919:21 | callables | [T;...] | main.rs:1876:5:1877:5 | MyCallable |
+| main.rs:1919:25:1919:81 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1919:25:1919:81 | [...] | [T;...] | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1919:26:1919:42 | ...::new(...) | | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1919:45:1919:61 | ...::new(...) | | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1919:64:1919:80 | ...::new(...) | | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1920:13:1920:13 | c | | main.rs:1876:5:1877:5 | MyCallable |
+| main.rs:1920:18:1920:26 | callables | | file://:0:0:0:0 | [] |
| main.rs:1920:18:1920:26 | callables | [T;...] | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1921:17:1921:22 | result | | {EXTERNAL LOCATION} | i64 |
| main.rs:1921:26:1921:26 | c | | main.rs:1876:5:1877:5 | MyCallable |
| main.rs:1921:26:1921:33 | c.call() | | {EXTERNAL LOCATION} | i64 |
| main.rs:1926:18:1926:18 | 0 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1926:21:1926:22 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1927:18:1927:28 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1927:19:1927:21 | 0u8 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1927:26:1927:27 | 10 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1929:13:1929:18 | range1 | | {EXTERNAL LOCATION} | Range |
@@ -2825,6 +2853,7 @@ inferType
| main.rs:1934:26:1934:26 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1934:29:1934:29 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1934:32:1934:32 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1937:21:1937:32 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1937:21:1937:32 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1937:21:1937:32 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:1937:22:1937:25 | 1u16 | | {EXTERNAL LOCATION} | i32 |
@@ -2839,6 +2868,7 @@ inferType
| main.rs:1940:21:1940:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
| main.rs:1940:21:1940:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global |
| main.rs:1940:21:1940:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1940:31:1940:42 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1940:31:1940:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1940:31:1940:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:1940:32:1940:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
@@ -2855,6 +2885,7 @@ inferType
| main.rs:1943:13:1943:17 | vals6 | A | {EXTERNAL LOCATION} | Global |
| main.rs:1943:13:1943:17 | vals6 | T | file://:0:0:0:0 | & |
| main.rs:1943:13:1943:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1943:33:1943:44 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1943:33:1943:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
| main.rs:1943:33:1943:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
| main.rs:1943:33:1943:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
From f670fcb301d7ff9790b254888877b4633c592771 Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 11:24:10 +0100
Subject: [PATCH 077/213] Rust: Add a Vec test case that we actually get
(explicit type).
---
.../test/library-tests/type-inference/main.rs | 7 +-
.../type-inference/type-inference.expected | 245 ++++++++++--------
2 files changed, 137 insertions(+), 115 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 663b560957e..c2ffdf57d34 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1934,8 +1934,11 @@ mod loops {
let vals3 = vec![1, 2, 3]; // $ MISSING: type=vals3:Vec
for i in vals3 { } // $ MISSING: type=i:i32
- let vals4 = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4:Vec
- for u in vals4 { } // $ MISSING: type=u:u16
+ let vals4a : Vec = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4a:Vec
+ for u in vals4a { } // $ type=u:u16
+
+ let vals4b = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4b:Vec
+ for u in vals4b { } // $ MISSING: type=u:u16
let vals5 = Vec::from([1u32, 2, 3]); // $ MISSING: type=vals5:Vec
for u in vals5 { } // $ MISSING: type=u:u32
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 5e049711e0f..3cb687091d7 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2853,117 +2853,136 @@ inferType
| main.rs:1934:26:1934:26 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1934:29:1934:29 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1934:32:1934:32 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:21:1937:32 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1937:21:1937:32 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:21:1937:32 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:22:1937:25 | 1u16 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:22:1937:25 | 1u16 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:28:1937:28 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:28:1937:28 | 2 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:31:1937:31 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:31:1937:31 | 3 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1940:13:1940:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1940:13:1940:17 | vals5 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1940:13:1940:17 | vals5 | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1940:21:1940:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1940:21:1940:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1940:21:1940:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1940:31:1940:42 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1940:31:1940:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:31:1940:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
-| main.rs:1940:32:1940:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:32:1940:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1940:38:1940:38 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:38:1940:38 | 2 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1940:41:1940:41 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:41:1940:41 | 3 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1941:13:1941:13 | u | | {EXTERNAL LOCATION} | u8 |
-| main.rs:1941:18:1941:22 | vals5 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1941:18:1941:22 | vals5 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1941:18:1941:22 | vals5 | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1943:13:1943:17 | vals6 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1943:13:1943:17 | vals6 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1943:13:1943:17 | vals6 | T | file://:0:0:0:0 | & |
-| main.rs:1943:13:1943:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1943:33:1943:44 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1943:33:1943:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:33:1943:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
-| main.rs:1943:33:1943:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1943:33:1943:61 | ... .collect() | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1943:33:1943:61 | ... .collect() | T | file://:0:0:0:0 | & |
-| main.rs:1943:33:1943:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1943:34:1943:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:34:1943:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1943:40:1943:40 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:40:1943:40 | 2 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1943:43:1943:43 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:43:1943:43 | 3 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1944:13:1944:13 | u | | file://:0:0:0:0 | & |
-| main.rs:1944:13:1944:13 | u | &T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1944:18:1944:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1944:18:1944:22 | vals6 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1944:18:1944:22 | vals6 | T | file://:0:0:0:0 | & |
-| main.rs:1944:18:1944:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:13:1946:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1946:13:1946:21 | mut vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1946:25:1946:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1946:25:1946:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1947:9:1947:13 | vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1947:9:1947:13 | vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1947:20:1947:22 | 1u8 | | {EXTERNAL LOCATION} | u8 |
-| main.rs:1948:18:1948:22 | vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1948:18:1948:22 | vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1950:33:1950:33 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1950:36:1950:36 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1950:45:1950:45 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1950:48:1950:48 | 4 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1956:13:1956:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1956:13:1956:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1956:24:1956:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1956:24:1956:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1957:9:1957:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1957:9:1957:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1957:9:1957:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1957:21:1957:21 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1957:24:1957:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1957:24:1957:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1957:33:1957:37 | "one" | | {EXTERNAL LOCATION} | str |
-| main.rs:1958:9:1958:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1958:9:1958:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1958:9:1958:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1958:21:1958:21 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1958:24:1958:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1958:24:1958:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1958:33:1958:37 | "two" | | {EXTERNAL LOCATION} | str |
-| main.rs:1959:20:1959:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1959:20:1959:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1959:20:1959:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
-| main.rs:1960:22:1960:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1960:22:1960:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1960:22:1960:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
-| main.rs:1961:29:1961:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1961:29:1961:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1961:29:1961:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
-| main.rs:1962:29:1962:33 | &map1 | | file://:0:0:0:0 | & |
-| main.rs:1962:29:1962:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1962:29:1962:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1962:30:1962:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1962:30:1962:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1966:13:1966:17 | mut a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1966:13:1966:17 | mut a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1966:26:1966:26 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1966:26:1966:26 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1967:15:1967:15 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1967:15:1967:15 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1967:15:1967:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1967:19:1967:20 | 10 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1968:13:1968:13 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1968:13:1968:13 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1968:13:1968:18 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1968:18:1968:18 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1975:5:1975:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1976:5:1976:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1976:20:1976:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1976:41:1976:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1992:5:1992:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1937:13:1937:18 | vals4a | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1937:13:1937:18 | vals4a | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1937:13:1937:18 | vals4a | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1937:33:1937:44 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1937:33:1937:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1937:33:1937:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1937:33:1937:53 | ... .to_vec() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1937:33:1937:53 | ... .to_vec() | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1937:33:1937:53 | ... .to_vec() | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1937:34:1937:37 | 1u16 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1937:34:1937:37 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1937:40:1937:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1937:40:1937:40 | 2 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1937:43:1937:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1937:43:1937:43 | 3 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1938:13:1938:13 | u | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1938:18:1938:23 | vals4a | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1938:18:1938:23 | vals4a | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1938:18:1938:23 | vals4a | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:22:1940:33 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1940:22:1940:33 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1940:22:1940:33 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:23:1940:26 | 1u16 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1940:23:1940:26 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:29:1940:29 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1940:29:1940:29 | 2 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:32:1940:32 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1940:32:1940:32 | 3 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1943:13:1943:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1943:13:1943:17 | vals5 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1943:13:1943:17 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1943:21:1943:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1943:21:1943:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1943:21:1943:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1943:31:1943:42 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1943:31:1943:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1943:31:1943:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1943:32:1943:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1943:32:1943:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1943:38:1943:38 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1943:38:1943:38 | 2 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1943:41:1943:41 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1943:41:1943:41 | 3 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1944:13:1944:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1944:18:1944:22 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1944:18:1944:22 | vals5 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1944:18:1944:22 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1946:13:1946:17 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1946:13:1946:17 | vals6 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1946:13:1946:17 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1946:13:1946:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1946:33:1946:44 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1946:33:1946:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1946:33:1946:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1946:33:1946:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1946:33:1946:61 | ... .collect() | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1946:33:1946:61 | ... .collect() | T | file://:0:0:0:0 | & |
+| main.rs:1946:33:1946:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1946:34:1946:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1946:34:1946:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1946:40:1946:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1946:40:1946:40 | 2 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1946:43:1946:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1946:43:1946:43 | 3 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1947:13:1947:13 | u | | file://:0:0:0:0 | & |
+| main.rs:1947:13:1947:13 | u | &T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1947:18:1947:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1947:18:1947:22 | vals6 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1947:18:1947:22 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1947:18:1947:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1949:13:1949:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1949:13:1949:21 | mut vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1949:25:1949:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1949:25:1949:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1950:9:1950:13 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1950:9:1950:13 | vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1950:20:1950:22 | 1u8 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1951:18:1951:22 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1951:18:1951:22 | vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1953:33:1953:33 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1953:36:1953:36 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1953:45:1953:45 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1953:48:1953:48 | 4 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1959:13:1959:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1959:13:1959:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1959:24:1959:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1959:24:1959:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1960:9:1960:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1960:9:1960:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1960:9:1960:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1960:21:1960:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1960:24:1960:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1960:24:1960:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1960:33:1960:37 | "one" | | {EXTERNAL LOCATION} | str |
+| main.rs:1961:9:1961:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1961:9:1961:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1961:9:1961:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1961:21:1961:21 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1961:24:1961:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1961:24:1961:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1961:33:1961:37 | "two" | | {EXTERNAL LOCATION} | str |
+| main.rs:1962:20:1962:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1962:20:1962:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1962:20:1962:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
+| main.rs:1963:22:1963:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1963:22:1963:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1963:22:1963:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
+| main.rs:1964:29:1964:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1964:29:1964:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1964:29:1964:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
+| main.rs:1965:29:1965:33 | &map1 | | file://:0:0:0:0 | & |
+| main.rs:1965:29:1965:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1965:29:1965:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1965:30:1965:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1965:30:1965:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1969:13:1969:17 | mut a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1969:13:1969:17 | mut a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1969:26:1969:26 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1969:26:1969:26 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1970:15:1970:15 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1970:15:1970:15 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1970:15:1970:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1970:19:1970:20 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1971:13:1971:13 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1971:13:1971:13 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1971:13:1971:18 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1971:18:1971:18 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1978:5:1978:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1979:5:1979:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1979:20:1979:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1979:41:1979:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1995:5:1995:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From 261c129555f02ceb2fc9bc21ee0cc9f078689c27 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 19 Jun 2025 12:54:30 +0200
Subject: [PATCH 078/213] MaD generator: add single file mode
---
.../models-as-data/bulk_generate_mad.py | 69 ++++++++++---------
misc/scripts/models-as-data/generate_mad.py | 13 +++-
misc/scripts/models-as-data/helpers.py | 2 +-
3 files changed, 47 insertions(+), 37 deletions(-)
diff --git a/misc/scripts/models-as-data/bulk_generate_mad.py b/misc/scripts/models-as-data/bulk_generate_mad.py
index 3b7465f5173..e2de5038206 100755
--- a/misc/scripts/models-as-data/bulk_generate_mad.py
+++ b/misc/scripts/models-as-data/bulk_generate_mad.py
@@ -5,7 +5,7 @@ Experimental script for bulk generation of MaD models based on a list of project
Note: This file must be formatted using the Black Python formatter.
"""
-import os.path
+import pathlib
import subprocess
import sys
from typing import Required, TypedDict, List, Callable, Optional
@@ -41,7 +41,7 @@ gitroot = (
.decode("utf-8")
.strip()
)
-build_dir = os.path.join(gitroot, "mad-generation-build")
+build_dir = pathlib.Path(gitroot, "mad-generation-build")
# A project to generate models for
@@ -86,10 +86,10 @@ def clone_project(project: Project) -> str:
git_tag = project.get("git-tag")
# Determine target directory
- target_dir = os.path.join(build_dir, name)
+ target_dir = build_dir / name
# Clone only if directory doesn't already exist
- if not os.path.exists(target_dir):
+ if not target_dir.exists():
if git_tag:
print(f"Cloning {name} from {repo_url} at tag {git_tag}")
else:
@@ -191,10 +191,10 @@ def build_database(
name = project["name"]
# Create database directory path
- database_dir = os.path.join(build_dir, f"{name}-db")
+ database_dir = build_dir / f"{name}-db"
# Only build the database if it doesn't already exist
- if not os.path.exists(database_dir):
+ if not database_dir.exists():
print(f"Building CodeQL database for {name}...")
extractor_options = [option for x in extractor_options for option in ("-O", x)]
try:
@@ -241,7 +241,11 @@ def generate_models(config, args, project: Project, database_dir: str) -> None:
generator.with_summaries = should_generate_summaries(project)
generator.threads = args.codeql_threads
generator.ram = args.codeql_ram
- generator.setenvironment(database=database_dir, folder=name)
+ if config.get("single-file", False):
+ generator.single_file = name
+ else:
+ generator.folder = name
+ generator.setenvironment(database=database_dir)
generator.run()
@@ -312,7 +316,7 @@ def download_artifact(url: str, artifact_name: str, pat: str) -> str:
if response.status_code != 200:
print(f"Failed to download file. Status code: {response.status_code}")
sys.exit(1)
- target_zip = os.path.join(build_dir, zipName)
+ target_zip = build_dir / zipName
with open(target_zip, "wb") as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)
@@ -320,12 +324,6 @@ def download_artifact(url: str, artifact_name: str, pat: str) -> str:
return target_zip
-def remove_extension(filename: str) -> str:
- while "." in filename:
- filename, _ = os.path.splitext(filename)
- return filename
-
-
def pretty_name_from_artifact_name(artifact_name: str) -> str:
return artifact_name.split("___")[1]
@@ -399,19 +397,17 @@ def download_dca_databases(
# The database is in a zip file, which contains a tar.gz file with the DB
# First we open the zip file
with zipfile.ZipFile(artifact_zip_location, "r") as zip_ref:
- artifact_unzipped_location = os.path.join(build_dir, artifact_name)
+ artifact_unzipped_location = build_dir / artifact_name
# clean up any remnants of previous runs
shutil.rmtree(artifact_unzipped_location, ignore_errors=True)
# And then we extract it to build_dir/artifact_name
zip_ref.extractall(artifact_unzipped_location)
# And then we extract the language tar.gz file inside it
- artifact_tar_location = os.path.join(
- artifact_unzipped_location, f"{language}.tar.gz"
- )
+ artifact_tar_location = artifact_unzipped_location / f"{language}.tar.gz"
with tarfile.open(artifact_tar_location, "r:gz") as tar_ref:
# And we just untar it to the same directory as the zip file
tar_ref.extractall(artifact_unzipped_location)
- ret = os.path.join(artifact_unzipped_location, language)
+ ret = artifact_unzipped_location / language
print(f"Decompression complete: {ret}")
return ret
@@ -431,8 +427,16 @@ def download_dca_databases(
return [(project_map[n], r) for n, r in zip(analyzed_databases, results)]
-def get_mad_destination_for_project(config, name: str) -> str:
- return os.path.join(config["destination"], name)
+def clean_up_mad_destination_for_project(config, name: str):
+ target = pathlib.Path(config["destination"], name)
+ if config.get("single-file", False):
+ target = target.with_suffix(".model.yml")
+ if target.exists():
+ print(f"Deleting existing MaD file at {target}")
+ target.unlink()
+ elif target.exists():
+ print(f"Deleting existing MaD directory at {target}")
+ shutil.rmtree(target, ignore_errors=True)
def get_strategy(config) -> str:
@@ -454,8 +458,7 @@ def main(config, args) -> None:
language = config["language"]
# Create build directory if it doesn't exist
- if not os.path.exists(build_dir):
- os.makedirs(build_dir)
+ build_dir.mkdir(parents=True, exist_ok=True)
database_results = []
match get_strategy(config):
@@ -475,7 +478,7 @@ def main(config, args) -> None:
if args.pat is None:
print("ERROR: --pat argument is required for DCA strategy")
sys.exit(1)
- if not os.path.exists(args.pat):
+ if not args.pat.exists():
print(f"ERROR: Personal Access Token file '{pat}' does not exist.")
sys.exit(1)
with open(args.pat, "r") as f:
@@ -499,12 +502,9 @@ def main(config, args) -> None:
)
sys.exit(1)
- # Delete the MaD directory for each project
- for project, database_dir in database_results:
- mad_dir = get_mad_destination_for_project(config, project["name"])
- if os.path.exists(mad_dir):
- print(f"Deleting existing MaD directory at {mad_dir}")
- subprocess.check_call(["rm", "-rf", mad_dir])
+ # clean up existing MaD data for the projects
+ for project, _ in database_results:
+ clean_up_mad_destination_for_project(config, project["name"])
for project, database_dir in database_results:
if database_dir is not None:
@@ -514,7 +514,10 @@ def main(config, args) -> None:
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
- "--config", type=str, help="Path to the configuration file.", required=True
+ "--config",
+ type=pathlib.Path,
+ help="Path to the configuration file.",
+ required=True,
)
parser.add_argument(
"--dca",
@@ -525,7 +528,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"--pat",
- type=str,
+ type=pathlib.Path,
help="Path to a file containing the PAT token required to grab DCA databases (the same as the one you use for DCA)",
)
parser.add_argument(
@@ -544,7 +547,7 @@ if __name__ == "__main__":
# Load config file
config = {}
- if not os.path.exists(args.config):
+ if not args.config.exists():
print(f"ERROR: Config file '{args.config}' does not exist.")
sys.exit(1)
try:
diff --git a/misc/scripts/models-as-data/generate_mad.py b/misc/scripts/models-as-data/generate_mad.py
index 80e0385da6d..5eeac91d857 100755
--- a/misc/scripts/models-as-data/generate_mad.py
+++ b/misc/scripts/models-as-data/generate_mad.py
@@ -53,12 +53,13 @@ class Generator:
ram = None
threads = 0
folder = ""
+ single_file = None
def __init__(self, language=None):
self.language = language
def setenvironment(self, database=None, folder=None):
- self.codeQlRoot = (
+ self.codeql_root = (
subprocess.check_output(["git", "rev-parse", "--show-toplevel"])
.decode("utf-8")
.strip()
@@ -66,7 +67,7 @@ class Generator:
self.database = database or self.database
self.folder = folder or self.folder
self.generated_frameworks = os.path.join(
- self.codeQlRoot, f"{self.language}/ql/lib/ext/generated/{self.folder}"
+ self.codeql_root, f"{self.language}/ql/lib/ext/generated/{self.folder}"
)
self.workDir = tempfile.mkdtemp()
if self.ram is None:
@@ -134,6 +135,10 @@ class Generator:
type=int,
help="Amount of RAM to use for CodeQL queries in MB. Default is to use 2048 MB per thread.",
)
+ p.add_argument(
+ "--single-file",
+ help="Generate a single file with all models instead of separate files for each namespace, using provided argument as the base filename.",
+ )
generator = p.parse_args(namespace=Generator())
if (
@@ -154,7 +159,7 @@ class Generator:
def runQuery(self, query):
print("########## Querying " + query + "...")
queryFile = os.path.join(
- self.codeQlRoot, f"{self.language}/ql/src/utils/{self.dirname}", query
+ self.codeql_root, f"{self.language}/ql/src/utils/{self.dirname}", query
)
resultBqrs = os.path.join(self.workDir, "out.bqrs")
@@ -187,6 +192,8 @@ class Generator:
def getAddsTo(self, query, predicate):
data = self.runQuery(query)
rows = parseData(data)
+ if self.single_file and rows:
+ rows = {self.single_file: "".join(rows.values())}
return self.asAddsTo(rows, predicate)
def makeContent(self):
diff --git a/misc/scripts/models-as-data/helpers.py b/misc/scripts/models-as-data/helpers.py
index f165caf62dc..580523f4bec 100644
--- a/misc/scripts/models-as-data/helpers.py
+++ b/misc/scripts/models-as-data/helpers.py
@@ -22,7 +22,7 @@ def remove_dir(dirName):
def run_cmd(cmd, msg="Failed to run command"):
- print("Running " + " ".join(cmd))
+ print("Running " + " ".join(map(str, cmd)))
if subprocess.check_call(cmd):
print(msg)
exit(1)
From 7170e97e22af6bc48a24af493653433d14fff00a Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 11:50:43 +0100
Subject: [PATCH 079/213] Rust: Update test expectations format (type=...).
---
.../test/library-tests/type-inference/main.rs | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index c2ffdf57d34..4969cedb044 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1893,30 +1893,30 @@ mod loops {
for i in [1, 2, 3].map(|x| x + 1) { } // $ method=map MISSING: type=i:i32
for i in [1, 2, 3].into_iter() { } // $ method=into_iter MISSING: type=i:i32
- let vals1 = [1u8, 2, 3]; // $ MISSING: type=vals1:[u8; 3]
+ let vals1 = [1u8, 2, 3]; // $ type=vals1:[T;...].u8
for u in vals1 { } // $ type=u:u8
- let vals2 = [1u16; 3]; // $ MISSING: type=vals2:[u16; 3]
+ let vals2 = [1u16; 3]; // $ type=vals2:[T;...].u16
for u in vals2 { } // $ type=u:u16
- let vals3: [u32; 3] = [1, 2, 3]; // $ MISSING: type=vals3:[u32; 3]
+ let vals3: [u32; 3] = [1, 2, 3]; // $ type=vals3:[T;...].u32
for u in vals3 { } // $ type=u:u32
- let vals4: [u64; 3] = [1; 3]; // $ MISSING: type=vals4:[u64; 3]
+ let vals4: [u64; 3] = [1; 3]; // $ type=vals4:[T;...].u64
for u in vals4 { } // $ type=u:u64
- let mut strings1 = ["foo", "bar", "baz"]; // $ MISSING: type=strings1:[&str; 3]
- for s in &strings1 { } // $ MISSING: type=s:&str
- for s in &mut strings1 { } // $ MISSING: type=s:&str
+ let mut strings1 = ["foo", "bar", "baz"]; // $ type=strings1:[T;...].str
+ for s in &strings1 { } // $ MISSING: type=s:&T.str
+ for s in &mut strings1 { } // $ MISSING: type=s:&T.str
for s in strings1 { } // $ type=s:str
- let strings2 = [String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings2:[String; 3]
+ let strings2 = [String::from("foo"), String::from("bar"), String::from("baz")]; // $ type=strings2:[T;...].String
for s in strings2 { } // $ type=s:String
- let strings3 = &[String::from("foo"), String::from("bar"), String::from("baz")]; // $ MISSING: type=strings3:&[String; 3]
+ let strings3 = &[String::from("foo"), String::from("bar"), String::from("baz")]; // $ type=strings3:&T.[T;...].String
for s in strings3 { } // $ MISSING: type=s:String
- let callables = [MyCallable::new(), MyCallable::new(), MyCallable::new()]; // $ MISSING: type=callables:[MyCallable; 3]
+ let callables = [MyCallable::new(), MyCallable::new(), MyCallable::new()]; // $ MISSING: type=callables:[T;...].MyCallable; 3
for c in callables { // $ type=c:MyCallable
let result = c.call(); // $ type=result:i64 method=call
}
@@ -1926,48 +1926,48 @@ mod loops {
for i in 0..10 { } // $ MISSING: type=i:i32
for u in [0u8 .. 10] { } // $ MISSING: type=u:u8
- let range1 = std::ops::Range { start: 0u16, end: 10u16 }; // $ MISSING: type=range:std::ops::Range
- for u in range1 { } // $ MISSING: type=i:u16
+ let range1 = std::ops::Range { start: 0u16, end: 10u16 }; // $ type=range1:Range type=range1:Idx.u16
+ for u in range1 { } // $ MISSING: type=u:u16
// for loops with containers
let vals3 = vec![1, 2, 3]; // $ MISSING: type=vals3:Vec
for i in vals3 { } // $ MISSING: type=i:i32
- let vals4a : Vec = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4a:Vec
+ let vals4a : Vec = [1u16, 2, 3].to_vec(); // $ type=vals4a:Vec type=vals4a:T.u16
for u in vals4a { } // $ type=u:u16
- let vals4b = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4b:Vec
+ let vals4b = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4b:Vec type=vals4b:T.u16
for u in vals4b { } // $ MISSING: type=u:u16
- let vals5 = Vec::from([1u32, 2, 3]); // $ MISSING: type=vals5:Vec
+ let vals5 = Vec::from([1u32, 2, 3]); // $ type=vals5:Vec MISSING: type=vals5:T.u32
for u in vals5 { } // $ MISSING: type=u:u32
- let vals6 : Vec<&u64> = [1u64, 2, 3].iter().collect(); // $ MISSING: type=vals6:Vec<&u64>
- for u in vals6 { } // $ MISSING: type=u:&u64
+ let vals6 : Vec<&u64> = [1u64, 2, 3].iter().collect(); // $ type=vals6:Vec type=vals6:T.&T.u64
+ for u in vals6 { } // $ type=u:&T.u64
- let mut vals7 = Vec::new(); // $ MISSING: type=vals7:Vec
+ let mut vals7 = Vec::new(); // $ type=vals7:Vec MISSING: type=vals7:T.u8
vals7.push(1u8); // $ method=push
for u in vals7 { } // $ MISSING: type=u:u8
- let matrix1 = vec![vec![1, 2], vec![3, 4]]; // $ MISSING: type=vals5:Vec>
- for row in matrix1 { // $ MISSING: type=row:Vec
+ let matrix1 = vec![vec![1, 2], vec![3, 4]]; // $ MISSING: type=matrix1:Vec type=matrix1:T.Vec type=matrix1:T.T.i32
+ for row in matrix1 { // $ MISSING: type=row:Vec type=row:T.i32
for cell in row { // $ MISSING: type=cell:i32
}
}
- let mut map1 = std::collections::HashMap::new(); // $ MISSING: type=map1:std::collections::HashMap<_, _>
+ let mut map1 = std::collections::HashMap::new(); // $ MISSING: type=map1:Hashmap type=map1:K.i32 type=map1:V.Box type1=map1:V.T.&T.str
map1.insert(1, Box::new("one")); // $ method=insert
map1.insert(2, Box::new("two")); // $ method=insert
for key in map1.keys() { } // $ method=keys MISSING: type=key:i32
- for value in map1.values() { } // $ method=values MISSING: type=value:Box<&str>
- for (key, value) in map1.iter() { } // $ method=iter MISSING: type=key:i32 type=value:Box<&str>
- for (key, value) in &map1 { } // $ MISSING: type=key:i32 type=value:Box<&str>
+ for value in map1.values() { } // $ method=values MISSING: type=value:Box type=value:Box.T:&T.str
+ for (key, value) in map1.iter() { } // $ method=iter MISSING: type=key:i32 type=value:Box type=value:Box.T:&T.str
+ for (key, value) in &map1 { } // $ MISSING: type=key:i32 type=value:Box type=value:Box.T:&T.str
// while loops
let mut a: i64 = 0; // $ type=a:i64
- while a < 10 { // $ method=lt MISSING: type=a:i64m
+ while a < 10 { // $ method=lt type=a:i64
a += 1; // $ type=a:i64 method=add_assign
}
}
From 5448071e0997d87c06a41745331b6d4f09fe3167 Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 19 Jun 2025 14:20:37 +0200
Subject: [PATCH 080/213] Update
javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
Co-authored-by: Taus
---
javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
index c34e91360af..2716069fb71 100644
--- a/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
+++ b/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md
@@ -1,4 +1,4 @@
---
category: minorAnalysis
---
-* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when `splice` is used as a condition that adjusts the loop counter.
+* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when the return value of `splice` is used to decide whether to adjust the loop counter.
From 8679151ace18829fde40feda40df1d1c793e0e1c Mon Sep 17 00:00:00 2001
From: Napalys Klicius
Date: Thu, 19 Jun 2025 14:21:08 +0200
Subject: [PATCH 081/213] Update
javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
Co-authored-by: Taus
---
javascript/ql/src/change-notes/2025-06-12-loop-iteration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
index 1458ccdbb8e..13b9fcf592a 100644
--- a/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
+++ b/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md
@@ -1,4 +1,4 @@
---
category: minorAnalysis
---
-* The `js/loop-iteration-skipped-due-to-shifting` query has been updated with `reliability` tag.
+* The `js/loop-iteration-skipped-due-to-shifting` query now has the `reliability` tag.
From 9bdb541065155f3ff1f5c82fdedb5fa5c4b826b8 Mon Sep 17 00:00:00 2001
From: Simon Friis Vindum
Date: Wed, 18 Jun 2025 10:45:22 +0200
Subject: [PATCH 082/213] Rust: Add type inference tests for dereferencing
---
.../type-inference/dereference.rs | 102 ++++++++
.../test/library-tests/type-inference/main.rs | 3 +
.../type-inference/type-inference.expected | 245 +++++++++++++++++-
3 files changed, 345 insertions(+), 5 deletions(-)
create mode 100644 rust/ql/test/library-tests/type-inference/dereference.rs
diff --git a/rust/ql/test/library-tests/type-inference/dereference.rs b/rust/ql/test/library-tests/type-inference/dereference.rs
new file mode 100644
index 00000000000..8ceb8ec78de
--- /dev/null
+++ b/rust/ql/test/library-tests/type-inference/dereference.rs
@@ -0,0 +1,102 @@
+/// This file contains tests for dereferencing with through the `Deref` trait.
+use std::ops::Deref;
+
+struct MyIntPointer {
+ value: i64,
+}
+
+impl Deref for MyIntPointer {
+ type Target = i64;
+
+ // MyIntPointer::deref
+ fn deref(&self) -> &i64 {
+ &self.value // $ fieldof=MyIntPointer
+ }
+}
+
+struct MySmartPointer {
+ value: T,
+}
+
+impl Deref for MySmartPointer {
+ type Target = T;
+
+ // MySmartPointer::deref
+ fn deref(&self) -> &T {
+ &self.value // $ fieldof=MySmartPointer
+ }
+}
+
+fn explicit_monomorphic_dereference() {
+ // Dereference with method call
+ let a1 = MyIntPointer { value: 34i64 };
+ let _b1 = a1.deref(); // $ method=MyIntPointer::deref type=_b1:&T.i64
+
+ // Dereference with overloaded dereference operator
+ let a2 = MyIntPointer { value: 34i64 };
+ let _b2 = *a2; // $ method=MyIntPointer::deref MISSING: type=_b2:i64
+
+ // Call method on explicitly dereferenced value
+ let a3 = MyIntPointer { value: 34i64 };
+ let _b3 = (*a3).is_positive(); // $ method=MyIntPointer::deref method=is_positive type=_b3:bool
+}
+
+fn explicit_polymorphic_dereference() {
+ // Explicit dereference with type parameter
+ let c1 = MySmartPointer { value: 'a' };
+ let _d1 = c1.deref(); // $ method=MySmartPointer::deref type=_d1:&T.char
+
+ // Explicit dereference with type parameter
+ let c2 = MySmartPointer { value: 'a' };
+ let _d2 = *c2; // $ method=MySmartPointer::deref MISSING: type=_d2:char
+
+ // Call method on explicitly dereferenced value with type parameter
+ let c3 = MySmartPointer { value: 34i64 };
+ let _d3 = (*c3).is_positive(); // $ method=MySmartPointer::deref MISSING: method=is_positive type=_d3:bool
+}
+
+fn explicit_ref_dereference() {
+ // Explicit dereference with type parameter
+ let e1 = &'a';
+ let _f1 = e1.deref(); // $ MISSING: method=deref type=_f1:&T.char
+
+ // Explicit dereference with type parameter
+ let e2 = &'a';
+ let _f2 = *e2; // $ method=deref type=_f2:char
+
+ // Call method on explicitly dereferenced value with type parameter
+ let e3 = &34i64;
+ let _f3 = (*e3).is_positive(); // $ method=deref method=is_positive type=_f3:bool
+}
+
+fn explicit_box_dereference() {
+ // Explicit dereference with type parameter
+ let g1: Box = Box::new('a');
+ let _h1 = g1.deref(); // $ method=deref type=_h1:&T.char
+
+ // Explicit dereference with type parameter
+ let g2: Box = Box::new('a');
+ let _h2 = *g2; // $ method=deref MISSING: type=_h2:char
+
+ // Call method on explicitly dereferenced value with type parameter
+ let g3: Box = Box::new(34i64);
+ let _h3 = (*g3).is_positive(); // $ method=deref MISSING: method=is_positive type=_h3:bool
+}
+
+fn implicit_dereference() {
+ // Call method on implicitly dereferenced value
+ let x = MyIntPointer { value: 34i64 };
+ let _y = x.is_positive(); // $ MISSING: method=is_positive type=_y:bool
+
+ // Call method on implicitly dereferenced value
+ let x = MySmartPointer { value: 34i64 };
+ let _y = x.is_positive(); // $ MISSING: method=is_positive type=_y:bool
+}
+
+pub fn test() {
+ explicit_monomorphic_dereference();
+ explicit_polymorphic_dereference();
+ explicit_ref_dereference();
+ explicit_box_dereference();
+ implicit_dereference();
+}
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 5b7232ae849..1197670c714 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1881,6 +1881,8 @@ mod method_determined_by_argument_type {
}
}
+mod dereference;
+
fn main() {
field_access::f();
method_impl::f();
@@ -1905,4 +1907,5 @@ fn main() {
indexers::f();
macros::f();
method_determined_by_argument_type::f();
+ dereference::test();
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 758882f52d8..53c85a28c4b 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -1,4 +1,239 @@
inferType
+| dereference.rs:12:14:12:18 | SelfParam | | file://:0:0:0:0 | & |
+| dereference.rs:12:14:12:18 | SelfParam | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:12:29:14:5 | { ... } | | file://:0:0:0:0 | & |
+| dereference.rs:12:29:14:5 | { ... } | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:13:9:13:19 | &... | | file://:0:0:0:0 | & |
+| dereference.rs:13:9:13:19 | &... | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:13:10:13:13 | self | | file://:0:0:0:0 | & |
+| dereference.rs:13:10:13:13 | self | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:13:10:13:19 | self.value | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:25:14:25:18 | SelfParam | | file://:0:0:0:0 | & |
+| dereference.rs:25:14:25:18 | SelfParam | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:25:14:25:18 | SelfParam | &T.T | dereference.rs:21:6:21:6 | T |
+| dereference.rs:25:27:27:5 | { ... } | | file://:0:0:0:0 | & |
+| dereference.rs:25:27:27:5 | { ... } | &T | dereference.rs:21:6:21:6 | T |
+| dereference.rs:26:9:26:19 | &... | | file://:0:0:0:0 | & |
+| dereference.rs:26:9:26:19 | &... | &T | dereference.rs:21:6:21:6 | T |
+| dereference.rs:26:10:26:13 | self | | file://:0:0:0:0 | & |
+| dereference.rs:26:10:26:13 | self | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:26:10:26:13 | self | &T.T | dereference.rs:21:6:21:6 | T |
+| dereference.rs:26:10:26:19 | self.value | | dereference.rs:21:6:21:6 | T |
+| dereference.rs:32:9:32:10 | a1 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:32:14:32:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:32:36:32:40 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:33:9:33:11 | _b1 | | file://:0:0:0:0 | & |
+| dereference.rs:33:9:33:11 | _b1 | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:33:15:33:16 | a1 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:33:15:33:24 | a1.deref() | | file://:0:0:0:0 | & |
+| dereference.rs:33:15:33:24 | a1.deref() | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:36:9:36:10 | a2 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:36:9:36:10 | a2 | | file://:0:0:0:0 | & |
+| dereference.rs:36:9:36:10 | a2 | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:36:9:36:10 | a2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:36:9:36:10 | a2 | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:36:14:36:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:36:14:36:42 | MyIntPointer {...} | | file://:0:0:0:0 | & |
+| dereference.rs:36:14:36:42 | MyIntPointer {...} | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:36:14:36:42 | MyIntPointer {...} | &T | file://:0:0:0:0 | & |
+| dereference.rs:36:14:36:42 | MyIntPointer {...} | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:36:36:36:40 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:37:9:37:11 | _b2 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:37:9:37:11 | _b2 | | file://:0:0:0:0 | & |
+| dereference.rs:37:9:37:11 | _b2 | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:37:15:37:17 | * ... | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:37:15:37:17 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:37:15:37:17 | * ... | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:37:16:37:17 | a2 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:37:16:37:17 | a2 | | file://:0:0:0:0 | & |
+| dereference.rs:37:16:37:17 | a2 | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:37:16:37:17 | a2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:37:16:37:17 | a2 | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:40:9:40:10 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:40:9:40:10 | a3 | | file://:0:0:0:0 | & |
+| dereference.rs:40:9:40:10 | a3 | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:40:9:40:10 | a3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:40:9:40:10 | a3 | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:40:14:40:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:40:14:40:42 | MyIntPointer {...} | | file://:0:0:0:0 | & |
+| dereference.rs:40:14:40:42 | MyIntPointer {...} | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:40:14:40:42 | MyIntPointer {...} | &T | file://:0:0:0:0 | & |
+| dereference.rs:40:14:40:42 | MyIntPointer {...} | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:40:36:40:40 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:41:9:41:11 | _b3 | | {EXTERNAL LOCATION} | bool |
+| dereference.rs:41:15:41:19 | (...) | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:41:15:41:19 | (...) | | file://:0:0:0:0 | & |
+| dereference.rs:41:15:41:19 | (...) | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:41:15:41:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool |
+| dereference.rs:41:16:41:18 | * ... | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:41:16:41:18 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:41:16:41:18 | * ... | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:41:17:41:18 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:41:17:41:18 | a3 | | file://:0:0:0:0 | & |
+| dereference.rs:41:17:41:18 | a3 | &T | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:41:17:41:18 | a3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:41:17:41:18 | a3 | &T.&T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:46:9:46:10 | c1 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:46:9:46:10 | c1 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:46:14:46:42 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:46:14:46:42 | MySmartPointer {...} | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:46:38:46:40 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:47:9:47:11 | _d1 | | file://:0:0:0:0 | & |
+| dereference.rs:47:9:47:11 | _d1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:47:15:47:16 | c1 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:47:15:47:16 | c1 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:47:15:47:24 | c1.deref() | | file://:0:0:0:0 | & |
+| dereference.rs:47:15:47:24 | c1.deref() | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:50:9:50:10 | c2 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:50:9:50:10 | c2 | | file://:0:0:0:0 | & |
+| dereference.rs:50:9:50:10 | c2 | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:50:9:50:10 | c2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:50:9:50:10 | c2 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:50:14:50:42 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:50:14:50:42 | MySmartPointer {...} | | file://:0:0:0:0 | & |
+| dereference.rs:50:14:50:42 | MySmartPointer {...} | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:50:14:50:42 | MySmartPointer {...} | &T | file://:0:0:0:0 | & |
+| dereference.rs:50:14:50:42 | MySmartPointer {...} | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:50:38:50:40 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:51:9:51:11 | _d2 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:51:9:51:11 | _d2 | | file://:0:0:0:0 | & |
+| dereference.rs:51:15:51:17 | * ... | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:51:15:51:17 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:51:16:51:17 | c2 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:51:16:51:17 | c2 | | file://:0:0:0:0 | & |
+| dereference.rs:51:16:51:17 | c2 | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:51:16:51:17 | c2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:51:16:51:17 | c2 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:54:9:54:10 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:54:9:54:10 | c3 | | file://:0:0:0:0 | & |
+| dereference.rs:54:9:54:10 | c3 | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:54:9:54:10 | c3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:54:9:54:10 | c3 | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:54:14:54:44 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:54:14:54:44 | MySmartPointer {...} | | file://:0:0:0:0 | & |
+| dereference.rs:54:14:54:44 | MySmartPointer {...} | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:54:14:54:44 | MySmartPointer {...} | &T | file://:0:0:0:0 | & |
+| dereference.rs:54:14:54:44 | MySmartPointer {...} | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:54:38:54:42 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:55:15:55:19 | (...) | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:55:15:55:19 | (...) | | file://:0:0:0:0 | & |
+| dereference.rs:55:16:55:18 | * ... | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:55:16:55:18 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:55:17:55:18 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:55:17:55:18 | c3 | | file://:0:0:0:0 | & |
+| dereference.rs:55:17:55:18 | c3 | &T | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:55:17:55:18 | c3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:55:17:55:18 | c3 | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:60:9:60:10 | e1 | | file://:0:0:0:0 | & |
+| dereference.rs:60:9:60:10 | e1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:60:14:60:17 | &'a' | | file://:0:0:0:0 | & |
+| dereference.rs:60:14:60:17 | &'a' | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:60:15:60:17 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:61:15:61:16 | e1 | | file://:0:0:0:0 | & |
+| dereference.rs:61:15:61:16 | e1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:64:9:64:10 | e2 | | file://:0:0:0:0 | & |
+| dereference.rs:64:9:64:10 | e2 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:64:9:64:10 | e2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:64:14:64:17 | &'a' | | file://:0:0:0:0 | & |
+| dereference.rs:64:14:64:17 | &'a' | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:64:14:64:17 | &'a' | &T | file://:0:0:0:0 | & |
+| dereference.rs:64:15:64:17 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:64:15:64:17 | 'a' | | file://:0:0:0:0 | & |
+| dereference.rs:65:9:65:11 | _f2 | | {EXTERNAL LOCATION} | char |
+| dereference.rs:65:9:65:11 | _f2 | | file://:0:0:0:0 | & |
+| dereference.rs:65:15:65:17 | * ... | | {EXTERNAL LOCATION} | char |
+| dereference.rs:65:15:65:17 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:65:16:65:17 | e2 | | file://:0:0:0:0 | & |
+| dereference.rs:65:16:65:17 | e2 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:65:16:65:17 | e2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:68:9:68:10 | e3 | | file://:0:0:0:0 | & |
+| dereference.rs:68:9:68:10 | e3 | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:68:9:68:10 | e3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:68:14:68:19 | &34i64 | | file://:0:0:0:0 | & |
+| dereference.rs:68:14:68:19 | &34i64 | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:68:14:68:19 | &34i64 | &T | file://:0:0:0:0 | & |
+| dereference.rs:68:15:68:19 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:68:15:68:19 | 34i64 | | file://:0:0:0:0 | & |
+| dereference.rs:69:9:69:11 | _f3 | | {EXTERNAL LOCATION} | bool |
+| dereference.rs:69:15:69:19 | (...) | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:69:15:69:19 | (...) | | file://:0:0:0:0 | & |
+| dereference.rs:69:15:69:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool |
+| dereference.rs:69:16:69:18 | * ... | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:69:16:69:18 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:69:17:69:18 | e3 | | file://:0:0:0:0 | & |
+| dereference.rs:69:17:69:18 | e3 | &T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:69:17:69:18 | e3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:74:9:74:10 | g1 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:74:9:74:10 | g1 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:74:9:74:10 | g1 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:74:25:74:37 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:74:25:74:37 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:74:25:74:37 | ...::new(...) | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:74:34:74:36 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:75:9:75:11 | _h1 | | file://:0:0:0:0 | & |
+| dereference.rs:75:9:75:11 | _h1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:75:15:75:16 | g1 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:75:15:75:16 | g1 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:75:15:75:16 | g1 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:75:15:75:24 | g1.deref() | | file://:0:0:0:0 | & |
+| dereference.rs:75:15:75:24 | g1.deref() | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:78:9:78:10 | g2 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:78:9:78:10 | g2 | | file://:0:0:0:0 | & |
+| dereference.rs:78:9:78:10 | g2 | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:78:9:78:10 | g2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:78:9:78:10 | g2 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:78:9:78:10 | g2 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:78:25:78:37 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:78:25:78:37 | ...::new(...) | | file://:0:0:0:0 | & |
+| dereference.rs:78:25:78:37 | ...::new(...) | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:78:25:78:37 | ...::new(...) | &T | file://:0:0:0:0 | & |
+| dereference.rs:78:25:78:37 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:78:25:78:37 | ...::new(...) | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:78:34:78:36 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:79:9:79:11 | _h2 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:79:9:79:11 | _h2 | | file://:0:0:0:0 | & |
+| dereference.rs:79:15:79:17 | * ... | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:79:15:79:17 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:79:16:79:17 | g2 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:79:16:79:17 | g2 | | file://:0:0:0:0 | & |
+| dereference.rs:79:16:79:17 | g2 | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:79:16:79:17 | g2 | &T | file://:0:0:0:0 | & |
+| dereference.rs:79:16:79:17 | g2 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:79:16:79:17 | g2 | T | {EXTERNAL LOCATION} | char |
+| dereference.rs:82:9:82:10 | g3 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:82:9:82:10 | g3 | | file://:0:0:0:0 | & |
+| dereference.rs:82:9:82:10 | g3 | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:82:9:82:10 | g3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:82:9:82:10 | g3 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:82:9:82:10 | g3 | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:82:24:82:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:82:24:82:38 | ...::new(...) | | file://:0:0:0:0 | & |
+| dereference.rs:82:24:82:38 | ...::new(...) | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:82:24:82:38 | ...::new(...) | &T | file://:0:0:0:0 | & |
+| dereference.rs:82:24:82:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:82:24:82:38 | ...::new(...) | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:82:33:82:37 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:83:15:83:19 | (...) | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:83:15:83:19 | (...) | | file://:0:0:0:0 | & |
+| dereference.rs:83:16:83:18 | * ... | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:83:16:83:18 | * ... | | file://:0:0:0:0 | & |
+| dereference.rs:83:17:83:18 | g3 | | {EXTERNAL LOCATION} | Box |
+| dereference.rs:83:17:83:18 | g3 | | file://:0:0:0:0 | & |
+| dereference.rs:83:17:83:18 | g3 | &T | {EXTERNAL LOCATION} | Box |
+| dereference.rs:83:17:83:18 | g3 | &T | file://:0:0:0:0 | & |
+| dereference.rs:83:17:83:18 | g3 | A | {EXTERNAL LOCATION} | Global |
+| dereference.rs:83:17:83:18 | g3 | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:88:9:88:9 | x | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:88:13:88:41 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:88:35:88:39 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:89:14:89:14 | x | | dereference.rs:4:1:6:1 | MyIntPointer |
+| dereference.rs:92:9:92:9 | x | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:92:9:92:9 | x | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:92:13:92:43 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:92:13:92:43 | MySmartPointer {...} | T | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:92:37:92:41 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| dereference.rs:93:14:93:14 | x | | dereference.rs:17:1:19:1 | MySmartPointer |
+| dereference.rs:93:14:93:14 | x | T | {EXTERNAL LOCATION} | i64 |
| loop/main.rs:7:12:7:15 | SelfParam | | loop/main.rs:6:1:8:1 | Self [trait T1] |
| loop/main.rs:11:12:11:15 | SelfParam | | loop/main.rs:10:1:14:1 | Self [trait T2] |
| loop/main.rs:12:9:12:12 | self | | loop/main.rs:10:1:14:1 | Self [trait T2] |
@@ -2705,9 +2940,9 @@ inferType
| main.rs:1880:9:1880:9 | x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1880:9:1880:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
| main.rs:1880:18:1880:21 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1886:5:1886:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1887:5:1887:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1887:20:1887:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1887:41:1887:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1903:5:1903:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1888:5:1888:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1889:5:1889:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1889:20:1889:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1889:41:1889:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1905:5:1905:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From 7c9d15b6051ac6e4dfdb90046bffbefc71b1a289 Mon Sep 17 00:00:00 2001
From: Simon Friis Vindum
Date: Wed, 18 Jun 2025 12:58:22 +0200
Subject: [PATCH 083/213] Rust: Add test with method on borrow
---
.../test/library-tests/type-inference/main.rs | 36 +-
.../type-inference/type-inference.expected | 2811 +++++++++--------
2 files changed, 1473 insertions(+), 1374 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 1197670c714..0b6d2b754a1 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1079,6 +1079,11 @@ mod method_call_type_conversion {
#[derive(Debug, Copy, Clone)]
struct S2;
+ #[derive(Debug, Copy, Clone, Default)]
+ struct MyInt {
+ a: i64,
+ }
+
impl S {
fn m1(self) -> T {
self.0 // $ fieldof=S
@@ -1093,6 +1098,24 @@ mod method_call_type_conversion {
}
}
+ trait ATrait {
+ fn method_on_borrow(&self) -> i64;
+ fn method_not_on_borrow(self) -> i64;
+ }
+
+ // Trait implementation on a borrow.
+ impl ATrait for &MyInt {
+ // MyInt::method_on_borrow
+ fn method_on_borrow(&self) -> i64 {
+ (*(*self)).a // $ method=deref fieldof=MyInt
+ }
+
+ // MyInt::method_not_on_borrow
+ fn method_not_on_borrow(self) -> i64 {
+ (*self).a // $ method=deref fieldof=MyInt
+ }
+ }
+
pub fn f() {
let x1 = S(S2);
println!("{:?}", x1.m1()); // $ method=m1
@@ -1128,10 +1151,21 @@ mod method_call_type_conversion {
let t = x7.m1(); // $ method=m1 type=t:& type=t:&T.S2
println!("{:?}", x7);
- let x9 : String = "Hello".to_string(); // $ type=x9:String
+ let x9: String = "Hello".to_string(); // $ type=x9:String
+
// Implicit `String` -> `str` conversion happens via the `Deref` trait:
// https://doc.rust-lang.org/std/string/struct.String.html#deref.
let u = x9.parse::(); // $ method=parse type=u:T.u32
+
+ let my_thing = &MyInt { a: 37 };
+ // implicit borrow of a `&`
+ let a = my_thing.method_on_borrow(); // $ MISSING: method=MyInt::method_on_borrow
+ println!("{:?}", a);
+
+ // no implicit borrow
+ let my_thing = &MyInt { a: 38 };
+ let a = my_thing.method_not_on_borrow(); // $ MISSING: method=MyInt::method_not_on_borrow
+ println!("{:?}", a);
}
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 53c85a28c4b..e7f2d2b10c1 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -1510,1439 +1510,1504 @@ inferType
| main.rs:1070:18:1070:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
| main.rs:1070:26:1070:34 | from_loop | | main.rs:988:5:992:5 | MyOption |
| main.rs:1070:26:1070:34 | from_loop | T | main.rs:1023:5:1024:13 | S |
-| main.rs:1083:15:1083:18 | SelfParam | | main.rs:1076:5:1077:19 | S |
-| main.rs:1083:15:1083:18 | SelfParam | T | main.rs:1082:10:1082:10 | T |
-| main.rs:1083:26:1085:9 | { ... } | | main.rs:1082:10:1082:10 | T |
-| main.rs:1084:13:1084:16 | self | | main.rs:1076:5:1077:19 | S |
-| main.rs:1084:13:1084:16 | self | T | main.rs:1082:10:1082:10 | T |
-| main.rs:1084:13:1084:18 | self.0 | | main.rs:1082:10:1082:10 | T |
-| main.rs:1087:15:1087:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1087:15:1087:19 | SelfParam | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1087:15:1087:19 | SelfParam | &T.T | main.rs:1082:10:1082:10 | T |
-| main.rs:1087:28:1089:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1087:28:1089:9 | { ... } | &T | main.rs:1082:10:1082:10 | T |
-| main.rs:1088:13:1088:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1088:13:1088:19 | &... | &T | main.rs:1082:10:1082:10 | T |
-| main.rs:1088:14:1088:17 | self | | file://:0:0:0:0 | & |
-| main.rs:1088:14:1088:17 | self | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1088:14:1088:17 | self | &T.T | main.rs:1082:10:1082:10 | T |
-| main.rs:1088:14:1088:19 | self.0 | | main.rs:1082:10:1082:10 | T |
-| main.rs:1091:15:1091:25 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1091:15:1091:25 | SelfParam | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1091:15:1091:25 | SelfParam | &T.T | main.rs:1082:10:1082:10 | T |
-| main.rs:1091:34:1093:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1091:34:1093:9 | { ... } | &T | main.rs:1082:10:1082:10 | T |
-| main.rs:1092:13:1092:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1092:13:1092:19 | &... | &T | main.rs:1082:10:1082:10 | T |
-| main.rs:1092:14:1092:17 | self | | file://:0:0:0:0 | & |
-| main.rs:1092:14:1092:17 | self | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1092:14:1092:17 | self | &T.T | main.rs:1082:10:1082:10 | T |
-| main.rs:1092:14:1092:19 | self.0 | | main.rs:1082:10:1082:10 | T |
-| main.rs:1097:13:1097:14 | x1 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1097:13:1097:14 | x1 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1097:18:1097:22 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1097:18:1097:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1097:20:1097:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1098:18:1098:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1098:26:1098:27 | x1 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1098:26:1098:27 | x1 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1098:26:1098:32 | x1.m1() | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1100:13:1100:14 | x2 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1100:13:1100:14 | x2 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1100:18:1100:22 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1100:18:1100:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1100:20:1100:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1102:18:1102:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1102:26:1102:27 | x2 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1102:26:1102:27 | x2 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1102:26:1102:32 | x2.m2() | | file://:0:0:0:0 | & |
-| main.rs:1102:26:1102:32 | x2.m2() | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1103:18:1103:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1103:26:1103:27 | x2 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1103:26:1103:27 | x2 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1103:26:1103:32 | x2.m3() | | file://:0:0:0:0 | & |
-| main.rs:1103:26:1103:32 | x2.m3() | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1105:13:1105:14 | x3 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1105:13:1105:14 | x3 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1105:18:1105:22 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1105:18:1105:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1105:20:1105:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1107:18:1107:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1107:26:1107:41 | ...::m2(...) | | file://:0:0:0:0 | & |
-| main.rs:1107:26:1107:41 | ...::m2(...) | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1107:38:1107:40 | &x3 | | file://:0:0:0:0 | & |
-| main.rs:1107:38:1107:40 | &x3 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1107:38:1107:40 | &x3 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1107:39:1107:40 | x3 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1107:39:1107:40 | x3 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1108:18:1108:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1108:26:1108:41 | ...::m3(...) | | file://:0:0:0:0 | & |
-| main.rs:1108:26:1108:41 | ...::m3(...) | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1108:38:1108:40 | &x3 | | file://:0:0:0:0 | & |
-| main.rs:1108:38:1108:40 | &x3 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1108:38:1108:40 | &x3 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1108:39:1108:40 | x3 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1108:39:1108:40 | x3 | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1110:13:1110:14 | x4 | | file://:0:0:0:0 | & |
-| main.rs:1110:13:1110:14 | x4 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1110:13:1110:14 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1110:18:1110:23 | &... | | file://:0:0:0:0 | & |
-| main.rs:1110:18:1110:23 | &... | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1110:18:1110:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1110:19:1110:23 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1110:19:1110:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1110:21:1110:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1112:18:1112:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1112:26:1112:27 | x4 | | file://:0:0:0:0 | & |
-| main.rs:1112:26:1112:27 | x4 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1112:26:1112:27 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1112:26:1112:32 | x4.m2() | | file://:0:0:0:0 | & |
-| main.rs:1112:26:1112:32 | x4.m2() | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1113:18:1113:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1113:26:1113:27 | x4 | | file://:0:0:0:0 | & |
-| main.rs:1113:26:1113:27 | x4 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1113:26:1113:27 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1113:26:1113:32 | x4.m3() | | file://:0:0:0:0 | & |
-| main.rs:1113:26:1113:32 | x4.m3() | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1115:13:1115:14 | x5 | | file://:0:0:0:0 | & |
-| main.rs:1115:13:1115:14 | x5 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1115:13:1115:14 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1115:18:1115:23 | &... | | file://:0:0:0:0 | & |
-| main.rs:1115:18:1115:23 | &... | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1115:18:1115:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1115:19:1115:23 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1115:19:1115:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1115:21:1115:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1117:18:1117:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1117:26:1117:27 | x5 | | file://:0:0:0:0 | & |
-| main.rs:1117:26:1117:27 | x5 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1117:26:1117:27 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1117:26:1117:32 | x5.m1() | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1118:18:1118:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1118:26:1118:27 | x5 | | file://:0:0:0:0 | & |
-| main.rs:1118:26:1118:27 | x5 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1118:26:1118:27 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1118:26:1118:29 | x5.0 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:13:1120:14 | x6 | | file://:0:0:0:0 | & |
-| main.rs:1120:13:1120:14 | x6 | &T | file://:0:0:0:0 | & |
-| main.rs:1120:13:1120:14 | x6 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:13:1120:14 | x6 | &T.&T | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:13:1120:14 | x6 | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:13:1120:14 | x6 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:18:1120:23 | &... | | file://:0:0:0:0 | & |
-| main.rs:1120:18:1120:23 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1120:18:1120:23 | &... | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:18:1120:23 | &... | &T.&T | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:18:1120:23 | &... | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:18:1120:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:19:1120:23 | S(...) | | file://:0:0:0:0 | & |
-| main.rs:1120:19:1120:23 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:19:1120:23 | S(...) | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1120:19:1120:23 | S(...) | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:19:1120:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1120:21:1120:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:18:1123:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1123:26:1123:30 | (...) | | file://:0:0:0:0 | & |
-| main.rs:1123:26:1123:30 | (...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:26:1123:30 | (...) | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:26:1123:30 | (...) | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:26:1123:30 | (...) | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:26:1123:35 | ... .m1() | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:27:1123:29 | * ... | | file://:0:0:0:0 | & |
-| main.rs:1123:27:1123:29 | * ... | | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:27:1123:29 | * ... | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:27:1123:29 | * ... | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:27:1123:29 | * ... | T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:28:1123:29 | x6 | | file://:0:0:0:0 | & |
-| main.rs:1123:28:1123:29 | x6 | &T | file://:0:0:0:0 | & |
-| main.rs:1123:28:1123:29 | x6 | &T | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:28:1123:29 | x6 | &T.&T | main.rs:1076:5:1077:19 | S |
-| main.rs:1123:28:1123:29 | x6 | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1123:28:1123:29 | x6 | &T.T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1125:13:1125:14 | x7 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1125:13:1125:14 | x7 | T | file://:0:0:0:0 | & |
-| main.rs:1125:13:1125:14 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1125:18:1125:23 | S(...) | | main.rs:1076:5:1077:19 | S |
-| main.rs:1125:18:1125:23 | S(...) | T | file://:0:0:0:0 | & |
-| main.rs:1125:18:1125:23 | S(...) | T.&T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1125:20:1125:22 | &S2 | | file://:0:0:0:0 | & |
-| main.rs:1125:20:1125:22 | &S2 | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1125:21:1125:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1128:13:1128:13 | t | | file://:0:0:0:0 | & |
-| main.rs:1128:13:1128:13 | t | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1128:17:1128:18 | x7 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1128:17:1128:18 | x7 | T | file://:0:0:0:0 | & |
-| main.rs:1128:17:1128:18 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1128:17:1128:23 | x7.m1() | | file://:0:0:0:0 | & |
-| main.rs:1128:17:1128:23 | x7.m1() | &T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1129:18:1129:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1129:26:1129:27 | x7 | | main.rs:1076:5:1077:19 | S |
-| main.rs:1129:26:1129:27 | x7 | T | file://:0:0:0:0 | & |
-| main.rs:1129:26:1129:27 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
-| main.rs:1131:13:1131:14 | x9 | | {EXTERNAL LOCATION} | String |
-| main.rs:1131:27:1131:33 | "Hello" | | {EXTERNAL LOCATION} | str |
-| main.rs:1131:27:1131:45 | "Hello".to_string() | | {EXTERNAL LOCATION} | String |
-| main.rs:1134:13:1134:13 | u | | {EXTERNAL LOCATION} | Result |
-| main.rs:1134:13:1134:13 | u | T | {EXTERNAL LOCATION} | u32 |
-| main.rs:1134:17:1134:18 | x9 | | {EXTERNAL LOCATION} | String |
-| main.rs:1134:17:1134:33 | x9.parse() | | {EXTERNAL LOCATION} | Result |
-| main.rs:1134:17:1134:33 | x9.parse() | T | {EXTERNAL LOCATION} | u32 |
-| main.rs:1141:16:1141:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1141:16:1141:20 | SelfParam | &T | main.rs:1139:5:1147:5 | Self [trait MyTrait] |
-| main.rs:1144:16:1144:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1144:16:1144:20 | SelfParam | &T | main.rs:1139:5:1147:5 | Self [trait MyTrait] |
-| main.rs:1144:32:1146:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1144:32:1146:9 | { ... } | &T | main.rs:1139:5:1147:5 | Self [trait MyTrait] |
-| main.rs:1145:13:1145:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1145:13:1145:16 | self | &T | main.rs:1139:5:1147:5 | Self [trait MyTrait] |
-| main.rs:1145:13:1145:22 | self.foo() | | file://:0:0:0:0 | & |
-| main.rs:1145:13:1145:22 | self.foo() | &T | main.rs:1139:5:1147:5 | Self [trait MyTrait] |
-| main.rs:1153:16:1153:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1153:16:1153:20 | SelfParam | &T | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1153:36:1155:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1153:36:1155:9 | { ... } | &T | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1154:13:1154:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1154:13:1154:16 | self | &T | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1159:13:1159:13 | x | | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1159:17:1159:24 | MyStruct | | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1160:9:1160:9 | x | | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1160:9:1160:15 | x.bar() | | file://:0:0:0:0 | & |
-| main.rs:1160:9:1160:15 | x.bar() | &T | main.rs:1149:5:1149:20 | MyStruct |
-| main.rs:1170:16:1170:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1170:16:1170:20 | SelfParam | &T | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1170:16:1170:20 | SelfParam | &T.T | main.rs:1169:10:1169:10 | T |
-| main.rs:1170:32:1172:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1170:32:1172:9 | { ... } | &T | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1170:32:1172:9 | { ... } | &T.T | main.rs:1169:10:1169:10 | T |
-| main.rs:1171:13:1171:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1171:13:1171:16 | self | &T | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1171:13:1171:16 | self | &T.T | main.rs:1169:10:1169:10 | T |
-| main.rs:1176:13:1176:13 | x | | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1176:13:1176:13 | x | T | main.rs:1165:5:1165:13 | S |
-| main.rs:1176:17:1176:27 | MyStruct(...) | | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1176:17:1176:27 | MyStruct(...) | T | main.rs:1165:5:1165:13 | S |
-| main.rs:1176:26:1176:26 | S | | main.rs:1165:5:1165:13 | S |
-| main.rs:1177:9:1177:9 | x | | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1177:9:1177:9 | x | T | main.rs:1165:5:1165:13 | S |
-| main.rs:1177:9:1177:15 | x.foo() | | file://:0:0:0:0 | & |
-| main.rs:1177:9:1177:15 | x.foo() | &T | main.rs:1167:5:1167:26 | MyStruct |
-| main.rs:1177:9:1177:15 | x.foo() | &T.T | main.rs:1165:5:1165:13 | S |
-| main.rs:1188:17:1188:25 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1188:17:1188:25 | SelfParam | &T | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1189:13:1189:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1189:13:1189:16 | self | &T | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1189:13:1189:21 | self.bool | | {EXTERNAL LOCATION} | bool |
-| main.rs:1189:13:1189:34 | ... = ... | | file://:0:0:0:0 | () |
-| main.rs:1189:25:1189:34 | ! ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1189:26:1189:29 | self | | file://:0:0:0:0 | & |
-| main.rs:1189:26:1189:29 | self | &T | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1189:26:1189:34 | self.bool | | {EXTERNAL LOCATION} | bool |
-| main.rs:1196:15:1196:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1196:15:1196:19 | SelfParam | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1196:31:1198:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1196:31:1198:9 | { ... } | &T | file://:0:0:0:0 | & |
-| main.rs:1196:31:1198:9 | { ... } | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1196:31:1198:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1196:31:1198:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1196:31:1198:9 | { ... } | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:13:1197:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1197:13:1197:19 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1197:13:1197:19 | &... | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:13:1197:19 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1197:13:1197:19 | &... | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1197:13:1197:19 | &... | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:14:1197:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1197:14:1197:19 | &... | | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:14:1197:19 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1197:14:1197:19 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1197:14:1197:19 | &... | &T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:15:1197:19 | &self | | file://:0:0:0:0 | & |
-| main.rs:1197:15:1197:19 | &self | &T | file://:0:0:0:0 | & |
-| main.rs:1197:15:1197:19 | &self | &T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1197:16:1197:19 | self | | file://:0:0:0:0 | & |
-| main.rs:1197:16:1197:19 | self | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1200:15:1200:25 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1200:15:1200:25 | SelfParam | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1200:37:1202:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1200:37:1202:9 | { ... } | &T | file://:0:0:0:0 | & |
-| main.rs:1200:37:1202:9 | { ... } | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1200:37:1202:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1200:37:1202:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1200:37:1202:9 | { ... } | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:13:1201:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1201:13:1201:19 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1201:13:1201:19 | &... | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:13:1201:19 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1201:13:1201:19 | &... | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1201:13:1201:19 | &... | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:14:1201:19 | &... | | file://:0:0:0:0 | & |
-| main.rs:1201:14:1201:19 | &... | | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:14:1201:19 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1201:14:1201:19 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1201:14:1201:19 | &... | &T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:15:1201:19 | &self | | file://:0:0:0:0 | & |
-| main.rs:1201:15:1201:19 | &self | &T | file://:0:0:0:0 | & |
-| main.rs:1201:15:1201:19 | &self | &T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1201:16:1201:19 | self | | file://:0:0:0:0 | & |
-| main.rs:1201:16:1201:19 | self | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1204:15:1204:15 | x | | file://:0:0:0:0 | & |
-| main.rs:1204:15:1204:15 | x | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1204:34:1206:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1204:34:1206:9 | { ... } | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1205:13:1205:13 | x | | file://:0:0:0:0 | & |
-| main.rs:1205:13:1205:13 | x | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1208:15:1208:15 | x | | file://:0:0:0:0 | & |
-| main.rs:1208:15:1208:15 | x | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1208:34:1210:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1208:34:1210:9 | { ... } | &T | file://:0:0:0:0 | & |
-| main.rs:1208:34:1210:9 | { ... } | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1208:34:1210:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1208:34:1210:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1208:34:1210:9 | { ... } | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:13:1209:16 | &... | | file://:0:0:0:0 | & |
-| main.rs:1209:13:1209:16 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1209:13:1209:16 | &... | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:13:1209:16 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1209:13:1209:16 | &... | &T.&T.&T | file://:0:0:0:0 | & |
-| main.rs:1209:13:1209:16 | &... | &T.&T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:14:1209:16 | &... | | file://:0:0:0:0 | & |
-| main.rs:1209:14:1209:16 | &... | | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:14:1209:16 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1209:14:1209:16 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1209:14:1209:16 | &... | &T.&T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:15:1209:16 | &x | | file://:0:0:0:0 | & |
-| main.rs:1209:15:1209:16 | &x | &T | file://:0:0:0:0 | & |
-| main.rs:1209:15:1209:16 | &x | &T.&T | main.rs:1193:5:1193:13 | S |
-| main.rs:1209:16:1209:16 | x | | file://:0:0:0:0 | & |
-| main.rs:1209:16:1209:16 | x | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1214:13:1214:13 | x | | main.rs:1193:5:1193:13 | S |
-| main.rs:1214:17:1214:20 | S {...} | | main.rs:1193:5:1193:13 | S |
-| main.rs:1215:9:1215:9 | x | | main.rs:1193:5:1193:13 | S |
-| main.rs:1215:9:1215:14 | x.f1() | | file://:0:0:0:0 | & |
-| main.rs:1215:9:1215:14 | x.f1() | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1216:9:1216:9 | x | | main.rs:1193:5:1193:13 | S |
-| main.rs:1216:9:1216:14 | x.f2() | | file://:0:0:0:0 | & |
-| main.rs:1216:9:1216:14 | x.f2() | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1217:9:1217:17 | ...::f3(...) | | file://:0:0:0:0 | & |
-| main.rs:1217:9:1217:17 | ...::f3(...) | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1217:15:1217:16 | &x | | file://:0:0:0:0 | & |
-| main.rs:1217:15:1217:16 | &x | &T | main.rs:1193:5:1193:13 | S |
-| main.rs:1217:16:1217:16 | x | | main.rs:1193:5:1193:13 | S |
-| main.rs:1219:13:1219:13 | n | | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:13:1219:13 | n | | file://:0:0:0:0 | & |
-| main.rs:1219:17:1219:24 | * ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:17:1219:24 | * ... | | file://:0:0:0:0 | & |
-| main.rs:1219:18:1219:24 | * ... | | file://:0:0:0:0 | & |
-| main.rs:1219:18:1219:24 | * ... | &T | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:18:1219:24 | * ... | &T | file://:0:0:0:0 | & |
-| main.rs:1219:19:1219:24 | &... | | file://:0:0:0:0 | & |
-| main.rs:1219:19:1219:24 | &... | &T | file://:0:0:0:0 | & |
-| main.rs:1219:19:1219:24 | &... | &T.&T | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:19:1219:24 | &... | &T.&T | file://:0:0:0:0 | & |
-| main.rs:1219:20:1219:24 | &true | | file://:0:0:0:0 | & |
-| main.rs:1219:20:1219:24 | &true | &T | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:20:1219:24 | &true | &T | file://:0:0:0:0 | & |
-| main.rs:1219:21:1219:24 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1219:21:1219:24 | true | | file://:0:0:0:0 | & |
-| main.rs:1223:13:1223:20 | mut flag | | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1223:24:1223:41 | ...::default(...) | | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1224:22:1224:30 | &mut flag | | file://:0:0:0:0 | & |
-| main.rs:1224:22:1224:30 | &mut flag | &T | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1224:27:1224:30 | flag | | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1225:18:1225:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1225:26:1225:29 | flag | | main.rs:1182:5:1185:5 | MyFlag |
-| main.rs:1239:43:1242:5 | { ... } | | {EXTERNAL LOCATION} | Result |
-| main.rs:1239:43:1242:5 | { ... } | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1239:43:1242:5 | { ... } | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1240:13:1240:13 | x | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1240:17:1240:30 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1240:17:1240:30 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1240:17:1240:31 | TryExpr | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1240:28:1240:29 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1241:9:1241:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1241:9:1241:22 | ...::Ok(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1241:9:1241:22 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1241:20:1241:21 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1245:46:1249:5 | { ... } | | {EXTERNAL LOCATION} | Result |
-| main.rs:1245:46:1249:5 | { ... } | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1245:46:1249:5 | { ... } | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1246:13:1246:13 | x | | {EXTERNAL LOCATION} | Result |
-| main.rs:1246:13:1246:13 | x | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1246:17:1246:30 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1246:17:1246:30 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1246:28:1246:29 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1247:13:1247:13 | y | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1247:17:1247:17 | x | | {EXTERNAL LOCATION} | Result |
-| main.rs:1247:17:1247:17 | x | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1247:17:1247:18 | TryExpr | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1248:9:1248:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1248:9:1248:22 | ...::Ok(...) | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1248:9:1248:22 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1248:20:1248:21 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1252:40:1257:5 | { ... } | | {EXTERNAL LOCATION} | Result |
-| main.rs:1252:40:1257:5 | { ... } | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1252:40:1257:5 | { ... } | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1253:13:1253:13 | x | | {EXTERNAL LOCATION} | Result |
-| main.rs:1253:13:1253:13 | x | T | {EXTERNAL LOCATION} | Result |
-| main.rs:1253:13:1253:13 | x | T.T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1253:17:1253:42 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1253:17:1253:42 | ...::Ok(...) | T | {EXTERNAL LOCATION} | Result |
-| main.rs:1253:17:1253:42 | ...::Ok(...) | T.T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1253:28:1253:41 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1253:28:1253:41 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1253:39:1253:40 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1255:17:1255:17 | x | | {EXTERNAL LOCATION} | Result |
-| main.rs:1255:17:1255:17 | x | T | {EXTERNAL LOCATION} | Result |
-| main.rs:1255:17:1255:17 | x | T.T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1255:17:1255:18 | TryExpr | | {EXTERNAL LOCATION} | Result |
-| main.rs:1255:17:1255:18 | TryExpr | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1255:17:1255:29 | ... .map(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1256:9:1256:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1256:9:1256:22 | ...::Ok(...) | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1256:9:1256:22 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1256:20:1256:21 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1260:30:1260:34 | input | | {EXTERNAL LOCATION} | Result |
-| main.rs:1260:30:1260:34 | input | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1260:30:1260:34 | input | T | main.rs:1260:20:1260:27 | T |
-| main.rs:1260:69:1267:5 | { ... } | | {EXTERNAL LOCATION} | Result |
-| main.rs:1260:69:1267:5 | { ... } | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1260:69:1267:5 | { ... } | T | main.rs:1260:20:1260:27 | T |
-| main.rs:1261:13:1261:17 | value | | main.rs:1260:20:1260:27 | T |
-| main.rs:1261:21:1261:25 | input | | {EXTERNAL LOCATION} | Result |
-| main.rs:1261:21:1261:25 | input | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1261:21:1261:25 | input | T | main.rs:1260:20:1260:27 | T |
-| main.rs:1261:21:1261:26 | TryExpr | | main.rs:1260:20:1260:27 | T |
-| main.rs:1262:22:1262:38 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1262:22:1262:38 | ...::Ok(...) | T | main.rs:1260:20:1260:27 | T |
-| main.rs:1262:22:1265:10 | ... .and_then(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1262:33:1262:37 | value | | main.rs:1260:20:1260:27 | T |
-| main.rs:1262:53:1265:9 | { ... } | | {EXTERNAL LOCATION} | Result |
-| main.rs:1262:53:1265:9 | { ... } | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1263:22:1263:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1264:13:1264:34 | ...::Ok::<...>(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1264:13:1264:34 | ...::Ok::<...>(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1266:9:1266:23 | ...::Err(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1266:9:1266:23 | ...::Err(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1266:9:1266:23 | ...::Err(...) | T | main.rs:1260:20:1260:27 | T |
-| main.rs:1266:21:1266:22 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1270:37:1270:52 | try_same_error(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1270:37:1270:52 | try_same_error(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1270:37:1270:52 | try_same_error(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1271:22:1271:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1274:37:1274:55 | try_convert_error(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1274:37:1274:55 | try_convert_error(...) | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1274:37:1274:55 | try_convert_error(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1275:22:1275:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1278:37:1278:49 | try_chained(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1278:37:1278:49 | try_chained(...) | E | main.rs:1235:5:1236:14 | S2 |
-| main.rs:1278:37:1278:49 | try_chained(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1279:22:1279:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1282:37:1282:63 | try_complex(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1282:37:1282:63 | try_complex(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1282:37:1282:63 | try_complex(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1282:49:1282:62 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
-| main.rs:1282:49:1282:62 | ...::Ok(...) | E | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1282:49:1282:62 | ...::Ok(...) | T | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1282:60:1282:61 | S1 | | main.rs:1232:5:1233:14 | S1 |
-| main.rs:1283:22:1283:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
-| main.rs:1290:13:1290:13 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1290:22:1290:22 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1291:13:1291:13 | y | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1291:17:1291:17 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1292:13:1292:13 | z | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1292:17:1292:17 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1292:17:1292:21 | ... + ... | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1292:21:1292:21 | y | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1293:13:1293:13 | z | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1293:17:1293:17 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1293:17:1293:23 | x.abs() | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1294:13:1294:13 | c | | {EXTERNAL LOCATION} | char |
-| main.rs:1294:17:1294:19 | 'c' | | {EXTERNAL LOCATION} | char |
-| main.rs:1295:13:1295:17 | hello | | {EXTERNAL LOCATION} | str |
-| main.rs:1295:21:1295:27 | "Hello" | | {EXTERNAL LOCATION} | str |
-| main.rs:1296:13:1296:13 | f | | {EXTERNAL LOCATION} | f64 |
-| main.rs:1296:17:1296:24 | 123.0f64 | | {EXTERNAL LOCATION} | f64 |
-| main.rs:1297:13:1297:13 | t | | {EXTERNAL LOCATION} | bool |
-| main.rs:1297:17:1297:20 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1298:13:1298:13 | f | | {EXTERNAL LOCATION} | bool |
-| main.rs:1298:17:1298:21 | false | | {EXTERNAL LOCATION} | bool |
-| main.rs:1305:13:1305:13 | x | | {EXTERNAL LOCATION} | bool |
-| main.rs:1305:17:1305:20 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1305:17:1305:29 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1305:25:1305:29 | false | | {EXTERNAL LOCATION} | bool |
-| main.rs:1306:13:1306:13 | y | | {EXTERNAL LOCATION} | bool |
-| main.rs:1306:17:1306:20 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1306:17:1306:29 | ... \|\| ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1306:25:1306:29 | false | | {EXTERNAL LOCATION} | bool |
-| main.rs:1308:13:1308:17 | mut a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1309:13:1309:16 | cond | | {EXTERNAL LOCATION} | bool |
-| main.rs:1309:20:1309:21 | 34 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1309:20:1309:27 | ... == ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1309:26:1309:27 | 33 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1310:12:1310:15 | cond | | {EXTERNAL LOCATION} | bool |
-| main.rs:1311:17:1311:17 | z | | file://:0:0:0:0 | () |
-| main.rs:1311:21:1311:27 | (...) | | file://:0:0:0:0 | () |
-| main.rs:1311:22:1311:22 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1311:22:1311:26 | ... = ... | | file://:0:0:0:0 | () |
-| main.rs:1311:26:1311:26 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1313:13:1313:13 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1313:13:1313:17 | ... = ... | | file://:0:0:0:0 | () |
-| main.rs:1313:17:1313:17 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1315:9:1315:9 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1329:30:1331:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1330:13:1330:31 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1330:23:1330:23 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1330:23:1330:23 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1330:29:1330:29 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1330:29:1330:29 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1337:16:1337:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1337:22:1337:24 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1337:41:1342:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1338:13:1341:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1339:20:1339:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1339:20:1339:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1339:20:1339:33 | ... + ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1339:29:1339:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1339:29:1339:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1340:20:1340:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1340:20:1340:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1340:20:1340:33 | ... + ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1340:29:1340:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1340:29:1340:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1347:23:1347:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1347:23:1347:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1347:34:1347:36 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1348:13:1348:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1348:13:1348:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1348:13:1348:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1348:13:1348:27 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1348:23:1348:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1348:23:1348:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1349:13:1349:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1349:13:1349:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1349:13:1349:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1349:13:1349:27 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1349:23:1349:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1349:23:1349:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1355:16:1355:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1355:22:1355:24 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1355:41:1360:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1356:13:1359:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1357:20:1357:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1357:20:1357:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1357:20:1357:33 | ... - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1357:29:1357:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1357:29:1357:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1358:20:1358:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1358:20:1358:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1358:20:1358:33 | ... - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1358:29:1358:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1358:29:1358:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1365:23:1365:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1365:23:1365:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1365:34:1365:36 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1366:13:1366:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1366:13:1366:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1366:13:1366:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1366:13:1366:27 | ... -= ... | | file://:0:0:0:0 | () |
-| main.rs:1366:23:1366:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1366:23:1366:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1367:13:1367:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1367:13:1367:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1367:13:1367:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1367:13:1367:27 | ... -= ... | | file://:0:0:0:0 | () |
-| main.rs:1367:23:1367:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1367:23:1367:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1373:16:1373:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1373:22:1373:24 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1373:41:1378:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1374:13:1377:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1375:20:1375:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1375:20:1375:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1375:20:1375:33 | ... * ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1375:29:1375:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1375:29:1375:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1376:20:1376:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1376:20:1376:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1376:20:1376:33 | ... * ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1376:29:1376:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1376:29:1376:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1382:23:1382:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1382:23:1382:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1382:34:1382:36 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1088:15:1088:18 | SelfParam | | main.rs:1076:5:1077:19 | S |
+| main.rs:1088:15:1088:18 | SelfParam | T | main.rs:1087:10:1087:10 | T |
+| main.rs:1088:26:1090:9 | { ... } | | main.rs:1087:10:1087:10 | T |
+| main.rs:1089:13:1089:16 | self | | main.rs:1076:5:1077:19 | S |
+| main.rs:1089:13:1089:16 | self | T | main.rs:1087:10:1087:10 | T |
+| main.rs:1089:13:1089:18 | self.0 | | main.rs:1087:10:1087:10 | T |
+| main.rs:1092:15:1092:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1092:15:1092:19 | SelfParam | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1092:15:1092:19 | SelfParam | &T.T | main.rs:1087:10:1087:10 | T |
+| main.rs:1092:28:1094:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1092:28:1094:9 | { ... } | &T | main.rs:1087:10:1087:10 | T |
+| main.rs:1093:13:1093:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1093:13:1093:19 | &... | &T | main.rs:1087:10:1087:10 | T |
+| main.rs:1093:14:1093:17 | self | | file://:0:0:0:0 | & |
+| main.rs:1093:14:1093:17 | self | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1093:14:1093:17 | self | &T.T | main.rs:1087:10:1087:10 | T |
+| main.rs:1093:14:1093:19 | self.0 | | main.rs:1087:10:1087:10 | T |
+| main.rs:1096:15:1096:25 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1096:15:1096:25 | SelfParam | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1096:15:1096:25 | SelfParam | &T.T | main.rs:1087:10:1087:10 | T |
+| main.rs:1096:34:1098:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1096:34:1098:9 | { ... } | &T | main.rs:1087:10:1087:10 | T |
+| main.rs:1097:13:1097:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1097:13:1097:19 | &... | &T | main.rs:1087:10:1087:10 | T |
+| main.rs:1097:14:1097:17 | self | | file://:0:0:0:0 | & |
+| main.rs:1097:14:1097:17 | self | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1097:14:1097:17 | self | &T.T | main.rs:1087:10:1087:10 | T |
+| main.rs:1097:14:1097:19 | self.0 | | main.rs:1087:10:1087:10 | T |
+| main.rs:1102:29:1102:33 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1102:29:1102:33 | SelfParam | &T | main.rs:1101:5:1104:5 | Self [trait ATrait] |
+| main.rs:1103:33:1103:36 | SelfParam | | main.rs:1101:5:1104:5 | Self [trait ATrait] |
+| main.rs:1109:29:1109:33 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1109:29:1109:33 | SelfParam | &T | file://:0:0:0:0 | & |
+| main.rs:1109:29:1109:33 | SelfParam | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1109:29:1109:33 | SelfParam | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1109:29:1109:33 | SelfParam | &T.&T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1109:43:1111:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1110:13:1110:22 | (...) | | file://:0:0:0:0 | & |
+| main.rs:1110:13:1110:22 | (...) | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:13:1110:22 | (...) | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:13:1110:24 | ... .a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1110:14:1110:21 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1110:14:1110:21 | * ... | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:14:1110:21 | * ... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:15:1110:21 | (...) | | file://:0:0:0:0 | & |
+| main.rs:1110:15:1110:21 | (...) | &T | file://:0:0:0:0 | & |
+| main.rs:1110:15:1110:21 | (...) | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:15:1110:21 | (...) | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:16:1110:20 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1110:16:1110:20 | * ... | &T | file://:0:0:0:0 | & |
+| main.rs:1110:16:1110:20 | * ... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:16:1110:20 | * ... | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:17:1110:20 | self | | file://:0:0:0:0 | & |
+| main.rs:1110:17:1110:20 | self | &T | file://:0:0:0:0 | & |
+| main.rs:1110:17:1110:20 | self | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1110:17:1110:20 | self | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1110:17:1110:20 | self | &T.&T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1114:33:1114:36 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1114:33:1114:36 | SelfParam | &T | file://:0:0:0:0 | & |
+| main.rs:1114:33:1114:36 | SelfParam | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1114:33:1114:36 | SelfParam | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1114:46:1116:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1115:13:1115:19 | (...) | | file://:0:0:0:0 | & |
+| main.rs:1115:13:1115:19 | (...) | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1115:13:1115:19 | (...) | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1115:13:1115:21 | ... .a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1115:14:1115:18 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1115:14:1115:18 | * ... | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1115:14:1115:18 | * ... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1115:15:1115:18 | self | | file://:0:0:0:0 | & |
+| main.rs:1115:15:1115:18 | self | &T | file://:0:0:0:0 | & |
+| main.rs:1115:15:1115:18 | self | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1115:15:1115:18 | self | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1120:13:1120:14 | x1 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1120:13:1120:14 | x1 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1120:18:1120:22 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1120:18:1120:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1120:20:1120:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1121:18:1121:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1121:26:1121:27 | x1 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1121:26:1121:27 | x1 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1121:26:1121:32 | x1.m1() | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1123:13:1123:14 | x2 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1123:13:1123:14 | x2 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1123:18:1123:22 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1123:18:1123:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1123:20:1123:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1125:18:1125:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1125:26:1125:27 | x2 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1125:26:1125:27 | x2 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1125:26:1125:32 | x2.m2() | | file://:0:0:0:0 | & |
+| main.rs:1125:26:1125:32 | x2.m2() | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1126:18:1126:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1126:26:1126:27 | x2 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1126:26:1126:27 | x2 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1126:26:1126:32 | x2.m3() | | file://:0:0:0:0 | & |
+| main.rs:1126:26:1126:32 | x2.m3() | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1128:13:1128:14 | x3 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1128:13:1128:14 | x3 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1128:18:1128:22 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1128:18:1128:22 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1128:20:1128:21 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1130:18:1130:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1130:26:1130:41 | ...::m2(...) | | file://:0:0:0:0 | & |
+| main.rs:1130:26:1130:41 | ...::m2(...) | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1130:38:1130:40 | &x3 | | file://:0:0:0:0 | & |
+| main.rs:1130:38:1130:40 | &x3 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1130:38:1130:40 | &x3 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1130:39:1130:40 | x3 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1130:39:1130:40 | x3 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1131:18:1131:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1131:26:1131:41 | ...::m3(...) | | file://:0:0:0:0 | & |
+| main.rs:1131:26:1131:41 | ...::m3(...) | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1131:38:1131:40 | &x3 | | file://:0:0:0:0 | & |
+| main.rs:1131:38:1131:40 | &x3 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1131:38:1131:40 | &x3 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1131:39:1131:40 | x3 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1131:39:1131:40 | x3 | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1133:13:1133:14 | x4 | | file://:0:0:0:0 | & |
+| main.rs:1133:13:1133:14 | x4 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1133:13:1133:14 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1133:18:1133:23 | &... | | file://:0:0:0:0 | & |
+| main.rs:1133:18:1133:23 | &... | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1133:18:1133:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1133:19:1133:23 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1133:19:1133:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1133:21:1133:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1135:18:1135:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1135:26:1135:27 | x4 | | file://:0:0:0:0 | & |
+| main.rs:1135:26:1135:27 | x4 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1135:26:1135:27 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1135:26:1135:32 | x4.m2() | | file://:0:0:0:0 | & |
+| main.rs:1135:26:1135:32 | x4.m2() | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1136:18:1136:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1136:26:1136:27 | x4 | | file://:0:0:0:0 | & |
+| main.rs:1136:26:1136:27 | x4 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1136:26:1136:27 | x4 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1136:26:1136:32 | x4.m3() | | file://:0:0:0:0 | & |
+| main.rs:1136:26:1136:32 | x4.m3() | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1138:13:1138:14 | x5 | | file://:0:0:0:0 | & |
+| main.rs:1138:13:1138:14 | x5 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1138:13:1138:14 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1138:18:1138:23 | &... | | file://:0:0:0:0 | & |
+| main.rs:1138:18:1138:23 | &... | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1138:18:1138:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1138:19:1138:23 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1138:19:1138:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1138:21:1138:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1140:18:1140:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1140:26:1140:27 | x5 | | file://:0:0:0:0 | & |
+| main.rs:1140:26:1140:27 | x5 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1140:26:1140:27 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1140:26:1140:32 | x5.m1() | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1141:18:1141:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1141:26:1141:27 | x5 | | file://:0:0:0:0 | & |
+| main.rs:1141:26:1141:27 | x5 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1141:26:1141:27 | x5 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1141:26:1141:29 | x5.0 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:13:1143:14 | x6 | | file://:0:0:0:0 | & |
+| main.rs:1143:13:1143:14 | x6 | &T | file://:0:0:0:0 | & |
+| main.rs:1143:13:1143:14 | x6 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:13:1143:14 | x6 | &T.&T | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:13:1143:14 | x6 | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:13:1143:14 | x6 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:18:1143:23 | &... | | file://:0:0:0:0 | & |
+| main.rs:1143:18:1143:23 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1143:18:1143:23 | &... | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:18:1143:23 | &... | &T.&T | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:18:1143:23 | &... | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:18:1143:23 | &... | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:19:1143:23 | S(...) | | file://:0:0:0:0 | & |
+| main.rs:1143:19:1143:23 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:19:1143:23 | S(...) | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1143:19:1143:23 | S(...) | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:19:1143:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1143:21:1143:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:18:1146:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1146:26:1146:30 | (...) | | file://:0:0:0:0 | & |
+| main.rs:1146:26:1146:30 | (...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:26:1146:30 | (...) | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:26:1146:30 | (...) | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:26:1146:30 | (...) | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:26:1146:35 | ... .m1() | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:27:1146:29 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1146:27:1146:29 | * ... | | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:27:1146:29 | * ... | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:27:1146:29 | * ... | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:27:1146:29 | * ... | T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:28:1146:29 | x6 | | file://:0:0:0:0 | & |
+| main.rs:1146:28:1146:29 | x6 | &T | file://:0:0:0:0 | & |
+| main.rs:1146:28:1146:29 | x6 | &T | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:28:1146:29 | x6 | &T.&T | main.rs:1076:5:1077:19 | S |
+| main.rs:1146:28:1146:29 | x6 | &T.&T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1146:28:1146:29 | x6 | &T.T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1148:13:1148:14 | x7 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1148:13:1148:14 | x7 | T | file://:0:0:0:0 | & |
+| main.rs:1148:13:1148:14 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1148:18:1148:23 | S(...) | | main.rs:1076:5:1077:19 | S |
+| main.rs:1148:18:1148:23 | S(...) | T | file://:0:0:0:0 | & |
+| main.rs:1148:18:1148:23 | S(...) | T.&T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1148:20:1148:22 | &S2 | | file://:0:0:0:0 | & |
+| main.rs:1148:20:1148:22 | &S2 | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1148:21:1148:22 | S2 | | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1151:13:1151:13 | t | | file://:0:0:0:0 | & |
+| main.rs:1151:13:1151:13 | t | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1151:17:1151:18 | x7 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1151:17:1151:18 | x7 | T | file://:0:0:0:0 | & |
+| main.rs:1151:17:1151:18 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1151:17:1151:23 | x7.m1() | | file://:0:0:0:0 | & |
+| main.rs:1151:17:1151:23 | x7.m1() | &T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1152:18:1152:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1152:26:1152:27 | x7 | | main.rs:1076:5:1077:19 | S |
+| main.rs:1152:26:1152:27 | x7 | T | file://:0:0:0:0 | & |
+| main.rs:1152:26:1152:27 | x7 | T.&T | main.rs:1079:5:1080:14 | S2 |
+| main.rs:1154:13:1154:14 | x9 | | {EXTERNAL LOCATION} | String |
+| main.rs:1154:26:1154:32 | "Hello" | | {EXTERNAL LOCATION} | str |
+| main.rs:1154:26:1154:44 | "Hello".to_string() | | {EXTERNAL LOCATION} | String |
+| main.rs:1158:13:1158:13 | u | | {EXTERNAL LOCATION} | Result |
+| main.rs:1158:13:1158:13 | u | T | {EXTERNAL LOCATION} | u32 |
+| main.rs:1158:17:1158:18 | x9 | | {EXTERNAL LOCATION} | String |
+| main.rs:1158:17:1158:33 | x9.parse() | | {EXTERNAL LOCATION} | Result |
+| main.rs:1158:17:1158:33 | x9.parse() | T | {EXTERNAL LOCATION} | u32 |
+| main.rs:1160:13:1160:20 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1160:13:1160:20 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:24:1160:39 | &... | | file://:0:0:0:0 | & |
+| main.rs:1160:24:1160:39 | &... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:25:1160:39 | MyInt {...} | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:36:1160:37 | 37 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1160:36:1160:37 | 37 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1162:17:1162:24 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1162:17:1162:24 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1163:18:1163:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1166:13:1166:20 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1166:13:1166:20 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1166:24:1166:39 | &... | | file://:0:0:0:0 | & |
+| main.rs:1166:24:1166:39 | &... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1166:25:1166:39 | MyInt {...} | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1166:36:1166:37 | 38 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1166:36:1166:37 | 38 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1167:17:1167:24 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1167:17:1167:24 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1168:18:1168:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1175:16:1175:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1175:16:1175:20 | SelfParam | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
+| main.rs:1178:16:1178:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1178:16:1178:20 | SelfParam | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
+| main.rs:1178:32:1180:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1178:32:1180:9 | { ... } | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
+| main.rs:1179:13:1179:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1179:13:1179:16 | self | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
+| main.rs:1179:13:1179:22 | self.foo() | | file://:0:0:0:0 | & |
+| main.rs:1179:13:1179:22 | self.foo() | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
+| main.rs:1187:16:1187:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1187:16:1187:20 | SelfParam | &T | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1187:36:1189:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1187:36:1189:9 | { ... } | &T | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1188:13:1188:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1188:13:1188:16 | self | &T | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1193:13:1193:13 | x | | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1193:17:1193:24 | MyStruct | | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1194:9:1194:9 | x | | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1194:9:1194:15 | x.bar() | | file://:0:0:0:0 | & |
+| main.rs:1194:9:1194:15 | x.bar() | &T | main.rs:1183:5:1183:20 | MyStruct |
+| main.rs:1204:16:1204:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1204:16:1204:20 | SelfParam | &T | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1204:16:1204:20 | SelfParam | &T.T | main.rs:1203:10:1203:10 | T |
+| main.rs:1204:32:1206:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1204:32:1206:9 | { ... } | &T | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1204:32:1206:9 | { ... } | &T.T | main.rs:1203:10:1203:10 | T |
+| main.rs:1205:13:1205:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1205:13:1205:16 | self | &T | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1205:13:1205:16 | self | &T.T | main.rs:1203:10:1203:10 | T |
+| main.rs:1210:13:1210:13 | x | | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1210:13:1210:13 | x | T | main.rs:1199:5:1199:13 | S |
+| main.rs:1210:17:1210:27 | MyStruct(...) | | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1210:17:1210:27 | MyStruct(...) | T | main.rs:1199:5:1199:13 | S |
+| main.rs:1210:26:1210:26 | S | | main.rs:1199:5:1199:13 | S |
+| main.rs:1211:9:1211:9 | x | | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1211:9:1211:9 | x | T | main.rs:1199:5:1199:13 | S |
+| main.rs:1211:9:1211:15 | x.foo() | | file://:0:0:0:0 | & |
+| main.rs:1211:9:1211:15 | x.foo() | &T | main.rs:1201:5:1201:26 | MyStruct |
+| main.rs:1211:9:1211:15 | x.foo() | &T.T | main.rs:1199:5:1199:13 | S |
+| main.rs:1222:17:1222:25 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1222:17:1222:25 | SelfParam | &T | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1223:13:1223:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1223:13:1223:16 | self | &T | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1223:13:1223:21 | self.bool | | {EXTERNAL LOCATION} | bool |
+| main.rs:1223:13:1223:34 | ... = ... | | file://:0:0:0:0 | () |
+| main.rs:1223:25:1223:34 | ! ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1223:26:1223:29 | self | | file://:0:0:0:0 | & |
+| main.rs:1223:26:1223:29 | self | &T | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1223:26:1223:34 | self.bool | | {EXTERNAL LOCATION} | bool |
+| main.rs:1230:15:1230:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1230:15:1230:19 | SelfParam | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1230:31:1232:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1230:31:1232:9 | { ... } | &T | file://:0:0:0:0 | & |
+| main.rs:1230:31:1232:9 | { ... } | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1230:31:1232:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1230:31:1232:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1230:31:1232:9 | { ... } | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:13:1231:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1231:13:1231:19 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1231:13:1231:19 | &... | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:13:1231:19 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1231:13:1231:19 | &... | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1231:13:1231:19 | &... | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:14:1231:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1231:14:1231:19 | &... | | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:14:1231:19 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1231:14:1231:19 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1231:14:1231:19 | &... | &T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:15:1231:19 | &self | | file://:0:0:0:0 | & |
+| main.rs:1231:15:1231:19 | &self | &T | file://:0:0:0:0 | & |
+| main.rs:1231:15:1231:19 | &self | &T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1231:16:1231:19 | self | | file://:0:0:0:0 | & |
+| main.rs:1231:16:1231:19 | self | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1234:15:1234:25 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1234:15:1234:25 | SelfParam | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1234:37:1236:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1234:37:1236:9 | { ... } | &T | file://:0:0:0:0 | & |
+| main.rs:1234:37:1236:9 | { ... } | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1234:37:1236:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1234:37:1236:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1234:37:1236:9 | { ... } | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:13:1235:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1235:13:1235:19 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1235:13:1235:19 | &... | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:13:1235:19 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1235:13:1235:19 | &... | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1235:13:1235:19 | &... | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:14:1235:19 | &... | | file://:0:0:0:0 | & |
+| main.rs:1235:14:1235:19 | &... | | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:14:1235:19 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1235:14:1235:19 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1235:14:1235:19 | &... | &T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:15:1235:19 | &self | | file://:0:0:0:0 | & |
+| main.rs:1235:15:1235:19 | &self | &T | file://:0:0:0:0 | & |
+| main.rs:1235:15:1235:19 | &self | &T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1235:16:1235:19 | self | | file://:0:0:0:0 | & |
+| main.rs:1235:16:1235:19 | self | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1238:15:1238:15 | x | | file://:0:0:0:0 | & |
+| main.rs:1238:15:1238:15 | x | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1238:34:1240:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1238:34:1240:9 | { ... } | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1239:13:1239:13 | x | | file://:0:0:0:0 | & |
+| main.rs:1239:13:1239:13 | x | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1242:15:1242:15 | x | | file://:0:0:0:0 | & |
+| main.rs:1242:15:1242:15 | x | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1242:34:1244:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1242:34:1244:9 | { ... } | &T | file://:0:0:0:0 | & |
+| main.rs:1242:34:1244:9 | { ... } | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1242:34:1244:9 | { ... } | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1242:34:1244:9 | { ... } | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1242:34:1244:9 | { ... } | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:13:1243:16 | &... | | file://:0:0:0:0 | & |
+| main.rs:1243:13:1243:16 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1243:13:1243:16 | &... | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:13:1243:16 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1243:13:1243:16 | &... | &T.&T.&T | file://:0:0:0:0 | & |
+| main.rs:1243:13:1243:16 | &... | &T.&T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:14:1243:16 | &... | | file://:0:0:0:0 | & |
+| main.rs:1243:14:1243:16 | &... | | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:14:1243:16 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1243:14:1243:16 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1243:14:1243:16 | &... | &T.&T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:15:1243:16 | &x | | file://:0:0:0:0 | & |
+| main.rs:1243:15:1243:16 | &x | &T | file://:0:0:0:0 | & |
+| main.rs:1243:15:1243:16 | &x | &T.&T | main.rs:1227:5:1227:13 | S |
+| main.rs:1243:16:1243:16 | x | | file://:0:0:0:0 | & |
+| main.rs:1243:16:1243:16 | x | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1248:13:1248:13 | x | | main.rs:1227:5:1227:13 | S |
+| main.rs:1248:17:1248:20 | S {...} | | main.rs:1227:5:1227:13 | S |
+| main.rs:1249:9:1249:9 | x | | main.rs:1227:5:1227:13 | S |
+| main.rs:1249:9:1249:14 | x.f1() | | file://:0:0:0:0 | & |
+| main.rs:1249:9:1249:14 | x.f1() | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1250:9:1250:9 | x | | main.rs:1227:5:1227:13 | S |
+| main.rs:1250:9:1250:14 | x.f2() | | file://:0:0:0:0 | & |
+| main.rs:1250:9:1250:14 | x.f2() | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1251:9:1251:17 | ...::f3(...) | | file://:0:0:0:0 | & |
+| main.rs:1251:9:1251:17 | ...::f3(...) | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1251:15:1251:16 | &x | | file://:0:0:0:0 | & |
+| main.rs:1251:15:1251:16 | &x | &T | main.rs:1227:5:1227:13 | S |
+| main.rs:1251:16:1251:16 | x | | main.rs:1227:5:1227:13 | S |
+| main.rs:1253:13:1253:13 | n | | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:13:1253:13 | n | | file://:0:0:0:0 | & |
+| main.rs:1253:17:1253:24 | * ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:17:1253:24 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1253:18:1253:24 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1253:18:1253:24 | * ... | &T | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:18:1253:24 | * ... | &T | file://:0:0:0:0 | & |
+| main.rs:1253:19:1253:24 | &... | | file://:0:0:0:0 | & |
+| main.rs:1253:19:1253:24 | &... | &T | file://:0:0:0:0 | & |
+| main.rs:1253:19:1253:24 | &... | &T.&T | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:19:1253:24 | &... | &T.&T | file://:0:0:0:0 | & |
+| main.rs:1253:20:1253:24 | &true | | file://:0:0:0:0 | & |
+| main.rs:1253:20:1253:24 | &true | &T | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:20:1253:24 | &true | &T | file://:0:0:0:0 | & |
+| main.rs:1253:21:1253:24 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1253:21:1253:24 | true | | file://:0:0:0:0 | & |
+| main.rs:1257:13:1257:20 | mut flag | | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1257:24:1257:41 | ...::default(...) | | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1258:22:1258:30 | &mut flag | | file://:0:0:0:0 | & |
+| main.rs:1258:22:1258:30 | &mut flag | &T | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1258:27:1258:30 | flag | | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1259:18:1259:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1259:26:1259:29 | flag | | main.rs:1216:5:1219:5 | MyFlag |
+| main.rs:1273:43:1276:5 | { ... } | | {EXTERNAL LOCATION} | Result |
+| main.rs:1273:43:1276:5 | { ... } | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1273:43:1276:5 | { ... } | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1274:13:1274:13 | x | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1274:17:1274:30 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1274:17:1274:30 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1274:17:1274:31 | TryExpr | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1274:28:1274:29 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1275:9:1275:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1275:9:1275:22 | ...::Ok(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1275:9:1275:22 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1275:20:1275:21 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1279:46:1283:5 | { ... } | | {EXTERNAL LOCATION} | Result |
+| main.rs:1279:46:1283:5 | { ... } | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1279:46:1283:5 | { ... } | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1280:13:1280:13 | x | | {EXTERNAL LOCATION} | Result |
+| main.rs:1280:13:1280:13 | x | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1280:17:1280:30 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1280:17:1280:30 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1280:28:1280:29 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1281:13:1281:13 | y | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1281:17:1281:17 | x | | {EXTERNAL LOCATION} | Result |
+| main.rs:1281:17:1281:17 | x | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1281:17:1281:18 | TryExpr | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1282:9:1282:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1282:9:1282:22 | ...::Ok(...) | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1282:9:1282:22 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1282:20:1282:21 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1286:40:1291:5 | { ... } | | {EXTERNAL LOCATION} | Result |
+| main.rs:1286:40:1291:5 | { ... } | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1286:40:1291:5 | { ... } | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1287:13:1287:13 | x | | {EXTERNAL LOCATION} | Result |
+| main.rs:1287:13:1287:13 | x | T | {EXTERNAL LOCATION} | Result |
+| main.rs:1287:13:1287:13 | x | T.T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1287:17:1287:42 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1287:17:1287:42 | ...::Ok(...) | T | {EXTERNAL LOCATION} | Result |
+| main.rs:1287:17:1287:42 | ...::Ok(...) | T.T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1287:28:1287:41 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1287:28:1287:41 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1287:39:1287:40 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1289:17:1289:17 | x | | {EXTERNAL LOCATION} | Result |
+| main.rs:1289:17:1289:17 | x | T | {EXTERNAL LOCATION} | Result |
+| main.rs:1289:17:1289:17 | x | T.T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1289:17:1289:18 | TryExpr | | {EXTERNAL LOCATION} | Result |
+| main.rs:1289:17:1289:18 | TryExpr | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1289:17:1289:29 | ... .map(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1290:9:1290:22 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1290:9:1290:22 | ...::Ok(...) | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1290:9:1290:22 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1290:20:1290:21 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1294:30:1294:34 | input | | {EXTERNAL LOCATION} | Result |
+| main.rs:1294:30:1294:34 | input | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1294:30:1294:34 | input | T | main.rs:1294:20:1294:27 | T |
+| main.rs:1294:69:1301:5 | { ... } | | {EXTERNAL LOCATION} | Result |
+| main.rs:1294:69:1301:5 | { ... } | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1294:69:1301:5 | { ... } | T | main.rs:1294:20:1294:27 | T |
+| main.rs:1295:13:1295:17 | value | | main.rs:1294:20:1294:27 | T |
+| main.rs:1295:21:1295:25 | input | | {EXTERNAL LOCATION} | Result |
+| main.rs:1295:21:1295:25 | input | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1295:21:1295:25 | input | T | main.rs:1294:20:1294:27 | T |
+| main.rs:1295:21:1295:26 | TryExpr | | main.rs:1294:20:1294:27 | T |
+| main.rs:1296:22:1296:38 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1296:22:1296:38 | ...::Ok(...) | T | main.rs:1294:20:1294:27 | T |
+| main.rs:1296:22:1299:10 | ... .and_then(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1296:33:1296:37 | value | | main.rs:1294:20:1294:27 | T |
+| main.rs:1296:53:1299:9 | { ... } | | {EXTERNAL LOCATION} | Result |
+| main.rs:1296:53:1299:9 | { ... } | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1297:22:1297:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1298:13:1298:34 | ...::Ok::<...>(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1298:13:1298:34 | ...::Ok::<...>(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1300:9:1300:23 | ...::Err(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1300:9:1300:23 | ...::Err(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1300:9:1300:23 | ...::Err(...) | T | main.rs:1294:20:1294:27 | T |
+| main.rs:1300:21:1300:22 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1304:37:1304:52 | try_same_error(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1304:37:1304:52 | try_same_error(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1304:37:1304:52 | try_same_error(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1305:22:1305:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1308:37:1308:55 | try_convert_error(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1308:37:1308:55 | try_convert_error(...) | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1308:37:1308:55 | try_convert_error(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1309:22:1309:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1312:37:1312:49 | try_chained(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1312:37:1312:49 | try_chained(...) | E | main.rs:1269:5:1270:14 | S2 |
+| main.rs:1312:37:1312:49 | try_chained(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1313:22:1313:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1316:37:1316:63 | try_complex(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1316:37:1316:63 | try_complex(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1316:37:1316:63 | try_complex(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1316:49:1316:62 | ...::Ok(...) | | {EXTERNAL LOCATION} | Result |
+| main.rs:1316:49:1316:62 | ...::Ok(...) | E | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1316:49:1316:62 | ...::Ok(...) | T | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1316:60:1316:61 | S1 | | main.rs:1266:5:1267:14 | S1 |
+| main.rs:1317:22:1317:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1324:13:1324:13 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1324:22:1324:22 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1325:13:1325:13 | y | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1325:17:1325:17 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1326:13:1326:13 | z | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1326:17:1326:17 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1326:17:1326:21 | ... + ... | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1326:21:1326:21 | y | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1327:13:1327:13 | z | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1327:17:1327:17 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1327:17:1327:23 | x.abs() | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1328:13:1328:13 | c | | {EXTERNAL LOCATION} | char |
+| main.rs:1328:17:1328:19 | 'c' | | {EXTERNAL LOCATION} | char |
+| main.rs:1329:13:1329:17 | hello | | {EXTERNAL LOCATION} | str |
+| main.rs:1329:21:1329:27 | "Hello" | | {EXTERNAL LOCATION} | str |
+| main.rs:1330:13:1330:13 | f | | {EXTERNAL LOCATION} | f64 |
+| main.rs:1330:17:1330:24 | 123.0f64 | | {EXTERNAL LOCATION} | f64 |
+| main.rs:1331:13:1331:13 | t | | {EXTERNAL LOCATION} | bool |
+| main.rs:1331:17:1331:20 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1332:13:1332:13 | f | | {EXTERNAL LOCATION} | bool |
+| main.rs:1332:17:1332:21 | false | | {EXTERNAL LOCATION} | bool |
+| main.rs:1339:13:1339:13 | x | | {EXTERNAL LOCATION} | bool |
+| main.rs:1339:17:1339:20 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1339:17:1339:29 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1339:25:1339:29 | false | | {EXTERNAL LOCATION} | bool |
+| main.rs:1340:13:1340:13 | y | | {EXTERNAL LOCATION} | bool |
+| main.rs:1340:17:1340:20 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1340:17:1340:29 | ... \|\| ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1340:25:1340:29 | false | | {EXTERNAL LOCATION} | bool |
+| main.rs:1342:13:1342:17 | mut a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1343:13:1343:16 | cond | | {EXTERNAL LOCATION} | bool |
+| main.rs:1343:20:1343:21 | 34 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1343:20:1343:27 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1343:26:1343:27 | 33 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1344:12:1344:15 | cond | | {EXTERNAL LOCATION} | bool |
+| main.rs:1345:17:1345:17 | z | | file://:0:0:0:0 | () |
+| main.rs:1345:21:1345:27 | (...) | | file://:0:0:0:0 | () |
+| main.rs:1345:22:1345:22 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1345:22:1345:26 | ... = ... | | file://:0:0:0:0 | () |
+| main.rs:1345:26:1345:26 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1347:13:1347:13 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1347:13:1347:17 | ... = ... | | file://:0:0:0:0 | () |
+| main.rs:1347:17:1347:17 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1349:9:1349:9 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1363:30:1365:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1364:13:1364:31 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1364:23:1364:23 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1364:23:1364:23 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1364:29:1364:29 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1364:29:1364:29 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1371:16:1371:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1371:22:1371:24 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1371:41:1376:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1372:13:1375:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1373:20:1373:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1373:20:1373:25 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1373:20:1373:33 | ... + ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1373:29:1373:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1373:29:1373:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1374:20:1374:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1374:20:1374:25 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1374:20:1374:33 | ... + ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1374:29:1374:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1374:29:1374:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1381:23:1381:31 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1381:23:1381:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1381:34:1381:36 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1382:13:1382:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1382:13:1382:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1382:13:1382:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1382:13:1382:27 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1382:23:1382:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1382:23:1382:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1383:13:1383:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1383:13:1383:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1383:13:1383:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1383:13:1383:27 | ... *= ... | | file://:0:0:0:0 | () |
-| main.rs:1383:23:1383:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1383:23:1383:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1384:13:1384:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1384:13:1384:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1384:13:1384:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1384:13:1384:27 | ... *= ... | | file://:0:0:0:0 | () |
-| main.rs:1384:23:1384:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1384:23:1384:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1390:16:1390:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1390:22:1390:24 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1390:41:1395:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1391:13:1394:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1392:20:1392:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1392:20:1392:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1392:20:1392:33 | ... / ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1392:29:1392:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1392:29:1392:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1393:20:1393:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1393:20:1393:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1393:20:1393:33 | ... / ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1393:29:1393:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1393:29:1393:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1383:13:1383:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1383:13:1383:18 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1383:13:1383:27 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1383:23:1383:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1383:23:1383:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1389:16:1389:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1389:22:1389:24 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1389:41:1394:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1390:13:1393:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1391:20:1391:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1391:20:1391:25 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1391:20:1391:33 | ... - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1391:29:1391:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1391:29:1391:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1392:20:1392:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1392:20:1392:25 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1392:20:1392:33 | ... - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1392:29:1392:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1392:29:1392:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
| main.rs:1399:23:1399:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1399:23:1399:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1399:34:1399:36 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1399:23:1399:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1399:34:1399:36 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1400:13:1400:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1400:13:1400:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1400:13:1400:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1400:13:1400:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1400:13:1400:27 | ... /= ... | | file://:0:0:0:0 | () |
-| main.rs:1400:23:1400:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1400:13:1400:27 | ... -= ... | | file://:0:0:0:0 | () |
+| main.rs:1400:23:1400:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1400:23:1400:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1401:13:1401:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1401:13:1401:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1401:13:1401:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1401:13:1401:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1401:13:1401:27 | ... /= ... | | file://:0:0:0:0 | () |
-| main.rs:1401:23:1401:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1401:13:1401:27 | ... -= ... | | file://:0:0:0:0 | () |
+| main.rs:1401:23:1401:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1401:23:1401:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1407:16:1407:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1407:22:1407:24 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1407:41:1412:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1408:13:1411:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1409:20:1409:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1407:16:1407:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1407:22:1407:24 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1407:41:1412:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1408:13:1411:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1409:20:1409:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1409:20:1409:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1409:20:1409:33 | ... % ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1409:29:1409:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1409:20:1409:33 | ... * ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1409:29:1409:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1409:29:1409:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1410:20:1410:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1410:20:1410:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1410:20:1410:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1410:20:1410:33 | ... % ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1410:29:1410:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1410:20:1410:33 | ... * ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1410:29:1410:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1410:29:1410:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
| main.rs:1416:23:1416:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1416:23:1416:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1416:34:1416:36 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1416:23:1416:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1416:34:1416:36 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1417:13:1417:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1417:13:1417:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1417:13:1417:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1417:13:1417:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1417:13:1417:27 | ... %= ... | | file://:0:0:0:0 | () |
-| main.rs:1417:23:1417:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1417:13:1417:27 | ... *= ... | | file://:0:0:0:0 | () |
+| main.rs:1417:23:1417:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1417:23:1417:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1418:13:1418:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1418:13:1418:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1418:13:1418:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1418:13:1418:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1418:13:1418:27 | ... %= ... | | file://:0:0:0:0 | () |
-| main.rs:1418:23:1418:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1418:13:1418:27 | ... *= ... | | file://:0:0:0:0 | () |
+| main.rs:1418:23:1418:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1418:23:1418:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1424:19:1424:22 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1424:25:1424:27 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1424:44:1429:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1425:13:1428:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1426:20:1426:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1424:16:1424:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1424:22:1424:24 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1424:41:1429:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1425:13:1428:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1426:20:1426:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1426:20:1426:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1426:20:1426:33 | ... & ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1426:29:1426:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1426:20:1426:33 | ... / ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1426:29:1426:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1426:29:1426:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1427:20:1427:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1427:20:1427:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1427:20:1427:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1427:20:1427:33 | ... & ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1427:29:1427:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1427:20:1427:33 | ... / ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1427:29:1427:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1427:29:1427:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1433:26:1433:34 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1433:26:1433:34 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1433:37:1433:39 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1433:23:1433:31 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1433:23:1433:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1433:34:1433:36 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1434:13:1434:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1434:13:1434:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1434:13:1434:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1434:13:1434:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1434:13:1434:27 | ... &= ... | | file://:0:0:0:0 | () |
-| main.rs:1434:23:1434:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1434:13:1434:27 | ... /= ... | | file://:0:0:0:0 | () |
+| main.rs:1434:23:1434:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1434:23:1434:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1435:13:1435:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1435:13:1435:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1435:13:1435:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1435:13:1435:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1435:13:1435:27 | ... &= ... | | file://:0:0:0:0 | () |
-| main.rs:1435:23:1435:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1435:13:1435:27 | ... /= ... | | file://:0:0:0:0 | () |
+| main.rs:1435:23:1435:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1435:23:1435:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1441:18:1441:21 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1441:24:1441:26 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1441:43:1446:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1442:13:1445:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1443:20:1443:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1441:16:1441:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1441:22:1441:24 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1441:41:1446:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1442:13:1445:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1443:20:1443:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1443:20:1443:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1443:20:1443:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1443:29:1443:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1443:20:1443:33 | ... % ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1443:29:1443:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1443:29:1443:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1444:20:1444:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1444:20:1444:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1444:20:1444:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1444:20:1444:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1444:29:1444:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1444:20:1444:33 | ... % ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1444:29:1444:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1444:29:1444:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1450:25:1450:33 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1450:25:1450:33 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1450:36:1450:38 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1450:23:1450:31 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1450:23:1450:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1450:34:1450:36 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1451:13:1451:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1451:13:1451:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1451:13:1451:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1451:13:1451:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1451:13:1451:27 | ... \|= ... | | file://:0:0:0:0 | () |
-| main.rs:1451:23:1451:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1451:13:1451:27 | ... %= ... | | file://:0:0:0:0 | () |
+| main.rs:1451:23:1451:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1451:23:1451:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1452:13:1452:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1452:13:1452:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1452:13:1452:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1452:13:1452:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1452:13:1452:27 | ... \|= ... | | file://:0:0:0:0 | () |
-| main.rs:1452:23:1452:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1452:13:1452:27 | ... %= ... | | file://:0:0:0:0 | () |
+| main.rs:1452:23:1452:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1452:23:1452:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1458:19:1458:22 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1458:25:1458:27 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1458:44:1463:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1459:13:1462:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1460:20:1460:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1458:19:1458:22 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1458:25:1458:27 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1458:44:1463:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1459:13:1462:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1460:20:1460:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1460:20:1460:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1460:20:1460:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1460:29:1460:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1460:20:1460:33 | ... & ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1460:29:1460:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1460:29:1460:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1461:20:1461:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1461:20:1461:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1461:20:1461:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1461:20:1461:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1461:29:1461:31 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1461:20:1461:33 | ... & ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1461:29:1461:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1461:29:1461:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
| main.rs:1467:26:1467:34 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1467:26:1467:34 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1467:37:1467:39 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1467:26:1467:34 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1467:37:1467:39 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1468:13:1468:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1468:13:1468:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1468:13:1468:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1468:13:1468:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1468:13:1468:27 | ... ^= ... | | file://:0:0:0:0 | () |
-| main.rs:1468:23:1468:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1468:13:1468:27 | ... &= ... | | file://:0:0:0:0 | () |
+| main.rs:1468:23:1468:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1468:23:1468:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1469:13:1469:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1469:13:1469:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1469:13:1469:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1469:13:1469:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1469:13:1469:27 | ... ^= ... | | file://:0:0:0:0 | () |
-| main.rs:1469:23:1469:25 | rhs | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1469:13:1469:27 | ... &= ... | | file://:0:0:0:0 | () |
+| main.rs:1469:23:1469:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1469:23:1469:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1475:16:1475:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1475:22:1475:24 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1475:40:1480:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1476:13:1479:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1477:20:1477:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1475:18:1475:21 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1475:24:1475:26 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1475:43:1480:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1476:13:1479:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1477:20:1477:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1477:20:1477:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1477:20:1477:32 | ... << ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1477:30:1477:32 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1478:20:1478:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1477:20:1477:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1477:29:1477:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1477:29:1477:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1478:20:1478:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1478:20:1478:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1478:20:1478:32 | ... << ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1478:30:1478:32 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1484:23:1484:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1484:23:1484:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1484:34:1484:36 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1478:20:1478:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1478:29:1478:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1478:29:1478:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1484:25:1484:33 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1484:25:1484:33 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1484:36:1484:38 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1485:13:1485:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1485:13:1485:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1485:13:1485:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1485:13:1485:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1485:13:1485:26 | ... <<= ... | | file://:0:0:0:0 | () |
-| main.rs:1485:24:1485:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1485:13:1485:27 | ... \|= ... | | file://:0:0:0:0 | () |
+| main.rs:1485:23:1485:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1485:23:1485:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1486:13:1486:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1486:13:1486:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1486:13:1486:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1486:13:1486:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1486:13:1486:26 | ... <<= ... | | file://:0:0:0:0 | () |
-| main.rs:1486:24:1486:26 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1492:16:1492:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1492:22:1492:24 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1492:40:1497:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1493:13:1496:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1494:20:1494:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1486:13:1486:27 | ... \|= ... | | file://:0:0:0:0 | () |
+| main.rs:1486:23:1486:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1486:23:1486:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1492:19:1492:22 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1492:25:1492:27 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1492:44:1497:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1493:13:1496:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1494:20:1494:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1494:20:1494:25 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1494:20:1494:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1494:30:1494:32 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1495:20:1495:23 | self | | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1494:20:1494:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1494:29:1494:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1494:29:1494:33 | rhs.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1495:20:1495:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1495:20:1495:25 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1495:20:1495:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1495:30:1495:32 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1501:23:1501:31 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1501:23:1501:31 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1501:34:1501:36 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1495:20:1495:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1495:29:1495:31 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1495:29:1495:33 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1501:26:1501:34 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1501:26:1501:34 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1501:37:1501:39 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1502:13:1502:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1502:13:1502:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1502:13:1502:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1502:13:1502:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1502:13:1502:26 | ... >>= ... | | file://:0:0:0:0 | () |
-| main.rs:1502:24:1502:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1502:13:1502:27 | ... ^= ... | | file://:0:0:0:0 | () |
+| main.rs:1502:23:1502:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1502:23:1502:27 | rhs.x | | {EXTERNAL LOCATION} | i64 |
| main.rs:1503:13:1503:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1503:13:1503:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
+| main.rs:1503:13:1503:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
| main.rs:1503:13:1503:18 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1503:13:1503:26 | ... >>= ... | | file://:0:0:0:0 | () |
-| main.rs:1503:24:1503:26 | rhs | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1509:16:1509:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1509:30:1514:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1510:13:1513:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1511:20:1511:26 | - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1511:21:1511:24 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1511:21:1511:26 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1512:20:1512:26 | - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1512:21:1512:24 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1512:21:1512:26 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1519:16:1519:19 | SelfParam | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1519:30:1524:9 | { ... } | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1520:13:1523:13 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1521:20:1521:26 | ! ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1521:21:1521:24 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1521:21:1521:26 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1522:20:1522:26 | ! ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1522:21:1522:24 | self | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1522:21:1522:26 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1528:15:1528:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1528:15:1528:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1528:22:1528:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1528:22:1528:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1528:44:1530:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1529:13:1529:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1529:13:1529:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1529:13:1529:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1529:13:1529:29 | ... == ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1529:13:1529:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1529:23:1529:27 | other | | file://:0:0:0:0 | & |
-| main.rs:1529:23:1529:27 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1529:23:1529:29 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1529:34:1529:37 | self | | file://:0:0:0:0 | & |
-| main.rs:1529:34:1529:37 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1529:34:1529:39 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1529:34:1529:50 | ... == ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1529:44:1529:48 | other | | file://:0:0:0:0 | & |
-| main.rs:1529:44:1529:48 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1529:44:1529:50 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1532:15:1532:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1532:15:1532:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1532:22:1532:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1532:22:1532:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1532:44:1534:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1533:13:1533:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1533:13:1533:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1533:13:1533:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1533:13:1533:29 | ... != ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1533:13:1533:50 | ... \|\| ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1533:23:1533:27 | other | | file://:0:0:0:0 | & |
-| main.rs:1533:23:1533:27 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1533:23:1533:29 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1533:34:1533:37 | self | | file://:0:0:0:0 | & |
-| main.rs:1533:34:1533:37 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1533:34:1533:39 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1533:34:1533:50 | ... != ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1533:44:1533:48 | other | | file://:0:0:0:0 | & |
-| main.rs:1533:44:1533:48 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1533:44:1533:50 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1538:24:1538:28 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1538:24:1538:28 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1538:31:1538:35 | other | | file://:0:0:0:0 | & |
-| main.rs:1538:31:1538:35 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1538:75:1540:9 | { ... } | | {EXTERNAL LOCATION} | Option |
-| main.rs:1538:75:1540:9 | { ... } | T | {EXTERNAL LOCATION} | Ordering |
-| main.rs:1539:13:1539:29 | (...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:13:1539:63 | ... .partial_cmp(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1539:13:1539:63 | ... .partial_cmp(...) | T | {EXTERNAL LOCATION} | Ordering |
-| main.rs:1539:14:1539:17 | self | | file://:0:0:0:0 | & |
-| main.rs:1539:14:1539:17 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1539:14:1539:19 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:14:1539:28 | ... + ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:23:1539:26 | self | | file://:0:0:0:0 | & |
-| main.rs:1539:23:1539:26 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1539:23:1539:28 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:43:1539:62 | &... | | file://:0:0:0:0 | & |
-| main.rs:1539:43:1539:62 | &... | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:44:1539:62 | (...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:45:1539:49 | other | | file://:0:0:0:0 | & |
-| main.rs:1539:45:1539:49 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1539:45:1539:51 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:45:1539:61 | ... + ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1539:55:1539:59 | other | | file://:0:0:0:0 | & |
-| main.rs:1539:55:1539:59 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1539:55:1539:61 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1542:15:1542:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1542:15:1542:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1542:22:1542:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1542:22:1542:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1542:44:1544:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1543:13:1543:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1543:13:1543:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1543:13:1543:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1543:13:1543:28 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1543:13:1543:48 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1543:22:1543:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1543:22:1543:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1543:22:1543:28 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1543:33:1543:36 | self | | file://:0:0:0:0 | & |
-| main.rs:1543:33:1543:36 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1543:33:1543:38 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1543:33:1543:48 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1543:42:1543:46 | other | | file://:0:0:0:0 | & |
-| main.rs:1543:42:1543:46 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1543:42:1543:48 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1546:15:1546:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1546:15:1546:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1546:22:1546:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1546:22:1546:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1546:44:1548:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1547:13:1547:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1547:13:1547:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1547:13:1547:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1547:13:1547:29 | ... <= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1547:13:1547:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1547:23:1547:27 | other | | file://:0:0:0:0 | & |
-| main.rs:1547:23:1547:27 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1547:23:1547:29 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1547:34:1547:37 | self | | file://:0:0:0:0 | & |
-| main.rs:1547:34:1547:37 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1547:34:1547:39 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1547:34:1547:50 | ... <= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1547:44:1547:48 | other | | file://:0:0:0:0 | & |
-| main.rs:1547:44:1547:48 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1547:44:1547:50 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1550:15:1550:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1550:15:1550:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1550:22:1550:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1550:22:1550:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1550:44:1552:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1551:13:1551:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1551:13:1551:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1551:13:1551:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1551:13:1551:28 | ... > ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1551:13:1551:48 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1551:22:1551:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1551:22:1551:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1551:22:1551:28 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1551:33:1551:36 | self | | file://:0:0:0:0 | & |
-| main.rs:1551:33:1551:36 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1551:33:1551:38 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1551:33:1551:48 | ... > ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1551:42:1551:46 | other | | file://:0:0:0:0 | & |
-| main.rs:1551:42:1551:46 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1551:42:1551:48 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1554:15:1554:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1554:15:1554:19 | SelfParam | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1554:22:1554:26 | other | | file://:0:0:0:0 | & |
-| main.rs:1554:22:1554:26 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1554:44:1556:9 | { ... } | | {EXTERNAL LOCATION} | bool |
-| main.rs:1555:13:1555:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1555:13:1555:16 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1555:13:1555:18 | self.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1555:13:1555:29 | ... >= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1555:13:1555:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1555:23:1555:27 | other | | file://:0:0:0:0 | & |
-| main.rs:1555:23:1555:27 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1555:23:1555:29 | other.x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1555:34:1555:37 | self | | file://:0:0:0:0 | & |
-| main.rs:1555:34:1555:37 | self | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1555:34:1555:39 | self.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1555:34:1555:50 | ... >= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1555:44:1555:48 | other | | file://:0:0:0:0 | & |
-| main.rs:1555:44:1555:48 | other | &T | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1555:44:1555:50 | other.y | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1562:13:1562:18 | i64_eq | | {EXTERNAL LOCATION} | bool |
-| main.rs:1562:22:1562:35 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1562:23:1562:26 | 1i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1562:23:1562:34 | ... == ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1562:31:1562:34 | 2i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1563:13:1563:18 | i64_ne | | {EXTERNAL LOCATION} | bool |
-| main.rs:1563:22:1563:35 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1563:23:1563:26 | 3i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1563:23:1563:34 | ... != ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1563:31:1563:34 | 4i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1564:13:1564:18 | i64_lt | | {EXTERNAL LOCATION} | bool |
-| main.rs:1564:22:1564:34 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1564:23:1564:26 | 5i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1564:23:1564:33 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1564:30:1564:33 | 6i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1565:13:1565:18 | i64_le | | {EXTERNAL LOCATION} | bool |
-| main.rs:1565:22:1565:35 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1565:23:1565:26 | 7i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1565:23:1565:34 | ... <= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1565:31:1565:34 | 8i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1566:13:1566:18 | i64_gt | | {EXTERNAL LOCATION} | bool |
-| main.rs:1566:22:1566:35 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1566:23:1566:26 | 9i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1566:23:1566:34 | ... > ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1566:30:1566:34 | 10i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1567:13:1567:18 | i64_ge | | {EXTERNAL LOCATION} | bool |
-| main.rs:1567:22:1567:37 | (...) | | {EXTERNAL LOCATION} | bool |
-| main.rs:1567:23:1567:27 | 11i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1567:23:1567:36 | ... >= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1567:32:1567:36 | 12i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1570:13:1570:19 | i64_add | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1570:23:1570:27 | 13i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1570:23:1570:35 | ... + ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1570:31:1570:35 | 14i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1571:13:1571:19 | i64_sub | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1571:23:1571:27 | 15i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1571:23:1571:35 | ... - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1571:31:1571:35 | 16i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1572:13:1572:19 | i64_mul | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1572:23:1572:27 | 17i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1572:23:1572:35 | ... * ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1572:31:1572:35 | 18i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1573:13:1573:19 | i64_div | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1573:23:1573:27 | 19i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1573:23:1573:35 | ... / ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1573:31:1573:35 | 20i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1574:13:1574:19 | i64_rem | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1574:23:1574:27 | 21i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1574:23:1574:35 | ... % ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1574:31:1574:35 | 22i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1577:13:1577:30 | mut i64_add_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1577:34:1577:38 | 23i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1578:9:1578:22 | i64_add_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1578:9:1578:31 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1578:27:1578:31 | 24i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1580:13:1580:30 | mut i64_sub_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1580:34:1580:38 | 25i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1581:9:1581:22 | i64_sub_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1581:9:1581:31 | ... -= ... | | file://:0:0:0:0 | () |
-| main.rs:1581:27:1581:31 | 26i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1583:13:1583:30 | mut i64_mul_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1583:34:1583:38 | 27i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1584:9:1584:22 | i64_mul_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1584:9:1584:31 | ... *= ... | | file://:0:0:0:0 | () |
-| main.rs:1584:27:1584:31 | 28i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1586:13:1586:30 | mut i64_div_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1586:34:1586:38 | 29i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1587:9:1587:22 | i64_div_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1587:9:1587:31 | ... /= ... | | file://:0:0:0:0 | () |
-| main.rs:1587:27:1587:31 | 30i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1589:13:1589:30 | mut i64_rem_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1589:34:1589:38 | 31i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1590:9:1590:22 | i64_rem_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1590:9:1590:31 | ... %= ... | | file://:0:0:0:0 | () |
-| main.rs:1590:27:1590:31 | 32i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1593:13:1593:22 | i64_bitand | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1593:26:1593:30 | 33i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1593:26:1593:38 | ... & ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1593:34:1593:38 | 34i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1594:13:1594:21 | i64_bitor | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1594:25:1594:29 | 35i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1594:25:1594:37 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1594:33:1594:37 | 36i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1595:13:1595:22 | i64_bitxor | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1595:26:1595:30 | 37i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1595:26:1595:38 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1595:34:1595:38 | 38i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1596:13:1596:19 | i64_shl | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1596:23:1596:27 | 39i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1596:23:1596:36 | ... << ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1596:32:1596:36 | 40i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1597:13:1597:19 | i64_shr | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1597:23:1597:27 | 41i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1597:23:1597:36 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1597:32:1597:36 | 42i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1600:13:1600:33 | mut i64_bitand_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1600:37:1600:41 | 43i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1601:9:1601:25 | i64_bitand_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1601:9:1601:34 | ... &= ... | | file://:0:0:0:0 | () |
-| main.rs:1601:30:1601:34 | 44i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1603:13:1603:32 | mut i64_bitor_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1603:36:1603:40 | 45i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1604:9:1604:24 | i64_bitor_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1604:9:1604:33 | ... \|= ... | | file://:0:0:0:0 | () |
-| main.rs:1604:29:1604:33 | 46i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1606:13:1606:33 | mut i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1606:37:1606:41 | 47i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1607:9:1607:25 | i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1607:9:1607:34 | ... ^= ... | | file://:0:0:0:0 | () |
-| main.rs:1607:30:1607:34 | 48i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1609:13:1609:30 | mut i64_shl_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1609:34:1609:38 | 49i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1610:9:1610:22 | i64_shl_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1610:9:1610:32 | ... <<= ... | | file://:0:0:0:0 | () |
-| main.rs:1610:28:1610:32 | 50i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1612:13:1612:30 | mut i64_shr_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1612:34:1612:38 | 51i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1613:9:1613:22 | i64_shr_assign | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1613:9:1613:32 | ... >>= ... | | file://:0:0:0:0 | () |
-| main.rs:1613:28:1613:32 | 52i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1615:13:1615:19 | i64_neg | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1615:23:1615:28 | - ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1615:24:1615:28 | 53i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1616:13:1616:19 | i64_not | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1616:23:1616:28 | ! ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1616:24:1616:28 | 54i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1619:13:1619:14 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1619:18:1619:36 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1619:28:1619:28 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1619:28:1619:28 | 1 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1619:34:1619:34 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1619:34:1619:34 | 2 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1620:13:1620:14 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1620:18:1620:36 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1620:28:1620:28 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1620:28:1620:28 | 3 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1620:34:1620:34 | 4 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1620:34:1620:34 | 4 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1623:13:1623:19 | vec2_eq | | {EXTERNAL LOCATION} | bool |
-| main.rs:1623:23:1623:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1623:23:1623:30 | ... == ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1623:29:1623:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1624:13:1624:19 | vec2_ne | | {EXTERNAL LOCATION} | bool |
-| main.rs:1624:23:1624:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1624:23:1624:30 | ... != ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1624:29:1624:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1625:13:1625:19 | vec2_lt | | {EXTERNAL LOCATION} | bool |
-| main.rs:1625:23:1625:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1625:23:1625:29 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1625:28:1625:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1626:13:1626:19 | vec2_le | | {EXTERNAL LOCATION} | bool |
-| main.rs:1626:23:1626:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1626:23:1626:30 | ... <= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1626:29:1626:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1627:13:1627:19 | vec2_gt | | {EXTERNAL LOCATION} | bool |
-| main.rs:1627:23:1627:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1627:23:1627:29 | ... > ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1627:28:1627:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1628:13:1628:19 | vec2_ge | | {EXTERNAL LOCATION} | bool |
-| main.rs:1628:23:1628:24 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1628:23:1628:30 | ... >= ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1628:29:1628:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1631:13:1631:20 | vec2_add | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1631:24:1631:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1631:24:1631:30 | ... + ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1631:29:1631:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1632:13:1632:20 | vec2_sub | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1632:24:1632:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1632:24:1632:30 | ... - ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1632:29:1632:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1633:13:1633:20 | vec2_mul | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1633:24:1633:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1633:24:1633:30 | ... * ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1633:29:1633:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1634:13:1634:20 | vec2_div | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1634:24:1634:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1634:24:1634:30 | ... / ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1634:29:1634:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1635:13:1635:20 | vec2_rem | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1635:24:1635:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1635:24:1635:30 | ... % ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1635:29:1635:30 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1638:13:1638:31 | mut vec2_add_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1638:35:1638:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1639:9:1639:23 | vec2_add_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1639:9:1639:29 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1639:28:1639:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1641:13:1641:31 | mut vec2_sub_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1641:35:1641:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1642:9:1642:23 | vec2_sub_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1642:9:1642:29 | ... -= ... | | file://:0:0:0:0 | () |
-| main.rs:1642:28:1642:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1644:13:1644:31 | mut vec2_mul_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1644:35:1644:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1645:9:1645:23 | vec2_mul_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1645:9:1645:29 | ... *= ... | | file://:0:0:0:0 | () |
-| main.rs:1645:28:1645:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1647:13:1647:31 | mut vec2_div_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1647:35:1647:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1648:9:1648:23 | vec2_div_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1648:9:1648:29 | ... /= ... | | file://:0:0:0:0 | () |
-| main.rs:1648:28:1648:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1650:13:1650:31 | mut vec2_rem_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1650:35:1650:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1651:9:1651:23 | vec2_rem_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1651:9:1651:29 | ... %= ... | | file://:0:0:0:0 | () |
-| main.rs:1651:28:1651:29 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1654:13:1654:23 | vec2_bitand | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1654:27:1654:28 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1654:27:1654:33 | ... & ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1654:32:1654:33 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1655:13:1655:22 | vec2_bitor | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1655:26:1655:27 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1655:26:1655:32 | ... \| ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1655:31:1655:32 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1656:13:1656:23 | vec2_bitxor | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1656:27:1656:28 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1656:27:1656:33 | ... ^ ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1656:32:1656:33 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1657:13:1657:20 | vec2_shl | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1657:24:1657:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1657:24:1657:33 | ... << ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1657:30:1657:33 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1658:13:1658:20 | vec2_shr | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1658:24:1658:25 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1658:24:1658:33 | ... >> ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1658:30:1658:33 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1661:13:1661:34 | mut vec2_bitand_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1661:38:1661:39 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1662:9:1662:26 | vec2_bitand_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1662:9:1662:32 | ... &= ... | | file://:0:0:0:0 | () |
-| main.rs:1662:31:1662:32 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1664:13:1664:33 | mut vec2_bitor_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1664:37:1664:38 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1665:9:1665:25 | vec2_bitor_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1665:9:1665:31 | ... \|= ... | | file://:0:0:0:0 | () |
-| main.rs:1665:30:1665:31 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1667:13:1667:34 | mut vec2_bitxor_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1667:38:1667:39 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1668:9:1668:26 | vec2_bitxor_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1668:9:1668:32 | ... ^= ... | | file://:0:0:0:0 | () |
-| main.rs:1668:31:1668:32 | v2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1670:13:1670:31 | mut vec2_shl_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1670:35:1670:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1671:9:1671:23 | vec2_shl_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1671:9:1671:32 | ... <<= ... | | file://:0:0:0:0 | () |
-| main.rs:1671:29:1671:32 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1673:13:1673:31 | mut vec2_shr_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1673:35:1673:36 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1674:9:1674:23 | vec2_shr_assign | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1674:9:1674:32 | ... >>= ... | | file://:0:0:0:0 | () |
-| main.rs:1674:29:1674:32 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1677:13:1677:20 | vec2_neg | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1677:24:1677:26 | - ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1677:25:1677:26 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1678:13:1678:20 | vec2_not | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1678:24:1678:26 | ! ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1678:25:1678:26 | v1 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1681:13:1681:24 | default_vec2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1681:28:1681:45 | ...::default(...) | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1682:13:1682:26 | vec2_zero_plus | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1682:30:1682:48 | Vec2 {...} | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1682:30:1682:63 | ... + ... | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1682:40:1682:40 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1682:40:1682:40 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1682:46:1682:46 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1682:46:1682:46 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1682:52:1682:63 | default_vec2 | | main.rs:1322:5:1327:5 | Vec2 |
-| main.rs:1692:18:1692:21 | SelfParam | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1695:25:1697:5 | { ... } | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1696:9:1696:10 | S1 | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1699:41:1701:5 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1699:41:1701:5 | { ... } | | main.rs:1699:16:1699:39 | ImplTraitTypeRepr |
-| main.rs:1699:41:1701:5 | { ... } | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1700:9:1700:20 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1700:9:1700:20 | { ... } | | main.rs:1699:16:1699:39 | ImplTraitTypeRepr |
-| main.rs:1700:9:1700:20 | { ... } | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1700:17:1700:18 | S1 | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1709:13:1709:42 | SelfParam | | {EXTERNAL LOCATION} | Pin |
-| main.rs:1709:13:1709:42 | SelfParam | Ptr | file://:0:0:0:0 | & |
-| main.rs:1709:13:1709:42 | SelfParam | Ptr.&T | main.rs:1703:5:1703:14 | S2 |
-| main.rs:1710:13:1710:15 | _cx | | file://:0:0:0:0 | & |
-| main.rs:1710:13:1710:15 | _cx | &T | {EXTERNAL LOCATION} | Context |
-| main.rs:1711:44:1713:9 | { ... } | | {EXTERNAL LOCATION} | Poll |
-| main.rs:1711:44:1713:9 | { ... } | T | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1712:13:1712:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll |
-| main.rs:1712:13:1712:38 | ...::Ready(...) | T | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1712:36:1712:37 | S1 | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1716:41:1718:5 | { ... } | | main.rs:1703:5:1703:14 | S2 |
-| main.rs:1716:41:1718:5 | { ... } | | main.rs:1716:16:1716:39 | ImplTraitTypeRepr |
-| main.rs:1717:9:1717:10 | S2 | | main.rs:1703:5:1703:14 | S2 |
-| main.rs:1717:9:1717:10 | S2 | | main.rs:1716:16:1716:39 | ImplTraitTypeRepr |
-| main.rs:1721:9:1721:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1721:9:1721:12 | f1(...) | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1721:9:1721:18 | await ... | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1722:9:1722:12 | f2(...) | | main.rs:1699:16:1699:39 | ImplTraitTypeRepr |
-| main.rs:1722:9:1722:18 | await ... | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1723:9:1723:12 | f3(...) | | main.rs:1716:16:1716:39 | ImplTraitTypeRepr |
-| main.rs:1723:9:1723:18 | await ... | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1724:9:1724:10 | S2 | | main.rs:1703:5:1703:14 | S2 |
-| main.rs:1724:9:1724:16 | await S2 | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1725:13:1725:13 | b | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1725:13:1725:13 | b | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1725:17:1725:28 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1725:17:1725:28 | { ... } | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1725:25:1725:26 | S1 | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1726:9:1726:9 | b | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1726:9:1726:9 | b | Output | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1726:9:1726:15 | await b | | main.rs:1689:5:1689:14 | S1 |
-| main.rs:1735:15:1735:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1735:15:1735:19 | SelfParam | &T | main.rs:1734:5:1736:5 | Self [trait Trait1] |
-| main.rs:1739:15:1739:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1739:15:1739:19 | SelfParam | &T | main.rs:1738:5:1740:5 | Self [trait Trait2] |
-| main.rs:1743:15:1743:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1743:15:1743:19 | SelfParam | &T | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1747:15:1747:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1747:15:1747:19 | SelfParam | &T | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1750:37:1752:5 | { ... } | | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1750:37:1752:5 | { ... } | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1751:9:1751:10 | S1 | | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1751:9:1751:10 | S1 | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1755:18:1755:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1755:18:1755:22 | SelfParam | &T | main.rs:1754:5:1756:5 | Self [trait MyTrait] |
-| main.rs:1759:18:1759:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1759:18:1759:22 | SelfParam | &T | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1759:31:1761:9 | { ... } | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1760:13:1760:14 | S2 | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1764:45:1766:5 | { ... } | | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1764:45:1766:5 | { ... } | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1765:9:1765:10 | S1 | | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1765:9:1765:10 | S1 | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1768:41:1768:41 | t | | main.rs:1768:26:1768:38 | B |
-| main.rs:1768:52:1770:5 | { ... } | | main.rs:1768:23:1768:23 | A |
-| main.rs:1769:9:1769:9 | t | | main.rs:1768:26:1768:38 | B |
-| main.rs:1769:9:1769:17 | t.get_a() | | main.rs:1768:23:1768:23 | A |
-| main.rs:1772:26:1772:26 | t | | main.rs:1772:29:1772:43 | ImplTraitTypeRepr |
-| main.rs:1772:51:1774:5 | { ... } | | main.rs:1772:23:1772:23 | A |
-| main.rs:1773:9:1773:9 | t | | main.rs:1772:29:1772:43 | ImplTraitTypeRepr |
-| main.rs:1773:9:1773:17 | t.get_a() | | main.rs:1772:23:1772:23 | A |
-| main.rs:1777:13:1777:13 | x | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1777:17:1777:20 | f1(...) | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1778:9:1778:9 | x | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1779:9:1779:9 | x | | main.rs:1750:16:1750:35 | ImplTraitTypeRepr |
-| main.rs:1780:13:1780:13 | a | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1780:17:1780:32 | get_a_my_trait(...) | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1781:13:1781:13 | b | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1781:17:1781:33 | uses_my_trait1(...) | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1781:32:1781:32 | a | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1782:13:1782:13 | a | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1782:17:1782:32 | get_a_my_trait(...) | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1783:13:1783:13 | c | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1783:17:1783:33 | uses_my_trait2(...) | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1783:32:1783:32 | a | | main.rs:1764:28:1764:43 | ImplTraitTypeRepr |
-| main.rs:1784:13:1784:13 | d | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1784:17:1784:34 | uses_my_trait2(...) | | main.rs:1732:5:1732:14 | S2 |
-| main.rs:1784:32:1784:33 | S1 | | main.rs:1731:5:1731:14 | S1 |
-| main.rs:1795:16:1795:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1795:16:1795:20 | SelfParam | &T | main.rs:1791:5:1792:13 | S |
-| main.rs:1795:31:1797:9 | { ... } | | main.rs:1791:5:1792:13 | S |
-| main.rs:1796:13:1796:13 | S | | main.rs:1791:5:1792:13 | S |
-| main.rs:1806:26:1808:9 | { ... } | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1806:26:1808:9 | { ... } | T | main.rs:1805:10:1805:10 | T |
-| main.rs:1807:13:1807:38 | MyVec {...} | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1807:13:1807:38 | MyVec {...} | T | main.rs:1805:10:1805:10 | T |
-| main.rs:1807:27:1807:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1807:27:1807:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1807:27:1807:36 | ...::new(...) | T | main.rs:1805:10:1805:10 | T |
-| main.rs:1810:17:1810:25 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1810:17:1810:25 | SelfParam | &T | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1810:17:1810:25 | SelfParam | &T.T | main.rs:1805:10:1805:10 | T |
-| main.rs:1810:28:1810:32 | value | | main.rs:1805:10:1805:10 | T |
-| main.rs:1811:13:1811:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1811:13:1811:16 | self | &T | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1811:13:1811:16 | self | &T.T | main.rs:1805:10:1805:10 | T |
-| main.rs:1811:13:1811:21 | self.data | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1811:13:1811:21 | self.data | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1811:13:1811:21 | self.data | T | main.rs:1805:10:1805:10 | T |
-| main.rs:1811:28:1811:32 | value | | main.rs:1805:10:1805:10 | T |
-| main.rs:1819:18:1819:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1819:18:1819:22 | SelfParam | &T | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1819:18:1819:22 | SelfParam | &T.T | main.rs:1815:10:1815:10 | T |
-| main.rs:1819:25:1819:29 | index | | {EXTERNAL LOCATION} | usize |
-| main.rs:1819:56:1821:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1819:56:1821:9 | { ... } | &T | main.rs:1815:10:1815:10 | T |
-| main.rs:1820:13:1820:29 | &... | | file://:0:0:0:0 | & |
-| main.rs:1820:13:1820:29 | &... | &T | main.rs:1815:10:1815:10 | T |
-| main.rs:1820:14:1820:17 | self | | file://:0:0:0:0 | & |
-| main.rs:1820:14:1820:17 | self | &T | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1820:14:1820:17 | self | &T.T | main.rs:1815:10:1815:10 | T |
-| main.rs:1820:14:1820:22 | self.data | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1820:14:1820:22 | self.data | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1820:14:1820:22 | self.data | T | main.rs:1815:10:1815:10 | T |
-| main.rs:1820:14:1820:29 | ...[index] | | main.rs:1815:10:1815:10 | T |
-| main.rs:1820:24:1820:28 | index | | {EXTERNAL LOCATION} | usize |
-| main.rs:1824:22:1824:26 | slice | | file://:0:0:0:0 | & |
-| main.rs:1824:22:1824:26 | slice | &T | file://:0:0:0:0 | [] |
-| main.rs:1824:22:1824:26 | slice | &T.[T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1825:13:1825:13 | x | | main.rs:1791:5:1792:13 | S |
-| main.rs:1825:17:1825:21 | slice | | file://:0:0:0:0 | & |
-| main.rs:1825:17:1825:21 | slice | &T | file://:0:0:0:0 | [] |
-| main.rs:1825:17:1825:21 | slice | &T.[T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1825:17:1825:24 | slice[0] | | main.rs:1791:5:1792:13 | S |
-| main.rs:1825:17:1825:30 | ... .foo() | | main.rs:1791:5:1792:13 | S |
-| main.rs:1825:23:1825:23 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1829:13:1829:19 | mut vec | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1829:13:1829:19 | mut vec | T | main.rs:1791:5:1792:13 | S |
-| main.rs:1829:23:1829:34 | ...::new(...) | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1829:23:1829:34 | ...::new(...) | T | main.rs:1791:5:1792:13 | S |
-| main.rs:1830:9:1830:11 | vec | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1830:9:1830:11 | vec | T | main.rs:1791:5:1792:13 | S |
-| main.rs:1830:18:1830:18 | S | | main.rs:1791:5:1792:13 | S |
-| main.rs:1831:9:1831:11 | vec | | main.rs:1800:5:1803:5 | MyVec |
-| main.rs:1831:9:1831:11 | vec | T | main.rs:1791:5:1792:13 | S |
-| main.rs:1831:13:1831:13 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1833:13:1833:14 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1833:13:1833:14 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1833:13:1833:14 | xs | [T;...] | main.rs:1791:5:1792:13 | S |
-| main.rs:1833:13:1833:14 | xs | [T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1833:21:1833:21 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1833:26:1833:28 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1833:26:1833:28 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1833:26:1833:28 | [...] | [T;...] | main.rs:1791:5:1792:13 | S |
-| main.rs:1833:26:1833:28 | [...] | [T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1833:27:1833:27 | S | | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:13:1834:13 | x | | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:17:1834:18 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1834:17:1834:18 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1834:17:1834:18 | xs | [T;...] | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:17:1834:18 | xs | [T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:17:1834:21 | xs[0] | | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:17:1834:27 | ... .foo() | | main.rs:1791:5:1792:13 | S |
-| main.rs:1834:20:1834:20 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1836:23:1836:25 | &xs | | file://:0:0:0:0 | & |
-| main.rs:1836:23:1836:25 | &xs | &T | file://:0:0:0:0 | [] |
-| main.rs:1836:23:1836:25 | &xs | &T | file://:0:0:0:0 | [] |
-| main.rs:1836:23:1836:25 | &xs | &T.[T;...] | main.rs:1791:5:1792:13 | S |
-| main.rs:1836:23:1836:25 | &xs | &T.[T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1836:24:1836:25 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1836:24:1836:25 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1836:24:1836:25 | xs | [T;...] | main.rs:1791:5:1792:13 | S |
-| main.rs:1836:24:1836:25 | xs | [T] | main.rs:1791:5:1792:13 | S |
-| main.rs:1842:25:1842:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str |
-| main.rs:1842:25:1842:45 | ...::format(...) | | {EXTERNAL LOCATION} | String |
-| main.rs:1842:25:1842:45 | { ... } | | {EXTERNAL LOCATION} | String |
-| main.rs:1842:38:1842:45 | "World!" | | {EXTERNAL LOCATION} | str |
-| main.rs:1848:19:1848:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1848:19:1848:23 | SelfParam | &T | main.rs:1847:5:1849:5 | Self [trait MyAdd] |
-| main.rs:1848:26:1848:30 | value | | main.rs:1847:17:1847:17 | T |
-| main.rs:1853:19:1853:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1853:19:1853:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1853:26:1853:30 | value | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1853:46:1855:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1854:13:1854:17 | value | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1860:19:1860:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1860:19:1860:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1860:26:1860:30 | value | | file://:0:0:0:0 | & |
-| main.rs:1860:26:1860:30 | value | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1860:26:1860:30 | value | &T | file://:0:0:0:0 | & |
-| main.rs:1860:47:1862:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1860:47:1862:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1861:13:1861:18 | * ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1861:13:1861:18 | * ... | | file://:0:0:0:0 | & |
-| main.rs:1861:14:1861:18 | value | | file://:0:0:0:0 | & |
-| main.rs:1861:14:1861:18 | value | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1861:14:1861:18 | value | &T | file://:0:0:0:0 | & |
-| main.rs:1867:19:1867:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1867:19:1867:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1867:26:1867:30 | value | | {EXTERNAL LOCATION} | bool |
-| main.rs:1867:47:1873:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1867:47:1873:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1868:13:1872:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1868:13:1872:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1868:16:1868:20 | value | | {EXTERNAL LOCATION} | bool |
-| main.rs:1868:22:1870:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1868:22:1870:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1869:17:1869:17 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1869:17:1869:17 | 1 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1870:20:1872:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1870:20:1872:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1871:17:1871:17 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1871:17:1871:17 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1877:13:1877:13 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1877:13:1877:13 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1877:22:1877:23 | 73 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1877:22:1877:23 | 73 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1878:9:1878:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1878:9:1878:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1878:9:1878:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1878:18:1878:21 | 5i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1879:9:1879:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1879:9:1879:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1879:9:1879:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1879:18:1879:22 | &5i64 | | file://:0:0:0:0 | & |
-| main.rs:1879:18:1879:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1879:19:1879:22 | 5i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1880:9:1880:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1880:9:1880:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1880:9:1880:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1880:18:1880:21 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1888:5:1888:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1889:5:1889:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1889:20:1889:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1889:41:1889:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1905:5:1905:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1503:13:1503:27 | ... ^= ... | | file://:0:0:0:0 | () |
+| main.rs:1503:23:1503:25 | rhs | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1503:23:1503:27 | rhs.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1509:16:1509:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1509:22:1509:24 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1509:40:1514:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1510:13:1513:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1511:20:1511:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1511:20:1511:25 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1511:20:1511:32 | ... << ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1511:30:1511:32 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1512:20:1512:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1512:20:1512:25 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1512:20:1512:32 | ... << ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1512:30:1512:32 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1518:23:1518:31 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1518:23:1518:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1518:34:1518:36 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1519:13:1519:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1519:13:1519:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1519:13:1519:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1519:13:1519:26 | ... <<= ... | | file://:0:0:0:0 | () |
+| main.rs:1519:24:1519:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1520:13:1520:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1520:13:1520:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1520:13:1520:18 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1520:13:1520:26 | ... <<= ... | | file://:0:0:0:0 | () |
+| main.rs:1520:24:1520:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1526:16:1526:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1526:22:1526:24 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1526:40:1531:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1527:13:1530:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1528:20:1528:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1528:20:1528:25 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1528:20:1528:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1528:30:1528:32 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1529:20:1529:23 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1529:20:1529:25 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1529:20:1529:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1529:30:1529:32 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1535:23:1535:31 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1535:23:1535:31 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1535:34:1535:36 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1536:13:1536:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1536:13:1536:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1536:13:1536:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1536:13:1536:26 | ... >>= ... | | file://:0:0:0:0 | () |
+| main.rs:1536:24:1536:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1537:13:1537:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1537:13:1537:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1537:13:1537:18 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1537:13:1537:26 | ... >>= ... | | file://:0:0:0:0 | () |
+| main.rs:1537:24:1537:26 | rhs | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1543:16:1543:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1543:30:1548:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1544:13:1547:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1545:20:1545:26 | - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1545:21:1545:24 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1545:21:1545:26 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1546:20:1546:26 | - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1546:21:1546:24 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1546:21:1546:26 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1553:16:1553:19 | SelfParam | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1553:30:1558:9 | { ... } | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1554:13:1557:13 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1555:20:1555:26 | ! ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1555:21:1555:24 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1555:21:1555:26 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1556:20:1556:26 | ! ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1556:21:1556:24 | self | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1556:21:1556:26 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1562:15:1562:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1562:15:1562:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1562:22:1562:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1562:22:1562:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1562:44:1564:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1563:13:1563:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1563:13:1563:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1563:13:1563:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1563:13:1563:29 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1563:13:1563:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1563:23:1563:27 | other | | file://:0:0:0:0 | & |
+| main.rs:1563:23:1563:27 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1563:23:1563:29 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1563:34:1563:37 | self | | file://:0:0:0:0 | & |
+| main.rs:1563:34:1563:37 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1563:34:1563:39 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1563:34:1563:50 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1563:44:1563:48 | other | | file://:0:0:0:0 | & |
+| main.rs:1563:44:1563:48 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1563:44:1563:50 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1566:15:1566:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1566:15:1566:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1566:22:1566:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1566:22:1566:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1566:44:1568:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1567:13:1567:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1567:13:1567:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1567:13:1567:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1567:13:1567:29 | ... != ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1567:13:1567:50 | ... \|\| ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1567:23:1567:27 | other | | file://:0:0:0:0 | & |
+| main.rs:1567:23:1567:27 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1567:23:1567:29 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1567:34:1567:37 | self | | file://:0:0:0:0 | & |
+| main.rs:1567:34:1567:37 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1567:34:1567:39 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1567:34:1567:50 | ... != ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1567:44:1567:48 | other | | file://:0:0:0:0 | & |
+| main.rs:1567:44:1567:48 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1567:44:1567:50 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1572:24:1572:28 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1572:24:1572:28 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1572:31:1572:35 | other | | file://:0:0:0:0 | & |
+| main.rs:1572:31:1572:35 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1572:75:1574:9 | { ... } | | {EXTERNAL LOCATION} | Option |
+| main.rs:1572:75:1574:9 | { ... } | T | {EXTERNAL LOCATION} | Ordering |
+| main.rs:1573:13:1573:29 | (...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:13:1573:63 | ... .partial_cmp(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1573:13:1573:63 | ... .partial_cmp(...) | T | {EXTERNAL LOCATION} | Ordering |
+| main.rs:1573:14:1573:17 | self | | file://:0:0:0:0 | & |
+| main.rs:1573:14:1573:17 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1573:14:1573:19 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:14:1573:28 | ... + ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:23:1573:26 | self | | file://:0:0:0:0 | & |
+| main.rs:1573:23:1573:26 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1573:23:1573:28 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:43:1573:62 | &... | | file://:0:0:0:0 | & |
+| main.rs:1573:43:1573:62 | &... | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:44:1573:62 | (...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:45:1573:49 | other | | file://:0:0:0:0 | & |
+| main.rs:1573:45:1573:49 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1573:45:1573:51 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:45:1573:61 | ... + ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1573:55:1573:59 | other | | file://:0:0:0:0 | & |
+| main.rs:1573:55:1573:59 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1573:55:1573:61 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1576:15:1576:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1576:15:1576:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1576:22:1576:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1576:22:1576:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1576:44:1578:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1577:13:1577:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1577:13:1577:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1577:13:1577:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1577:13:1577:28 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1577:13:1577:48 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1577:22:1577:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1577:22:1577:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1577:22:1577:28 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1577:33:1577:36 | self | | file://:0:0:0:0 | & |
+| main.rs:1577:33:1577:36 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1577:33:1577:38 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1577:33:1577:48 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1577:42:1577:46 | other | | file://:0:0:0:0 | & |
+| main.rs:1577:42:1577:46 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1577:42:1577:48 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1580:15:1580:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1580:15:1580:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1580:22:1580:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1580:22:1580:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1580:44:1582:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1581:13:1581:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1581:13:1581:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1581:13:1581:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1581:13:1581:29 | ... <= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1581:13:1581:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1581:23:1581:27 | other | | file://:0:0:0:0 | & |
+| main.rs:1581:23:1581:27 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1581:23:1581:29 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1581:34:1581:37 | self | | file://:0:0:0:0 | & |
+| main.rs:1581:34:1581:37 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1581:34:1581:39 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1581:34:1581:50 | ... <= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1581:44:1581:48 | other | | file://:0:0:0:0 | & |
+| main.rs:1581:44:1581:48 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1581:44:1581:50 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1584:15:1584:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1584:15:1584:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1584:22:1584:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1584:22:1584:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1584:44:1586:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1585:13:1585:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1585:13:1585:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1585:13:1585:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1585:13:1585:28 | ... > ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1585:13:1585:48 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1585:22:1585:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1585:22:1585:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1585:22:1585:28 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1585:33:1585:36 | self | | file://:0:0:0:0 | & |
+| main.rs:1585:33:1585:36 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1585:33:1585:38 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1585:33:1585:48 | ... > ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1585:42:1585:46 | other | | file://:0:0:0:0 | & |
+| main.rs:1585:42:1585:46 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1585:42:1585:48 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1588:15:1588:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1588:15:1588:19 | SelfParam | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1588:22:1588:26 | other | | file://:0:0:0:0 | & |
+| main.rs:1588:22:1588:26 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1588:44:1590:9 | { ... } | | {EXTERNAL LOCATION} | bool |
+| main.rs:1589:13:1589:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1589:13:1589:16 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1589:13:1589:18 | self.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1589:13:1589:29 | ... >= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1589:13:1589:50 | ... && ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1589:23:1589:27 | other | | file://:0:0:0:0 | & |
+| main.rs:1589:23:1589:27 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1589:23:1589:29 | other.x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1589:34:1589:37 | self | | file://:0:0:0:0 | & |
+| main.rs:1589:34:1589:37 | self | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1589:34:1589:39 | self.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1589:34:1589:50 | ... >= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1589:44:1589:48 | other | | file://:0:0:0:0 | & |
+| main.rs:1589:44:1589:48 | other | &T | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1589:44:1589:50 | other.y | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1596:13:1596:18 | i64_eq | | {EXTERNAL LOCATION} | bool |
+| main.rs:1596:22:1596:35 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1596:23:1596:26 | 1i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1596:23:1596:34 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1596:31:1596:34 | 2i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1597:13:1597:18 | i64_ne | | {EXTERNAL LOCATION} | bool |
+| main.rs:1597:22:1597:35 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1597:23:1597:26 | 3i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1597:23:1597:34 | ... != ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1597:31:1597:34 | 4i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1598:13:1598:18 | i64_lt | | {EXTERNAL LOCATION} | bool |
+| main.rs:1598:22:1598:34 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1598:23:1598:26 | 5i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1598:23:1598:33 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1598:30:1598:33 | 6i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1599:13:1599:18 | i64_le | | {EXTERNAL LOCATION} | bool |
+| main.rs:1599:22:1599:35 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1599:23:1599:26 | 7i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1599:23:1599:34 | ... <= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1599:31:1599:34 | 8i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1600:13:1600:18 | i64_gt | | {EXTERNAL LOCATION} | bool |
+| main.rs:1600:22:1600:35 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1600:23:1600:26 | 9i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1600:23:1600:34 | ... > ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1600:30:1600:34 | 10i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1601:13:1601:18 | i64_ge | | {EXTERNAL LOCATION} | bool |
+| main.rs:1601:22:1601:37 | (...) | | {EXTERNAL LOCATION} | bool |
+| main.rs:1601:23:1601:27 | 11i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1601:23:1601:36 | ... >= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1601:32:1601:36 | 12i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1604:13:1604:19 | i64_add | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1604:23:1604:27 | 13i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1604:23:1604:35 | ... + ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1604:31:1604:35 | 14i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1605:13:1605:19 | i64_sub | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1605:23:1605:27 | 15i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1605:23:1605:35 | ... - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1605:31:1605:35 | 16i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1606:13:1606:19 | i64_mul | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1606:23:1606:27 | 17i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1606:23:1606:35 | ... * ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1606:31:1606:35 | 18i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1607:13:1607:19 | i64_div | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1607:23:1607:27 | 19i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1607:23:1607:35 | ... / ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1607:31:1607:35 | 20i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1608:13:1608:19 | i64_rem | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1608:23:1608:27 | 21i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1608:23:1608:35 | ... % ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1608:31:1608:35 | 22i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1611:13:1611:30 | mut i64_add_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1611:34:1611:38 | 23i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1612:9:1612:22 | i64_add_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1612:9:1612:31 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1612:27:1612:31 | 24i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1614:13:1614:30 | mut i64_sub_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1614:34:1614:38 | 25i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1615:9:1615:22 | i64_sub_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1615:9:1615:31 | ... -= ... | | file://:0:0:0:0 | () |
+| main.rs:1615:27:1615:31 | 26i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1617:13:1617:30 | mut i64_mul_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1617:34:1617:38 | 27i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1618:9:1618:22 | i64_mul_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1618:9:1618:31 | ... *= ... | | file://:0:0:0:0 | () |
+| main.rs:1618:27:1618:31 | 28i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1620:13:1620:30 | mut i64_div_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1620:34:1620:38 | 29i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1621:9:1621:22 | i64_div_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1621:9:1621:31 | ... /= ... | | file://:0:0:0:0 | () |
+| main.rs:1621:27:1621:31 | 30i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1623:13:1623:30 | mut i64_rem_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1623:34:1623:38 | 31i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1624:9:1624:22 | i64_rem_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1624:9:1624:31 | ... %= ... | | file://:0:0:0:0 | () |
+| main.rs:1624:27:1624:31 | 32i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1627:13:1627:22 | i64_bitand | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1627:26:1627:30 | 33i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1627:26:1627:38 | ... & ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1627:34:1627:38 | 34i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1628:13:1628:21 | i64_bitor | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1628:25:1628:29 | 35i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1628:25:1628:37 | ... \| ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1628:33:1628:37 | 36i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1629:13:1629:22 | i64_bitxor | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1629:26:1629:30 | 37i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1629:26:1629:38 | ... ^ ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1629:34:1629:38 | 38i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1630:13:1630:19 | i64_shl | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1630:23:1630:27 | 39i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1630:23:1630:36 | ... << ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1630:32:1630:36 | 40i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1631:13:1631:19 | i64_shr | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1631:23:1631:27 | 41i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1631:23:1631:36 | ... >> ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1631:32:1631:36 | 42i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1634:13:1634:33 | mut i64_bitand_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1634:37:1634:41 | 43i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1635:9:1635:25 | i64_bitand_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1635:9:1635:34 | ... &= ... | | file://:0:0:0:0 | () |
+| main.rs:1635:30:1635:34 | 44i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1637:13:1637:32 | mut i64_bitor_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1637:36:1637:40 | 45i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1638:9:1638:24 | i64_bitor_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1638:9:1638:33 | ... \|= ... | | file://:0:0:0:0 | () |
+| main.rs:1638:29:1638:33 | 46i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1640:13:1640:33 | mut i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1640:37:1640:41 | 47i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1641:9:1641:25 | i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1641:9:1641:34 | ... ^= ... | | file://:0:0:0:0 | () |
+| main.rs:1641:30:1641:34 | 48i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1643:13:1643:30 | mut i64_shl_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1643:34:1643:38 | 49i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1644:9:1644:22 | i64_shl_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1644:9:1644:32 | ... <<= ... | | file://:0:0:0:0 | () |
+| main.rs:1644:28:1644:32 | 50i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1646:13:1646:30 | mut i64_shr_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1646:34:1646:38 | 51i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1647:9:1647:22 | i64_shr_assign | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1647:9:1647:32 | ... >>= ... | | file://:0:0:0:0 | () |
+| main.rs:1647:28:1647:32 | 52i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1649:13:1649:19 | i64_neg | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1649:23:1649:28 | - ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1649:24:1649:28 | 53i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1650:13:1650:19 | i64_not | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1650:23:1650:28 | ! ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1650:24:1650:28 | 54i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1653:13:1653:14 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1653:18:1653:36 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1653:28:1653:28 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1653:28:1653:28 | 1 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1653:34:1653:34 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1653:34:1653:34 | 2 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1654:13:1654:14 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1654:18:1654:36 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1654:28:1654:28 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1654:28:1654:28 | 3 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1654:34:1654:34 | 4 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1654:34:1654:34 | 4 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1657:13:1657:19 | vec2_eq | | {EXTERNAL LOCATION} | bool |
+| main.rs:1657:23:1657:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1657:23:1657:30 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1657:29:1657:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1658:13:1658:19 | vec2_ne | | {EXTERNAL LOCATION} | bool |
+| main.rs:1658:23:1658:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1658:23:1658:30 | ... != ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1658:29:1658:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1659:13:1659:19 | vec2_lt | | {EXTERNAL LOCATION} | bool |
+| main.rs:1659:23:1659:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1659:23:1659:29 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1659:28:1659:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1660:13:1660:19 | vec2_le | | {EXTERNAL LOCATION} | bool |
+| main.rs:1660:23:1660:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1660:23:1660:30 | ... <= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1660:29:1660:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1661:13:1661:19 | vec2_gt | | {EXTERNAL LOCATION} | bool |
+| main.rs:1661:23:1661:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1661:23:1661:29 | ... > ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1661:28:1661:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1662:13:1662:19 | vec2_ge | | {EXTERNAL LOCATION} | bool |
+| main.rs:1662:23:1662:24 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1662:23:1662:30 | ... >= ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1662:29:1662:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1665:13:1665:20 | vec2_add | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1665:24:1665:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1665:24:1665:30 | ... + ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1665:29:1665:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1666:13:1666:20 | vec2_sub | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1666:24:1666:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1666:24:1666:30 | ... - ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1666:29:1666:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1667:13:1667:20 | vec2_mul | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1667:24:1667:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1667:24:1667:30 | ... * ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1667:29:1667:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1668:13:1668:20 | vec2_div | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1668:24:1668:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1668:24:1668:30 | ... / ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1668:29:1668:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1669:13:1669:20 | vec2_rem | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1669:24:1669:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1669:24:1669:30 | ... % ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1669:29:1669:30 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1672:13:1672:31 | mut vec2_add_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1672:35:1672:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1673:9:1673:23 | vec2_add_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1673:9:1673:29 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1673:28:1673:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1675:13:1675:31 | mut vec2_sub_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1675:35:1675:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1676:9:1676:23 | vec2_sub_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1676:9:1676:29 | ... -= ... | | file://:0:0:0:0 | () |
+| main.rs:1676:28:1676:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1678:13:1678:31 | mut vec2_mul_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1678:35:1678:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1679:9:1679:23 | vec2_mul_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1679:9:1679:29 | ... *= ... | | file://:0:0:0:0 | () |
+| main.rs:1679:28:1679:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1681:13:1681:31 | mut vec2_div_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1681:35:1681:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1682:9:1682:23 | vec2_div_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1682:9:1682:29 | ... /= ... | | file://:0:0:0:0 | () |
+| main.rs:1682:28:1682:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1684:13:1684:31 | mut vec2_rem_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1684:35:1684:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1685:9:1685:23 | vec2_rem_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1685:9:1685:29 | ... %= ... | | file://:0:0:0:0 | () |
+| main.rs:1685:28:1685:29 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1688:13:1688:23 | vec2_bitand | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1688:27:1688:28 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1688:27:1688:33 | ... & ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1688:32:1688:33 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1689:13:1689:22 | vec2_bitor | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1689:26:1689:27 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1689:26:1689:32 | ... \| ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1689:31:1689:32 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1690:13:1690:23 | vec2_bitxor | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1690:27:1690:28 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1690:27:1690:33 | ... ^ ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1690:32:1690:33 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1691:13:1691:20 | vec2_shl | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1691:24:1691:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1691:24:1691:33 | ... << ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1691:30:1691:33 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1692:13:1692:20 | vec2_shr | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1692:24:1692:25 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1692:24:1692:33 | ... >> ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1692:30:1692:33 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1695:13:1695:34 | mut vec2_bitand_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1695:38:1695:39 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1696:9:1696:26 | vec2_bitand_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1696:9:1696:32 | ... &= ... | | file://:0:0:0:0 | () |
+| main.rs:1696:31:1696:32 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1698:13:1698:33 | mut vec2_bitor_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1698:37:1698:38 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1699:9:1699:25 | vec2_bitor_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1699:9:1699:31 | ... \|= ... | | file://:0:0:0:0 | () |
+| main.rs:1699:30:1699:31 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1701:13:1701:34 | mut vec2_bitxor_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1701:38:1701:39 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1702:9:1702:26 | vec2_bitxor_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1702:9:1702:32 | ... ^= ... | | file://:0:0:0:0 | () |
+| main.rs:1702:31:1702:32 | v2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1704:13:1704:31 | mut vec2_shl_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1704:35:1704:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1705:9:1705:23 | vec2_shl_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1705:9:1705:32 | ... <<= ... | | file://:0:0:0:0 | () |
+| main.rs:1705:29:1705:32 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1707:13:1707:31 | mut vec2_shr_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1707:35:1707:36 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1708:9:1708:23 | vec2_shr_assign | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1708:9:1708:32 | ... >>= ... | | file://:0:0:0:0 | () |
+| main.rs:1708:29:1708:32 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1711:13:1711:20 | vec2_neg | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1711:24:1711:26 | - ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1711:25:1711:26 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1712:13:1712:20 | vec2_not | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1712:24:1712:26 | ! ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1712:25:1712:26 | v1 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1715:13:1715:24 | default_vec2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1715:28:1715:45 | ...::default(...) | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1716:13:1716:26 | vec2_zero_plus | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1716:30:1716:48 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1716:30:1716:63 | ... + ... | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1716:40:1716:40 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1716:40:1716:40 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1716:46:1716:46 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1716:46:1716:46 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1716:52:1716:63 | default_vec2 | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1726:18:1726:21 | SelfParam | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1729:25:1731:5 | { ... } | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1730:9:1730:10 | S1 | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1733:41:1735:5 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1733:41:1735:5 | { ... } | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
+| main.rs:1733:41:1735:5 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1734:9:1734:20 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1734:9:1734:20 | { ... } | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
+| main.rs:1734:9:1734:20 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1734:17:1734:18 | S1 | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1743:13:1743:42 | SelfParam | | {EXTERNAL LOCATION} | Pin |
+| main.rs:1743:13:1743:42 | SelfParam | Ptr | file://:0:0:0:0 | & |
+| main.rs:1743:13:1743:42 | SelfParam | Ptr.&T | main.rs:1737:5:1737:14 | S2 |
+| main.rs:1744:13:1744:15 | _cx | | file://:0:0:0:0 | & |
+| main.rs:1744:13:1744:15 | _cx | &T | {EXTERNAL LOCATION} | Context |
+| main.rs:1745:44:1747:9 | { ... } | | {EXTERNAL LOCATION} | Poll |
+| main.rs:1745:44:1747:9 | { ... } | T | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1746:13:1746:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll |
+| main.rs:1746:13:1746:38 | ...::Ready(...) | T | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1746:36:1746:37 | S1 | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1750:41:1752:5 | { ... } | | main.rs:1737:5:1737:14 | S2 |
+| main.rs:1750:41:1752:5 | { ... } | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
+| main.rs:1751:9:1751:10 | S2 | | main.rs:1737:5:1737:14 | S2 |
+| main.rs:1751:9:1751:10 | S2 | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
+| main.rs:1755:9:1755:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1755:9:1755:12 | f1(...) | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1755:9:1755:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1756:9:1756:12 | f2(...) | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
+| main.rs:1756:9:1756:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1757:9:1757:12 | f3(...) | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
+| main.rs:1757:9:1757:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1758:9:1758:10 | S2 | | main.rs:1737:5:1737:14 | S2 |
+| main.rs:1758:9:1758:16 | await S2 | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1759:13:1759:13 | b | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1759:13:1759:13 | b | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1759:17:1759:28 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1759:17:1759:28 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1759:25:1759:26 | S1 | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1760:9:1760:9 | b | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1760:9:1760:9 | b | Output | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1760:9:1760:15 | await b | | main.rs:1723:5:1723:14 | S1 |
+| main.rs:1769:15:1769:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1769:15:1769:19 | SelfParam | &T | main.rs:1768:5:1770:5 | Self [trait Trait1] |
+| main.rs:1773:15:1773:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1773:15:1773:19 | SelfParam | &T | main.rs:1772:5:1774:5 | Self [trait Trait2] |
+| main.rs:1777:15:1777:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1777:15:1777:19 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1781:15:1781:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1781:15:1781:19 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1784:37:1786:5 | { ... } | | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1784:37:1786:5 | { ... } | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1785:9:1785:10 | S1 | | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1785:9:1785:10 | S1 | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1789:18:1789:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1789:18:1789:22 | SelfParam | &T | main.rs:1788:5:1790:5 | Self [trait MyTrait] |
+| main.rs:1793:18:1793:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1793:18:1793:22 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1793:31:1795:9 | { ... } | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1794:13:1794:14 | S2 | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1798:45:1800:5 | { ... } | | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1798:45:1800:5 | { ... } | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1799:9:1799:10 | S1 | | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1799:9:1799:10 | S1 | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1802:41:1802:41 | t | | main.rs:1802:26:1802:38 | B |
+| main.rs:1802:52:1804:5 | { ... } | | main.rs:1802:23:1802:23 | A |
+| main.rs:1803:9:1803:9 | t | | main.rs:1802:26:1802:38 | B |
+| main.rs:1803:9:1803:17 | t.get_a() | | main.rs:1802:23:1802:23 | A |
+| main.rs:1806:26:1806:26 | t | | main.rs:1806:29:1806:43 | ImplTraitTypeRepr |
+| main.rs:1806:51:1808:5 | { ... } | | main.rs:1806:23:1806:23 | A |
+| main.rs:1807:9:1807:9 | t | | main.rs:1806:29:1806:43 | ImplTraitTypeRepr |
+| main.rs:1807:9:1807:17 | t.get_a() | | main.rs:1806:23:1806:23 | A |
+| main.rs:1811:13:1811:13 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1811:17:1811:20 | f1(...) | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1812:9:1812:9 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1813:9:1813:9 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
+| main.rs:1814:13:1814:13 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1814:17:1814:32 | get_a_my_trait(...) | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1815:13:1815:13 | b | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1815:17:1815:33 | uses_my_trait1(...) | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1815:32:1815:32 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1816:13:1816:13 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1816:17:1816:32 | get_a_my_trait(...) | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1817:13:1817:13 | c | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1817:17:1817:33 | uses_my_trait2(...) | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1817:32:1817:32 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
+| main.rs:1818:13:1818:13 | d | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1818:17:1818:34 | uses_my_trait2(...) | | main.rs:1766:5:1766:14 | S2 |
+| main.rs:1818:32:1818:33 | S1 | | main.rs:1765:5:1765:14 | S1 |
+| main.rs:1829:16:1829:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1829:16:1829:20 | SelfParam | &T | main.rs:1825:5:1826:13 | S |
+| main.rs:1829:31:1831:9 | { ... } | | main.rs:1825:5:1826:13 | S |
+| main.rs:1830:13:1830:13 | S | | main.rs:1825:5:1826:13 | S |
+| main.rs:1840:26:1842:9 | { ... } | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1840:26:1842:9 | { ... } | T | main.rs:1839:10:1839:10 | T |
+| main.rs:1841:13:1841:38 | MyVec {...} | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1841:13:1841:38 | MyVec {...} | T | main.rs:1839:10:1839:10 | T |
+| main.rs:1841:27:1841:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1841:27:1841:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1841:27:1841:36 | ...::new(...) | T | main.rs:1839:10:1839:10 | T |
+| main.rs:1844:17:1844:25 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1844:17:1844:25 | SelfParam | &T | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1844:17:1844:25 | SelfParam | &T.T | main.rs:1839:10:1839:10 | T |
+| main.rs:1844:28:1844:32 | value | | main.rs:1839:10:1839:10 | T |
+| main.rs:1845:13:1845:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1845:13:1845:16 | self | &T | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1845:13:1845:16 | self | &T.T | main.rs:1839:10:1839:10 | T |
+| main.rs:1845:13:1845:21 | self.data | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1845:13:1845:21 | self.data | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1845:13:1845:21 | self.data | T | main.rs:1839:10:1839:10 | T |
+| main.rs:1845:28:1845:32 | value | | main.rs:1839:10:1839:10 | T |
+| main.rs:1853:18:1853:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1853:18:1853:22 | SelfParam | &T | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1853:18:1853:22 | SelfParam | &T.T | main.rs:1849:10:1849:10 | T |
+| main.rs:1853:25:1853:29 | index | | {EXTERNAL LOCATION} | usize |
+| main.rs:1853:56:1855:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1853:56:1855:9 | { ... } | &T | main.rs:1849:10:1849:10 | T |
+| main.rs:1854:13:1854:29 | &... | | file://:0:0:0:0 | & |
+| main.rs:1854:13:1854:29 | &... | &T | main.rs:1849:10:1849:10 | T |
+| main.rs:1854:14:1854:17 | self | | file://:0:0:0:0 | & |
+| main.rs:1854:14:1854:17 | self | &T | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1854:14:1854:17 | self | &T.T | main.rs:1849:10:1849:10 | T |
+| main.rs:1854:14:1854:22 | self.data | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1854:14:1854:22 | self.data | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1854:14:1854:22 | self.data | T | main.rs:1849:10:1849:10 | T |
+| main.rs:1854:14:1854:29 | ...[index] | | main.rs:1849:10:1849:10 | T |
+| main.rs:1854:24:1854:28 | index | | {EXTERNAL LOCATION} | usize |
+| main.rs:1858:22:1858:26 | slice | | file://:0:0:0:0 | & |
+| main.rs:1858:22:1858:26 | slice | &T | file://:0:0:0:0 | [] |
+| main.rs:1858:22:1858:26 | slice | &T.[T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1859:13:1859:13 | x | | main.rs:1825:5:1826:13 | S |
+| main.rs:1859:17:1859:21 | slice | | file://:0:0:0:0 | & |
+| main.rs:1859:17:1859:21 | slice | &T | file://:0:0:0:0 | [] |
+| main.rs:1859:17:1859:21 | slice | &T.[T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1859:17:1859:24 | slice[0] | | main.rs:1825:5:1826:13 | S |
+| main.rs:1859:17:1859:30 | ... .foo() | | main.rs:1825:5:1826:13 | S |
+| main.rs:1859:23:1859:23 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1863:13:1863:19 | mut vec | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1863:13:1863:19 | mut vec | T | main.rs:1825:5:1826:13 | S |
+| main.rs:1863:23:1863:34 | ...::new(...) | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1863:23:1863:34 | ...::new(...) | T | main.rs:1825:5:1826:13 | S |
+| main.rs:1864:9:1864:11 | vec | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1864:9:1864:11 | vec | T | main.rs:1825:5:1826:13 | S |
+| main.rs:1864:18:1864:18 | S | | main.rs:1825:5:1826:13 | S |
+| main.rs:1865:9:1865:11 | vec | | main.rs:1834:5:1837:5 | MyVec |
+| main.rs:1865:9:1865:11 | vec | T | main.rs:1825:5:1826:13 | S |
+| main.rs:1865:13:1865:13 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1867:13:1867:14 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1867:13:1867:14 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1867:13:1867:14 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
+| main.rs:1867:13:1867:14 | xs | [T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1867:21:1867:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1867:26:1867:28 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1867:26:1867:28 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1867:26:1867:28 | [...] | [T;...] | main.rs:1825:5:1826:13 | S |
+| main.rs:1867:26:1867:28 | [...] | [T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1867:27:1867:27 | S | | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:13:1868:13 | x | | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:17:1868:18 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1868:17:1868:18 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1868:17:1868:18 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:17:1868:18 | xs | [T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:17:1868:21 | xs[0] | | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:17:1868:27 | ... .foo() | | main.rs:1825:5:1826:13 | S |
+| main.rs:1868:20:1868:20 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1870:23:1870:25 | &xs | | file://:0:0:0:0 | & |
+| main.rs:1870:23:1870:25 | &xs | &T | file://:0:0:0:0 | [] |
+| main.rs:1870:23:1870:25 | &xs | &T | file://:0:0:0:0 | [] |
+| main.rs:1870:23:1870:25 | &xs | &T.[T;...] | main.rs:1825:5:1826:13 | S |
+| main.rs:1870:23:1870:25 | &xs | &T.[T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1870:24:1870:25 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1870:24:1870:25 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1870:24:1870:25 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
+| main.rs:1870:24:1870:25 | xs | [T] | main.rs:1825:5:1826:13 | S |
+| main.rs:1876:25:1876:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str |
+| main.rs:1876:25:1876:45 | ...::format(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1876:25:1876:45 | { ... } | | {EXTERNAL LOCATION} | String |
+| main.rs:1876:38:1876:45 | "World!" | | {EXTERNAL LOCATION} | str |
+| main.rs:1882:19:1882:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1882:19:1882:23 | SelfParam | &T | main.rs:1881:5:1883:5 | Self [trait MyAdd] |
+| main.rs:1882:26:1882:30 | value | | main.rs:1881:17:1881:17 | T |
+| main.rs:1887:19:1887:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1887:19:1887:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1887:26:1887:30 | value | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1887:46:1889:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1888:13:1888:17 | value | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1894:19:1894:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1894:19:1894:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1894:26:1894:30 | value | | file://:0:0:0:0 | & |
+| main.rs:1894:26:1894:30 | value | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1894:26:1894:30 | value | &T | file://:0:0:0:0 | & |
+| main.rs:1894:47:1896:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1894:47:1896:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1895:13:1895:18 | * ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1895:13:1895:18 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1895:14:1895:18 | value | | file://:0:0:0:0 | & |
+| main.rs:1895:14:1895:18 | value | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1895:14:1895:18 | value | &T | file://:0:0:0:0 | & |
+| main.rs:1901:19:1901:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1901:19:1901:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1901:26:1901:30 | value | | {EXTERNAL LOCATION} | bool |
+| main.rs:1901:47:1907:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1901:47:1907:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1902:13:1906:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1902:13:1906:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1902:16:1902:20 | value | | {EXTERNAL LOCATION} | bool |
+| main.rs:1902:22:1904:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1902:22:1904:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1903:17:1903:17 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1903:17:1903:17 | 1 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1904:20:1906:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1904:20:1906:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1905:17:1905:17 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1905:17:1905:17 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1911:13:1911:13 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1911:13:1911:13 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1911:22:1911:23 | 73 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1911:22:1911:23 | 73 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1912:9:1912:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1912:9:1912:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1912:9:1912:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1912:18:1912:21 | 5i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1913:9:1913:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1913:9:1913:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1913:9:1913:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1913:18:1913:22 | &5i64 | | file://:0:0:0:0 | & |
+| main.rs:1913:18:1913:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1913:19:1913:22 | 5i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1914:9:1914:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1914:9:1914:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1914:9:1914:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1914:18:1914:21 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1922:5:1922:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1923:5:1923:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1923:20:1923:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1923:41:1923:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1939:5:1939:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From 845179665cb2ec50f12b17f1fcb98214a891ccca Mon Sep 17 00:00:00 2001
From: Simon Friis Vindum
Date: Wed, 18 Jun 2025 19:55:58 +0200
Subject: [PATCH 084/213] Rust: Add type inference test with borrow of unknown
argument
---
.../test/library-tests/type-inference/main.rs | 5 +
.../type-inference/type-inference.expected | 477 +++++++++---------
2 files changed, 247 insertions(+), 235 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 0b6d2b754a1..fef7184c87b 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1714,6 +1714,11 @@ mod overloadable_operators {
// Here the type of `default_vec2` must be inferred from the `+` call.
let default_vec2 = Default::default(); // $ type=default_vec2:Vec2
let vec2_zero_plus = Vec2 { x: 0, y: 0 } + default_vec2; // $ method=Vec2::add
+
+ // Here the type of `default_vec2` must be inferred from the `==` call
+ // and the type of the borrowed second argument is unknown at the call.
+ let default_vec2 = Default::default(); // $ MISSING: type=default_vec2:Vec2
+ let vec2_zero_plus = Vec2 { x: 0, y: 0 } == default_vec2; // $ method=Vec2::eq
}
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index e7f2d2b10c1..328a2ec7198 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2774,240 +2774,247 @@ inferType
| main.rs:1716:46:1716:46 | 0 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1716:46:1716:46 | 0 | | {EXTERNAL LOCATION} | i64 |
| main.rs:1716:52:1716:63 | default_vec2 | | main.rs:1356:5:1361:5 | Vec2 |
-| main.rs:1726:18:1726:21 | SelfParam | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1729:25:1731:5 | { ... } | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1730:9:1730:10 | S1 | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1733:41:1735:5 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1733:41:1735:5 | { ... } | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
-| main.rs:1733:41:1735:5 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1734:9:1734:20 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1734:9:1734:20 | { ... } | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
-| main.rs:1734:9:1734:20 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1734:17:1734:18 | S1 | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1743:13:1743:42 | SelfParam | | {EXTERNAL LOCATION} | Pin |
-| main.rs:1743:13:1743:42 | SelfParam | Ptr | file://:0:0:0:0 | & |
-| main.rs:1743:13:1743:42 | SelfParam | Ptr.&T | main.rs:1737:5:1737:14 | S2 |
-| main.rs:1744:13:1744:15 | _cx | | file://:0:0:0:0 | & |
-| main.rs:1744:13:1744:15 | _cx | &T | {EXTERNAL LOCATION} | Context |
-| main.rs:1745:44:1747:9 | { ... } | | {EXTERNAL LOCATION} | Poll |
-| main.rs:1745:44:1747:9 | { ... } | T | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1746:13:1746:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll |
-| main.rs:1746:13:1746:38 | ...::Ready(...) | T | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1746:36:1746:37 | S1 | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1750:41:1752:5 | { ... } | | main.rs:1737:5:1737:14 | S2 |
-| main.rs:1750:41:1752:5 | { ... } | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
-| main.rs:1751:9:1751:10 | S2 | | main.rs:1737:5:1737:14 | S2 |
-| main.rs:1751:9:1751:10 | S2 | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
-| main.rs:1755:9:1755:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1755:9:1755:12 | f1(...) | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1755:9:1755:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1756:9:1756:12 | f2(...) | | main.rs:1733:16:1733:39 | ImplTraitTypeRepr |
-| main.rs:1756:9:1756:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1757:9:1757:12 | f3(...) | | main.rs:1750:16:1750:39 | ImplTraitTypeRepr |
-| main.rs:1757:9:1757:18 | await ... | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1758:9:1758:10 | S2 | | main.rs:1737:5:1737:14 | S2 |
-| main.rs:1758:9:1758:16 | await S2 | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1759:13:1759:13 | b | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1759:13:1759:13 | b | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1759:17:1759:28 | { ... } | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1759:17:1759:28 | { ... } | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1759:25:1759:26 | S1 | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1760:9:1760:9 | b | | {EXTERNAL LOCATION} | trait Future |
-| main.rs:1760:9:1760:9 | b | Output | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1760:9:1760:15 | await b | | main.rs:1723:5:1723:14 | S1 |
-| main.rs:1769:15:1769:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1769:15:1769:19 | SelfParam | &T | main.rs:1768:5:1770:5 | Self [trait Trait1] |
-| main.rs:1773:15:1773:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1773:15:1773:19 | SelfParam | &T | main.rs:1772:5:1774:5 | Self [trait Trait2] |
-| main.rs:1777:15:1777:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1777:15:1777:19 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1781:15:1781:19 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1781:15:1781:19 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1784:37:1786:5 | { ... } | | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1784:37:1786:5 | { ... } | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1785:9:1785:10 | S1 | | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1785:9:1785:10 | S1 | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1789:18:1789:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1789:18:1789:22 | SelfParam | &T | main.rs:1788:5:1790:5 | Self [trait MyTrait] |
-| main.rs:1793:18:1793:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1793:18:1793:22 | SelfParam | &T | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1793:31:1795:9 | { ... } | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1794:13:1794:14 | S2 | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1798:45:1800:5 | { ... } | | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1798:45:1800:5 | { ... } | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1799:9:1799:10 | S1 | | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1799:9:1799:10 | S1 | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1802:41:1802:41 | t | | main.rs:1802:26:1802:38 | B |
-| main.rs:1802:52:1804:5 | { ... } | | main.rs:1802:23:1802:23 | A |
-| main.rs:1803:9:1803:9 | t | | main.rs:1802:26:1802:38 | B |
-| main.rs:1803:9:1803:17 | t.get_a() | | main.rs:1802:23:1802:23 | A |
-| main.rs:1806:26:1806:26 | t | | main.rs:1806:29:1806:43 | ImplTraitTypeRepr |
-| main.rs:1806:51:1808:5 | { ... } | | main.rs:1806:23:1806:23 | A |
-| main.rs:1807:9:1807:9 | t | | main.rs:1806:29:1806:43 | ImplTraitTypeRepr |
-| main.rs:1807:9:1807:17 | t.get_a() | | main.rs:1806:23:1806:23 | A |
-| main.rs:1811:13:1811:13 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1811:17:1811:20 | f1(...) | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1812:9:1812:9 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1813:9:1813:9 | x | | main.rs:1784:16:1784:35 | ImplTraitTypeRepr |
-| main.rs:1814:13:1814:13 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1814:17:1814:32 | get_a_my_trait(...) | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1815:13:1815:13 | b | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1815:17:1815:33 | uses_my_trait1(...) | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1815:32:1815:32 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1816:13:1816:13 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1816:17:1816:32 | get_a_my_trait(...) | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1817:13:1817:13 | c | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1817:17:1817:33 | uses_my_trait2(...) | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1817:32:1817:32 | a | | main.rs:1798:28:1798:43 | ImplTraitTypeRepr |
-| main.rs:1818:13:1818:13 | d | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1818:17:1818:34 | uses_my_trait2(...) | | main.rs:1766:5:1766:14 | S2 |
-| main.rs:1818:32:1818:33 | S1 | | main.rs:1765:5:1765:14 | S1 |
-| main.rs:1829:16:1829:20 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1829:16:1829:20 | SelfParam | &T | main.rs:1825:5:1826:13 | S |
-| main.rs:1829:31:1831:9 | { ... } | | main.rs:1825:5:1826:13 | S |
-| main.rs:1830:13:1830:13 | S | | main.rs:1825:5:1826:13 | S |
-| main.rs:1840:26:1842:9 | { ... } | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1840:26:1842:9 | { ... } | T | main.rs:1839:10:1839:10 | T |
-| main.rs:1841:13:1841:38 | MyVec {...} | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1841:13:1841:38 | MyVec {...} | T | main.rs:1839:10:1839:10 | T |
-| main.rs:1841:27:1841:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1841:27:1841:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1841:27:1841:36 | ...::new(...) | T | main.rs:1839:10:1839:10 | T |
-| main.rs:1844:17:1844:25 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1844:17:1844:25 | SelfParam | &T | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1844:17:1844:25 | SelfParam | &T.T | main.rs:1839:10:1839:10 | T |
-| main.rs:1844:28:1844:32 | value | | main.rs:1839:10:1839:10 | T |
-| main.rs:1845:13:1845:16 | self | | file://:0:0:0:0 | & |
-| main.rs:1845:13:1845:16 | self | &T | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1845:13:1845:16 | self | &T.T | main.rs:1839:10:1839:10 | T |
-| main.rs:1845:13:1845:21 | self.data | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1845:13:1845:21 | self.data | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1845:13:1845:21 | self.data | T | main.rs:1839:10:1839:10 | T |
-| main.rs:1845:28:1845:32 | value | | main.rs:1839:10:1839:10 | T |
-| main.rs:1853:18:1853:22 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1853:18:1853:22 | SelfParam | &T | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1853:18:1853:22 | SelfParam | &T.T | main.rs:1849:10:1849:10 | T |
-| main.rs:1853:25:1853:29 | index | | {EXTERNAL LOCATION} | usize |
-| main.rs:1853:56:1855:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1853:56:1855:9 | { ... } | &T | main.rs:1849:10:1849:10 | T |
-| main.rs:1854:13:1854:29 | &... | | file://:0:0:0:0 | & |
-| main.rs:1854:13:1854:29 | &... | &T | main.rs:1849:10:1849:10 | T |
-| main.rs:1854:14:1854:17 | self | | file://:0:0:0:0 | & |
-| main.rs:1854:14:1854:17 | self | &T | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1854:14:1854:17 | self | &T.T | main.rs:1849:10:1849:10 | T |
-| main.rs:1854:14:1854:22 | self.data | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1854:14:1854:22 | self.data | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1854:14:1854:22 | self.data | T | main.rs:1849:10:1849:10 | T |
-| main.rs:1854:14:1854:29 | ...[index] | | main.rs:1849:10:1849:10 | T |
-| main.rs:1854:24:1854:28 | index | | {EXTERNAL LOCATION} | usize |
-| main.rs:1858:22:1858:26 | slice | | file://:0:0:0:0 | & |
-| main.rs:1858:22:1858:26 | slice | &T | file://:0:0:0:0 | [] |
-| main.rs:1858:22:1858:26 | slice | &T.[T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1859:13:1859:13 | x | | main.rs:1825:5:1826:13 | S |
-| main.rs:1859:17:1859:21 | slice | | file://:0:0:0:0 | & |
-| main.rs:1859:17:1859:21 | slice | &T | file://:0:0:0:0 | [] |
-| main.rs:1859:17:1859:21 | slice | &T.[T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1859:17:1859:24 | slice[0] | | main.rs:1825:5:1826:13 | S |
-| main.rs:1859:17:1859:30 | ... .foo() | | main.rs:1825:5:1826:13 | S |
-| main.rs:1859:23:1859:23 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1863:13:1863:19 | mut vec | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1863:13:1863:19 | mut vec | T | main.rs:1825:5:1826:13 | S |
-| main.rs:1863:23:1863:34 | ...::new(...) | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1863:23:1863:34 | ...::new(...) | T | main.rs:1825:5:1826:13 | S |
-| main.rs:1864:9:1864:11 | vec | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1864:9:1864:11 | vec | T | main.rs:1825:5:1826:13 | S |
-| main.rs:1864:18:1864:18 | S | | main.rs:1825:5:1826:13 | S |
-| main.rs:1865:9:1865:11 | vec | | main.rs:1834:5:1837:5 | MyVec |
-| main.rs:1865:9:1865:11 | vec | T | main.rs:1825:5:1826:13 | S |
-| main.rs:1865:13:1865:13 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1867:13:1867:14 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1867:13:1867:14 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1867:13:1867:14 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
-| main.rs:1867:13:1867:14 | xs | [T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1867:21:1867:21 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1867:26:1867:28 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1867:26:1867:28 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1867:26:1867:28 | [...] | [T;...] | main.rs:1825:5:1826:13 | S |
-| main.rs:1867:26:1867:28 | [...] | [T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1867:27:1867:27 | S | | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:13:1868:13 | x | | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:17:1868:18 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1868:17:1868:18 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1868:17:1868:18 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:17:1868:18 | xs | [T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:17:1868:21 | xs[0] | | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:17:1868:27 | ... .foo() | | main.rs:1825:5:1826:13 | S |
-| main.rs:1868:20:1868:20 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1870:23:1870:25 | &xs | | file://:0:0:0:0 | & |
-| main.rs:1870:23:1870:25 | &xs | &T | file://:0:0:0:0 | [] |
-| main.rs:1870:23:1870:25 | &xs | &T | file://:0:0:0:0 | [] |
-| main.rs:1870:23:1870:25 | &xs | &T.[T;...] | main.rs:1825:5:1826:13 | S |
-| main.rs:1870:23:1870:25 | &xs | &T.[T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1870:24:1870:25 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1870:24:1870:25 | xs | | file://:0:0:0:0 | [] |
-| main.rs:1870:24:1870:25 | xs | [T;...] | main.rs:1825:5:1826:13 | S |
-| main.rs:1870:24:1870:25 | xs | [T] | main.rs:1825:5:1826:13 | S |
-| main.rs:1876:25:1876:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str |
-| main.rs:1876:25:1876:45 | ...::format(...) | | {EXTERNAL LOCATION} | String |
-| main.rs:1876:25:1876:45 | { ... } | | {EXTERNAL LOCATION} | String |
-| main.rs:1876:38:1876:45 | "World!" | | {EXTERNAL LOCATION} | str |
-| main.rs:1882:19:1882:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1882:19:1882:23 | SelfParam | &T | main.rs:1881:5:1883:5 | Self [trait MyAdd] |
-| main.rs:1882:26:1882:30 | value | | main.rs:1881:17:1881:17 | T |
+| main.rs:1721:13:1721:26 | vec2_zero_plus | | {EXTERNAL LOCATION} | bool |
+| main.rs:1721:30:1721:48 | Vec2 {...} | | main.rs:1356:5:1361:5 | Vec2 |
+| main.rs:1721:30:1721:64 | ... == ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1721:40:1721:40 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1721:40:1721:40 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1721:46:1721:46 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1721:46:1721:46 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1731:18:1731:21 | SelfParam | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1734:25:1736:5 | { ... } | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1735:9:1735:10 | S1 | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1738:41:1740:5 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1738:41:1740:5 | { ... } | | main.rs:1738:16:1738:39 | ImplTraitTypeRepr |
+| main.rs:1738:41:1740:5 | { ... } | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1739:9:1739:20 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1739:9:1739:20 | { ... } | | main.rs:1738:16:1738:39 | ImplTraitTypeRepr |
+| main.rs:1739:9:1739:20 | { ... } | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1739:17:1739:18 | S1 | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1748:13:1748:42 | SelfParam | | {EXTERNAL LOCATION} | Pin |
+| main.rs:1748:13:1748:42 | SelfParam | Ptr | file://:0:0:0:0 | & |
+| main.rs:1748:13:1748:42 | SelfParam | Ptr.&T | main.rs:1742:5:1742:14 | S2 |
+| main.rs:1749:13:1749:15 | _cx | | file://:0:0:0:0 | & |
+| main.rs:1749:13:1749:15 | _cx | &T | {EXTERNAL LOCATION} | Context |
+| main.rs:1750:44:1752:9 | { ... } | | {EXTERNAL LOCATION} | Poll |
+| main.rs:1750:44:1752:9 | { ... } | T | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1751:13:1751:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll |
+| main.rs:1751:13:1751:38 | ...::Ready(...) | T | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1751:36:1751:37 | S1 | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1755:41:1757:5 | { ... } | | main.rs:1742:5:1742:14 | S2 |
+| main.rs:1755:41:1757:5 | { ... } | | main.rs:1755:16:1755:39 | ImplTraitTypeRepr |
+| main.rs:1756:9:1756:10 | S2 | | main.rs:1742:5:1742:14 | S2 |
+| main.rs:1756:9:1756:10 | S2 | | main.rs:1755:16:1755:39 | ImplTraitTypeRepr |
+| main.rs:1760:9:1760:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1760:9:1760:12 | f1(...) | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1760:9:1760:18 | await ... | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1761:9:1761:12 | f2(...) | | main.rs:1738:16:1738:39 | ImplTraitTypeRepr |
+| main.rs:1761:9:1761:18 | await ... | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1762:9:1762:12 | f3(...) | | main.rs:1755:16:1755:39 | ImplTraitTypeRepr |
+| main.rs:1762:9:1762:18 | await ... | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1763:9:1763:10 | S2 | | main.rs:1742:5:1742:14 | S2 |
+| main.rs:1763:9:1763:16 | await S2 | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1764:13:1764:13 | b | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1764:13:1764:13 | b | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1764:17:1764:28 | { ... } | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1764:17:1764:28 | { ... } | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1764:25:1764:26 | S1 | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1765:9:1765:9 | b | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1765:9:1765:9 | b | Output | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1765:9:1765:15 | await b | | main.rs:1728:5:1728:14 | S1 |
+| main.rs:1774:15:1774:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1774:15:1774:19 | SelfParam | &T | main.rs:1773:5:1775:5 | Self [trait Trait1] |
+| main.rs:1778:15:1778:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1778:15:1778:19 | SelfParam | &T | main.rs:1777:5:1779:5 | Self [trait Trait2] |
+| main.rs:1782:15:1782:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1782:15:1782:19 | SelfParam | &T | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1786:15:1786:19 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1786:15:1786:19 | SelfParam | &T | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1789:37:1791:5 | { ... } | | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1789:37:1791:5 | { ... } | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1790:9:1790:10 | S1 | | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1790:9:1790:10 | S1 | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1794:18:1794:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1794:18:1794:22 | SelfParam | &T | main.rs:1793:5:1795:5 | Self [trait MyTrait] |
+| main.rs:1798:18:1798:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1798:18:1798:22 | SelfParam | &T | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1798:31:1800:9 | { ... } | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1799:13:1799:14 | S2 | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1803:45:1805:5 | { ... } | | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1803:45:1805:5 | { ... } | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1804:9:1804:10 | S1 | | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1804:9:1804:10 | S1 | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1807:41:1807:41 | t | | main.rs:1807:26:1807:38 | B |
+| main.rs:1807:52:1809:5 | { ... } | | main.rs:1807:23:1807:23 | A |
+| main.rs:1808:9:1808:9 | t | | main.rs:1807:26:1807:38 | B |
+| main.rs:1808:9:1808:17 | t.get_a() | | main.rs:1807:23:1807:23 | A |
+| main.rs:1811:26:1811:26 | t | | main.rs:1811:29:1811:43 | ImplTraitTypeRepr |
+| main.rs:1811:51:1813:5 | { ... } | | main.rs:1811:23:1811:23 | A |
+| main.rs:1812:9:1812:9 | t | | main.rs:1811:29:1811:43 | ImplTraitTypeRepr |
+| main.rs:1812:9:1812:17 | t.get_a() | | main.rs:1811:23:1811:23 | A |
+| main.rs:1816:13:1816:13 | x | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1816:17:1816:20 | f1(...) | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1817:9:1817:9 | x | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1818:9:1818:9 | x | | main.rs:1789:16:1789:35 | ImplTraitTypeRepr |
+| main.rs:1819:13:1819:13 | a | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1819:17:1819:32 | get_a_my_trait(...) | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1820:13:1820:13 | b | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1820:17:1820:33 | uses_my_trait1(...) | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1820:32:1820:32 | a | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1821:13:1821:13 | a | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1821:17:1821:32 | get_a_my_trait(...) | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1822:13:1822:13 | c | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1822:17:1822:33 | uses_my_trait2(...) | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1822:32:1822:32 | a | | main.rs:1803:28:1803:43 | ImplTraitTypeRepr |
+| main.rs:1823:13:1823:13 | d | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1823:17:1823:34 | uses_my_trait2(...) | | main.rs:1771:5:1771:14 | S2 |
+| main.rs:1823:32:1823:33 | S1 | | main.rs:1770:5:1770:14 | S1 |
+| main.rs:1834:16:1834:20 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1834:16:1834:20 | SelfParam | &T | main.rs:1830:5:1831:13 | S |
+| main.rs:1834:31:1836:9 | { ... } | | main.rs:1830:5:1831:13 | S |
+| main.rs:1835:13:1835:13 | S | | main.rs:1830:5:1831:13 | S |
+| main.rs:1845:26:1847:9 | { ... } | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1845:26:1847:9 | { ... } | T | main.rs:1844:10:1844:10 | T |
+| main.rs:1846:13:1846:38 | MyVec {...} | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1846:13:1846:38 | MyVec {...} | T | main.rs:1844:10:1844:10 | T |
+| main.rs:1846:27:1846:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1846:27:1846:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1846:27:1846:36 | ...::new(...) | T | main.rs:1844:10:1844:10 | T |
+| main.rs:1849:17:1849:25 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1849:17:1849:25 | SelfParam | &T | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1849:17:1849:25 | SelfParam | &T.T | main.rs:1844:10:1844:10 | T |
+| main.rs:1849:28:1849:32 | value | | main.rs:1844:10:1844:10 | T |
+| main.rs:1850:13:1850:16 | self | | file://:0:0:0:0 | & |
+| main.rs:1850:13:1850:16 | self | &T | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1850:13:1850:16 | self | &T.T | main.rs:1844:10:1844:10 | T |
+| main.rs:1850:13:1850:21 | self.data | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1850:13:1850:21 | self.data | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1850:13:1850:21 | self.data | T | main.rs:1844:10:1844:10 | T |
+| main.rs:1850:28:1850:32 | value | | main.rs:1844:10:1844:10 | T |
+| main.rs:1858:18:1858:22 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1858:18:1858:22 | SelfParam | &T | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1858:18:1858:22 | SelfParam | &T.T | main.rs:1854:10:1854:10 | T |
+| main.rs:1858:25:1858:29 | index | | {EXTERNAL LOCATION} | usize |
+| main.rs:1858:56:1860:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1858:56:1860:9 | { ... } | &T | main.rs:1854:10:1854:10 | T |
+| main.rs:1859:13:1859:29 | &... | | file://:0:0:0:0 | & |
+| main.rs:1859:13:1859:29 | &... | &T | main.rs:1854:10:1854:10 | T |
+| main.rs:1859:14:1859:17 | self | | file://:0:0:0:0 | & |
+| main.rs:1859:14:1859:17 | self | &T | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1859:14:1859:17 | self | &T.T | main.rs:1854:10:1854:10 | T |
+| main.rs:1859:14:1859:22 | self.data | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1859:14:1859:22 | self.data | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1859:14:1859:22 | self.data | T | main.rs:1854:10:1854:10 | T |
+| main.rs:1859:14:1859:29 | ...[index] | | main.rs:1854:10:1854:10 | T |
+| main.rs:1859:24:1859:28 | index | | {EXTERNAL LOCATION} | usize |
+| main.rs:1863:22:1863:26 | slice | | file://:0:0:0:0 | & |
+| main.rs:1863:22:1863:26 | slice | &T | file://:0:0:0:0 | [] |
+| main.rs:1863:22:1863:26 | slice | &T.[T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1864:13:1864:13 | x | | main.rs:1830:5:1831:13 | S |
+| main.rs:1864:17:1864:21 | slice | | file://:0:0:0:0 | & |
+| main.rs:1864:17:1864:21 | slice | &T | file://:0:0:0:0 | [] |
+| main.rs:1864:17:1864:21 | slice | &T.[T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1864:17:1864:24 | slice[0] | | main.rs:1830:5:1831:13 | S |
+| main.rs:1864:17:1864:30 | ... .foo() | | main.rs:1830:5:1831:13 | S |
+| main.rs:1864:23:1864:23 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1868:13:1868:19 | mut vec | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1868:13:1868:19 | mut vec | T | main.rs:1830:5:1831:13 | S |
+| main.rs:1868:23:1868:34 | ...::new(...) | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1868:23:1868:34 | ...::new(...) | T | main.rs:1830:5:1831:13 | S |
+| main.rs:1869:9:1869:11 | vec | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1869:9:1869:11 | vec | T | main.rs:1830:5:1831:13 | S |
+| main.rs:1869:18:1869:18 | S | | main.rs:1830:5:1831:13 | S |
+| main.rs:1870:9:1870:11 | vec | | main.rs:1839:5:1842:5 | MyVec |
+| main.rs:1870:9:1870:11 | vec | T | main.rs:1830:5:1831:13 | S |
+| main.rs:1870:13:1870:13 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1872:13:1872:14 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1872:13:1872:14 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1872:13:1872:14 | xs | [T;...] | main.rs:1830:5:1831:13 | S |
+| main.rs:1872:13:1872:14 | xs | [T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1872:21:1872:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1872:26:1872:28 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1872:26:1872:28 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1872:26:1872:28 | [...] | [T;...] | main.rs:1830:5:1831:13 | S |
+| main.rs:1872:26:1872:28 | [...] | [T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1872:27:1872:27 | S | | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:13:1873:13 | x | | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:17:1873:18 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1873:17:1873:18 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1873:17:1873:18 | xs | [T;...] | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:17:1873:18 | xs | [T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:17:1873:21 | xs[0] | | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:17:1873:27 | ... .foo() | | main.rs:1830:5:1831:13 | S |
+| main.rs:1873:20:1873:20 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1875:23:1875:25 | &xs | | file://:0:0:0:0 | & |
+| main.rs:1875:23:1875:25 | &xs | &T | file://:0:0:0:0 | [] |
+| main.rs:1875:23:1875:25 | &xs | &T | file://:0:0:0:0 | [] |
+| main.rs:1875:23:1875:25 | &xs | &T.[T;...] | main.rs:1830:5:1831:13 | S |
+| main.rs:1875:23:1875:25 | &xs | &T.[T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1875:24:1875:25 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1875:24:1875:25 | xs | | file://:0:0:0:0 | [] |
+| main.rs:1875:24:1875:25 | xs | [T;...] | main.rs:1830:5:1831:13 | S |
+| main.rs:1875:24:1875:25 | xs | [T] | main.rs:1830:5:1831:13 | S |
+| main.rs:1881:25:1881:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str |
+| main.rs:1881:25:1881:45 | ...::format(...) | | {EXTERNAL LOCATION} | String |
+| main.rs:1881:25:1881:45 | { ... } | | {EXTERNAL LOCATION} | String |
+| main.rs:1881:38:1881:45 | "World!" | | {EXTERNAL LOCATION} | str |
| main.rs:1887:19:1887:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1887:19:1887:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1887:26:1887:30 | value | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1887:46:1889:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1888:13:1888:17 | value | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1894:19:1894:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1894:19:1894:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1894:26:1894:30 | value | | file://:0:0:0:0 | & |
-| main.rs:1894:26:1894:30 | value | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1894:26:1894:30 | value | &T | file://:0:0:0:0 | & |
-| main.rs:1894:47:1896:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1894:47:1896:9 | { ... } | | file://:0:0:0:0 | & |
-| main.rs:1895:13:1895:18 | * ... | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1895:13:1895:18 | * ... | | file://:0:0:0:0 | & |
-| main.rs:1895:14:1895:18 | value | | file://:0:0:0:0 | & |
-| main.rs:1895:14:1895:18 | value | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1895:14:1895:18 | value | &T | file://:0:0:0:0 | & |
-| main.rs:1901:19:1901:23 | SelfParam | | file://:0:0:0:0 | & |
-| main.rs:1901:19:1901:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1901:26:1901:30 | value | | {EXTERNAL LOCATION} | bool |
-| main.rs:1901:47:1907:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1901:47:1907:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1902:13:1906:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1902:13:1906:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1902:16:1902:20 | value | | {EXTERNAL LOCATION} | bool |
-| main.rs:1902:22:1904:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1902:22:1904:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1903:17:1903:17 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1903:17:1903:17 | 1 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1904:20:1906:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1904:20:1906:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1905:17:1905:17 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1905:17:1905:17 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1911:13:1911:13 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1911:13:1911:13 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1911:22:1911:23 | 73 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1911:22:1911:23 | 73 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1912:9:1912:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1912:9:1912:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1912:9:1912:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1912:18:1912:21 | 5i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1913:9:1913:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1913:9:1913:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1913:9:1913:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1913:18:1913:22 | &5i64 | | file://:0:0:0:0 | & |
-| main.rs:1913:18:1913:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 |
-| main.rs:1913:19:1913:22 | 5i64 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1914:9:1914:9 | x | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1914:9:1914:9 | x | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1914:9:1914:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1914:18:1914:21 | true | | {EXTERNAL LOCATION} | bool |
-| main.rs:1922:5:1922:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1923:5:1923:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1923:20:1923:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1923:41:1923:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1939:5:1939:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1887:19:1887:23 | SelfParam | &T | main.rs:1886:5:1888:5 | Self [trait MyAdd] |
+| main.rs:1887:26:1887:30 | value | | main.rs:1886:17:1886:17 | T |
+| main.rs:1892:19:1892:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1892:19:1892:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1892:26:1892:30 | value | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1892:46:1894:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1893:13:1893:17 | value | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1899:19:1899:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1899:19:1899:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1899:26:1899:30 | value | | file://:0:0:0:0 | & |
+| main.rs:1899:26:1899:30 | value | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1899:26:1899:30 | value | &T | file://:0:0:0:0 | & |
+| main.rs:1899:47:1901:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1899:47:1901:9 | { ... } | | file://:0:0:0:0 | & |
+| main.rs:1900:13:1900:18 | * ... | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1900:13:1900:18 | * ... | | file://:0:0:0:0 | & |
+| main.rs:1900:14:1900:18 | value | | file://:0:0:0:0 | & |
+| main.rs:1900:14:1900:18 | value | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1900:14:1900:18 | value | &T | file://:0:0:0:0 | & |
+| main.rs:1906:19:1906:23 | SelfParam | | file://:0:0:0:0 | & |
+| main.rs:1906:19:1906:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1906:26:1906:30 | value | | {EXTERNAL LOCATION} | bool |
+| main.rs:1906:47:1912:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1906:47:1912:9 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1907:13:1911:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1907:13:1911:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1907:16:1907:20 | value | | {EXTERNAL LOCATION} | bool |
+| main.rs:1907:22:1909:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1907:22:1909:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1908:17:1908:17 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1908:17:1908:17 | 1 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1909:20:1911:13 | { ... } | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1909:20:1911:13 | { ... } | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1910:17:1910:17 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1910:17:1910:17 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1916:13:1916:13 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1916:13:1916:13 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1916:22:1916:23 | 73 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1916:22:1916:23 | 73 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1917:9:1917:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1917:9:1917:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1917:9:1917:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1917:18:1917:21 | 5i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1918:9:1918:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1918:9:1918:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1918:9:1918:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1918:18:1918:22 | &5i64 | | file://:0:0:0:0 | & |
+| main.rs:1918:18:1918:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 |
+| main.rs:1918:19:1918:22 | 5i64 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1919:9:1919:9 | x | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1919:9:1919:9 | x | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1919:9:1919:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1919:18:1919:21 | true | | {EXTERNAL LOCATION} | bool |
+| main.rs:1927:5:1927:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1928:5:1928:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1928:20:1928:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1928:41:1928:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1944:5:1944:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From d55e8b70109c2a9fac209a5a489f34bc50ba9dec Mon Sep 17 00:00:00 2001
From: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
Date: Thu, 19 Jun 2025 13:45:54 +0100
Subject: [PATCH 085/213] Rust: Add another test case for ranges.
---
.../test/library-tests/type-inference/main.rs | 2 +
.../type-inference/type-inference.expected | 288 +++++++++---------
2 files changed, 147 insertions(+), 143 deletions(-)
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index 4969cedb044..43dda03936a 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1925,6 +1925,8 @@ mod loops {
for i in 0..10 { } // $ MISSING: type=i:i32
for u in [0u8 .. 10] { } // $ MISSING: type=u:u8
+ let range = 0..10; // $ MISSING: type=range:Range type=range:Idx.i32
+ for i in range { } // $ MISSING: type=i:i32
let range1 = std::ops::Range { start: 0u16, end: 10u16 }; // $ type=range1:Range type=range1:Idx.u16
for u in range1 { } // $ MISSING: type=u:u16
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 3cb687091d7..6cdf1b4750d 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -2842,147 +2842,149 @@ inferType
| main.rs:1927:18:1927:28 | [...] | | file://:0:0:0:0 | [] |
| main.rs:1927:19:1927:21 | 0u8 | | {EXTERNAL LOCATION} | u8 |
| main.rs:1927:26:1927:27 | 10 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1929:13:1929:18 | range1 | | {EXTERNAL LOCATION} | Range |
-| main.rs:1929:13:1929:18 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
-| main.rs:1929:22:1929:64 | ...::Range {...} | | {EXTERNAL LOCATION} | Range |
-| main.rs:1929:22:1929:64 | ...::Range {...} | Idx | {EXTERNAL LOCATION} | u16 |
-| main.rs:1929:47:1929:50 | 0u16 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1929:58:1929:62 | 10u16 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1930:18:1930:23 | range1 | | {EXTERNAL LOCATION} | Range |
-| main.rs:1930:18:1930:23 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
-| main.rs:1934:26:1934:26 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1934:29:1934:29 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1934:32:1934:32 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:13:1937:18 | vals4a | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1937:13:1937:18 | vals4a | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1937:13:1937:18 | vals4a | T | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:33:1937:44 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1937:33:1937:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:33:1937:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:33:1937:53 | ... .to_vec() | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1937:33:1937:53 | ... .to_vec() | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1937:33:1937:53 | ... .to_vec() | T | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:34:1937:37 | 1u16 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:34:1937:37 | 1u16 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:40:1937:40 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:40:1937:40 | 2 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1937:43:1937:43 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1937:43:1937:43 | 3 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1938:13:1938:13 | u | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1938:18:1938:23 | vals4a | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1938:18:1938:23 | vals4a | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1938:18:1938:23 | vals4a | T | {EXTERNAL LOCATION} | u16 |
-| main.rs:1940:22:1940:33 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1940:22:1940:33 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:22:1940:33 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
-| main.rs:1940:23:1940:26 | 1u16 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:23:1940:26 | 1u16 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1940:29:1940:29 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:29:1940:29 | 2 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1940:32:1940:32 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1940:32:1940:32 | 3 | | {EXTERNAL LOCATION} | u16 |
-| main.rs:1943:13:1943:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1943:13:1943:17 | vals5 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1943:13:1943:17 | vals5 | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1943:21:1943:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1943:21:1943:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1943:21:1943:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1943:31:1943:42 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1943:31:1943:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:31:1943:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
-| main.rs:1943:32:1943:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:32:1943:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1943:38:1943:38 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:38:1943:38 | 2 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1943:41:1943:41 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1943:41:1943:41 | 3 | | {EXTERNAL LOCATION} | u32 |
-| main.rs:1944:13:1944:13 | u | | {EXTERNAL LOCATION} | u8 |
-| main.rs:1944:18:1944:22 | vals5 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1944:18:1944:22 | vals5 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1944:18:1944:22 | vals5 | T | {EXTERNAL LOCATION} | u8 |
-| main.rs:1946:13:1946:17 | vals6 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1946:13:1946:17 | vals6 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1946:13:1946:17 | vals6 | T | file://:0:0:0:0 | & |
-| main.rs:1946:13:1946:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:33:1946:44 | [...] | | file://:0:0:0:0 | [] |
-| main.rs:1946:33:1946:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
-| main.rs:1946:33:1946:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:33:1946:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1946:33:1946:61 | ... .collect() | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1946:33:1946:61 | ... .collect() | T | file://:0:0:0:0 | & |
-| main.rs:1946:33:1946:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:34:1946:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1946:34:1946:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:40:1946:40 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1946:40:1946:40 | 2 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1946:43:1946:43 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1946:43:1946:43 | 3 | | {EXTERNAL LOCATION} | u64 |
-| main.rs:1947:13:1947:13 | u | | file://:0:0:0:0 | & |
-| main.rs:1947:13:1947:13 | u | &T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1947:18:1947:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1947:18:1947:22 | vals6 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1947:18:1947:22 | vals6 | T | file://:0:0:0:0 | & |
-| main.rs:1947:18:1947:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
-| main.rs:1949:13:1949:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1949:13:1949:21 | mut vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1949:25:1949:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1949:25:1949:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1950:9:1950:13 | vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1950:9:1950:13 | vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1950:20:1950:22 | 1u8 | | {EXTERNAL LOCATION} | u8 |
-| main.rs:1951:18:1951:22 | vals7 | | {EXTERNAL LOCATION} | Vec |
-| main.rs:1951:18:1951:22 | vals7 | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1953:33:1953:33 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1953:36:1953:36 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1953:45:1953:45 | 3 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1953:48:1953:48 | 4 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1959:13:1959:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1959:13:1959:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1959:24:1959:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1959:24:1959:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1960:9:1960:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1960:9:1960:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1960:9:1960:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1960:21:1960:21 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1960:24:1960:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1960:24:1960:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1960:33:1960:37 | "one" | | {EXTERNAL LOCATION} | str |
-| main.rs:1961:9:1961:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1961:9:1961:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1961:9:1961:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
-| main.rs:1961:21:1961:21 | 2 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1961:24:1961:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
-| main.rs:1961:24:1961:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
-| main.rs:1961:33:1961:37 | "two" | | {EXTERNAL LOCATION} | str |
-| main.rs:1962:20:1962:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1962:20:1962:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1962:20:1962:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
-| main.rs:1963:22:1963:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1963:22:1963:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1963:22:1963:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
-| main.rs:1964:29:1964:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1964:29:1964:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1964:29:1964:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
-| main.rs:1965:29:1965:33 | &map1 | | file://:0:0:0:0 | & |
-| main.rs:1965:29:1965:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1965:29:1965:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1965:30:1965:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
-| main.rs:1965:30:1965:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
-| main.rs:1969:13:1969:17 | mut a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1969:13:1969:17 | mut a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1969:26:1969:26 | 0 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1969:26:1969:26 | 0 | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1970:15:1970:15 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1970:15:1970:15 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1970:15:1970:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
-| main.rs:1970:19:1970:20 | 10 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1971:13:1971:13 | a | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1971:13:1971:13 | a | | {EXTERNAL LOCATION} | i64 |
-| main.rs:1971:13:1971:18 | ... += ... | | file://:0:0:0:0 | () |
-| main.rs:1971:18:1971:18 | 1 | | {EXTERNAL LOCATION} | i32 |
-| main.rs:1978:5:1978:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1979:5:1979:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
-| main.rs:1979:20:1979:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1979:41:1979:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
-| main.rs:1995:5:1995:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
+| main.rs:1928:21:1928:21 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1928:24:1928:25 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1931:13:1931:18 | range1 | | {EXTERNAL LOCATION} | Range |
+| main.rs:1931:13:1931:18 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1931:22:1931:64 | ...::Range {...} | | {EXTERNAL LOCATION} | Range |
+| main.rs:1931:22:1931:64 | ...::Range {...} | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1931:47:1931:50 | 0u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1931:58:1931:62 | 10u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1932:18:1932:23 | range1 | | {EXTERNAL LOCATION} | Range |
+| main.rs:1932:18:1932:23 | range1 | Idx | {EXTERNAL LOCATION} | u16 |
+| main.rs:1936:26:1936:26 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1936:29:1936:29 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1936:32:1936:32 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1939:13:1939:18 | vals4a | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1939:13:1939:18 | vals4a | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1939:13:1939:18 | vals4a | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1939:33:1939:44 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1939:33:1939:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1939:33:1939:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1939:33:1939:53 | ... .to_vec() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1939:33:1939:53 | ... .to_vec() | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1939:33:1939:53 | ... .to_vec() | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1939:34:1939:37 | 1u16 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1939:34:1939:37 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1939:40:1939:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1939:40:1939:40 | 2 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1939:43:1939:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1939:43:1939:43 | 3 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:13:1940:13 | u | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1940:18:1940:23 | vals4a | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1940:18:1940:23 | vals4a | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1940:18:1940:23 | vals4a | T | {EXTERNAL LOCATION} | u16 |
+| main.rs:1942:22:1942:33 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1942:22:1942:33 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1942:22:1942:33 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
+| main.rs:1942:23:1942:26 | 1u16 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1942:23:1942:26 | 1u16 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1942:29:1942:29 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1942:29:1942:29 | 2 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1942:32:1942:32 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1942:32:1942:32 | 3 | | {EXTERNAL LOCATION} | u16 |
+| main.rs:1945:13:1945:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1945:13:1945:17 | vals5 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1945:13:1945:17 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1945:21:1945:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1945:21:1945:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1945:21:1945:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1945:31:1945:42 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1945:31:1945:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1945:31:1945:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
+| main.rs:1945:32:1945:35 | 1u32 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1945:32:1945:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1945:38:1945:38 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1945:38:1945:38 | 2 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1945:41:1945:41 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1945:41:1945:41 | 3 | | {EXTERNAL LOCATION} | u32 |
+| main.rs:1946:13:1946:13 | u | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1946:18:1946:22 | vals5 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1946:18:1946:22 | vals5 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1946:18:1946:22 | vals5 | T | {EXTERNAL LOCATION} | u8 |
+| main.rs:1948:13:1948:17 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1948:13:1948:17 | vals6 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1948:13:1948:17 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1948:13:1948:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1948:33:1948:44 | [...] | | file://:0:0:0:0 | [] |
+| main.rs:1948:33:1948:44 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 |
+| main.rs:1948:33:1948:44 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 |
+| main.rs:1948:33:1948:61 | ... .collect() | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1948:33:1948:61 | ... .collect() | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1948:33:1948:61 | ... .collect() | T | file://:0:0:0:0 | & |
+| main.rs:1948:33:1948:61 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1948:34:1948:37 | 1u64 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1948:34:1948:37 | 1u64 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1948:40:1948:40 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1948:40:1948:40 | 2 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1948:43:1948:43 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1948:43:1948:43 | 3 | | {EXTERNAL LOCATION} | u64 |
+| main.rs:1949:13:1949:13 | u | | file://:0:0:0:0 | & |
+| main.rs:1949:13:1949:13 | u | &T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1949:18:1949:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1949:18:1949:22 | vals6 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1949:18:1949:22 | vals6 | T | file://:0:0:0:0 | & |
+| main.rs:1949:18:1949:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 |
+| main.rs:1951:13:1951:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1951:13:1951:21 | mut vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1951:25:1951:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1951:25:1951:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1952:9:1952:13 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1952:9:1952:13 | vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1952:20:1952:22 | 1u8 | | {EXTERNAL LOCATION} | u8 |
+| main.rs:1953:18:1953:22 | vals7 | | {EXTERNAL LOCATION} | Vec |
+| main.rs:1953:18:1953:22 | vals7 | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1955:33:1955:33 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1955:36:1955:36 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1955:45:1955:45 | 3 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1955:48:1955:48 | 4 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1961:13:1961:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1961:13:1961:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1961:24:1961:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1961:24:1961:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1962:9:1962:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1962:9:1962:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1962:9:1962:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1962:21:1962:21 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1962:24:1962:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1962:24:1962:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1962:33:1962:37 | "one" | | {EXTERNAL LOCATION} | str |
+| main.rs:1963:9:1963:12 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1963:9:1963:12 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1963:9:1963:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option |
+| main.rs:1963:21:1963:21 | 2 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1963:24:1963:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
+| main.rs:1963:24:1963:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
+| main.rs:1963:33:1963:37 | "two" | | {EXTERNAL LOCATION} | str |
+| main.rs:1964:20:1964:23 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1964:20:1964:23 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1964:20:1964:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys |
+| main.rs:1965:22:1965:25 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1965:22:1965:25 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1965:22:1965:34 | map1.values() | | {EXTERNAL LOCATION} | Values |
+| main.rs:1966:29:1966:32 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1966:29:1966:32 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1966:29:1966:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter |
+| main.rs:1967:29:1967:33 | &map1 | | file://:0:0:0:0 | & |
+| main.rs:1967:29:1967:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1967:29:1967:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1967:30:1967:33 | map1 | | {EXTERNAL LOCATION} | HashMap |
+| main.rs:1967:30:1967:33 | map1 | S | {EXTERNAL LOCATION} | RandomState |
+| main.rs:1971:13:1971:17 | mut a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1971:13:1971:17 | mut a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1971:26:1971:26 | 0 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1971:26:1971:26 | 0 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1972:15:1972:15 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1972:15:1972:15 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1972:15:1972:20 | ... < ... | | {EXTERNAL LOCATION} | bool |
+| main.rs:1972:19:1972:20 | 10 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1973:13:1973:13 | a | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1973:13:1973:13 | a | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1973:13:1973:18 | ... += ... | | file://:0:0:0:0 | () |
+| main.rs:1973:18:1973:18 | 1 | | {EXTERNAL LOCATION} | i32 |
+| main.rs:1980:5:1980:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1981:5:1981:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
+| main.rs:1981:20:1981:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1981:41:1981:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
+| main.rs:1997:5:1997:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future |
testFailures
From 7d536a3c80af2925e62f7d7dcf502d49a5e847c4 Mon Sep 17 00:00:00 2001
From: Simon Friis Vindum
Date: Thu, 19 Jun 2025 14:57:52 +0200
Subject: [PATCH 086/213] Rust: When resolving methods on reference also
consider the reference itself
---
.../codeql/rust/internal/TypeInference.qll | 2 --
.../type-inference/dereference.rs | 2 +-
.../test/library-tests/type-inference/main.rs | 6 +++---
.../type-inference/type-inference.expected | 20 +++++++++++++++++++
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
index 34fce308239..73c18b86cd0 100644
--- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll
+++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll
@@ -1141,8 +1141,6 @@ final class MethodCall extends Call {
(
path0.isCons(TRefTypeParameter(), path)
or
- not path0.isCons(TRefTypeParameter(), _) and
- not (path0.isEmpty() and result = TRefType()) and
path = path0
)
|
diff --git a/rust/ql/test/library-tests/type-inference/dereference.rs b/rust/ql/test/library-tests/type-inference/dereference.rs
index 8ceb8ec78de..df0018cbf20 100644
--- a/rust/ql/test/library-tests/type-inference/dereference.rs
+++ b/rust/ql/test/library-tests/type-inference/dereference.rs
@@ -58,7 +58,7 @@ fn explicit_polymorphic_dereference() {
fn explicit_ref_dereference() {
// Explicit dereference with type parameter
let e1 = &'a';
- let _f1 = e1.deref(); // $ MISSING: method=deref type=_f1:&T.char
+ let _f1 = e1.deref(); // $ method=deref MISSING: type=_f1:&T.char
// Explicit dereference with type parameter
let e2 = &'a';
diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs
index fef7184c87b..a6f98ffebc4 100644
--- a/rust/ql/test/library-tests/type-inference/main.rs
+++ b/rust/ql/test/library-tests/type-inference/main.rs
@@ -1157,14 +1157,14 @@ mod method_call_type_conversion {
// https://doc.rust-lang.org/std/string/struct.String.html#deref.
let u = x9.parse::(); // $ method=parse type=u:T.u32
- let my_thing = &MyInt { a: 37 };
+ let my_thing = &MyInt { a: 37 }; // $ SPURIOUS: type=my_thing:&T.&T.MyInt
// implicit borrow of a `&`
- let a = my_thing.method_on_borrow(); // $ MISSING: method=MyInt::method_on_borrow
+ let a = my_thing.method_on_borrow(); // $ method=MyInt::method_on_borrow
println!("{:?}", a);
// no implicit borrow
let my_thing = &MyInt { a: 38 };
- let a = my_thing.method_not_on_borrow(); // $ MISSING: method=MyInt::method_not_on_borrow
+ let a = my_thing.method_not_on_borrow(); // $ method=MyInt::method_not_on_borrow
println!("{:?}", a);
}
}
diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected
index 328a2ec7198..8a3bfb24e60 100644
--- a/rust/ql/test/library-tests/type-inference/type-inference.expected
+++ b/rust/ql/test/library-tests/type-inference/type-inference.expected
@@ -126,11 +126,17 @@ inferType
| dereference.rs:55:17:55:18 | c3 | T | {EXTERNAL LOCATION} | i64 |
| dereference.rs:60:9:60:10 | e1 | | file://:0:0:0:0 | & |
| dereference.rs:60:9:60:10 | e1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:60:9:60:10 | e1 | &T | file://:0:0:0:0 | & |
| dereference.rs:60:14:60:17 | &'a' | | file://:0:0:0:0 | & |
| dereference.rs:60:14:60:17 | &'a' | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:60:14:60:17 | &'a' | &T | file://:0:0:0:0 | & |
| dereference.rs:60:15:60:17 | 'a' | | {EXTERNAL LOCATION} | char |
+| dereference.rs:60:15:60:17 | 'a' | | file://:0:0:0:0 | & |
+| dereference.rs:61:9:61:11 | _f1 | | file://:0:0:0:0 | & |
| dereference.rs:61:15:61:16 | e1 | | file://:0:0:0:0 | & |
| dereference.rs:61:15:61:16 | e1 | &T | {EXTERNAL LOCATION} | char |
+| dereference.rs:61:15:61:16 | e1 | &T | file://:0:0:0:0 | & |
+| dereference.rs:61:15:61:24 | e1.deref() | | file://:0:0:0:0 | & |
| dereference.rs:64:9:64:10 | e2 | | file://:0:0:0:0 | & |
| dereference.rs:64:9:64:10 | e2 | &T | {EXTERNAL LOCATION} | char |
| dereference.rs:64:9:64:10 | e2 | &T | file://:0:0:0:0 | & |
@@ -1733,15 +1739,26 @@ inferType
| main.rs:1158:17:1158:33 | x9.parse() | | {EXTERNAL LOCATION} | Result |
| main.rs:1158:17:1158:33 | x9.parse() | T | {EXTERNAL LOCATION} | u32 |
| main.rs:1160:13:1160:20 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1160:13:1160:20 | my_thing | &T | file://:0:0:0:0 | & |
| main.rs:1160:13:1160:20 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:13:1160:20 | my_thing | &T.&T | main.rs:1082:5:1085:5 | MyInt |
| main.rs:1160:24:1160:39 | &... | | file://:0:0:0:0 | & |
+| main.rs:1160:24:1160:39 | &... | &T | file://:0:0:0:0 | & |
| main.rs:1160:24:1160:39 | &... | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:24:1160:39 | &... | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:25:1160:39 | MyInt {...} | | file://:0:0:0:0 | & |
| main.rs:1160:25:1160:39 | MyInt {...} | | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1160:25:1160:39 | MyInt {...} | &T | main.rs:1082:5:1085:5 | MyInt |
| main.rs:1160:36:1160:37 | 37 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1160:36:1160:37 | 37 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1162:13:1162:13 | a | | {EXTERNAL LOCATION} | i64 |
| main.rs:1162:17:1162:24 | my_thing | | file://:0:0:0:0 | & |
+| main.rs:1162:17:1162:24 | my_thing | &T | file://:0:0:0:0 | & |
| main.rs:1162:17:1162:24 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1162:17:1162:24 | my_thing | &T.&T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1162:17:1162:43 | my_thing.method_on_borrow() | | {EXTERNAL LOCATION} | i64 |
| main.rs:1163:18:1163:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1163:26:1163:26 | a | | {EXTERNAL LOCATION} | i64 |
| main.rs:1166:13:1166:20 | my_thing | | file://:0:0:0:0 | & |
| main.rs:1166:13:1166:20 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
| main.rs:1166:24:1166:39 | &... | | file://:0:0:0:0 | & |
@@ -1749,9 +1766,12 @@ inferType
| main.rs:1166:25:1166:39 | MyInt {...} | | main.rs:1082:5:1085:5 | MyInt |
| main.rs:1166:36:1166:37 | 38 | | {EXTERNAL LOCATION} | i32 |
| main.rs:1166:36:1166:37 | 38 | | {EXTERNAL LOCATION} | i64 |
+| main.rs:1167:13:1167:13 | a | | {EXTERNAL LOCATION} | i64 |
| main.rs:1167:17:1167:24 | my_thing | | file://:0:0:0:0 | & |
| main.rs:1167:17:1167:24 | my_thing | &T | main.rs:1082:5:1085:5 | MyInt |
+| main.rs:1167:17:1167:47 | my_thing.method_not_on_borrow() | | {EXTERNAL LOCATION} | i64 |
| main.rs:1168:18:1168:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str |
+| main.rs:1168:26:1168:26 | a | | {EXTERNAL LOCATION} | i64 |
| main.rs:1175:16:1175:20 | SelfParam | | file://:0:0:0:0 | & |
| main.rs:1175:16:1175:20 | SelfParam | &T | main.rs:1173:5:1181:5 | Self [trait MyTrait] |
| main.rs:1178:16:1178:20 | SelfParam | | file://:0:0:0:0 | & |
From 79fd10d31f82f0916909264b8d1ce8be1ab220e4 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 19 Jun 2025 12:57:40 +0200
Subject: [PATCH 087/213] Rust: move model generator to new format
---
rust/bulk_generation_targets.yml | 1 +
.../modelgenerator/internal/CaptureModels.qll | 68 ++++++++++---------
2 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/rust/bulk_generation_targets.yml b/rust/bulk_generation_targets.yml
index 15e38c7a18e..baccc89da38 100644
--- a/rust/bulk_generation_targets.yml
+++ b/rust/bulk_generation_targets.yml
@@ -1,6 +1,7 @@
strategy: dca
language: rust
destination: rust/ql/lib/ext/generated
+single-file: true # dump models into a single file per crate (we do not have proper namespaces)
# targets must have name specified and corresponding to the name in the DCA suite
# they can optionally specify any of
# with-sinks: false
diff --git a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll
index d30157b5090..bfe71d2ef85 100644
--- a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll
+++ b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll
@@ -11,26 +11,32 @@ private import codeql.rust.dataflow.internal.TaintTrackingImpl
private import codeql.mad.modelgenerator.internal.ModelGeneratorImpl
private import codeql.rust.dataflow.internal.FlowSummaryImpl as FlowSummary
-private predicate relevant(Function api) {
- // Only include functions that have a resolved path.
- api.hasCrateOrigin() and
- api.hasExtendedCanonicalPath() and
- // A canonical path can contain `;` as the syntax for array types use `;`. For
- // instance `<[Foo; 1] as Bar>::baz`. This does not work with the shared model
- // generator and it is not clear if this will also be the case when we move to
- // QL created canoonical paths, so for now we just exclude functions with
- // `;`s.
- not exists(api.getExtendedCanonicalPath().indexOf(";")) and
- (
- // This excludes closures (these are not exported API endpoints) and
- // functions without a `pub` visibility. A function can be `pub` without
- // ultimately being exported by a crate, so this is an overapproximation.
- api.hasVisibility()
- or
- // If a method implements a public trait it is exposed through the trait.
- // We overapproximate this by including all trait method implementations.
- exists(Impl impl | impl.hasTrait() and impl.getAssocItemList().getAssocItem(_) = api)
- )
+private newtype TCallable =
+ TFunction(Function api, string path) {
+ path = api.getCanonicalPath() and
+ (
+ // This excludes closures (these are not exported API endpoints) and
+ // functions without a `pub` visibility. A function can be `pub` without
+ // ultimately being exported by a crate, so this is an overapproximation.
+ api.hasVisibility()
+ or
+ // If a method implements a public trait it is exposed through the trait.
+ // We overapproximate this by including all trait method implementations.
+ exists(Impl impl | impl.hasTrait() and impl.getAssocItemList().getAssocItem(_) = api)
+ )
+ }
+
+private class QualifiedCallable extends TCallable {
+ Function api;
+ string path;
+
+ QualifiedCallable() { this = TFunction(api, path) }
+
+ string toString() { result = path }
+
+ Function asFunction() { result = api }
+
+ string getCanonicalPath() { result = path }
}
module ModelGeneratorCommonInput implements
@@ -41,14 +47,14 @@ module ModelGeneratorCommonInput implements
class Parameter = R::ParamBase;
- class Callable = R::Callable;
+ class Callable = QualifiedCallable;
class NodeExtended extends DataFlow::Node {
Type getType() { any() }
}
- Callable getEnclosingCallable(NodeExtended node) {
- result = node.(Node::Node).getEnclosingCallable().asCfgScope()
+ QualifiedCallable getEnclosingCallable(NodeExtended node) {
+ result.asFunction() = node.(Node::Node).getEnclosingCallable().asCfgScope()
}
predicate isRelevantType(Type t) { any() }
@@ -73,19 +79,19 @@ module ModelGeneratorCommonInput implements
}
bindingset[c]
- string paramReturnNodeAsApproximateOutput(Callable c, DataFlowImpl::ParameterPosition pos) {
+ string paramReturnNodeAsApproximateOutput(QualifiedCallable c, DataFlowImpl::ParameterPosition pos) {
result = paramReturnNodeAsExactOutput(c, pos)
}
bindingset[c]
- string paramReturnNodeAsExactOutput(Callable c, DataFlowImpl::ParameterPosition pos) {
- result = parameterExactAccess(c.getParam(pos.getPosition()))
+ string paramReturnNodeAsExactOutput(QualifiedCallable c, DataFlowImpl::ParameterPosition pos) {
+ result = parameterExactAccess(c.asFunction().getParam(pos.getPosition()))
or
pos.isSelf() and result = qualifierString()
}
- Callable returnNodeEnclosingCallable(DataFlow::Node ret) {
- result = ret.(Node::Node).getEnclosingCallable().asCfgScope()
+ QualifiedCallable returnNodeEnclosingCallable(DataFlow::Node ret) {
+ result.asFunction() = ret.(Node::Node).getEnclosingCallable().asCfgScope()
}
predicate isOwnInstanceAccessNode(DataFlowImpl::RustDataFlow::ReturnNode node) {
@@ -99,10 +105,8 @@ module ModelGeneratorCommonInput implements
c.(SingletonContentSet).getContent() instanceof ElementContent
}
- string partialModelRow(Callable api, int i) {
- i = 0 and result = api.(Function).getCrateOrigin() // crate
- or
- i = 1 and result = api.(Function).getExtendedCanonicalPath() // name
+ string partialModelRow(QualifiedCallable api, int i) {
+ i = 0 and result = min(string path | path = api.(Function).getCanonicalPath() | path)
}
string partialNeutralModelRow(Callable api, int i) { result = partialModelRow(api, i) }
From 170dd6c9ccf09a23a073e4e3ae42ddaf8b4c65c5 Mon Sep 17 00:00:00 2001
From: Paolo Tranquilli
Date: Thu, 19 Jun 2025 14:29:22 +0200
Subject: [PATCH 088/213] Rust: regenerate models
---
rust/ql/lib/ext/generated/actix-web.model.yml | 1160 +++
....com-actix-actix-web-actix-files.model.yml | 74 -
...-actix-actix-web-actix-http-test.model.yml | 10 -
...b.com-actix-actix-web-actix-http.model.yml | 301 -
...-actix-actix-web-actix-multipart.model.yml | 73 -
...com-actix-actix-web-actix-router.model.yml | 41 -
...b.com-actix-actix-web-actix-test.model.yml | 44 -
...actix-actix-web-actix-web-actors.model.yml | 33 -
...ctix-actix-web-actix-web-codegen.model.yml | 24 -
...ub.com-actix-actix-web-actix-web.model.yml | 441 --
...s-github.com-actix-actix-web-awc.model.yml | 288 -
rust/ql/lib/ext/generated/clap.model.yml | 546 ++
...tps-github.com-clap-rs-clap-clap.model.yml | 24 -
...thub.com-clap-rs-clap-clap_bench.model.yml | 11 -
...ub.com-clap-rs-clap-clap_builder.model.yml | 448 --
...b.com-clap-rs-clap-clap_complete.model.yml | 79 -
...ap-rs-clap-clap_complete_nushell.model.yml | 13 -
...hub.com-clap-rs-clap-clap_derive.model.yml | 55 -
...github.com-clap-rs-clap-clap_lex.model.yml | 12 -
...hub.com-clap-rs-clap-clap_mangen.model.yml | 19 -
rust/ql/lib/ext/generated/hyper.model.yml | 443 ++
...-github.com-hyperium-hyper-hyper.model.yml | 323 -
rust/ql/lib/ext/generated/libc.model.yml | 86 +
...hub.com-rust-lang-libc-libc-test.model.yml | 19 -
...s-github.com-rust-lang-libc-libc.model.yml | 68 -
rust/ql/lib/ext/generated/log.model.yml | 67 +
...tps-github.com-rust-lang-log-log.model.yml | 73 -
rust/ql/lib/ext/generated/memchr.model.yml | 162 +
...hub.com-BurntSushi-memchr-memchr.model.yml | 191 -
rust/ql/lib/ext/generated/once_cell.model.yml | 25 +
....com-matklad-once_cell-once_cell.model.yml | 25 -
rust/ql/lib/ext/generated/rand.model.yml | 87 +
.../ext/generated/rand/repo-benches.model.yml | 9 -
...github.com-rust-random-rand-rand.model.yml | 71 -
...com-rust-random-rand-rand_chacha.model.yml | 28 -
...b.com-rust-random-rand-rand_core.model.yml | 15 -
...ub.com-rust-random-rand-rand_pcg.model.yml | 10 -
rust/ql/lib/ext/generated/reqwest.model.yml | 443 ++
....com-seanmonstar-reqwest-reqwest.model.yml | 488 --
rust/ql/lib/ext/generated/rocket.model.yml | 898 +++
.../generated/rocket/repo-cookies.model.yml | 7 -
.../generated/rocket/repo-fairings.model.yml | 10 -
...ps-github.com-rwf2-Rocket-rocket.model.yml | 659 --
...b.com-rwf2-Rocket-rocket_codegen.model.yml | 74 -
...thub.com-rwf2-Rocket-rocket_http.model.yml | 274 -
...contrib-db_pools-rocket_db_pools.model.yml | 28 -
...n_templates-rocket_dyn_templates.model.yml | 26 -
...nc_db_pools-rocket_sync_db_pools.model.yml | 11 -
...t-tree-v0.5-contrib-ws-rocket_ws.model.yml | 19 -
.../rocket/repo-manual_routes.model.yml | 9 -
.../generated/rocket/repo-pastebin.model.yml | 8 -
.../ext/generated/rocket/repo-state.model.yml | 10 -
.../rocket/repo-static-files.model.yml | 7 -
.../ext/generated/rocket/repo-tls.model.yml | 9 -
.../ext/generated/rocket/repo-todo.model.yml | 7 -
rust/ql/lib/ext/generated/rust.model.yml | 6860 +++++++++++++++++
.../ext/generated/rust/lang-alloc.model.yml | 708 --
.../ext/generated/rust/lang-core.model.yml | 3200 --------
.../ext/generated/rust/lang-other.model.yml | 8 -
.../generated/rust/lang-proc_macro.model.yml | 142 -
.../lib/ext/generated/rust/lang-std.model.yml | 822 --
.../generated/rust/repo-dylib-dep.model.yml | 7 -
...rust-lang-backtrace-rs-backtrace.model.yml | 42 -
...ust-lang-portable-simd-core_simd.model.yml | 48 -
....com-rust-lang-stdarch-core_arch.model.yml | 1195 ---
.../rust/repo-intrinsic-test.model.yml | 52 -
.../generated/rust/repo-std_float.model.yml | 7 -
.../rust/repo-stdarch-gen-arm.model.yml | 98 -
.../rust/repo-stdarch-gen-loongarch.model.yml | 7 -
.../rust/repo-stdarch-test.model.yml | 10 -
.../rust/repo-stdarch_examples.model.yml | 8 -
.../rust/repo-test_helpers.model.yml | 12 -
rust/ql/lib/ext/generated/serde.model.yml | 265 +
...-github.com-serde-rs-serde-serde.model.yml | 221 -
....com-serde-rs-serde-serde_derive.model.yml | 78 -
.../serde/repo-serde_test_suite.model.yml | 34 -
rust/ql/lib/ext/generated/smallvec.model.yml | 54 +
...com-servo-rust-smallvec-smallvec.model.yml | 54 -
rust/ql/lib/ext/generated/tokio.model.yml | 1639 ++++
.../generated/tokio/repo-benches.model.yml | 7 -
.../generated/tokio/repo-examples.model.yml | 7 -
....com-tokio-rs-tokio-tokio-macros.model.yml | 10 -
....com-tokio-rs-tokio-tokio-stream.model.yml | 192 -
...ub.com-tokio-rs-tokio-tokio-test.model.yml | 36 -
...ub.com-tokio-rs-tokio-tokio-util.model.yml | 284 -
...-github.com-tokio-rs-tokio-tokio.model.yml | 1158 ---
.../modelgenerator/internal/CaptureModels.qll | 46 +-
.../internal/CaptureModelsPrinting.qll | 4 +-
88 files changed, 12754 insertions(+), 12946 deletions(-)
create mode 100644 rust/ql/lib/ext/generated/actix-web.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-files.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-http-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-http.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-multipart.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-router.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-web-actors.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-web-codegen.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-actix-web.model.yml
delete mode 100644 rust/ql/lib/ext/generated/actix-web/repo-https-github.com-actix-actix-web-awc.model.yml
create mode 100644 rust/ql/lib/ext/generated/clap.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_bench.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_builder.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_complete.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_complete_nushell.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_derive.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_lex.model.yml
delete mode 100644 rust/ql/lib/ext/generated/clap/repo-https-github.com-clap-rs-clap-clap_mangen.model.yml
create mode 100644 rust/ql/lib/ext/generated/hyper.model.yml
delete mode 100644 rust/ql/lib/ext/generated/hyper/repo-https-github.com-hyperium-hyper-hyper.model.yml
create mode 100644 rust/ql/lib/ext/generated/libc.model.yml
delete mode 100644 rust/ql/lib/ext/generated/libc/repo-https-github.com-rust-lang-libc-libc-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/libc/repo-https-github.com-rust-lang-libc-libc.model.yml
create mode 100644 rust/ql/lib/ext/generated/log.model.yml
delete mode 100644 rust/ql/lib/ext/generated/log/repo-https-github.com-rust-lang-log-log.model.yml
create mode 100644 rust/ql/lib/ext/generated/memchr.model.yml
delete mode 100644 rust/ql/lib/ext/generated/memchr/repo-https-github.com-BurntSushi-memchr-memchr.model.yml
create mode 100644 rust/ql/lib/ext/generated/once_cell.model.yml
delete mode 100644 rust/ql/lib/ext/generated/once_cell/repo-https-github.com-matklad-once_cell-once_cell.model.yml
create mode 100644 rust/ql/lib/ext/generated/rand.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rand/repo-benches.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rand/repo-https-github.com-rust-random-rand-rand.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rand/repo-https-github.com-rust-random-rand-rand_chacha.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rand/repo-https-github.com-rust-random-rand-rand_core.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rand/repo-https-github.com-rust-random-rand-rand_pcg.model.yml
create mode 100644 rust/ql/lib/ext/generated/reqwest.model.yml
delete mode 100644 rust/ql/lib/ext/generated/reqwest/repo-https-github.com-seanmonstar-reqwest-reqwest.model.yml
create mode 100644 rust/ql/lib/ext/generated/rocket.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-cookies.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-fairings.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-rocket.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-rocket_codegen.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-rocket_http.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-tree-v0.5-contrib-db_pools-rocket_db_pools.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-tree-v0.5-contrib-dyn_templates-rocket_dyn_templates.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-tree-v0.5-contrib-sync_db_pools-rocket_sync_db_pools.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-https-github.com-rwf2-Rocket-tree-v0.5-contrib-ws-rocket_ws.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-manual_routes.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-pastebin.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-state.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-static-files.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-tls.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rocket/repo-todo.model.yml
create mode 100644 rust/ql/lib/ext/generated/rust.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/lang-alloc.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/lang-core.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/lang-other.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/lang-proc_macro.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/lang-std.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-dylib-dep.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-https-github.com-rust-lang-backtrace-rs-backtrace.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-https-github.com-rust-lang-portable-simd-core_simd.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-https-github.com-rust-lang-stdarch-core_arch.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-intrinsic-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-std_float.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-stdarch-gen-arm.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-stdarch-gen-loongarch.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-stdarch-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-stdarch_examples.model.yml
delete mode 100644 rust/ql/lib/ext/generated/rust/repo-test_helpers.model.yml
create mode 100644 rust/ql/lib/ext/generated/serde.model.yml
delete mode 100644 rust/ql/lib/ext/generated/serde/repo-https-github.com-serde-rs-serde-serde.model.yml
delete mode 100644 rust/ql/lib/ext/generated/serde/repo-https-github.com-serde-rs-serde-serde_derive.model.yml
delete mode 100644 rust/ql/lib/ext/generated/serde/repo-serde_test_suite.model.yml
create mode 100644 rust/ql/lib/ext/generated/smallvec.model.yml
delete mode 100644 rust/ql/lib/ext/generated/smallvec/repo-https-github.com-servo-rust-smallvec-smallvec.model.yml
create mode 100644 rust/ql/lib/ext/generated/tokio.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-benches.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-examples.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-https-github.com-tokio-rs-tokio-tokio-macros.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-https-github.com-tokio-rs-tokio-tokio-stream.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-https-github.com-tokio-rs-tokio-tokio-test.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-https-github.com-tokio-rs-tokio-tokio-util.model.yml
delete mode 100644 rust/ql/lib/ext/generated/tokio/repo-https-github.com-tokio-rs-tokio-tokio.model.yml
diff --git a/rust/ql/lib/ext/generated/actix-web.model.yml b/rust/ql/lib/ext/generated/actix-web.model.yml
new file mode 100644
index 00000000000..ea9da767d9c
--- /dev/null
+++ b/rust/ql/lib/ext/generated/actix-web.model.yml
@@ -0,0 +1,1160 @@
+# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
+extensions:
+ - addsTo:
+ pack: codeql/rust-all
+ extensible: summaryModel
+ data:
+ - ["::project", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::project_ref", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_files::directory::Directory::base]", "value", "dfc-generated"]
+ - ["::new", "Argument[1]", "ReturnValue.Field[actix_files::directory::Directory::path]", "value", "dfc-generated"]
+ - ["::new_service", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::clone", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::default_handler", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::disable_content_disposition", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::files_listing_renderer", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::guard", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::index_file", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::method_guard", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::mime_override", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::path_filter", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::prefer_utf8", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::redirect_to_slash_directory", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::show_files_listing", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_etag", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_guards", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_hidden_files", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_last_modified", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::new_service", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::content_disposition", "Argument[self].Field[actix_files::named::NamedFile::content_disposition]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::content_encoding", "Argument[self].Field[actix_files::named::NamedFile::encoding]", "ReturnValue", "value", "dfc-generated"]
+ - ["::content_type", "Argument[self].Field[actix_files::named::NamedFile::content_type]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::disable_content_disposition", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::etag", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::file", "Argument[self].Field[actix_files::named::NamedFile::file]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::from_file", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[actix_files::named::NamedFile::file]", "value", "dfc-generated"]
+ - ["::last_modified", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::metadata", "Argument[self].Field[actix_files::named::NamedFile::md]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::modified", "Argument[self].Field[actix_files::named::NamedFile::modified]", "ReturnValue", "value", "dfc-generated"]
+ - ["::path", "Argument[self].Field[actix_files::named::NamedFile::path]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::path", "Argument[self].Field[actix_files::named::NamedFile::path]", "ReturnValue", "value", "dfc-generated"]
+ - ["::prefer_utf8", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::set_content_disposition", "Argument[0]", "Argument[self].Field[actix_files::named::NamedFile::content_disposition]", "value", "dfc-generated"]
+ - ["::set_content_disposition", "Argument[0]", "ReturnValue.Field[actix_files::named::NamedFile::content_disposition]", "value", "dfc-generated"]
+ - ["::set_content_disposition", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::set_content_encoding", "Argument[0]", "Argument[self].Field[actix_files::named::NamedFile::encoding].Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::set_content_encoding", "Argument[0]", "ReturnValue.Field[actix_files::named::NamedFile::encoding].Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::set_content_encoding", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::set_content_type", "Argument[0]", "Argument[self].Field[actix_files::named::NamedFile::content_type]", "value", "dfc-generated"]
+ - ["::set_content_type", "Argument[0]", "ReturnValue.Field[actix_files::named::NamedFile::content_type]", "value", "dfc-generated"]
+ - ["::set_content_type", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::set_status_code", "Argument[0]", "Argument[self].Field[actix_files::named::NamedFile::status_code]", "value", "dfc-generated"]
+ - ["::set_status_code", "Argument[0]", "ReturnValue.Field[actix_files::named::NamedFile::status_code]", "value", "dfc-generated"]
+ - ["::set_status_code", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_etag", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::use_last_modified", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::call", "Argument[self].Field[actix_files::named::NamedFileService::path].Reference", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::call", "Argument[self].Field[actix_files::named::NamedFileService::path]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::as_ref", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::call", "Argument[0]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::deref", "Argument[self].Field[0]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::deref", "Argument[self].Field[actix_files::service::FilesService(0)]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::from_io", "Argument[1]", "Argument[0]", "taint", "df-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::body::body_stream::BodyStream::stream]", "value", "dfc-generated"]
+ - ["::project", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::body_stream::BodyStream::stream]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::project_ref", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::body_stream::BodyStream::stream]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::boxed", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::try_into_bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Err(0)]", "value", "dfc-generated"]
+ - ["::as_pin_mut", "Argument[self].Reference", "ReturnValue", "value", "dfc-generated"]
+ - ["::as_pin_mut", "Argument[self]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::as_pin_mut", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::body::message_body::MessageBodyMapErr::body]", "value", "dfc-generated"]
+ - ["::new", "Argument[1]", "ReturnValue.Field[actix_http::body::message_body::MessageBodyMapErr::mapper].Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::project", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::message_body::MessageBodyMapErr::body]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::project", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::message_body::MessageBodyMapErr::mapper]", "ReturnValue", "value", "dfc-generated"]
+ - ["::project_ref", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::message_body::MessageBodyMapErr::body]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::project_ref", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::message_body::MessageBodyMapErr::mapper]", "ReturnValue", "value", "dfc-generated"]
+ - ["::size", "Argument[self].Field[actix_http::body::sized_stream::SizedStream::size]", "ReturnValue.Field[actix_http::body::size::BodySize::Sized(0)]", "value", "dfc-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::body::sized_stream::SizedStream::size]", "value", "dfc-generated"]
+ - ["::new", "Argument[1]", "ReturnValue.Field[actix_http::body::sized_stream::SizedStream::stream]", "value", "dfc-generated"]
+ - ["::project", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::sized_stream::SizedStream::size]", "ReturnValue", "value", "dfc-generated"]
+ - ["::project", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::sized_stream::SizedStream::stream]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::project_ref", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::sized_stream::SizedStream::size]", "ReturnValue", "value", "dfc-generated"]
+ - ["::project_ref", "Argument[self].Field[core::pin::Pin::__pointer].Field[actix_http::body::sized_stream::SizedStream::stream]", "ReturnValue.Field[core::pin::Pin::__pointer]", "value", "dfc-generated"]
+ - ["::client_disconnect", "Argument[0]", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::client_disconnect_timeout]", "value", "dfc-generated"]
+ - ["::client_disconnect", "Argument[0]", "ReturnValue.Field[actix_http::builder::HttpServiceBuilder::client_disconnect_timeout]", "value", "dfc-generated"]
+ - ["::client_disconnect", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::client_disconnect_timeout", "Argument[0]", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::client_disconnect_timeout]", "value", "dfc-generated"]
+ - ["::client_disconnect_timeout", "Argument[0]", "ReturnValue.Field[actix_http::builder::HttpServiceBuilder::client_disconnect_timeout]", "value", "dfc-generated"]
+ - ["::client_disconnect_timeout", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::client_request_timeout", "Argument[0]", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::client_request_timeout]", "value", "dfc-generated"]
+ - ["::client_request_timeout", "Argument[0]", "ReturnValue.Field[actix_http::builder::HttpServiceBuilder::client_request_timeout]", "value", "dfc-generated"]
+ - ["::client_request_timeout", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::client_timeout", "Argument[0]", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::client_request_timeout]", "value", "dfc-generated"]
+ - ["::client_timeout", "Argument[0]", "ReturnValue.Field[actix_http::builder::HttpServiceBuilder::client_request_timeout]", "value", "dfc-generated"]
+ - ["::client_timeout", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::expect", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::finish", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::expect]", "ReturnValue.Field[actix_http::service::HttpService::expect]", "value", "dfc-generated"]
+ - ["::finish", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::on_connect_ext]", "ReturnValue.Field[actix_http::service::HttpService::on_connect_ext]", "value", "dfc-generated"]
+ - ["::finish", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::upgrade]", "ReturnValue.Field[actix_http::service::HttpService::upgrade]", "value", "dfc-generated"]
+ - ["::h1", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::expect]", "ReturnValue.Field[actix_http::h1::service::H1Service::expect]", "value", "dfc-generated"]
+ - ["::h1", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::on_connect_ext]", "ReturnValue.Field[actix_http::h1::service::H1Service::on_connect_ext]", "value", "dfc-generated"]
+ - ["::h1", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::upgrade]", "ReturnValue.Field[actix_http::h1::service::H1Service::upgrade]", "value", "dfc-generated"]
+ - ["::h2", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::on_connect_ext]", "ReturnValue.Field[actix_http::h2::service::H2Service::on_connect_ext]", "value", "dfc-generated"]
+ - ["::keep_alive", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::local_addr", "Argument[0]", "Argument[self].Field[actix_http::builder::HttpServiceBuilder::local_addr].Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::local_addr", "Argument[0]", "ReturnValue.Field[actix_http::builder::HttpServiceBuilder::local_addr].Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::local_addr", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::on_connect_ext", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::secure", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::upgrade", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::from_headers", "Argument[0]", "ReturnValue.Field[actix_http::encoding::decoder::Decoder::stream]", "value", "dfc-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::encoding::decoder::Decoder::stream]", "value", "dfc-generated"]
+ - ["::project", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::project_ref", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::try_into_bytes", "Argument[self].Field[actix_http::encoding::encoder::Encoder::body]", "ReturnValue.Field[core::result::Result::Err(0)].Field[actix_http::encoding::encoder::Encoder::body]", "value", "dfc-generated"]
+ - ["::try_into_bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Err(0)]", "value", "dfc-generated"]
+ - ["::project", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::project_ref", "Argument[self]", "ReturnValue", "taint", "df-generated"]
+ - ["::response", "Argument[2]", "ReturnValue.Field[actix_http::encoding::encoder::Encoder::body].Field[actix_http::encoding::encoder::EncoderBody::Stream::body]", "value", "dfc-generated"]
+ - ["::try_into_bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Err(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::encoding::encoder::EncoderError::Io(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::DispatchError::H2(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::DispatchError::Io(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::DispatchError::Parse(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::with_cause", "Argument[self]", "ReturnValue", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::PayloadError::Http2Payload(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::PayloadError::Incomplete(0)].Field[core::option::Option::Some(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::source", "Argument[self].Field[actix_http::error::PayloadError::Io(0)]", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "dfc-generated"]
+ - ["::finish", "Argument[self].Field[0]", "ReturnValue", "value", "dfc-generated"]
+ - ["::finish", "Argument[self].Field[actix_http::extensions::NoOpHasher(0)]", "ReturnValue", "value", "dfc-generated"]
+ - ["::write_u64", "Argument[0]", "Argument[self].Field[0]", "value", "dfc-generated"]
+ - ["::write_u64", "Argument[0]", "Argument[self].Field[actix_http::extensions::NoOpHasher(0)]", "value", "dfc-generated"]
+ - ["::from", "Argument[0]", "ReturnValue.Field[actix_http::h1::Message::Item(0)]", "value", "dfc-generated"]
+ - ["::chunk", "Argument[self].Field[actix_http::h1::Message::Chunk(0)].Field[core::option::Option::Some(0)]", "ReturnValue", "value", "dfc-generated"]
+ - ["::message", "Argument[self].Field[actix_http::h1::Message::Item(0)]", "ReturnValue", "value", "dfc-generated"]
+ - ["::into_payload_codec", "Argument[self].Field[actix_http::h1::client::ClientCodec::inner]", "ReturnValue.Field[actix_http::h1::client::ClientPayloadCodec::inner]", "value", "dfc-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::h1::client::ClientCodec::inner].Field[actix_http::h1::client::ClientCodecInner::config]", "value", "dfc-generated"]
+ - ["::into_message_codec", "Argument[self].Field[actix_http::h1::client::ClientPayloadCodec::inner]", "ReturnValue.Field[actix_http::h1::client::ClientCodec::inner]", "value", "dfc-generated"]
+ - ["::config", "Argument[self].Field[actix_http::h1::codec::Codec::config]", "ReturnValue.Reference", "value", "dfc-generated"]
+ - ["::new", "Argument[0]", "ReturnValue.Field[actix_http::h1::codec::Codec::config]", "value", "dfc-generated"]
+ - ["::length", "Argument[0]", "ReturnValue.Field[actix_http::h1::decoder::PayloadDecoder::kind].Field[actix_http::h1::decoder::Kind::Length(0)]", "value", "dfc-generated"]
+ - ["::chunk", "Argument[self].Field[actix_http::h1::decoder::PayloadItem::Chunk(0)]", "ReturnValue", "value", "dfc-generated"]
+ - ["