From 4543c66d26ba2cd7df87869abfe32f45bd3ecbe4 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 9 Jan 2026 13:49:17 +0000 Subject: [PATCH 01/25] Python: Prepare `LocalSourceNode` for locality Removes the dependence on the (global) `ModuleVariableNode.getARead()`, by adding a local version (that doesn't include `import *` reads) instead. --- .../python/dataflow/new/internal/DataFlowPublic.qll | 10 +++++++--- .../python/dataflow/new/internal/LocalSources.qll | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 4d112bcdcdd..10ac89b023d 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -440,13 +440,17 @@ class ModuleVariableNode extends Node, TModuleVariableNode { /** Gets a node that reads this variable. */ Node getARead() { - result.asCfgNode() = var.getALoad().getAFlowNode() and - // Ignore reads that happen when the module is imported. These are only executed once. - not result.getScope() = mod + result = this.getALocalRead() or this = import_star_read(result) } + /** Gets a node that reads this variable, excluding reads that happen through `from ... import *`. */ + Node getALocalRead() { + result.asCfgNode() = var.getALoad().getAFlowNode() and + not result.getScope() = mod + } + /** Gets an `EssaNode` that corresponds to an assignment of this global variable. */ Node getAWrite() { any(EssaNodeDefinition def).definedBy(var, result.asCfgNode().(DefinitionNode)) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll b/python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll index c43a111c9c8..7752846ae1f 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll @@ -67,7 +67,7 @@ class LocalSourceNode extends Node { or // We explicitly include any read of a global variable, as some of these may have local flow going // into them. - this = any(ModuleVariableNode mvn).getARead() + this = any(ModuleVariableNode v).getALocalRead() or // We include all scope entry definitions, as these act as the local source within the scope they // enter. @@ -248,7 +248,7 @@ private module Cached { pragma[nomagic] private predicate localSourceFlowStep(Node nodeFrom, Node nodeTo) { simpleLocalFlowStep(nodeFrom, nodeTo, _) and - not nodeTo = any(ModuleVariableNode v).getARead() + not nodeTo = any(ModuleVariableNode v).getALocalRead() } /** From 30ce4069c7f57a158f9cd4fa0a1e3f35906538b2 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 9 Jan 2026 17:01:11 +0000 Subject: [PATCH 02/25] Python: Remove global restriction on `ModuleVariableNode` This may result in more nodes, but it should still be bounded by the number of global variables in the source code. --- .../python/dataflow/new/internal/DataFlowPublic.qll | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 10ac89b023d..0f508898c5a 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -76,15 +76,7 @@ newtype TNode = node.getNode() = any(Comp c).getIterable() } or /** A node representing a global (module-level) variable in a specific module. */ - TModuleVariableNode(Module m, GlobalVariable v) { - v.getScope() = m and - ( - v.escapes() - or - isAccessedThroughImportStar(m) and - ImportStar::globalNameDefinedInModule(v.getId(), m) - ) - } or + TModuleVariableNode(Module m, GlobalVariable v) { v.getScope() = m } or /** * A synthetic node representing that an iterable sequence flows to consumer. */ @@ -470,8 +462,6 @@ class ModuleVariableNode extends Node, TModuleVariableNode { override Location getLocation() { result = mod.getLocation() } } -private predicate isAccessedThroughImportStar(Module m) { m = ImportStar::getStarImported(_) } - private ModuleVariableNode import_star_read(Node n) { resolved_import_star_module(result.getModule(), result.getVariable().getId(), n) } From ac5a74448fd8a6191d1c01060787eb70b7ce6e3f Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 12 Jan 2026 15:04:14 +0000 Subject: [PATCH 03/25] Python: Fix tests With `ModuleVariableNode`s now appearing for _all_ global variables (not just the ones that actually seem to be used), some of the tests changed a bit. Mostly this was in the form of new flow (because of new nodes that popped into existence). For some inline expectation tests, I opted to instead exclude these results, as there was no suitable location to annotate. For the normal tests, I just accepted the output (after having vetted it carefully, of course). --- .../utils/test/dataflow/MaximalFlowTest.qll | 4 ++- .../experimental/attrs/AttrWrites.expected | 1 + .../dataflow/basic/global.expected | 15 +++++++++++ .../dataflow/basic/globalStep.expected | 4 +++ .../dataflow/basic/local.expected | 5 ++++ .../dataflow/basic/maximalFlows.expected | 5 ++++ .../dataflow/basic/sinks.expected | 5 ++++ .../dataflow/basic/sources.expected | 5 ++++ .../dataflow/global-flow/test.py | 26 +++++++++---------- .../dataflow/typetracking/moduleattr.expected | 1 + .../PoorMansFunctionResolutionTest.ql | 4 ++- 11 files changed, 60 insertions(+), 15 deletions(-) diff --git a/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll b/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll index 7587584a269..5e9831906a4 100644 --- a/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll +++ b/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll @@ -8,7 +8,9 @@ module MaximalFlowTest implements FlowTestSig { predicate relevantFlow(DataFlow::Node source, DataFlow::Node sink) { source != sink and - MaximalFlows::flow(source, sink) + MaximalFlows::flow(source, sink) and + // exclude ModuleVariableNodes (which have location 0:0:0:0) + not sink instanceof DataFlow::ModuleVariableNode } } diff --git a/python/ql/test/experimental/attrs/AttrWrites.expected b/python/ql/test/experimental/attrs/AttrWrites.expected index f8a55824043..d1fc30b3451 100644 --- a/python/ql/test/experimental/attrs/AttrWrites.expected +++ b/python/ql/test/experimental/attrs/AttrWrites.expected @@ -1,4 +1,5 @@ | test.py:5:9:5:16 | ControlFlowNode for __init__ | test.py:4:1:4:20 | ControlFlowNode for ClassExpr | __init__ | test.py:5:5:5:28 | ControlFlowNode for FunctionExpr | | test.py:6:9:6:16 | ControlFlowNode for Attribute | test.py:6:9:6:12 | ControlFlowNode for self | foo | test.py:6:20:6:22 | ControlFlowNode for foo | +| test.py:9:1:9:9 | ControlFlowNode for Attribute | test.py:0:0:0:0 | ModuleVariableNode in Module test for myobj | foo | test.py:9:13:9:17 | ControlFlowNode for StringLiteral | | test.py:9:1:9:9 | ControlFlowNode for Attribute | test.py:9:1:9:5 | ControlFlowNode for myobj | foo | test.py:9:13:9:17 | ControlFlowNode for StringLiteral | | test.py:12:1:12:25 | ControlFlowNode for setattr() | test.py:12:9:12:13 | ControlFlowNode for myobj | foo | test.py:12:23:12:24 | ControlFlowNode for IntegerLiteral | diff --git a/python/ql/test/library-tests/dataflow/basic/global.expected b/python/ql/test/library-tests/dataflow/basic/global.expected index 7d2c0cab9b9..9e0ef2e6751 100644 --- a/python/ql/test/library-tests/dataflow/basic/global.expected +++ b/python/ql/test/library-tests/dataflow/basic/global.expected @@ -1,6 +1,9 @@ +| test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:1:19:1:19 | ControlFlowNode for x | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:7:2:7 | ControlFlowNode for x | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:3:3:3:3 | ControlFlowNode for z | @@ -8,26 +11,33 @@ | test.py:1:19:1:19 | ControlFlowNode for x | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:2:3:2:3 | ControlFlowNode for y | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:2:3:2:3 | ControlFlowNode for y | test.py:3:3:3:3 | ControlFlowNode for z | | test.py:2:3:2:3 | ControlFlowNode for y | test.py:3:7:3:7 | ControlFlowNode for y | | test.py:2:3:2:3 | ControlFlowNode for y | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:2:3:2:3 | ControlFlowNode for y | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:2:3:2:3 | ControlFlowNode for y | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:2:7:2:7 | ControlFlowNode for x | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:3:3:3:3 | ControlFlowNode for z | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:3:7:3:7 | ControlFlowNode for y | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:2:7:2:7 | ControlFlowNode for x | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:3:3:3:3 | ControlFlowNode for z | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:3:3:3:3 | ControlFlowNode for z | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:3:3:3:3 | ControlFlowNode for z | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:3:3:3:3 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:3:7:3:7 | ControlFlowNode for y | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:3:7:3:7 | ControlFlowNode for y | test.py:3:3:3:3 | ControlFlowNode for z | | test.py:3:7:3:7 | ControlFlowNode for y | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:3:7:3:7 | ControlFlowNode for y | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:3:7:3:7 | ControlFlowNode for y | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:4:10:4:10 | ControlFlowNode for z | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:6:1:6:1 | ControlFlowNode for a | test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:6:1:6:1 | ControlFlowNode for a | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:1:19:1:19 | ControlFlowNode for x | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:2:7:2:7 | ControlFlowNode for x | @@ -37,6 +47,8 @@ | test.py:6:1:6:1 | ControlFlowNode for a | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:7:19:7:19 | ControlFlowNode for a | +| test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:1:19:1:19 | ControlFlowNode for x | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:2:7:2:7 | ControlFlowNode for x | @@ -47,7 +59,10 @@ | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:19:7:19 | ControlFlowNode for a | +| test.py:7:1:7:1 | ControlFlowNode for b | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | +| test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:1:7:1 | ControlFlowNode for b | +| test.py:7:19:7:19 | ControlFlowNode for a | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | ControlFlowNode for x | | test.py:7:19:7:19 | ControlFlowNode for a | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:7:19:7:19 | ControlFlowNode for a | test.py:2:7:2:7 | ControlFlowNode for x | diff --git a/python/ql/test/library-tests/dataflow/basic/globalStep.expected b/python/ql/test/library-tests/dataflow/basic/globalStep.expected index 00ee53dba00..26d8902e7bb 100644 --- a/python/ql/test/library-tests/dataflow/basic/globalStep.expected +++ b/python/ql/test/library-tests/dataflow/basic/globalStep.expected @@ -1,5 +1,6 @@ | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | +| test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:3:2:3 | ControlFlowNode for y | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:3:2:3 | ControlFlowNode for y | @@ -31,10 +32,13 @@ | test.py:3:7:3:7 | ControlFlowNode for y | test.py:3:3:3:3 | ControlFlowNode for z | | test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | +| test.py:6:1:6:1 | ControlFlowNode for a | test.py:0:0:0:0 | ModuleVariableNode in Module test for a | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:7:19:7:19 | ControlFlowNode for a | | test.py:6:1:6:1 | ControlFlowNode for a | test.py:7:19:7:19 | ControlFlowNode for a | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:6:1:6:1 | ControlFlowNode for a | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:6:1:6:1 | ControlFlowNode for a | +| test.py:7:1:7:1 | ControlFlowNode for b | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | +| test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | ControlFlowNode for x | | test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | ControlFlowNode for x | diff --git a/python/ql/test/library-tests/dataflow/basic/local.expected b/python/ql/test/library-tests/dataflow/basic/local.expected index 142c84015ae..eb47f1308d4 100644 --- a/python/ql/test/library-tests/dataflow/basic/local.expected +++ b/python/ql/test/library-tests/dataflow/basic/local.expected @@ -1,3 +1,8 @@ +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __name__ | test.py:0:0:0:0 | ModuleVariableNode in Module test for __name__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __package__ | test.py:0:0:0:0 | ModuleVariableNode in Module test for __package__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for a | test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for b | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | diff --git a/python/ql/test/library-tests/dataflow/basic/maximalFlows.expected b/python/ql/test/library-tests/dataflow/basic/maximalFlows.expected index a9fa5d8da92..42191862045 100644 --- a/python/ql/test/library-tests/dataflow/basic/maximalFlows.expected +++ b/python/ql/test/library-tests/dataflow/basic/maximalFlows.expected @@ -1,7 +1,12 @@ +| test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:1:19:1:19 | ControlFlowNode for x | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:1:19:1:19 | ControlFlowNode for x | test.py:7:1:7:1 | ControlFlowNode for b | +| test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:4:10:4:10 | ControlFlowNode for z | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:19:7:19 | ControlFlowNode for a | +| test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:0:0:0:0 | ModuleVariableNode in Module test for b | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:1:7:1 | ControlFlowNode for b | diff --git a/python/ql/test/library-tests/dataflow/basic/sinks.expected b/python/ql/test/library-tests/dataflow/basic/sinks.expected index bf5800e0b73..34525d5043e 100644 --- a/python/ql/test/library-tests/dataflow/basic/sinks.expected +++ b/python/ql/test/library-tests/dataflow/basic/sinks.expected @@ -1,3 +1,8 @@ +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __name__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __package__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for b | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | | test.py:1:1:1:21 | SynthDictSplatParameterNode | | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | diff --git a/python/ql/test/library-tests/dataflow/basic/sources.expected b/python/ql/test/library-tests/dataflow/basic/sources.expected index bf5800e0b73..34525d5043e 100644 --- a/python/ql/test/library-tests/dataflow/basic/sources.expected +++ b/python/ql/test/library-tests/dataflow/basic/sources.expected @@ -1,3 +1,8 @@ +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __name__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for __package__ | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for a | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for b | +| test.py:0:0:0:0 | ModuleVariableNode in Module test for obfuscated_id | | test.py:1:1:1:21 | ControlFlowNode for FunctionExpr | | test.py:1:1:1:21 | SynthDictSplatParameterNode | | test.py:1:5:1:17 | ControlFlowNode for obfuscated_id | diff --git a/python/ql/test/library-tests/dataflow/global-flow/test.py b/python/ql/test/library-tests/dataflow/global-flow/test.py index ab2da1c2959..0b62e47c71f 100644 --- a/python/ql/test/library-tests/dataflow/global-flow/test.py +++ b/python/ql/test/library-tests/dataflow/global-flow/test.py @@ -8,9 +8,9 @@ g = [5] # $writes=g g1, g2 = [6], [7] # $writes=g1 writes=g2 -# Assignment that's only referenced in this scope. This one will not give rise to a `ModuleVariableNode`. +# Assignment that's only referenced in this scope. -unreferenced_g = [8] +unreferenced_g = [8] # $writes=unreferenced_g print(unreferenced_g) # Testing modifications of globals @@ -34,7 +34,7 @@ g_ins.append(75) # A global with multiple potential definitions -import unknown_module +import unknown_module # $writes=unknown_module if unknown_module.attr: g_mult = [200] # $writes=g_mult else: @@ -46,7 +46,7 @@ g_redef = [400] # $writes=g_redef if unknown_module.attr: g_redef = [500] # $writes=g_redef -def global_access(): +def global_access(): # $writes=global_access l = 5 print(g) # $reads=g print(g1) # $reads=g1 @@ -59,12 +59,12 @@ def global_access(): def print_g_mod(): # $writes=print_g_mod print(g_mod) # $reads=g_mod -def global_mod(): +def global_mod(): # $writes=global_mod global g_mod g_mod += [150] # $reads,writes=g_mod print_g_mod() # $reads=print_g_mod -def global_inside_local_function(): +def global_inside_local_function(): # $writes=global_inside_local_function def local_function(): print(g) # $reads=g local_function() @@ -76,21 +76,21 @@ def global_inside_local_function(): import foo_module # $writes=foo_module -def use_foo(): +def use_foo(): # $writes=use_foo print(foo_module.attr) # $reads=foo_module # Partial imports from bar import baz_attr, quux_attr # $writes=baz_attr writes=quux_attr -def use_partial_import(): +def use_partial_import(): # $writes=use_partial_import print(baz_attr, quux_attr) # $reads=baz_attr reads=quux_attr # Aliased imports from spam_module import ham_attr as eggs_attr # $writes=eggs_attr -def use_aliased_import(): +def use_aliased_import(): # $writes=use_aliased_import print(eggs_attr) # $reads=eggs_attr # Import star (unlikely to work unless we happen to extract/model the referenced module) @@ -99,23 +99,23 @@ def use_aliased_import(): from unknown import * -def secretly_use_unknown(): +def secretly_use_unknown(): # $writes=secretly_use_unknown print(unknown_attr) # $reads=unknown_attr # Known modules from known import * -def secretly_use_known(): +def secretly_use_known(): # $writes=secretly_use_known print(known_attr) # $reads=known_attr # Local import in function -def imports_locally(): +def imports_locally(): # $writes=imports_locally import mod1 # Global import hidden in function -def imports_stuff(): +def imports_stuff(): # $writes=imports_stuff global mod2 import mod2 # $writes=mod2 diff --git a/python/ql/test/library-tests/dataflow/typetracking/moduleattr.expected b/python/ql/test/library-tests/dataflow/typetracking/moduleattr.expected index ff9673aaaea..06b56062392 100644 --- a/python/ql/test/library-tests/dataflow/typetracking/moduleattr.expected +++ b/python/ql/test/library-tests/dataflow/typetracking/moduleattr.expected @@ -2,6 +2,7 @@ module_tracker | import_as_attr.py:1:6:1:11 | ControlFlowNode for ImportExpr | module_attr_tracker | import_as_attr.py:0:0:0:0 | ModuleVariableNode in Module import_as_attr for attr_ref | +| import_as_attr.py:0:0:0:0 | ModuleVariableNode in Module import_as_attr for x | | import_as_attr.py:1:20:1:35 | ControlFlowNode for ImportMember | | import_as_attr.py:1:28:1:35 | ControlFlowNode for attr_ref | | import_as_attr.py:3:1:3:1 | ControlFlowNode for x | diff --git a/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql b/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql index b0325b027c3..b9575e43493 100644 --- a/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql +++ b/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql @@ -17,7 +17,9 @@ module InlinePoorMansFunctionResolutionTest implements TestSig { ) and // exclude decorator calls (which with our extractor rewrites does reference the // function) - not ref.asExpr() = func.getDefinition().(FunctionExpr).getADecoratorCall() + not ref.asExpr() = func.getDefinition().(FunctionExpr).getADecoratorCall() and + // exclude ModuleVariableNodes (which have location 0:0:0:0) + not ref instanceof DataFlow::ModuleVariableNode | value = func.getName() and tag = "resolved" and From 7fccc23dbef3d37b398534c5727d37bc2c5ebd28 Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 26 Jan 2026 13:28:35 +0000 Subject: [PATCH 04/25] Python: Make `ExtractedArgumentNode` local Explicitly adds a bunch of nodes that were previously (using a global analysis) identified as `ExtractedArgumentNode`s. These are then subsequently filtered out in `argumentOf` (which is global) by putting the call to `getCallArg` there instead of in the charpred. --- .../dataflow/new/internal/DataFlowPublic.qll | 46 ++++++++++++++----- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 0f508898c5a..d14cac5a4cd 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -339,27 +339,51 @@ abstract class ArgumentNode extends Node { final ExtractedDataFlowCall getCall() { this.argumentOf(result, _) } } +/** Gets an overapproximation of the argument nodes that are included in `getCallArg`. */ +Node getCallArgApproximation() { + // pre-update nodes for calls + result = any(CallCfgNode c).(PostUpdateNode).getPreUpdateNode() + or + // self parameters in methods + exists(Class c | result.asExpr() = c.getAMethod().getArg(0)) + or + // the object part of an attribute expression (which might be a bound method) + result.asCfgNode() = any(AttrNode a).getObject() + or + // the function part of any call + result.asCfgNode() = any(CallNode c).getFunction() +} + +/** Gets the extracted argument nodes that do not rely on `getCallArg`. */ +private Node otherArgs() { + // for potential summaries we allow all normal call arguments + normalCallArg(_, result, _) + or + // and self arguments + result.asCfgNode() = any(CallNode c).getFunction().(AttrNode).getObject() + or + // for comprehensions, we allow the synthetic `iterable` argument + result.asExpr() = any(Comp c).getIterable() +} + /** * A data flow node that represents a call argument found in the source code. */ class ExtractedArgumentNode extends ArgumentNode { ExtractedArgumentNode() { - // for resolved calls, we need to allow all argument nodes - getCallArg(_, _, _, this, _) + this = getCallArgApproximation() or - // for potential summaries we allow all normal call arguments - normalCallArg(_, this, _) - or - // and self arguments - this.asCfgNode() = any(CallNode c).getFunction().(AttrNode).getObject() - or - // for comprehensions, we allow the synthetic `iterable` argument - this.asExpr() = any(Comp c).getIterable() + this = otherArgs() } final override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { this = call.getArgument(pos) and - call instanceof ExtractedDataFlowCall + call instanceof ExtractedDataFlowCall and + ( + this = otherArgs() + or + this = getCallArgApproximation() and getCallArg(_, _, _, this, _) + ) } } From 6113d4be9e6a3711e4afdcdc22e27cb0afb56da6 Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 26 Jan 2026 15:38:25 +0000 Subject: [PATCH 05/25] Python: Fix test issues Fixes the test failures that arose from making `ExtractedArgumentNode` local. For the consistency checks, we now explicitly exclude the `ExtractedArgumentNode`s (now much more plentiful due to the overapproximation) that don't have a corresponding `getCallArg` tuple. For various queries/tests using `instanceof ArgumentNode`, we instead us `isArgumentNode`, which explicitly filters out the ones for which `isArgumentOf` doesn't hold (which, again, is the case for most of the nodes in the overapproximation). --- python/ql/consistency-queries/DataFlowConsistency.ql | 10 ++++++++++ python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll | 2 +- python/ql/lib/utils/test/dataflow/callGraphConfig.qll | 2 +- .../InitCallsSubclass/InitCallsSubclassMethod.ql | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/python/ql/consistency-queries/DataFlowConsistency.ql b/python/ql/consistency-queries/DataFlowConsistency.ql index 759db3d19a9..62bbb3062c2 100644 --- a/python/ql/consistency-queries/DataFlowConsistency.ql +++ b/python/ql/consistency-queries/DataFlowConsistency.ql @@ -26,6 +26,8 @@ private module Input implements InputSig { or // TODO: Implement post-updates for **kwargs, see tests added in https://github.com/github/codeql/pull/14936 exists(ArgumentPosition apos | n.argumentOf(_, apos) and apos.isDictSplat()) + or + missingArgumentCallExclude(n) } predicate reverseReadExclude(Node n) { @@ -134,6 +136,14 @@ private module Input implements InputSig { other.getNode().getScope() = f ) } + + predicate missingArgumentCallExclude(ArgumentNode arg) { + // We overapproximate the argument nodes in order to not rely on the global `getCallArg` + // predicate. + // Because of this, we must exclude the cases where we have an approximation but no actual + // argument node. + arg = getCallArgApproximation() and not getCallArg(_, _, _, arg, _) + } } import MakeConsistency diff --git a/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll b/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll index 5e9831906a4..cbd3b4c6aa5 100644 --- a/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll +++ b/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll @@ -35,7 +35,7 @@ module MaximalFlowsConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { exists(node.getLocation().getFile().getRelativePath()) and not any(CallNode c).getArg(_) = node.asCfgNode() and - not node instanceof DataFlow::ArgumentNode and + not isArgumentNode(node, _, _) and not node.asCfgNode().(NameNode).getId().matches("SINK%") and not DataFlow::localFlowStep(node, _) } diff --git a/python/ql/lib/utils/test/dataflow/callGraphConfig.qll b/python/ql/lib/utils/test/dataflow/callGraphConfig.qll index 8528396a12f..85ecb9b701d 100644 --- a/python/ql/lib/utils/test/dataflow/callGraphConfig.qll +++ b/python/ql/lib/utils/test/dataflow/callGraphConfig.qll @@ -9,7 +9,7 @@ module CallGraphConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node instanceof DataFlowPrivate::ReturnNode or - node instanceof DataFlow::ArgumentNode + DataFlowPrivate::isArgumentNode(node, _, _) } predicate isSink(DataFlow::Node node) { diff --git a/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.ql b/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.ql index 32eb5ffe79e..4c1b3247d96 100644 --- a/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.ql +++ b/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.ql @@ -15,6 +15,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.internal.DataFlowDispatch +import semmle.python.dataflow.new.internal.DataFlowPrivate predicate initSelfCallOverridden( Function init, DataFlow::Node self, DataFlow::MethodCallNode call, Function target, @@ -39,7 +40,7 @@ predicate readsFromSelf(Function method) { self.getParameter() = method.getArg(0) and DataFlow::localFlow(self, sink) | - sink instanceof DataFlow::ArgumentNode + isArgumentNode(sink, _, _) or sink = any(DataFlow::AttrRead a).getObject() ) From 3f718123a687bf43d6bdc1c108a23e30f5503548 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 29 Jan 2026 16:09:43 +0000 Subject: [PATCH 06/25] Python: Make capturing closure arguments synthetic and non-global Uses the same trick as for `ExtractedArgumentNode`, wherein we postpone the global restriction on the charpred to instead be in the `argumentOf` predicate (which is global anyway). In addition to this, we also converted `CapturedVariablesArgumentNode` into a proper synthetic node, and added an explicit post-update node for it. These nodes just act as wrappers for the function part of call nodes. Thus, to make them work with the variable capture machinery, we simply map them to the closure node for the corresponding control-flow or post-update node. --- .../new/internal/DataFlowDispatch.qll | 74 ++++++++++++++----- .../dataflow/new/internal/DataFlowPrivate.qll | 8 ++ .../dataflow/new/internal/DataFlowPublic.qll | 14 ++++ .../dataflow/new/internal/VariableCapture.qll | 6 ++ 4 files changed, 82 insertions(+), 20 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll index c717cd7bc97..b04b83be83e 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll @@ -1714,36 +1714,66 @@ private class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNodeImpl * This is also known as the environment part of a closure. * * This is used for tracking flow through captured variables. - * - * TODO: - * We might want a synthetic node here, but currently that incurs problems - * with non-monotonic recursion, because of the use of `resolveCall` in the - * char pred. This may be solvable by using - * `CallGraphConstruction::Make` in stead of - * `CallGraphConstruction::Simple::Make` appropriately. */ -class CapturedVariablesArgumentNode extends CfgNode, ArgumentNode { - CallNode callNode; +class SynthCapturedVariablesArgumentNode extends Node, TSynthCapturedVariablesArgumentNode { + ControlFlowNode callable; - CapturedVariablesArgumentNode() { - node = callNode.getFunction() and - exists(Function target | resolveCall(callNode, target, _) | - target = any(VariableCapture::CapturedVariable v).getACapturingScope() - ) - } + SynthCapturedVariablesArgumentNode() { this = TSynthCapturedVariablesArgumentNode(callable) } + + /** Gets the `CallNode` corresponding to this captured variables argument node. */ + CallNode getCallNode() { result.getFunction() = callable } + + /** Gets the `CfgNode` that corresponds to this synthetic node. */ + CfgNode getUnderlyingNode() { result.asCfgNode() = callable } + + override Scope getScope() { result = callable.getScope() } + + override Location getLocation() { result = callable.getLocation() } override string toString() { result = "Capturing closure argument" } +} +/** A captured variables argument node viewed as an argument node. Needed because `argumentOf` is a global predicate. */ +class CapturedVariablesArgumentNodeAsArgumentNode extends ArgumentNode, + SynthCapturedVariablesArgumentNode +{ override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { - callNode = call.getNode() and - pos.isLambdaSelf() + exists(CallNode callNode | callNode = this.getCallNode() | + callNode = call.getNode() and + exists(Function target | resolveCall(callNode, target, _) | + target = any(VariableCapture::CapturedVariable v).getACapturingScope() + ) and + pos.isLambdaSelf() + ) + } +} + +/** A synthetic node representing the values of captured variables after the output has been computed. */ +class SynthCapturedVariablesArgumentPostUpdateNode extends PostUpdateNodeImpl, + TSynthCapturedVariablesArgumentPostUpdateNode +{ + ControlFlowNode callable; + + SynthCapturedVariablesArgumentPostUpdateNode() { + this = TSynthCapturedVariablesArgumentPostUpdateNode(callable) + } + + /** Gets the `PostUpdateNode` (for a `CfgNode`) that corresponds to this synthetic node. */ + PostUpdateNode getUnderlyingNode() { result.getPreUpdateNode().asCfgNode() = callable } + + override string toString() { result = "[post] Capturing closure argument" } + + override Scope getScope() { result = callable.getScope() } + + override Location getLocation() { result = callable.getLocation() } + + override SynthCapturedVariablesArgumentNode getPreUpdateNode() { + result = TSynthCapturedVariablesArgumentNode(callable) } } /** A synthetic node representing the values of variables captured by a comprehension. */ -class SynthCompCapturedVariablesArgumentNode extends Node, TSynthCompCapturedVariablesArgumentNode, - ArgumentNode -{ +class SynthCompCapturedVariablesArgumentNode extends Node, TSynthCompCapturedVariablesArgumentNode { Comp comp; SynthCompCapturedVariablesArgumentNode() { this = TSynthCompCapturedVariablesArgumentNode(comp) } @@ -1755,7 +1785,11 @@ class SynthCompCapturedVariablesArgumentNode extends Node, TSynthCompCapturedVar override Location getLocation() { result = comp.getLocation() } Comp getComprehension() { result = comp } +} +class SynthCompCapturedVariablesArgumentNodeAsArgumentNode extends SynthCompCapturedVariablesArgumentNode, + ArgumentNode +{ override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { call.(ComprehensionCall).getComprehension() = comp and pos.isLambdaSelf() diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll index 2322539995b..9866bd00964 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll @@ -1128,6 +1128,14 @@ predicate nodeIsHidden(Node n) { n instanceof SynthCaptureNode or n instanceof SynthCapturedVariablesParameterNode + or + n instanceof SynthCapturedVariablesArgumentNode + or + n instanceof SynthCapturedVariablesArgumentPostUpdateNode + or + n instanceof SynthCompCapturedVariablesArgumentNode + or + n instanceof SynthCompCapturedVariablesArgumentPostUpdateNode } class LambdaCallKind = Unit; diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index d14cac5a4cd..532f7b23e4c 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -121,6 +121,20 @@ newtype TNode = f = any(VariableCapture::CapturedVariable v).getACapturingScope() and exists(TFunction(f)) } or + /** + * A synthetic node representing the values of the variables captured + * by the callable being called. + */ + TSynthCapturedVariablesArgumentNode(ControlFlowNode callable) { + callable = any(CallNode c).getFunction() + } or + /** + * A synthetic node representing the values of the variables captured + * by the callable being called, after the output has been computed. + */ + TSynthCapturedVariablesArgumentPostUpdateNode(ControlFlowNode callable) { + callable = any(CallNode c).getFunction() + } or /** A synthetic node representing the values of variables captured by a comprehension. */ TSynthCompCapturedVariablesArgumentNode(Comp comp) { comp.getFunction() = any(VariableCapture::CapturedVariable v).getACapturingScope() diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll b/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll index a7b3b9ceaeb..5ed365a8e56 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll @@ -114,6 +114,12 @@ private Flow::ClosureNode asClosureNode(Node n) { result.(Flow::ExprNode).getExpr().getNode() = comp ) or + // For captured variable argument nodes (and their post-update variants), we use the closure node + // for the underlying node. + result = asClosureNode(n.(SynthCapturedVariablesArgumentNode).getUnderlyingNode()) + or + result = asClosureNode(n.(SynthCapturedVariablesArgumentPostUpdateNode).getUnderlyingNode()) + or // TODO: Should the `Comp`s above be excluded here? result.(Flow::ExprNode).getExpr() = n.(CfgNode).getNode() or From fb6175d10b24116a98fbda185b922a41ae426085 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 29 Jan 2026 17:06:21 +0000 Subject: [PATCH 07/25] Python: Fix consistency test failures As we now have many more capturing closure arguments, we must once again exclude the ones that don't actually have `argumentOf` defined. --- python/ql/consistency-queries/DataFlowConsistency.ql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ql/consistency-queries/DataFlowConsistency.ql b/python/ql/consistency-queries/DataFlowConsistency.ql index 62bbb3062c2..829aa6debef 100644 --- a/python/ql/consistency-queries/DataFlowConsistency.ql +++ b/python/ql/consistency-queries/DataFlowConsistency.ql @@ -143,6 +143,10 @@ private module Input implements InputSig { // Because of this, we must exclude the cases where we have an approximation but no actual // argument node. arg = getCallArgApproximation() and not getCallArg(_, _, _, arg, _) + or + // Likewise, capturing closure arguments do not have corresponding argument nodes in some cases. + arg instanceof SynthCapturedVariablesArgumentNode and + not arg.argumentOf(_, _) } } From 958c798c3fa09ba96bcf7d6dc6cc4deb6f7a0505 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 29 Jan 2026 19:37:55 +0000 Subject: [PATCH 08/25] Python: Accept dataflow test changes New nodes means new results. Luckily we rarely have a test that selects _all_ dataflow nodes. --- python/ql/test/library-tests/dataflow/basic/local.expected | 2 ++ python/ql/test/library-tests/dataflow/basic/sinks.expected | 2 ++ python/ql/test/library-tests/dataflow/basic/sources.expected | 2 ++ 3 files changed, 6 insertions(+) diff --git a/python/ql/test/library-tests/dataflow/basic/local.expected b/python/ql/test/library-tests/dataflow/basic/local.expected index eb47f1308d4..96d40232512 100644 --- a/python/ql/test/library-tests/dataflow/basic/local.expected +++ b/python/ql/test/library-tests/dataflow/basic/local.expected @@ -36,7 +36,9 @@ | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | test.py:7:19:7:19 | ControlFlowNode for a | | test.py:7:1:7:1 | ControlFlowNode for b | test.py:7:1:7:1 | ControlFlowNode for b | +| test.py:7:5:7:17 | Capturing closure argument | test.py:7:5:7:17 | Capturing closure argument | | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:7:5:7:17 | [post] Capturing closure argument | test.py:7:5:7:17 | [post] Capturing closure argument | | test.py:7:5:7:17 | [post] ControlFlowNode for obfuscated_id | test.py:7:5:7:17 | [post] ControlFlowNode for obfuscated_id | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:1:7:1 | ControlFlowNode for b | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | diff --git a/python/ql/test/library-tests/dataflow/basic/sinks.expected b/python/ql/test/library-tests/dataflow/basic/sinks.expected index 34525d5043e..80055f9a2f2 100644 --- a/python/ql/test/library-tests/dataflow/basic/sinks.expected +++ b/python/ql/test/library-tests/dataflow/basic/sinks.expected @@ -15,7 +15,9 @@ | test.py:6:1:6:1 | ControlFlowNode for a | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | | test.py:7:1:7:1 | ControlFlowNode for b | +| test.py:7:5:7:17 | Capturing closure argument | | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:7:5:7:17 | [post] Capturing closure argument | | test.py:7:5:7:17 | [post] ControlFlowNode for obfuscated_id | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:7:5:7:20 | [pre] ControlFlowNode for obfuscated_id() | diff --git a/python/ql/test/library-tests/dataflow/basic/sources.expected b/python/ql/test/library-tests/dataflow/basic/sources.expected index 34525d5043e..80055f9a2f2 100644 --- a/python/ql/test/library-tests/dataflow/basic/sources.expected +++ b/python/ql/test/library-tests/dataflow/basic/sources.expected @@ -15,7 +15,9 @@ | test.py:6:1:6:1 | ControlFlowNode for a | | test.py:6:5:6:6 | ControlFlowNode for IntegerLiteral | | test.py:7:1:7:1 | ControlFlowNode for b | +| test.py:7:5:7:17 | Capturing closure argument | | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id | +| test.py:7:5:7:17 | [post] Capturing closure argument | | test.py:7:5:7:17 | [post] ControlFlowNode for obfuscated_id | | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() | | test.py:7:5:7:20 | [pre] ControlFlowNode for obfuscated_id() | From 62fb38d8343e75cd86ea949fd4c09dff274f367f Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 3 Feb 2026 15:32:46 +0000 Subject: [PATCH 09/25] Python: Rename `otherArgs` to `implicitArgumentNode` Co-authored-by: yoff --- .../semmle/python/dataflow/new/internal/DataFlowPublic.qll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 532f7b23e4c..de26d988c06 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -369,7 +369,7 @@ Node getCallArgApproximation() { } /** Gets the extracted argument nodes that do not rely on `getCallArg`. */ -private Node otherArgs() { +private Node implicitArgumentNode() { // for potential summaries we allow all normal call arguments normalCallArg(_, result, _) or @@ -387,14 +387,14 @@ class ExtractedArgumentNode extends ArgumentNode { ExtractedArgumentNode() { this = getCallArgApproximation() or - this = otherArgs() + this = implicitArgumentNode() } final override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { this = call.getArgument(pos) and call instanceof ExtractedDataFlowCall and ( - this = otherArgs() + this = implicitArgumentNode() or this = getCallArgApproximation() and getCallArg(_, _, _, this, _) ) From 0cd5366034a989cb1d364f1715539ee5bcbf154c Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Thu, 5 Feb 2026 13:15:22 +0100 Subject: [PATCH 10/25] Rust: Add type inference test for associated type acces on a type parameter of an impl block --- .../type-inference/associated_types.rs | 13 + .../type-inference/type-inference.expected | 1010 +++++++++-------- 2 files changed, 528 insertions(+), 495 deletions(-) diff --git a/rust/ql/test/library-tests/type-inference/associated_types.rs b/rust/ql/test/library-tests/type-inference/associated_types.rs index 1d8657b29a0..567d4449150 100644 --- a/rust/ql/test/library-tests/type-inference/associated_types.rs +++ b/rust/ql/test/library-tests/type-inference/associated_types.rs @@ -260,6 +260,16 @@ mod type_param_access_associated_type { ) } + // Associated type accessed on a type parameter of an impl block + impl Wrapper + where + TI: GetSet, + { + fn extract(&self) -> TI::Output { + self.0.get() // $ fieldof=Wrapper target=GetSet::get + } + } + pub fn test() { let _o1 = tp_with_as(S); // $ target=tp_with_as MISSING: type=_o1:S3 let _o2 = tp_without_as(S); // $ target=tp_without_as MISSING: type=_o2:S3 @@ -267,6 +277,9 @@ mod type_param_access_associated_type { _o3, // $ MISSING: type=_o3:S3 _o4, // $ MISSING: type=_o4:bool ) = tp_assoc_from_supertrait(S); // $ target=tp_assoc_from_supertrait + + let w = Wrapper(S); + let _extracted = w.extract(); // $ target=extract MISSING: type=_extracted:S3 } } 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 1e8f76409fb..f4bfb48031c 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -119,189 +119,195 @@ inferCertainType | associated_types.rs:257:9:260:9 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | | associated_types.rs:258:13:258:17 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:259:13:259:17 | thing | | associated_types.rs:256:33:256:45 | T | -| associated_types.rs:263:19:270:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:266:13:269:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:269:13:269:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:277:26:277:26 | x | | associated_types.rs:277:23:277:23 | T | -| associated_types.rs:280:5:282:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:281:18:281:18 | x | | associated_types.rs:277:23:277:23 | T | -| associated_types.rs:285:24:285:24 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:288:5:292:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:289:19:289:19 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:290:23:290:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:290:24:290:24 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:291:18:291:18 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:295:23:295:23 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:299:5:303:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:300:19:300:19 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:301:23:301:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:301:24:301:24 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:302:18:302:18 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:309:17:309:21 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:309:17:309:21 | SelfParam | TRef | associated_types.rs:305:5:310:5 | Self [trait AssocNameClash] | -| associated_types.rs:312:34:312:34 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:316:5:319:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:317:18:317:18 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:318:18:318:18 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:329:19:329:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:329:19:329:23 | SelfParam | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:329:26:329:26 | a | | associated_types.rs:329:16:329:16 | A | -| associated_types.rs:332:23:332:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:332:23:332:27 | SelfParam | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:332:30:332:30 | a | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:332:36:332:36 | b | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:332:76:335:9 | { ... } | | associated_types.rs:326:9:326:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:333:13:333:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:333:13:333:16 | self | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:333:22:333:22 | a | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:334:13:334:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:334:13:334:16 | self | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:334:22:334:22 | b | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:343:19:343:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:343:19:343:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:343:26:343:26 | a | | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:343:46:345:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:343:46:345:9 | { ... } | A | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:344:21:344:21 | a | | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:348:19:355:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:351:25:351:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:354:29:354:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:354:35:354:39 | false | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:366:21:366:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:366:21:366:25 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:368:20:368:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:368:20:368:24 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:370:20:370:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:370:20:370:24 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:377:21:377:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:377:21:377:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:377:34:379:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:268:20:268:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:268:20:268:24 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:268:20:268:24 | SelfParam | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:269:13:269:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:269:13:269:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:273:19:283:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:276:13:279:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:290:26:290:26 | x | | associated_types.rs:290:23:290:23 | T | +| associated_types.rs:293:5:295:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:294:18:294:18 | x | | associated_types.rs:290:23:290:23 | T | +| associated_types.rs:298:24:298:24 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:301:5:305:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:302:19:302:19 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:303:23:303:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:303:24:303:24 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:304:18:304:18 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:308:23:308:23 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:312:5:316:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:313:19:313:19 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:314:23:314:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:314:24:314:24 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:315:18:315:18 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:322:17:322:21 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:322:17:322:21 | SelfParam | TRef | associated_types.rs:318:5:323:5 | Self [trait AssocNameClash] | +| associated_types.rs:325:34:325:34 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:329:5:332:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:330:18:330:18 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:331:18:331:18 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:342:19:342:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:342:19:342:23 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:342:26:342:26 | a | | associated_types.rs:342:16:342:16 | A | +| associated_types.rs:345:23:345:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:345:23:345:27 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:345:30:345:30 | a | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:345:36:345:36 | b | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:345:76:348:9 | { ... } | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:346:13:346:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:346:13:346:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:346:22:346:22 | a | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:347:13:347:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:347:13:347:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:347:22:347:22 | b | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:356:19:356:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:356:19:356:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:356:26:356:26 | a | | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:356:46:358:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:356:46:358:9 | { ... } | A | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:357:21:357:21 | a | | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:361:19:368:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:364:25:364:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:367:29:367:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:367:35:367:39 | false | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:379:21:379:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:379:21:379:25 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | | associated_types.rs:381:20:381:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:381:43:383:9 | { ... } | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:385:20:385:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:385:20:385:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:385:43:387:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:390:19:394:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:402:24:402:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:402:24:402:28 | SelfParam | TRef | associated_types.rs:400:5:403:5 | Self [trait Subtrait] | -| associated_types.rs:411:23:411:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:411:23:411:27 | SelfParam | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:411:30:411:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:411:48:411:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:411:66:414:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:412:13:412:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:412:13:412:16 | self | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:412:22:412:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:413:13:413:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:413:13:413:16 | self | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:413:22:413:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:422:16:422:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:422:16:422:20 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:422:16:422:20 | SelfParam | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:422:39:424:9 | { ... } | | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:423:13:423:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:423:13:423:16 | self | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:423:13:423:16 | self | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:16:426:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:426:16:426:20 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:426:16:426:20 | SelfParam | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:23:426:30 | _content | | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:47:428:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:22:427:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | -| associated_types.rs:427:22:427:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | -| associated_types.rs:427:22:427:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:22:427:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:433:24:433:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:433:24:433:28 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:433:24:433:28 | SelfParam | TRef.T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:433:47:435:9 | { ... } | | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:434:15:434:18 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:434:15:434:18 | self | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:434:15:434:18 | self | TRef.T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:440:24:440:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:440:24:440:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:440:24:440:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:440:47:443:9 | { ... } | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:448:24:448:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:448:24:448:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:448:24:448:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:448:47:450:9 | { ... } | | {EXTERNAL LOCATION} | char | -| associated_types.rs:453:33:453:36 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:453:33:453:36 | item | TRef | associated_types.rs:453:20:453:30 | T | -| associated_types.rs:454:9:454:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:454:9:454:12 | item | TRef | associated_types.rs:453:20:453:30 | T | -| associated_types.rs:457:35:457:38 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:457:35:457:38 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:457:90:460:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:458:9:458:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:458:9:458:12 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:459:9:459:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:459:9:459:12 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:462:19:471:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:463:28:463:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:466:28:466:31 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:467:37:467:42 | &item2 | | {EXTERNAL LOCATION} | & | -| associated_types.rs:469:29:469:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:470:29:470:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:484:16:484:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:484:16:484:20 | SelfParam | TRef | associated_types.rs:477:5:477:20 | ST | -| associated_types.rs:484:16:484:20 | SelfParam | TRef.T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:484:39:486:9 | { ... } | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:484:39:486:9 | { ... } | E | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:484:39:486:9 | { ... } | T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:485:16:485:19 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:485:16:485:19 | self | TRef | associated_types.rs:477:5:477:20 | ST | -| associated_types.rs:485:16:485:19 | self | TRef.T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:489:19:491:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:490:21:490:24 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:498:31:498:31 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:498:31:498:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:498:31:498:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:498:61:506:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:500:21:500:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:500:21:500:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:500:21:500:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:503:19:503:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:503:19:503:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:503:19:503:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:505:23:505:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:505:23:505:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:505:23:505:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:508:36:508:36 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:508:36:508:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:508:36:508:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:508:36:508:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:508:92:514:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:509:21:509:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:509:21:509:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:509:21:509:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:509:21:509:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:510:19:510:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:510:19:510:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:510:19:510:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:510:19:510:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:23:511:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:511:23:511:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:511:23:511:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:511:23:511:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:512:21:512:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:512:21:512:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:512:21:512:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:21:512:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:19:513:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:513:19:513:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:513:19:513:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:513:19:513:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:517:15:526:1 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:518:5:518:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:519:5:519:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:520:5:520:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:521:5:521:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:522:5:522:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:523:5:523:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:524:5:524:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:525:5:525:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:383:20:383:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:383:20:383:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:390:21:390:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:390:21:390:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:390:34:392:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:394:20:394:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:394:20:394:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:394:43:396:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:398:20:398:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:398:20:398:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:398:43:400:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:403:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:415:24:415:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:415:24:415:28 | SelfParam | TRef | associated_types.rs:413:5:416:5 | Self [trait Subtrait] | +| associated_types.rs:424:23:424:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:424:23:424:27 | SelfParam | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:424:30:424:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:424:48:424:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:424:66:427:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:425:13:425:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:425:13:425:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:425:22:425:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:426:13:426:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:426:13:426:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:426:22:426:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:435:16:435:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:435:16:435:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:435:16:435:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:435:39:437:9 | { ... } | | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:436:13:436:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:436:13:436:16 | self | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:436:13:436:16 | self | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:16:439:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:439:16:439:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:439:16:439:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:23:439:30 | _content | | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:47:441:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | +| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | +| associated_types.rs:440:22:440:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:446:24:446:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:446:24:446:28 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:446:24:446:28 | SelfParam | TRef.T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:446:47:448:9 | { ... } | | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:447:15:447:18 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:447:15:447:18 | self | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:447:15:447:18 | self | TRef.T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:453:24:453:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:453:24:453:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:453:24:453:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:453:47:456:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:461:24:461:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:461:24:461:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:461:24:461:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:461:47:463:9 | { ... } | | {EXTERNAL LOCATION} | char | +| associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:476:28:476:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:479:28:479:31 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:480:37:480:42 | &item2 | | {EXTERNAL LOCATION} | & | +| associated_types.rs:482:29:482:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:483:29:483:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:497:16:497:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:497:16:497:20 | SelfParam | TRef | associated_types.rs:490:5:490:20 | ST | +| associated_types.rs:497:16:497:20 | SelfParam | TRef.T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:497:39:499:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:497:39:499:9 | { ... } | E | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:497:39:499:9 | { ... } | T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:498:16:498:19 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:498:16:498:19 | self | TRef | associated_types.rs:490:5:490:20 | ST | +| associated_types.rs:498:16:498:19 | self | TRef.T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:502:19:504:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:503:21:503:24 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:511:31:511:31 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:511:31:511:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:511:31:511:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:511:61:519:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:513:21:513:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:513:21:513:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:513:21:513:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:516:19:516:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:516:19:516:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:516:19:516:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:518:23:518:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:518:23:518:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:518:23:518:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:521:36:521:36 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:521:36:521:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:521:36:521:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:521:36:521:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:521:92:527:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:522:21:522:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:522:21:522:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:522:21:522:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:522:21:522:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:523:19:523:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:523:19:523:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:523:19:523:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:523:19:523:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:524:23:524:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:524:23:524:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:524:23:524:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:524:23:524:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:525:21:525:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:525:21:525:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:525:21:525:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:21:525:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:526:19:526:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:526:19:526:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:526:19:526:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:526:19:526:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:530:15:539:1 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:531:5:531:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:532:5:532:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:533:5:533:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:534:5:534:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:535:5:535:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:536:5:536:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:537:5:537:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:538:5:538:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | | blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | | blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | | blanket_impl.rs:15:42:17:9 | { ... } | | {EXTERNAL LOCATION} | & | @@ -5080,320 +5086,334 @@ inferType | associated_types.rs:257:9:260:9 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | | associated_types.rs:258:13:258:17 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:259:13:259:17 | thing | | associated_types.rs:256:33:256:45 | T | -| associated_types.rs:263:19:270:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:264:30:264:30 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:265:33:265:33 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:266:13:269:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:269:13:269:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:269:38:269:38 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:277:26:277:26 | x | | associated_types.rs:277:23:277:23 | T | -| associated_types.rs:280:5:282:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:281:13:281:14 | _a | | {EXTERNAL LOCATION} | char | -| associated_types.rs:281:18:281:18 | x | | associated_types.rs:277:23:277:23 | T | -| associated_types.rs:281:18:281:24 | x.get() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:285:24:285:24 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:288:5:292:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:289:13:289:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:289:19:289:19 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:289:19:289:25 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:290:13:290:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:290:19:290:25 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:290:23:290:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:290:23:290:24 | &x | TRef | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:290:24:290:24 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:291:13:291:14 | _b | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:291:18:291:18 | x | | associated_types.rs:285:21:285:21 | T | -| associated_types.rs:291:18:291:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:295:23:295:23 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:299:5:303:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:300:13:300:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:300:19:300:19 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:300:19:300:25 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:301:13:301:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:301:19:301:25 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:301:23:301:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:301:23:301:24 | &x | TRef | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:301:24:301:24 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:302:13:302:14 | _b | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:302:18:302:18 | x | | associated_types.rs:295:20:295:20 | T | -| associated_types.rs:302:18:302:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:309:17:309:21 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:309:17:309:21 | SelfParam | TRef | associated_types.rs:305:5:310:5 | Self [trait AssocNameClash] | -| associated_types.rs:312:34:312:34 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:316:5:319:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:317:13:317:14 | _a | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:317:18:317:18 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:317:18:317:24 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:318:13:318:14 | _b | | {EXTERNAL LOCATION} | char | -| associated_types.rs:318:18:318:18 | x | | associated_types.rs:312:31:312:31 | T | -| associated_types.rs:318:18:318:25 | x.get2() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:329:19:329:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:329:19:329:23 | SelfParam | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:329:26:329:26 | a | | associated_types.rs:329:16:329:16 | A | -| associated_types.rs:332:23:332:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:332:23:332:27 | SelfParam | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:332:30:332:30 | a | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:332:36:332:36 | b | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:332:76:335:9 | { ... } | | associated_types.rs:326:9:326:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:333:13:333:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:333:13:333:16 | self | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:333:13:333:23 | self.put(...) | | associated_types.rs:326:9:326:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:333:22:333:22 | a | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:334:13:334:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:334:13:334:16 | self | TRef | associated_types.rs:325:5:336:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:334:13:334:23 | self.put(...) | | associated_types.rs:326:9:326:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:334:22:334:22 | b | | associated_types.rs:332:20:332:20 | A | -| associated_types.rs:343:19:343:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:343:19:343:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:343:26:343:26 | a | | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:343:46:345:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:343:46:345:9 | { ... } | A | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:344:13:344:22 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:344:13:344:22 | Wrapper(...) | A | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:344:21:344:21 | a | | associated_types.rs:343:16:343:16 | A | -| associated_types.rs:348:19:355:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:349:13:349:13 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:349:17:349:17 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:351:13:351:15 | _g1 | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:351:13:351:15 | _g1 | A | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:351:19:351:19 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:351:19:351:29 | s.put(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:351:19:351:29 | s.put(...) | A | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:351:25:351:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:354:13:354:15 | _g2 | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:354:19:354:19 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:354:19:354:40 | s.put_two(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:354:29:354:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:354:35:354:39 | false | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:366:21:366:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:366:21:366:25 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:368:20:368:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:368:20:368:24 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:370:20:370:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:370:20:370:24 | SelfParam | TRef | associated_types.rs:361:5:371:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:377:21:377:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:377:21:377:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:377:34:379:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:378:13:378:14 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:268:20:268:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:268:20:268:24 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:268:20:268:24 | SelfParam | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:269:13:269:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:269:13:269:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:269:13:269:18 | self.0 | | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:273:19:283:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:274:30:274:30 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:275:33:275:33 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:276:13:279:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:279:38:279:38 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:281:13:281:13 | w | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:281:13:281:13 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:281:17:281:26 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:281:17:281:26 | Wrapper(...) | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:281:25:281:25 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:282:26:282:26 | w | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:282:26:282:26 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:290:26:290:26 | x | | associated_types.rs:290:23:290:23 | T | +| associated_types.rs:293:5:295:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:294:13:294:14 | _a | | {EXTERNAL LOCATION} | char | +| associated_types.rs:294:18:294:18 | x | | associated_types.rs:290:23:290:23 | T | +| associated_types.rs:294:18:294:24 | x.get() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:298:24:298:24 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:301:5:305:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:302:13:302:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:302:19:302:19 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:302:19:302:25 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:303:13:303:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:303:19:303:25 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:303:23:303:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:303:23:303:24 | &x | TRef | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:303:24:303:24 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:304:13:304:14 | _b | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:304:18:304:18 | x | | associated_types.rs:298:21:298:21 | T | +| associated_types.rs:304:18:304:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:308:23:308:23 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:312:5:316:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:313:13:313:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:313:19:313:19 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:313:19:313:25 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:314:13:314:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:314:19:314:25 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:314:23:314:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:314:23:314:24 | &x | TRef | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:314:24:314:24 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:315:13:315:14 | _b | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:315:18:315:18 | x | | associated_types.rs:308:20:308:20 | T | +| associated_types.rs:315:18:315:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:322:17:322:21 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:322:17:322:21 | SelfParam | TRef | associated_types.rs:318:5:323:5 | Self [trait AssocNameClash] | +| associated_types.rs:325:34:325:34 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:329:5:332:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:330:13:330:14 | _a | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:330:18:330:18 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:330:18:330:24 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:331:13:331:14 | _b | | {EXTERNAL LOCATION} | char | +| associated_types.rs:331:18:331:18 | x | | associated_types.rs:325:31:325:31 | T | +| associated_types.rs:331:18:331:25 | x.get2() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:342:19:342:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:342:19:342:23 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:342:26:342:26 | a | | associated_types.rs:342:16:342:16 | A | +| associated_types.rs:345:23:345:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:345:23:345:27 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:345:30:345:30 | a | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:345:36:345:36 | b | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:345:76:348:9 | { ... } | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:346:13:346:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:346:13:346:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:346:13:346:23 | self.put(...) | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:346:22:346:22 | a | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:347:13:347:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:347:13:347:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:347:13:347:23 | self.put(...) | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:347:22:347:22 | b | | associated_types.rs:345:20:345:20 | A | +| associated_types.rs:356:19:356:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:356:19:356:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:356:26:356:26 | a | | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:356:46:358:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:356:46:358:9 | { ... } | A | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:357:13:357:22 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:357:13:357:22 | Wrapper(...) | A | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:357:21:357:21 | a | | associated_types.rs:356:16:356:16 | A | +| associated_types.rs:361:19:368:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:362:13:362:13 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:362:17:362:17 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:364:13:364:15 | _g1 | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:364:13:364:15 | _g1 | A | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:364:19:364:19 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:364:19:364:29 | s.put(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:364:19:364:29 | s.put(...) | A | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:364:25:364:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:367:13:367:15 | _g2 | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:367:19:367:19 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:367:19:367:40 | s.put_two(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:367:29:367:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:367:35:367:39 | false | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:379:21:379:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:379:21:379:25 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | | associated_types.rs:381:20:381:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:381:43:383:9 | { ... } | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:382:13:382:13 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:385:20:385:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:385:20:385:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:385:43:387:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:386:13:386:14 | S2 | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:390:19:394:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:391:13:391:23 | _assoc_zero | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:391:27:391:28 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:391:27:391:39 | S3.get_zero() | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:392:13:392:22 | _assoc_one | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:392:26:392:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:392:26:392:37 | S3.get_one() | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:393:13:393:22 | _assoc_two | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:393:26:393:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:393:26:393:37 | S3.get_two() | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:402:24:402:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:402:24:402:28 | SelfParam | TRef | associated_types.rs:400:5:403:5 | Self [trait Subtrait] | -| associated_types.rs:411:23:411:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:411:23:411:27 | SelfParam | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:411:30:411:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:411:48:411:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:411:66:414:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:412:13:412:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:412:13:412:16 | self | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:412:13:412:24 | self.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:412:22:412:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:413:13:413:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:413:13:413:16 | self | TRef | associated_types.rs:405:5:415:5 | Self [trait Subtrait2] | -| associated_types.rs:413:13:413:24 | self.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:413:22:413:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:422:16:422:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:422:16:422:20 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:422:16:422:20 | SelfParam | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:422:39:424:9 | { ... } | | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:423:13:423:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:423:13:423:16 | self | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:423:13:423:16 | self | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:423:13:423:18 | self.0 | | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:16:426:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:426:16:426:20 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:426:16:426:20 | SelfParam | TRef.T | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:23:426:30 | _content | | associated_types.rs:419:10:419:16 | T | -| associated_types.rs:426:47:428:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:13:427:43 | MacroExpr | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:22:427:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | -| associated_types.rs:427:22:427:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | -| associated_types.rs:427:22:427:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:22:427:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:427:22:427:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:433:24:433:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:433:24:433:28 | SelfParam | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:433:24:433:28 | SelfParam | TRef.T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:433:47:435:9 | { ... } | | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:434:13:434:19 | (...) | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:434:13:434:19 | (...) | T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:434:13:434:21 | ... .0 | | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:434:14:434:18 | * ... | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:434:14:434:18 | * ... | T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:434:15:434:18 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:434:15:434:18 | self | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:434:15:434:18 | self | TRef.T | associated_types.rs:431:10:431:16 | T | -| associated_types.rs:440:24:440:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:440:24:440:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:440:24:440:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:440:47:443:9 | { ... } | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:442:13:442:30 | ...::default(...) | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:448:24:448:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:448:24:448:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:448:24:448:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:448:47:450:9 | { ... } | | {EXTERNAL LOCATION} | char | -| associated_types.rs:449:13:449:30 | ...::default(...) | | {EXTERNAL LOCATION} | char | -| associated_types.rs:453:33:453:36 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:453:33:453:36 | item | TRef | associated_types.rs:453:20:453:30 | T | -| associated_types.rs:454:9:454:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:454:9:454:12 | item | TRef | associated_types.rs:453:20:453:30 | T | -| associated_types.rs:457:35:457:38 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:457:35:457:38 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:457:90:460:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:458:9:458:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:458:9:458:12 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:458:9:458:20 | item.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:459:9:459:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:459:9:459:12 | item | TRef | associated_types.rs:457:21:457:32 | T | -| associated_types.rs:459:9:459:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:462:19:471:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:463:13:463:17 | item1 | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:463:13:463:17 | item1 | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:463:21:463:33 | MyType(...) | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:463:21:463:33 | MyType(...) | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:463:28:463:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:464:13:464:21 | _content1 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:464:25:464:29 | item1 | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:464:25:464:29 | item1 | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:464:25:464:43 | item1.get_content() | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:466:13:466:17 | item2 | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:466:13:466:17 | item2 | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:466:21:466:32 | MyType(...) | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:466:21:466:32 | MyType(...) | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:466:28:466:31 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:467:37:467:42 | &item2 | | {EXTERNAL LOCATION} | & | -| associated_types.rs:467:37:467:42 | &item2 | TRef | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:467:37:467:42 | &item2 | TRef.T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:467:38:467:42 | item2 | | associated_types.rs:417:5:417:24 | MyType | -| associated_types.rs:467:38:467:42 | item2 | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:469:13:469:21 | _content3 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:469:25:469:34 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:469:25:469:34 | Odd(...) | OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:469:25:469:48 | ... .get_content() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:469:29:469:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:470:13:470:21 | _content4 | | {EXTERNAL LOCATION} | char | -| associated_types.rs:470:25:470:33 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:470:25:470:33 | Odd(...) | OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:470:25:470:47 | ... .get_content() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:470:29:470:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:484:16:484:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:484:16:484:20 | SelfParam | TRef | associated_types.rs:477:5:477:20 | ST | -| associated_types.rs:484:16:484:20 | SelfParam | TRef.T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:484:39:486:9 | { ... } | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:484:39:486:9 | { ... } | E | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:484:39:486:9 | { ... } | T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:485:13:485:22 | Ok(...) | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:485:13:485:22 | Ok(...) | E | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:485:13:485:22 | Ok(...) | T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:485:16:485:19 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:485:16:485:19 | self | TRef | associated_types.rs:477:5:477:20 | ST | -| associated_types.rs:485:16:485:19 | self | TRef.T | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:485:16:485:21 | self.0 | | associated_types.rs:479:10:479:21 | Output | -| associated_types.rs:489:19:491:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:490:13:490:14 | _y | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:490:13:490:14 | _y | E | {EXTERNAL LOCATION} | bool | -| associated_types.rs:490:13:490:14 | _y | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:490:18:490:25 | ST(...) | | associated_types.rs:477:5:477:20 | ST | -| associated_types.rs:490:18:490:25 | ST(...) | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:490:18:490:31 | ... .get() | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:490:18:490:31 | ... .get() | E | {EXTERNAL LOCATION} | bool | -| associated_types.rs:490:18:490:31 | ... .get() | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:490:21:490:24 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:498:31:498:31 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:498:31:498:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:498:31:498:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:498:61:506:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:500:13:500:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:500:19:500:22 | (...) | | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:500:19:500:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:500:19:500:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:500:20:500:21 | * ... | | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:500:20:500:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:500:21:500:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:500:21:500:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:500:21:500:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:503:13:503:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:503:19:503:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:503:19:503:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:503:19:503:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:503:19:503:25 | t.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:505:13:505:15 | _a3 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:505:19:505:24 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:505:23:505:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:505:23:505:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:505:23:505:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:508:36:508:36 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:508:36:508:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:508:36:508:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:508:36:508:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:508:92:514:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:509:13:509:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:509:19:509:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:509:19:509:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:509:19:509:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:509:19:509:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:509:20:509:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:509:20:509:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:509:20:509:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:509:21:509:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:509:21:509:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:509:21:509:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:509:21:509:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:510:13:510:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:510:19:510:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:510:19:510:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:510:19:510:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:510:19:510:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:510:19:510:25 | t.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:13:511:15 | _a3 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:19:511:24 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:23:511:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:511:23:511:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:511:23:511:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:511:23:511:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:512:13:512:15 | _b1 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:19:512:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:512:19:512:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:19:512:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:512:19:512:36 | ... .get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:20:512:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:512:20:512:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:20:512:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:512:21:512:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:512:21:512:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:512:21:512:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:512:21:512:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:13:513:15 | _b2 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:513:19:513:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:513:19:513:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:513:19:513:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:513:19:513:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:19:513:33 | t.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:517:15:526:1 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:518:5:518:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:519:5:519:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:520:5:520:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:521:5:521:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:522:5:522:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:523:5:523:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:524:5:524:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:525:5:525:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:383:20:383:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:383:20:383:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:390:21:390:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:390:21:390:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:390:34:392:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:391:13:391:14 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:394:20:394:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:394:20:394:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:394:43:396:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:395:13:395:13 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:398:20:398:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:398:20:398:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:398:43:400:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:399:13:399:14 | S2 | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:403:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:404:13:404:23 | _assoc_zero | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:404:27:404:28 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:404:27:404:39 | S3.get_zero() | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:405:13:405:22 | _assoc_one | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:405:26:405:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:405:26:405:37 | S3.get_one() | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:406:13:406:22 | _assoc_two | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:406:26:406:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:406:26:406:37 | S3.get_two() | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:415:24:415:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:415:24:415:28 | SelfParam | TRef | associated_types.rs:413:5:416:5 | Self [trait Subtrait] | +| associated_types.rs:424:23:424:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:424:23:424:27 | SelfParam | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:424:30:424:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:424:48:424:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:424:66:427:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:425:13:425:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:425:13:425:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:425:13:425:24 | self.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:425:22:425:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:426:13:426:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:426:13:426:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | +| associated_types.rs:426:13:426:24 | self.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:426:22:426:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:435:16:435:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:435:16:435:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:435:16:435:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:435:39:437:9 | { ... } | | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:436:13:436:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:436:13:436:16 | self | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:436:13:436:16 | self | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:436:13:436:18 | self.0 | | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:16:439:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:439:16:439:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:439:16:439:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:23:439:30 | _content | | associated_types.rs:432:10:432:16 | T | +| associated_types.rs:439:47:441:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:13:440:43 | MacroExpr | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | +| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | +| associated_types.rs:440:22:440:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:446:24:446:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:446:24:446:28 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:446:24:446:28 | SelfParam | TRef.T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:446:47:448:9 | { ... } | | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:447:13:447:19 | (...) | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:447:13:447:19 | (...) | T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:447:13:447:21 | ... .0 | | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:447:14:447:18 | * ... | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:447:14:447:18 | * ... | T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:447:15:447:18 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:447:15:447:18 | self | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:447:15:447:18 | self | TRef.T | associated_types.rs:444:10:444:16 | T | +| associated_types.rs:453:24:453:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:453:24:453:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:453:24:453:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:453:47:456:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:455:13:455:30 | ...::default(...) | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:461:24:461:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:461:24:461:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:461:24:461:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:461:47:463:9 | { ... } | | {EXTERNAL LOCATION} | char | +| associated_types.rs:462:13:462:30 | ...::default(...) | | {EXTERNAL LOCATION} | char | +| associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:471:9:471:20 | item.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:472:9:472:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:476:13:476:17 | item1 | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:476:13:476:17 | item1 | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:476:21:476:33 | MyType(...) | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:476:21:476:33 | MyType(...) | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:476:28:476:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:477:13:477:21 | _content1 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:477:25:477:29 | item1 | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:477:25:477:29 | item1 | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:477:25:477:43 | item1.get_content() | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:479:13:479:17 | item2 | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:479:13:479:17 | item2 | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:479:21:479:32 | MyType(...) | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:479:21:479:32 | MyType(...) | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:479:28:479:31 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:480:37:480:42 | &item2 | | {EXTERNAL LOCATION} | & | +| associated_types.rs:480:37:480:42 | &item2 | TRef | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:480:37:480:42 | &item2 | TRef.T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:480:38:480:42 | item2 | | associated_types.rs:430:5:430:24 | MyType | +| associated_types.rs:480:38:480:42 | item2 | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:482:13:482:21 | _content3 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:482:25:482:34 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:482:25:482:34 | Odd(...) | OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:482:25:482:48 | ... .get_content() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:482:29:482:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:483:13:483:21 | _content4 | | {EXTERNAL LOCATION} | char | +| associated_types.rs:483:25:483:33 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:483:25:483:33 | Odd(...) | OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:483:25:483:47 | ... .get_content() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:483:29:483:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:497:16:497:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:497:16:497:20 | SelfParam | TRef | associated_types.rs:490:5:490:20 | ST | +| associated_types.rs:497:16:497:20 | SelfParam | TRef.T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:497:39:499:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:497:39:499:9 | { ... } | E | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:497:39:499:9 | { ... } | T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:498:13:498:22 | Ok(...) | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:498:13:498:22 | Ok(...) | E | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:498:13:498:22 | Ok(...) | T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:498:16:498:19 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:498:16:498:19 | self | TRef | associated_types.rs:490:5:490:20 | ST | +| associated_types.rs:498:16:498:19 | self | TRef.T | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:498:16:498:21 | self.0 | | associated_types.rs:492:10:492:21 | Output | +| associated_types.rs:502:19:504:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:503:13:503:14 | _y | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:503:13:503:14 | _y | E | {EXTERNAL LOCATION} | bool | +| associated_types.rs:503:13:503:14 | _y | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:503:18:503:25 | ST(...) | | associated_types.rs:490:5:490:20 | ST | +| associated_types.rs:503:18:503:25 | ST(...) | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:503:18:503:31 | ... .get() | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:503:18:503:31 | ... .get() | E | {EXTERNAL LOCATION} | bool | +| associated_types.rs:503:18:503:31 | ... .get() | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:503:21:503:24 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:511:31:511:31 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:511:31:511:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:511:31:511:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:511:61:519:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:513:13:513:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:513:19:513:22 | (...) | | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:513:19:513:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:513:19:513:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:513:20:513:21 | * ... | | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:513:20:513:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:513:21:513:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:513:21:513:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:513:21:513:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:516:13:516:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:516:19:516:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:516:19:516:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:516:19:516:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:516:19:516:25 | t.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:518:13:518:15 | _a3 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:518:19:518:24 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:518:23:518:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:518:23:518:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:518:23:518:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:521:36:521:36 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:521:36:521:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:521:36:521:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:521:36:521:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:521:92:527:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:522:13:522:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:19:522:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:522:19:522:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:522:19:522:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:19:522:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:20:522:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:522:20:522:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:522:20:522:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:21:522:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:522:21:522:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:522:21:522:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:522:21:522:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:523:13:523:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:523:19:523:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:523:19:523:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:523:19:523:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:523:19:523:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:523:19:523:25 | t.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:524:13:524:15 | _a3 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:524:19:524:24 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:524:23:524:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:524:23:524:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:524:23:524:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:524:23:524:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:525:13:525:15 | _b1 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:19:525:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:525:19:525:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:19:525:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:525:19:525:36 | ... .get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:20:525:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:525:20:525:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:20:525:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:525:21:525:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:525:21:525:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:525:21:525:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:525:21:525:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:526:13:526:15 | _b2 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:526:19:526:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:526:19:526:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:526:19:526:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:526:19:526:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:526:19:526:33 | t.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:530:15:539:1 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:531:5:531:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:532:5:532:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:533:5:533:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:534:5:534:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:535:5:535:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:536:5:536:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:537:5:537:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:538:5:538:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | | blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | | blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | | blanket_impl.rs:15:42:17:9 | { ... } | | {EXTERNAL LOCATION} | & | From 624ee1898af66fb08fdf0ee04b18ad74d7d5a6f6 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Thu, 5 Feb 2026 13:25:05 +0100 Subject: [PATCH 11/25] Rust: Implement support for associated types accessed on type parameters --- .../typeinference/AssociatedTypes.qll | 65 ++++++++++++++++ .../rust/internal/typeinference/Type.qll | 61 +++++++++++++-- .../internal/typeinference/TypeInference.qll | 17 +++- .../internal/typeinference/TypeMention.qll | 28 +++++-- .../type-inference/associated_types.rs | 8 +- .../test/library-tests/type-inference/main.rs | 4 +- .../type-inference/type-inference.expected | 77 +++++++++++++++++++ 7 files changed, 238 insertions(+), 22 deletions(-) create mode 100644 rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll new file mode 100644 index 00000000000..a31b2730def --- /dev/null +++ b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll @@ -0,0 +1,65 @@ +/** + * Provides classes and helper predicates for associated types. + */ + +private import rust +private import codeql.rust.internal.PathResolution +private import TypeMention +private import Type +private import TypeInference + +/** An associated type, that is, a type alias in a trait block. */ +final class AssocType extends TypeAlias { + Trait trait; + + AssocType() { this = trait.getAssocItemList().getAnAssocItem() } + + Trait getTrait() { result = trait } + + string getText() { result = this.getName().getText() } +} + +/** Gets an associated type of `trait` or of a supertrait of `trait`. */ +AssocType getTraitAssocType(Trait trait) { + result = trait.getSupertrait*().getAssocItemList().getAnAssocItem() +} + +/** Holds if `path` is of the form `::name` */ +predicate asTraitPath(Path path, TypeRepr typeRepr, Path traitPath, string name) { + exists(PathSegment segment | + segment = path.getQualifier().getSegment() and + typeRepr = segment.getTypeRepr() and + traitPath = segment.getTraitTypeRepr().getPath() and + name = path.getText() + ) +} + +/** + * Holds if `assoc` is accessed on `tp` in `path`. + * + * That is this is the case when `path` is of the form `::AssocType` or `tp::AssocType`; and `AssocType` resolves to `assoc`. + */ +predicate tpAssociatedType(TypeParam tp, AssocType assoc, Path path) { + resolvePath(path.getQualifier()) = tp and + resolvePath(path) = assoc + or + exists(TypeRepr typeRepr, Path traitPath, string name | + asTraitPath(path, typeRepr, traitPath, name) and + tp = resolvePath(typeRepr.(PathTypeRepr).getPath()) and + assoc = resolvePath(traitPath).(TraitItemNode).getAssocItem(name) + ) +} + +/** + * Holds if `bound` is a type bound for `tp` that gives rise to `assoc` being + * present for `tp`. + */ +predicate tpBoundAssociatedType( + TypeParam tp, TypeBound bound, Path path, TraitItemNode trait, AssocType assoc +) { + bound = tp.getATypeBound() and + path = bound.getTypeRepr().(PathTypeRepr).getPath() and + trait = resolvePath(path) and + assoc = getTraitAssocType(trait) +} diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll index 983e9a75ee5..f9cebef3523 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll @@ -8,11 +8,7 @@ private import codeql.rust.elements.internal.generated.Raw private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.frameworks.stdlib.Stdlib private import codeql.rust.frameworks.stdlib.Builtins as Builtins - -/** Gets a type alias of `trait` or of a supertrait of `trait`. */ -private TypeAlias getTraitTypeAlias(Trait trait) { - result = trait.getSupertrait*().getAssocItemList().getAnAssocItem() -} +private import AssociatedTypes /** * Holds if a dyn trait type for the trait `trait` should have a type parameter @@ -31,7 +27,7 @@ private TypeAlias getTraitTypeAlias(Trait trait) { */ private predicate dynTraitTypeParameter(Trait trait, AstNode n) { trait = any(DynTraitTypeRepr dt).getTrait() and - n = [trait.getGenericParamList().getATypeParam().(AstNode), getTraitTypeAlias(trait)] + n = [trait.getGenericParamList().getATypeParam().(AstNode), getTraitAssocType(trait)] } cached @@ -43,8 +39,11 @@ newtype TType = TNeverType() or TUnknownType() or TTypeParamTypeParameter(TypeParam t) or - TAssociatedTypeTypeParameter(Trait trait, TypeAlias typeAlias) { - getTraitTypeAlias(trait) = typeAlias + TAssociatedTypeTypeParameter(Trait trait, AssocType typeAlias) { + getTraitAssocType(trait) = typeAlias + } or + TTypeParamAssociatedTypeTypeParameter(TypeParam tp, AssocType assoc) { + tpAssociatedType(tp, assoc, _) } or TDynTraitTypeParameter(Trait trait, AstNode n) { dynTraitTypeParameter(trait, n) } or TImplTraitTypeParameter(ImplTraitTypeRepr implTrait, TypeParam tp) { @@ -464,6 +463,52 @@ class AssociatedTypeTypeParameter extends TypeParameter, TAssociatedTypeTypePara override Location getLocation() { result = typeAlias.getLocation() } } +/** + * A type parameter corresponding to an associated type accessed on a type + * parameter, for example `T::AssociatedType` where `T` is a type parameter. + * + * These type parameters are created when a function signature accesses an + * associated type on a type parameter. For example, in + * ```rust + * fn foo(arg: T::Assoc) { } + * ``` + * we create a `TypeParamAssociatedTypeTypeParameter` for `Assoc` on `T` and the + * mention `T::Assoc` resolves to this type parameter. If denoting the type + * parameter by `T_Assoc` then the above function is treated as if it was + * ```rust + * fn foo, T_Assoc>(arg: T_Assoc) { } + * ``` + */ +class TypeParamAssociatedTypeTypeParameter extends TypeParameter, + TTypeParamAssociatedTypeTypeParameter +{ + private TypeParam typeParam; + private AssocType assoc; + + TypeParamAssociatedTypeTypeParameter() { + this = TTypeParamAssociatedTypeTypeParameter(typeParam, assoc) + } + + /** Gets the type parameter that this associated type is accessed on. */ + TypeParam getTypeParam() { result = typeParam } + + /** Gets the associated type alias. */ + AssocType getTypeAlias() { result = assoc } + + /** Gets a path that accesses this type parameter. */ + Path getPath() { tpAssociatedType(typeParam, assoc, result) } + + override ItemNode getDeclaringItem() { result.getTypeParam(_) = typeParam } + + override string toString() { + result = + typeParam.toString() + "::" + assoc.getName().getText() + "[" + + assoc.getTrait().getName().getText() + "]" + } + + override Location getLocation() { result = typeParam.getLocation() } +} + /** Gets the associated type type-parameter corresponding directly to `typeAlias`. */ AssociatedTypeTypeParameter getAssociatedTypeTypeParameter(TypeAlias typeAlias) { result.isDirect() and result.getTypeAlias() = typeAlias diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll index e026f532eb0..74ee0b220e0 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll @@ -108,6 +108,10 @@ private module Input implements InputSig1, InputSig2 { id2 = idOfTypeParameterAstNode(tp0.(AssociatedTypeTypeParameter).getTypeAlias()) or kind = 4 and + id1 = idOfTypeParameterAstNode(tp0.(TypeParamAssociatedTypeTypeParameter).getTypeParam()) and + id2 = idOfTypeParameterAstNode(tp0.(TypeParamAssociatedTypeTypeParameter).getTypeAlias()) + or + kind = 5 and id1 = 0 and exists(AstNode node | id2 = idOfTypeParameterAstNode(node) | node = tp0.(TypeParamTypeParameter).getTypeParam() or @@ -273,9 +277,16 @@ private class FunctionDeclaration extends Function { TypeParameter getTypeParameter(ImplOrTraitItemNodeOption i, TypeParameterPosition ppos) { i = parent and ( - typeParamMatchPosition(this.getGenericParamList().getATypeParam(), result, ppos) - or - typeParamMatchPosition(i.asSome().getTypeParam(_), result, ppos) + exists(TypeParam tp | + tp = [this.getGenericParamList().getATypeParam(), i.asSome().getTypeParam(_)] + | + typeParamMatchPosition(tp, result, ppos) + or + // If `tp` is a type parameter for this function, then any associated + // types accessed on `tp` are also type parameters. + ppos.isImplicit() and + result.(TypeParamAssociatedTypeTypeParameter).getTypeParam() = tp + ) or ppos.isImplicit() and result = TSelfTypeParameter(i.asSome()) or diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll index 4865dd82ef8..0c71b03c637 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll @@ -6,6 +6,7 @@ private import codeql.rust.frameworks.stdlib.Stdlib private import Type private import TypeAbstraction private import TypeInference +private import AssociatedTypes bindingset[trait, name] pragma[inline_late] @@ -319,6 +320,22 @@ private module MkTypeMention, T_Assoc>(arg: T_Assoc) { } + // ^^^^^^^^^ ^^^^^ ^^^^^^^ + // this path result + // ``` + exists(TypeParam typeParam, Trait trait, AssocType assoc | + tpBoundAssociatedType(typeParam, _, this, trait, assoc) and + tp = TAssociatedTypeTypeParameter(resolved, assoc) and + result = TTypeParamAssociatedTypeTypeParameter(typeParam, assoc) and + path.isEmpty() + ) } bindingset[name] @@ -372,6 +389,8 @@ private module MkTypeMention::AssocType` // ^^^ tm ^^^^^^^^^ name - exists(string name | - name = path.getText() and - trait = resolvePath(qualifier.getSegment().getTraitTypeRepr().getPath()) and - getTraitAssocType(trait, name) = alias and - tm = qualifier.getSegment().getTypeRepr() + exists(string name, Path traitPath | + asTraitPath(path, tm, traitPath, name) and + trait = resolvePath(traitPath) and + getTraitAssocType(trait, name) = alias ) or // path of the form `Self::AssocType` within an `impl` block diff --git a/rust/ql/test/library-tests/type-inference/associated_types.rs b/rust/ql/test/library-tests/type-inference/associated_types.rs index 567d4449150..573404ebaf6 100644 --- a/rust/ql/test/library-tests/type-inference/associated_types.rs +++ b/rust/ql/test/library-tests/type-inference/associated_types.rs @@ -271,15 +271,15 @@ mod type_param_access_associated_type { } pub fn test() { - let _o1 = tp_with_as(S); // $ target=tp_with_as MISSING: type=_o1:S3 - let _o2 = tp_without_as(S); // $ target=tp_without_as MISSING: type=_o2:S3 + let _o1 = tp_with_as(S); // $ target=tp_with_as type=_o1:S3 + let _o2 = tp_without_as(S); // $ target=tp_without_as type=_o2:S3 let ( _o3, // $ MISSING: type=_o3:S3 - _o4, // $ MISSING: type=_o4:bool + _o4, // $ type=_o4:bool ) = tp_assoc_from_supertrait(S); // $ target=tp_assoc_from_supertrait let w = Wrapper(S); - let _extracted = w.extract(); // $ target=extract MISSING: type=_extracted:S3 + let _extracted = w.extract(); // $ target=extract type=_extracted:S3 } } diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs index 842970a869c..204bd7e55cb 100644 --- a/rust/ql/test/library-tests/type-inference/main.rs +++ b/rust/ql/test/library-tests/type-inference/main.rs @@ -1748,7 +1748,7 @@ mod overloadable_operators { let i64_mul = 17i64 * 18i64; // $ type=i64_mul:i64 target=mul let i64_div = 19i64 / 20i64; // $ type=i64_div:i64 target=div let i64_rem = 21i64 % 22i64; // $ type=i64_rem:i64 target=rem - let i64_param_add = param_add(1i64, 2i64); // $ target=param_add $ MISSING: type=i64_param_add:i64 + let i64_param_add = param_add(1i64, 2i64); // $ target=param_add $ type=i64_param_add:i64 // Arithmetic assignment operators let mut i64_add_assign = 23i64; @@ -2053,7 +2053,7 @@ mod indexers { let xs: [S; 1] = [S]; let x = xs[0].foo(); // $ target=foo type=x:S target=index - let y = param_index(vec, 0); // $ target=param_index $ MISSING: type=y:S + let y = param_index(vec, 0); // $ target=param_index $ type=y:S analyze_slice(&xs); // $ target=analyze_slice } 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 f4bfb48031c..94888602713 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -111,17 +111,22 @@ inferCertainType | associated_types.rs:237:19:241:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:239:28:239:31 | true | | {EXTERNAL LOCATION} | bool | | associated_types.rs:248:30:248:34 | thing | | associated_types.rs:248:19:248:27 | T | +| associated_types.rs:248:65:250:5 | { ... } | | associated_types.rs:248:19:248:27 | T::Output[GetSet] | | associated_types.rs:249:9:249:13 | thing | | associated_types.rs:248:19:248:27 | T | | associated_types.rs:252:33:252:37 | thing | | associated_types.rs:252:22:252:30 | T | +| associated_types.rs:252:56:254:5 | { ... } | | associated_types.rs:252:22:252:30 | T::Output[GetSet] | | associated_types.rs:253:9:253:13 | thing | | associated_types.rs:252:22:252:30 | T | | associated_types.rs:256:48:256:52 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:256:91:261:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:256:91:261:5 | { ... } | T0 | associated_types.rs:256:33:256:45 | T::Output[GetSet] | +| associated_types.rs:256:91:261:5 | { ... } | T1 | associated_types.rs:256:33:256:45 | T::AnotherOutput[AnotherGet] | | associated_types.rs:257:9:260:9 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | | associated_types.rs:258:13:258:17 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:259:13:259:17 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:268:20:268:24 | SelfParam | | {EXTERNAL LOCATION} | & | | associated_types.rs:268:20:268:24 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:268:20:268:24 | SelfParam | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:268:41:270:9 | { ... } | | associated_types.rs:264:10:264:11 | TI::Output[GetSet] | | associated_types.rs:269:13:269:16 | self | | {EXTERNAL LOCATION} | & | | associated_types.rs:269:13:269:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | @@ -235,15 +240,22 @@ inferCertainType | associated_types.rs:461:47:463:9 | { ... } | | {EXTERNAL LOCATION} | char | | associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:466:56:468:5 | { ... } | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | | associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | | associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:470:45:470:46 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:470:60:470:61 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:470:75:470:76 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:471:18:471:19 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:472:25:472:26 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:472:29:472:30 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:476:28:476:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | | associated_types.rs:479:28:479:31 | true | | {EXTERNAL LOCATION} | bool | @@ -2719,6 +2731,7 @@ inferCertainType | main.rs:1726:44:1726:48 | other | TRef | main.rs:1493:5:1498:5 | Vec2 | | main.rs:1730:26:1730:26 | a | | main.rs:1730:18:1730:23 | T | | main.rs:1730:32:1730:32 | b | | main.rs:1730:18:1730:23 | T | +| main.rs:1730:51:1732:5 | { ... } | | main.rs:1730:18:1730:23 | T::Output[Add] | | main.rs:1731:9:1731:9 | a | | main.rs:1730:18:1730:23 | T | | main.rs:1731:13:1731:13 | b | | main.rs:1730:18:1730:23 | T | | main.rs:1734:16:1865:5 | { ... } | | {EXTERNAL LOCATION} | () | @@ -3002,6 +3015,7 @@ inferCertainType | main.rs:2038:17:2038:21 | slice | TRef.TSlice | main.rs:2004:5:2005:13 | S | | main.rs:2041:37:2041:37 | a | | main.rs:2041:20:2041:34 | T | | main.rs:2041:43:2041:43 | b | | {EXTERNAL LOCATION} | usize | +| main.rs:2044:5:2046:5 | { ... } | | main.rs:2041:20:2041:34 | T::Output[Index] | | main.rs:2045:9:2045:9 | a | | main.rs:2041:20:2041:34 | T | | main.rs:2045:11:2045:11 | b | | {EXTERNAL LOCATION} | usize | | main.rs:2048:16:2059:5 | { ... } | | {EXTERNAL LOCATION} | () | @@ -3046,6 +3060,7 @@ inferCertainType | main.rs:2113:25:2113:29 | other | | main.rs:2107:5:2107:19 | S | | main.rs:2113:25:2113:29 | other | T | main.rs:2109:10:2109:17 | T | | main.rs:2113:54:2115:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2113:54:2115:9 | { ... } | T | main.rs:2109:10:2109:17 | T::Output[MyAdd] | | main.rs:2114:16:2114:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2114:16:2114:19 | self | T | main.rs:2109:10:2109:17 | T | | main.rs:2114:31:2114:35 | other | | main.rs:2107:5:2107:19 | S | @@ -3054,6 +3069,7 @@ inferCertainType | main.rs:2122:19:2122:22 | SelfParam | T | main.rs:2118:10:2118:17 | T | | main.rs:2122:25:2122:29 | other | | main.rs:2118:10:2118:17 | T | | main.rs:2122:51:2124:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2122:51:2124:9 | { ... } | T | main.rs:2118:10:2118:17 | T::Output[MyAdd] | | main.rs:2123:16:2123:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2123:16:2123:19 | self | T | main.rs:2118:10:2118:17 | T | | main.rs:2123:31:2123:35 | other | | main.rs:2118:10:2118:17 | T | @@ -3062,6 +3078,7 @@ inferCertainType | main.rs:2134:25:2134:29 | other | | {EXTERNAL LOCATION} | & | | main.rs:2134:25:2134:29 | other | TRef | main.rs:2127:14:2127:14 | T | | main.rs:2134:55:2136:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2134:55:2136:9 | { ... } | T | main.rs:2127:14:2127:14 | T::Output[MyAdd] | | main.rs:2135:16:2135:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2135:16:2135:19 | self | T | main.rs:2127:14:2127:14 | T | | main.rs:2135:31:2135:35 | other | | {EXTERNAL LOCATION} | & | @@ -5078,34 +5095,55 @@ inferType | associated_types.rs:240:18:240:30 | s.convert(...) | | {EXTERNAL LOCATION} | i32 | | associated_types.rs:240:28:240:29 | 42 | | {EXTERNAL LOCATION} | i32 | | associated_types.rs:248:30:248:34 | thing | | associated_types.rs:248:19:248:27 | T | +| associated_types.rs:248:65:250:5 | { ... } | | associated_types.rs:248:19:248:27 | T::Output[GetSet] | | associated_types.rs:249:9:249:13 | thing | | associated_types.rs:248:19:248:27 | T | +| associated_types.rs:249:9:249:19 | thing.get() | | associated_types.rs:248:19:248:27 | T::Output[GetSet] | | associated_types.rs:252:33:252:37 | thing | | associated_types.rs:252:22:252:30 | T | +| associated_types.rs:252:56:254:5 | { ... } | | associated_types.rs:252:22:252:30 | T::Output[GetSet] | | associated_types.rs:253:9:253:13 | thing | | associated_types.rs:252:22:252:30 | T | +| associated_types.rs:253:9:253:19 | thing.get() | | associated_types.rs:252:22:252:30 | T::Output[GetSet] | | associated_types.rs:256:48:256:52 | thing | | associated_types.rs:256:33:256:45 | T | | associated_types.rs:256:91:261:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:256:91:261:5 | { ... } | T0 | associated_types.rs:256:33:256:45 | T::Output[GetSet] | +| associated_types.rs:256:91:261:5 | { ... } | T1 | associated_types.rs:256:33:256:45 | T::AnotherOutput[AnotherGet] | | associated_types.rs:257:9:260:9 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:257:9:260:9 | TupleExpr | T0 | associated_types.rs:256:33:256:45 | T::Output[GetSet] | +| associated_types.rs:257:9:260:9 | TupleExpr | T1 | associated_types.rs:256:33:256:45 | T::AnotherOutput[AnotherGet] | | associated_types.rs:258:13:258:17 | thing | | associated_types.rs:256:33:256:45 | T | +| associated_types.rs:258:13:258:23 | thing.get() | | associated_types.rs:256:33:256:45 | T::Output[GetSet] | | associated_types.rs:259:13:259:17 | thing | | associated_types.rs:256:33:256:45 | T | +| associated_types.rs:259:13:259:31 | thing.get_another() | | associated_types.rs:256:33:256:45 | T::AnotherOutput[AnotherGet] | | associated_types.rs:268:20:268:24 | SelfParam | | {EXTERNAL LOCATION} | & | | associated_types.rs:268:20:268:24 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:268:20:268:24 | SelfParam | TRef.A | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:268:41:270:9 | { ... } | | associated_types.rs:264:10:264:11 | TI::Output[GetSet] | | associated_types.rs:269:13:269:16 | self | | {EXTERNAL LOCATION} | & | | associated_types.rs:269:13:269:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | | associated_types.rs:269:13:269:18 | self.0 | | associated_types.rs:264:10:264:11 | TI | +| associated_types.rs:269:13:269:24 | ... .get() | | associated_types.rs:264:10:264:11 | TI::Output[GetSet] | | associated_types.rs:273:19:283:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:274:13:274:15 | _o1 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:274:19:274:31 | tp_with_as(...) | | associated_types.rs:16:1:17:10 | S3 | | associated_types.rs:274:30:274:30 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:275:13:275:15 | _o2 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:275:19:275:34 | tp_without_as(...) | | associated_types.rs:16:1:17:10 | S3 | | associated_types.rs:275:33:275:33 | S | | associated_types.rs:10:1:11:9 | S | | associated_types.rs:276:13:279:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:276:13:279:9 | TuplePat | T1 | {EXTERNAL LOCATION} | bool | +| associated_types.rs:278:13:278:15 | _o4 | | {EXTERNAL LOCATION} | bool | | associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | T1 | {EXTERNAL LOCATION} | bool | | associated_types.rs:279:38:279:38 | S | | associated_types.rs:10:1:11:9 | S | | associated_types.rs:281:13:281:13 | w | | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:281:13:281:13 | w | A | associated_types.rs:10:1:11:9 | S | | associated_types.rs:281:17:281:26 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:281:17:281:26 | Wrapper(...) | A | associated_types.rs:10:1:11:9 | S | | associated_types.rs:281:25:281:25 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:282:13:282:22 | _extracted | | associated_types.rs:16:1:17:10 | S3 | | associated_types.rs:282:26:282:26 | w | | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:282:26:282:26 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:282:26:282:36 | w.extract() | | associated_types.rs:16:1:17:10 | S3 | | associated_types.rs:290:26:290:26 | x | | associated_types.rs:290:23:290:23 | T | | associated_types.rs:293:5:295:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:294:13:294:14 | _a | | {EXTERNAL LOCATION} | char | @@ -5271,17 +5309,25 @@ inferType | associated_types.rs:462:13:462:30 | ...::default(...) | | {EXTERNAL LOCATION} | char | | associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:466:56:468:5 | { ... } | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | | associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | +| associated_types.rs:467:9:467:26 | item.get_content() | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | | associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | +| associated_types.rs:470:45:470:46 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:470:60:470:61 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:470:75:470:76 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | | associated_types.rs:471:9:471:20 | item.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:471:18:471:19 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | | associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | | associated_types.rs:472:9:472:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:472:25:472:26 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | +| associated_types.rs:472:29:472:30 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | | associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | | associated_types.rs:476:13:476:17 | item1 | | associated_types.rs:430:5:430:24 | MyType | | associated_types.rs:476:13:476:17 | item1 | T | {EXTERNAL LOCATION} | i64 | @@ -6110,6 +6156,7 @@ inferType | closure.rs:147:9:147:9 | f | A | {EXTERNAL LOCATION} | Global | | closure.rs:147:9:147:9 | f | T | closure.rs:146:26:146:51 | F | | closure.rs:147:9:147:14 | f(...) | | closure.rs:146:23:146:23 | B | +| closure.rs:147:9:147:14 | f(...) | | {EXTERNAL LOCATION} | F::Output[FnOnce] | | closure.rs:147:11:147:13 | arg | | closure.rs:146:20:146:20 | A | | closure.rs:150:30:150:30 | f | | {EXTERNAL LOCATION} | Box | | closure.rs:150:30:150:30 | f | A | {EXTERNAL LOCATION} | Global | @@ -8952,9 +8999,11 @@ inferType | main.rs:1198:26:1198:32 | "Hello" | TRef | {EXTERNAL LOCATION} | str | | main.rs:1198:26:1198:44 | "Hello".to_string() | | {EXTERNAL LOCATION} | String | | main.rs:1202:13:1202:13 | u | | {EXTERNAL LOCATION} | Result | +| main.rs:1202:13:1202:13 | u | E | {EXTERNAL LOCATION} | ParseIntError | | main.rs:1202:13:1202:13 | u | T | {EXTERNAL LOCATION} | u32 | | main.rs:1202:17:1202:18 | x9 | | {EXTERNAL LOCATION} | String | | main.rs:1202:17:1202:33 | x9.parse() | | {EXTERNAL LOCATION} | Result | +| main.rs:1202:17:1202:33 | x9.parse() | E | {EXTERNAL LOCATION} | ParseIntError | | main.rs:1202:17:1202:33 | x9.parse() | T | {EXTERNAL LOCATION} | u32 | | main.rs:1204:13:1204:20 | my_thing | | {EXTERNAL LOCATION} | & | | main.rs:1204:13:1204:20 | my_thing | TRef | main.rs:1126:5:1129:5 | MyInt | @@ -9404,6 +9453,7 @@ inferType | main.rs:1412:17:1412:20 | self | TRef.TSlice | main.rs:1410:14:1410:23 | T | | main.rs:1412:17:1412:27 | self.get(...) | | {EXTERNAL LOCATION} | Option | | main.rs:1412:17:1412:27 | self.get(...) | T | {EXTERNAL LOCATION} | & | +| main.rs:1412:17:1412:27 | self.get(...) | T.TRef | main.rs:1410:14:1410:23 | T | | main.rs:1412:17:1412:36 | ... .unwrap() | | {EXTERNAL LOCATION} | & | | main.rs:1412:17:1412:36 | ... .unwrap() | TRef | main.rs:1410:14:1410:23 | T | | main.rs:1412:26:1412:26 | 0 | | {EXTERNAL LOCATION} | i32 | @@ -10049,7 +10099,9 @@ inferType | main.rs:1726:44:1726:50 | other.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1730:26:1730:26 | a | | main.rs:1730:18:1730:23 | T | | main.rs:1730:32:1730:32 | b | | main.rs:1730:18:1730:23 | T | +| main.rs:1730:51:1732:5 | { ... } | | main.rs:1730:18:1730:23 | T::Output[Add] | | main.rs:1731:9:1731:9 | a | | main.rs:1730:18:1730:23 | T | +| main.rs:1731:9:1731:13 | ... + ... | | main.rs:1730:18:1730:23 | T::Output[Add] | | main.rs:1731:13:1731:13 | b | | main.rs:1730:18:1730:23 | T | | main.rs:1734:16:1865:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1738:13:1738:18 | i64_eq | | {EXTERNAL LOCATION} | bool | @@ -10102,6 +10154,8 @@ inferType | main.rs:1750:23:1750:27 | 21i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:1750:23:1750:35 | ... % ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1750:31:1750:35 | 22i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1751:13:1751:25 | i64_param_add | | {EXTERNAL LOCATION} | i64 | +| main.rs:1751:29:1751:49 | param_add(...) | | {EXTERNAL LOCATION} | i64 | | main.rs:1751:39:1751:42 | 1i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:1751:45:1751:48 | 2i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:1754:17:1754:30 | i64_add_assign | | {EXTERNAL LOCATION} | i64 | @@ -10536,6 +10590,7 @@ inferType | main.rs:2032:56:2034:9 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:2032:56:2034:9 | { ... } | TRef | main.rs:2028:10:2028:10 | T | | main.rs:2033:13:2033:29 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2033:13:2033:29 | &... | TRef | {EXTERNAL LOCATION} | u8 | | main.rs:2033:13:2033:29 | &... | TRef | main.rs:2028:10:2028:10 | T | | main.rs:2033:14:2033:17 | self | | {EXTERNAL LOCATION} | & | | main.rs:2033:14:2033:17 | self | TRef | main.rs:2013:5:2016:5 | MyVec | @@ -10543,6 +10598,7 @@ inferType | main.rs:2033:14:2033:22 | self.data | | {EXTERNAL LOCATION} | Vec | | main.rs:2033:14:2033:22 | self.data | A | {EXTERNAL LOCATION} | Global | | main.rs:2033:14:2033:22 | self.data | T | main.rs:2028:10:2028:10 | T | +| main.rs:2033:14:2033:29 | ...[index] | | {EXTERNAL LOCATION} | u8 | | main.rs:2033:14:2033:29 | ...[index] | | main.rs:2028:10:2028:10 | T | | main.rs:2033:24:2033:28 | index | | {EXTERNAL LOCATION} | usize | | main.rs:2037:22:2037:26 | slice | | {EXTERNAL LOCATION} | & | @@ -10558,7 +10614,9 @@ inferType | main.rs:2038:23:2038:23 | 0 | | {EXTERNAL LOCATION} | i32 | | main.rs:2041:37:2041:37 | a | | main.rs:2041:20:2041:34 | T | | main.rs:2041:43:2041:43 | b | | {EXTERNAL LOCATION} | usize | +| main.rs:2044:5:2046:5 | { ... } | | main.rs:2041:20:2041:34 | T::Output[Index] | | main.rs:2045:9:2045:9 | a | | main.rs:2041:20:2041:34 | T | +| main.rs:2045:9:2045:12 | a[b] | | main.rs:2041:20:2041:34 | T::Output[Index] | | main.rs:2045:11:2045:11 | b | | {EXTERNAL LOCATION} | usize | | main.rs:2048:16:2059:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2049:17:2049:19 | vec | | main.rs:2013:5:2016:5 | MyVec | @@ -10586,6 +10644,8 @@ inferType | main.rs:2054:17:2054:21 | xs[0] | | main.rs:2004:5:2005:13 | S | | main.rs:2054:17:2054:27 | ... .foo() | | main.rs:2004:5:2005:13 | S | | main.rs:2054:20:2054:20 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2056:13:2056:13 | y | | main.rs:2004:5:2005:13 | S | +| main.rs:2056:17:2056:35 | param_index(...) | | main.rs:2004:5:2005:13 | S | | main.rs:2056:29:2056:31 | vec | | main.rs:2013:5:2016:5 | MyVec | | main.rs:2056:29:2056:31 | vec | T | main.rs:2004:5:2005:13 | S | | main.rs:2056:34:2056:34 | 0 | | {EXTERNAL LOCATION} | i32 | @@ -10637,8 +10697,11 @@ inferType | main.rs:2113:25:2113:29 | other | | main.rs:2107:5:2107:19 | S | | main.rs:2113:25:2113:29 | other | T | main.rs:2109:10:2109:17 | T | | main.rs:2113:54:2115:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2113:54:2115:9 | { ... } | T | main.rs:2109:10:2109:17 | T::Output[MyAdd] | | main.rs:2114:13:2114:39 | S(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2114:13:2114:39 | S(...) | T | main.rs:2109:10:2109:17 | T::Output[MyAdd] | | main.rs:2114:15:2114:22 | (...) | | main.rs:2109:10:2109:17 | T | +| main.rs:2114:15:2114:38 | ... .my_add(...) | | main.rs:2109:10:2109:17 | T::Output[MyAdd] | | main.rs:2114:16:2114:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2114:16:2114:19 | self | T | main.rs:2109:10:2109:17 | T | | main.rs:2114:16:2114:21 | self.0 | | main.rs:2109:10:2109:17 | T | @@ -10649,8 +10712,11 @@ inferType | main.rs:2122:19:2122:22 | SelfParam | T | main.rs:2118:10:2118:17 | T | | main.rs:2122:25:2122:29 | other | | main.rs:2118:10:2118:17 | T | | main.rs:2122:51:2124:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2122:51:2124:9 | { ... } | T | main.rs:2118:10:2118:17 | T::Output[MyAdd] | | main.rs:2123:13:2123:37 | S(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2123:13:2123:37 | S(...) | T | main.rs:2118:10:2118:17 | T::Output[MyAdd] | | main.rs:2123:15:2123:22 | (...) | | main.rs:2118:10:2118:17 | T | +| main.rs:2123:15:2123:36 | ... .my_add(...) | | main.rs:2118:10:2118:17 | T::Output[MyAdd] | | main.rs:2123:16:2123:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2123:16:2123:19 | self | T | main.rs:2118:10:2118:17 | T | | main.rs:2123:16:2123:21 | self.0 | | main.rs:2118:10:2118:17 | T | @@ -10660,8 +10726,11 @@ inferType | main.rs:2134:25:2134:29 | other | | {EXTERNAL LOCATION} | & | | main.rs:2134:25:2134:29 | other | TRef | main.rs:2127:14:2127:14 | T | | main.rs:2134:55:2136:9 | { ... } | | main.rs:2107:5:2107:19 | S | +| main.rs:2134:55:2136:9 | { ... } | T | main.rs:2127:14:2127:14 | T::Output[MyAdd] | | main.rs:2135:13:2135:37 | S(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2135:13:2135:37 | S(...) | T | main.rs:2127:14:2127:14 | T::Output[MyAdd] | | main.rs:2135:15:2135:22 | (...) | | main.rs:2127:14:2127:14 | T | +| main.rs:2135:15:2135:36 | ... .my_add(...) | | main.rs:2127:14:2127:14 | T::Output[MyAdd] | | main.rs:2135:16:2135:19 | self | | main.rs:2107:5:2107:19 | S | | main.rs:2135:16:2135:19 | self | T | main.rs:2127:14:2127:14 | T | | main.rs:2135:16:2135:21 | self.0 | | main.rs:2127:14:2127:14 | T | @@ -10736,6 +10805,11 @@ inferType | main.rs:2223:9:2223:15 | S(...) | | main.rs:2107:5:2107:19 | S | | main.rs:2223:9:2223:15 | S(...) | T | {EXTERNAL LOCATION} | i64 | | main.rs:2223:9:2223:31 | ... .my_add(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2223:9:2223:31 | ... .my_add(...) | T | {EXTERNAL LOCATION} | i64 | +| main.rs:2223:9:2223:31 | ... .my_add(...) | T | main.rs:2107:5:2107:19 | S | +| main.rs:2223:9:2223:31 | ... .my_add(...) | T.T | main.rs:2109:10:2109:17 | T::Output[MyAdd] | +| main.rs:2223:9:2223:31 | ... .my_add(...) | T.T | main.rs:2118:10:2118:17 | T::Output[MyAdd] | +| main.rs:2223:9:2223:31 | ... .my_add(...) | T.T | main.rs:2127:14:2127:14 | T::Output[MyAdd] | | main.rs:2223:11:2223:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:2223:24:2223:30 | S(...) | | main.rs:2107:5:2107:19 | S | | main.rs:2223:24:2223:30 | S(...) | T | {EXTERNAL LOCATION} | i64 | @@ -10743,11 +10817,13 @@ inferType | main.rs:2224:9:2224:15 | S(...) | | main.rs:2107:5:2107:19 | S | | main.rs:2224:9:2224:15 | S(...) | T | {EXTERNAL LOCATION} | i64 | | main.rs:2224:9:2224:28 | ... .my_add(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2224:9:2224:28 | ... .my_add(...) | T | {EXTERNAL LOCATION} | i64 | | main.rs:2224:11:2224:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:2224:24:2224:27 | 3i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:2225:9:2225:15 | S(...) | | main.rs:2107:5:2107:19 | S | | main.rs:2225:9:2225:15 | S(...) | T | {EXTERNAL LOCATION} | i64 | | main.rs:2225:9:2225:29 | ... .my_add(...) | | main.rs:2107:5:2107:19 | S | +| main.rs:2225:9:2225:29 | ... .my_add(...) | T | {EXTERNAL LOCATION} | i64 | | main.rs:2225:11:2225:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | | main.rs:2225:24:2225:28 | &3i64 | | {EXTERNAL LOCATION} | & | | main.rs:2225:24:2225:28 | &3i64 | TRef | {EXTERNAL LOCATION} | i64 | @@ -10908,6 +10984,7 @@ inferType | main.rs:2278:19:2278:26 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2278:28:2278:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2279:9:2279:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2279:13:2279:13 | s | | {EXTERNAL LOCATION} | I::Item[Iterator] | | main.rs:2279:13:2279:13 | s | | {EXTERNAL LOCATION} | &mut | | main.rs:2279:13:2279:13 | s | TRefMut | {EXTERNAL LOCATION} | & | | main.rs:2279:13:2279:13 | s | TRefMut.TRef | {EXTERNAL LOCATION} | str | From a033057d90f7b4d729e860a4c0bc39a5c884b998 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Mon, 9 Feb 2026 14:57:42 +0100 Subject: [PATCH 12/25] Rust: Fix a bad join --- .../internal/typeinference/TypeInference.qll | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll index 74ee0b220e0..aca32d05260 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll @@ -274,20 +274,21 @@ private class FunctionDeclaration extends Function { this = i.asSome().getAnAssocItem() } + TypeParam getTypeParam(ImplOrTraitItemNodeOption i) { + i = parent and + result = [this.getGenericParamList().getATypeParam(), i.asSome().getTypeParam(_)] + } + TypeParameter getTypeParameter(ImplOrTraitItemNodeOption i, TypeParameterPosition ppos) { + typeParamMatchPosition(this.getTypeParam(i), result, ppos) + or + // For every `TypeParam` of this function, any associated types accessed on + // the type parameter are also type parameters. + ppos.isImplicit() and + result.(TypeParamAssociatedTypeTypeParameter).getTypeParam() = this.getTypeParam(i) + or i = parent and ( - exists(TypeParam tp | - tp = [this.getGenericParamList().getATypeParam(), i.asSome().getTypeParam(_)] - | - typeParamMatchPosition(tp, result, ppos) - or - // If `tp` is a type parameter for this function, then any associated - // types accessed on `tp` are also type parameters. - ppos.isImplicit() and - result.(TypeParamAssociatedTypeTypeParameter).getTypeParam() = tp - ) - or ppos.isImplicit() and result = TSelfTypeParameter(i.asSome()) or ppos.isImplicit() and result.(AssociatedTypeTypeParameter).getTrait() = i.asSome() From 564a3bd4440b01e271d07ce513309c4dd0100833 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 10 Feb 2026 15:30:56 +0100 Subject: [PATCH 13/25] Rust: Simplify `inferMethodCallTypeSelf` --- .../internal/typeinference/TypeInference.qll | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll index e7e4bbb717c..4ed15a2683e 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll @@ -2604,27 +2604,30 @@ private Type inferMethodCallTypeNonSelf(AstNode n, boolean isReturn, TypePath pa } /** - * Gets the type of `n` at `path` after applying `derefChain` and `borrow`, - * where `n` is the `self` argument of a method call. + * Gets the type of `n` at `path` after applying `derefChain`, where `n` is the + * `self` argument of a method call. * * The predicate recursively pops the head of `derefChain` until it becomes * empty, at which point the inferred type can be applied back to `n`. */ pragma[nomagic] -private Type inferMethodCallTypeSelf( - AstNode n, DerefChain derefChain, BorrowKind borrow, TypePath path -) { - exists(MethodCallMatchingInput::AccessPosition apos, string derefChainBorrow | - result = inferMethodCallType0(_, apos, n, derefChainBorrow, path) and +private Type inferMethodCallTypeSelf(AstNode n, DerefChain derefChain, TypePath path) { + exists( + MethodCallMatchingInput::AccessPosition apos, string derefChainBorrow, BorrowKind borrow, + TypePath path0 + | + result = inferMethodCallType0(_, apos, n, derefChainBorrow, path0) and apos.isSelf() and MethodCallMatchingInput::decodeDerefChainBorrow(derefChainBorrow, derefChain, borrow) - ) - or - // adjust for implicit borrow - exists(TypePath path0, BorrowKind borrow0 | - result = inferMethodCallTypeSelf(n, derefChain, borrow0, path0) and - path0.isCons(borrow0.getRefType().getPositionalTypeParameter(0), path) and - borrow.isNoBorrow() + | + borrow.isNoBorrow() and + path = path0 + or + // adjust for implicit borrow + exists(TypePath prefix | + prefix = TypePath::singleton(borrow.getRefType().getPositionalTypeParameter(0)) and + path0 = prefix.appendInverse(path) + ) ) or // adjust for implicit deref @@ -2632,9 +2635,8 @@ private Type inferMethodCallTypeSelf( DerefChain derefChain0, Type t0, TypePath path0, DerefImplItemNode impl, Type selfParamType, TypePath selfPath | - t0 = inferMethodCallTypeSelf(n, derefChain0, borrow, path0) and + t0 = inferMethodCallTypeSelf(n, derefChain0, path0) and derefChain0.isCons(impl, derefChain) and - borrow.isNoBorrow() and selfParamType = impl.resolveSelfTypeAt(selfPath) | result = selfParamType and @@ -2653,7 +2655,7 @@ private Type inferMethodCallTypeSelf( private Type inferMethodCallTypePreCheck(AstNode n, boolean isReturn, TypePath path) { result = inferMethodCallTypeNonSelf(n, isReturn, path) or - result = inferMethodCallTypeSelf(n, DerefChain::nil(), TNoBorrowKind(), path) and + result = inferMethodCallTypeSelf(n, DerefChain::nil(), path) and isReturn = false } From 49f24ca8ecff1c81b0a90b11e75fe2cc3d3526f2 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 10 Feb 2026 15:33:03 +0100 Subject: [PATCH 14/25] Rust: Avoid using `regexpCapture` with multiple capture groups --- .../internal/typeinference/TypeInference.qll | 8 +++---- shared/util/codeql/util/UnboundList.qll | 21 ++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll index 4ed15a2683e..9a8f99a49b6 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll @@ -2477,10 +2477,10 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi additional predicate decodeDerefChainBorrow( string derefChainBorrow, DerefChain derefChain, BorrowKind borrow ) { - exists(string regexp | - regexp = "^(.*);(.*)$" and - derefChain = derefChainBorrow.regexpCapture(regexp, 1) and - borrow.toString() = derefChainBorrow.regexpCapture(regexp, 2) + exists(int i | + i = derefChainBorrow.indexOf(";") and + derefChain = derefChainBorrow.prefix(i) and + borrow.toString() = derefChainBorrow.suffix(i + 1) ) } diff --git a/shared/util/codeql/util/UnboundList.qll b/shared/util/codeql/util/UnboundList.qll index 5cfe06d02ee..79fac6506d6 100644 --- a/shared/util/codeql/util/UnboundList.qll +++ b/shared/util/codeql/util/UnboundList.qll @@ -78,6 +78,9 @@ module Make Input> { /** Holds if this list is empty. */ predicate isEmpty() { this = "" } + bindingset[this] + private int stringLength() { result = super.length() } + /** Gets the length of this list. */ bindingset[this] pragma[inline_late] @@ -115,19 +118,23 @@ module Make Input> { /** Holds if this list starts with `e`, followed by `suffix`. */ bindingset[this] predicate isCons(Element e, UnboundList suffix) { - exists(string regexp | regexp = "^([0-9]+)\\.(.*)$" | - e = decode(this.regexpCapture(regexp, 1)) and - suffix = this.regexpCapture(regexp, 2) + exists(string elem | + // it is more efficient to not create a capture group for the suffix, since + // `regexpCapture` will then always join in both groups, only to afterwards filter + // based on the requested group (the group number is not part of the binding set + // of `regexpCapture`) + elem = this.regexpCapture("^([0-9]+)\\..*$", 1) and + e = decode(elem) and + suffix = this.suffix(elem.length() + 1) ) } /** Holds if this list starts with `prefix`, followed by `e`. */ bindingset[this] predicate isSnoc(UnboundList prefix, Element e) { - exists(string regexp | regexp = "^(|.+\\.)([0-9]+)\\.$" | - prefix = this.regexpCapture(regexp, 1) and - e = decode(this.regexpCapture(regexp, 2)) - ) + // same remark as above about not using multiple capture groups + prefix = this.regexpCapture("^(|.+\\.)[0-9]+\\.$", 1) and + e = decode(this.substring(prefix.stringLength(), this.stringLength() - 1)) } /** Gets the head of this list, if any. */ From f60d759a6593b30375fb9f39a643ff6615046400 Mon Sep 17 00:00:00 2001 From: Philip Ginsbach Date: Tue, 10 Feb 2026 14:52:57 +0000 Subject: [PATCH 15/25] Avoid non-trivially shadowing string.toString() Prepare libraries for a possible deprecation warning on shadowing string.toString(). These instanceof classes were using this.(Type).method() to call supertype methods, but super.method() is clearer and equivalent for instanceof supertypes. --- .../regex/nfa/ExponentialBackTracking.qll | 2 +- shared/regex/codeql/regex/nfa/NfaUtils.qll | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/shared/regex/codeql/regex/nfa/ExponentialBackTracking.qll b/shared/regex/codeql/regex/nfa/ExponentialBackTracking.qll index 23f76497371..116029c56a9 100644 --- a/shared/regex/codeql/regex/nfa/ExponentialBackTracking.qll +++ b/shared/regex/codeql/regex/nfa/ExponentialBackTracking.qll @@ -95,7 +95,7 @@ module Make { ) } - string toString() { result = this.(InfiniteRepetitionQuantifier).toString() } + string toString() { result = super.toString() } } /** diff --git a/shared/regex/codeql/regex/nfa/NfaUtils.qll b/shared/regex/codeql/regex/nfa/NfaUtils.qll index e1be49796e0..468cf7a3e96 100644 --- a/shared/regex/codeql/regex/nfa/NfaUtils.qll +++ b/shared/regex/codeql/regex/nfa/NfaUtils.qll @@ -104,11 +104,11 @@ module Make { private class RegexpCharacterConstant instanceof RegExpConstant { RegexpCharacterConstant() { this.isCharacter() } - string toString() { result = this.(RegExpConstant).toString() } + string toString() { result = super.toString() } - RegExpTerm getRootTerm() { result = this.(RegExpConstant).getRootTerm() } + RegExpTerm getRootTerm() { result = super.getRootTerm() } - string getValue() { result = this.(RegExpConstant).getValue() } + string getValue() { result = super.getValue() } } /** @@ -578,11 +578,11 @@ module Make { ) } - string toString() { result = this.(RegExpTerm).toString() } + string toString() { result = super.toString() } - RegExpTerm getAChild() { result = this.(RegExpTerm).getChild(_) } + RegExpTerm getAChild() { result = super.getChild(_) } - RegExpTerm getChild(int i) { result = this.(RegExpTerm).getChild(i) } + RegExpTerm getChild(int i) { result = super.getChild(i) } } /** @@ -601,11 +601,11 @@ module Make { ) } - string toString() { result = this.(RegExpTerm).toString() } + string toString() { result = super.toString() } - RegExpTerm getAChild() { result = this.(RegExpTerm).getAChild() } + RegExpTerm getAChild() { result = super.getAChild() } - RegExpTerm getChild(int i) { result = this.(RegExpTerm).getChild(i) } + RegExpTerm getChild(int i) { result = super.getChild(i) } } /** @@ -621,11 +621,11 @@ module Make { ) } - string toString() { result = this.(RegExpTerm).toString() } + string toString() { result = super.toString() } - RegExpTerm getAChild() { result = this.(RegExpTerm).getAChild() } + RegExpTerm getAChild() { result = super.getAChild() } - RegExpTerm getChild(int i) { result = this.(RegExpTerm).getChild(i) } + RegExpTerm getChild(int i) { result = super.getChild(i) } } /** From 2b10c8aef378447886854913a11af6de441bd879 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 11 Feb 2026 09:09:34 +0100 Subject: [PATCH 16/25] Rust: Fix gramar in qldoc --- .../lib/codeql/rust/internal/typeinference/AssociatedTypes.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll index a31b2730def..546bdad6169 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll @@ -37,7 +37,7 @@ predicate asTraitPath(Path path, TypeRepr typeRepr, Path traitPath, string name) /** * Holds if `assoc` is accessed on `tp` in `path`. * - * That is this is the case when `path` is of the form `::AssocType` or `tp::AssocType`; and `AssocType` resolves to `assoc`. */ predicate tpAssociatedType(TypeParam tp, AssocType assoc, Path path) { From 2fa71f0c17c38eb2c8a91b844ad6ced7715ea976 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 11 Feb 2026 09:10:21 +0100 Subject: [PATCH 17/25] Rust: Add examples with associated type accessed on associated type --- .../type-inference/associated_types.rs | 41 +- .../type-inference/type-inference.expected | 1091 +++++++++-------- 2 files changed, 603 insertions(+), 529 deletions(-) diff --git a/rust/ql/test/library-tests/type-inference/associated_types.rs b/rust/ql/test/library-tests/type-inference/associated_types.rs index 573404ebaf6..ea050377c21 100644 --- a/rust/ql/test/library-tests/type-inference/associated_types.rs +++ b/rust/ql/test/library-tests/type-inference/associated_types.rs @@ -7,7 +7,7 @@ impl Wrapper { } } -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone, Copy)] struct S; #[derive(Debug, Default)] @@ -270,6 +270,41 @@ mod type_param_access_associated_type { } } + // Associated type accessed on another associated type + + fn tp_nested_assoc_type(thing: T) -> <::Output as GetSet>::Output + where + ::Output: GetSet, + { + thing.get().get() // $ target=GetSet::get target=GetSet::get + } + + pub trait GetSetWrap { + type Assoc: GetSet; + + // GetSetWrap::get_wrap + fn get_wrap(&self) -> Self::Assoc; + } + + impl GetSetWrap for S { + type Assoc = S; + + // S::get_wrap + fn get_wrap(&self) -> Self::Assoc { + S + } + } + + // Nested associated type accessed on a type parameter of an impl block + impl Wrapper + where + TI: GetSetWrap, + { + fn extract2(&self) -> <::Assoc as GetSet>::Output { + self.0.get_wrap().get() // $ fieldof=Wrapper target=GetSetWrap::get_wrap $ MISSING: target=GetSet::get + } + } + pub fn test() { let _o1 = tp_with_as(S); // $ target=tp_with_as type=_o1:S3 let _o2 = tp_without_as(S); // $ target=tp_without_as type=_o2:S3 @@ -278,8 +313,12 @@ mod type_param_access_associated_type { _o4, // $ type=_o4:bool ) = tp_assoc_from_supertrait(S); // $ target=tp_assoc_from_supertrait + let _o5 = tp_nested_assoc_type(Wrapper(S)); // $ target=tp_nested_assoc_type MISSING: type=_o5:S3 + let w = Wrapper(S); let _extracted = w.extract(); // $ target=extract type=_extracted:S3 + + let _extracted2 = w.extract2(); // $ target=extract2 MISSING: type=_extracted2:S3 } } 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 94888602713..1b750fab458 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -130,196 +130,209 @@ inferCertainType | associated_types.rs:269:13:269:16 | self | | {EXTERNAL LOCATION} | & | | associated_types.rs:269:13:269:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | | associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | -| associated_types.rs:273:19:283:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:276:13:279:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:290:26:290:26 | x | | associated_types.rs:290:23:290:23 | T | -| associated_types.rs:293:5:295:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:294:18:294:18 | x | | associated_types.rs:290:23:290:23 | T | -| associated_types.rs:298:24:298:24 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:301:5:305:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:302:19:302:19 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:303:23:303:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:303:24:303:24 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:304:18:304:18 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:308:23:308:23 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:312:5:316:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:313:19:313:19 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:314:23:314:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:314:24:314:24 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:315:18:315:18 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:322:17:322:21 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:322:17:322:21 | SelfParam | TRef | associated_types.rs:318:5:323:5 | Self [trait AssocNameClash] | -| associated_types.rs:325:34:325:34 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:329:5:332:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:330:18:330:18 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:331:18:331:18 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:342:19:342:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:342:19:342:23 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:342:26:342:26 | a | | associated_types.rs:342:16:342:16 | A | -| associated_types.rs:345:23:345:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:345:23:345:27 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:345:30:345:30 | a | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:345:36:345:36 | b | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:345:76:348:9 | { ... } | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:346:13:346:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:346:13:346:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:346:22:346:22 | a | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:347:13:347:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:347:13:347:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:347:22:347:22 | b | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:356:19:356:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:356:19:356:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:356:26:356:26 | a | | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:356:46:358:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:356:46:358:9 | { ... } | A | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:357:21:357:21 | a | | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:361:19:368:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:364:25:364:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:367:29:367:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:367:35:367:39 | false | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:379:21:379:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:379:21:379:25 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:381:20:381:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:383:20:383:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:383:20:383:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:390:21:390:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:390:21:390:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:390:34:392:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:394:20:394:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:394:20:394:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:394:43:396:9 | { ... } | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:398:20:398:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:398:20:398:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:398:43:400:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:403:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:415:24:415:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:415:24:415:28 | SelfParam | TRef | associated_types.rs:413:5:416:5 | Self [trait Subtrait] | -| associated_types.rs:424:23:424:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:424:23:424:27 | SelfParam | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:424:30:424:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:424:48:424:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:424:66:427:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:425:13:425:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:425:13:425:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:425:22:425:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:426:13:426:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:426:13:426:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:426:22:426:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:435:16:435:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:435:16:435:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:435:16:435:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:435:39:437:9 | { ... } | | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:436:13:436:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:436:13:436:16 | self | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:436:13:436:16 | self | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:16:439:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:439:16:439:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:439:16:439:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:23:439:30 | _content | | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:47:441:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | -| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | -| associated_types.rs:440:22:440:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:446:24:446:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:446:24:446:28 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:446:24:446:28 | SelfParam | TRef.T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:446:47:448:9 | { ... } | | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:447:15:447:18 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:447:15:447:18 | self | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:447:15:447:18 | self | TRef.T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:453:24:453:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:453:24:453:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:453:24:453:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:453:47:456:9 | { ... } | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:461:24:461:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:461:24:461:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:461:24:461:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:461:47:463:9 | { ... } | | {EXTERNAL LOCATION} | char | -| associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | -| associated_types.rs:466:56:468:5 | { ... } | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | -| associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | -| associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:470:45:470:46 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:60:470:61 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:75:470:76 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:471:18:471:19 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:472:25:472:26 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:472:29:472:30 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:476:28:476:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:479:28:479:31 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:480:37:480:42 | &item2 | | {EXTERNAL LOCATION} | & | -| associated_types.rs:482:29:482:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:483:29:483:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:497:16:497:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:497:16:497:20 | SelfParam | TRef | associated_types.rs:490:5:490:20 | ST | -| associated_types.rs:497:16:497:20 | SelfParam | TRef.T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:497:39:499:9 | { ... } | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:497:39:499:9 | { ... } | E | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:497:39:499:9 | { ... } | T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:498:16:498:19 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:498:16:498:19 | self | TRef | associated_types.rs:490:5:490:20 | ST | -| associated_types.rs:498:16:498:19 | self | TRef.T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:502:19:504:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:503:21:503:24 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:511:31:511:31 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:511:31:511:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:511:31:511:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:61:519:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:513:21:513:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:513:21:513:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:513:21:513:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:516:19:516:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:516:19:516:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:516:19:516:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:518:23:518:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:518:23:518:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:518:23:518:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:521:36:521:36 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:521:36:521:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:521:36:521:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:521:36:521:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:521:92:527:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:522:21:522:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:522:21:522:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:522:21:522:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:522:21:522:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:523:19:523:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:523:19:523:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:523:19:523:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:523:19:523:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:524:23:524:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:524:23:524:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:524:23:524:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:524:23:524:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:525:21:525:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:525:21:525:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:525:21:525:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:21:525:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:526:19:526:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:526:19:526:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:526:19:526:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:526:19:526:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:530:15:539:1 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:531:5:531:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:532:5:532:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:533:5:533:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:534:5:534:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:535:5:535:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:536:5:536:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:537:5:537:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:538:5:538:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:275:40:275:44 | thing | | associated_types.rs:275:29:275:37 | T | +| associated_types.rs:279:9:279:13 | thing | | associated_types.rs:275:29:275:37 | T | +| associated_types.rs:286:21:286:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:286:21:286:25 | SelfParam | TRef | associated_types.rs:282:5:287:5 | Self [trait GetSetWrap] | +| associated_types.rs:293:21:293:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:293:21:293:25 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:293:43:295:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:303:21:303:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:303:21:303:25 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:303:21:303:25 | SelfParam | TRef.A | associated_types.rs:299:10:299:11 | TI | +| associated_types.rs:304:13:304:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:304:13:304:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:304:13:304:16 | self | TRef.A | associated_types.rs:299:10:299:11 | TI | +| associated_types.rs:308:19:322:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:311:13:314:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:314:13:314:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:329:26:329:26 | x | | associated_types.rs:329:23:329:23 | T | +| associated_types.rs:332:5:334:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:333:18:333:18 | x | | associated_types.rs:329:23:329:23 | T | +| associated_types.rs:337:24:337:24 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:340:5:344:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:341:19:341:19 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:342:23:342:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:342:24:342:24 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:343:18:343:18 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:347:23:347:23 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:351:5:355:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:352:19:352:19 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:353:23:353:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:353:24:353:24 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:354:18:354:18 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:361:17:361:21 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:361:17:361:21 | SelfParam | TRef | associated_types.rs:357:5:362:5 | Self [trait AssocNameClash] | +| associated_types.rs:364:34:364:34 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:368:5:371:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:369:18:369:18 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:370:18:370:18 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:381:19:381:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:381:19:381:23 | SelfParam | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:381:26:381:26 | a | | associated_types.rs:381:16:381:16 | A | +| associated_types.rs:384:23:384:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:384:23:384:27 | SelfParam | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:384:30:384:30 | a | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:384:36:384:36 | b | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:384:76:387:9 | { ... } | | associated_types.rs:378:9:378:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:385:13:385:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:385:13:385:16 | self | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:385:22:385:22 | a | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:386:13:386:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:386:13:386:16 | self | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:386:22:386:22 | b | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:395:19:395:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:395:19:395:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:395:26:395:26 | a | | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:395:46:397:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:395:46:397:9 | { ... } | A | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:396:21:396:21 | a | | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:400:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:403:25:403:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:406:29:406:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:406:35:406:39 | false | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:418:21:418:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:418:21:418:25 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:420:20:420:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:420:20:420:24 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:422:20:422:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:422:20:422:24 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:429:21:429:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:429:21:429:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:429:34:431:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:433:20:433:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:433:20:433:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:433:43:435:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:437:20:437:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:437:20:437:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:437:43:439:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:442:19:446:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:454:24:454:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:454:24:454:28 | SelfParam | TRef | associated_types.rs:452:5:455:5 | Self [trait Subtrait] | +| associated_types.rs:463:23:463:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:463:23:463:27 | SelfParam | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:463:30:463:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:463:48:463:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:463:66:466:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:464:13:464:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:464:13:464:16 | self | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:464:22:464:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:465:13:465:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:465:13:465:16 | self | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:465:22:465:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:474:16:474:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:474:16:474:20 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:474:16:474:20 | SelfParam | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:474:39:476:9 | { ... } | | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:475:13:475:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:475:13:475:16 | self | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:475:13:475:16 | self | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:16:478:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:478:16:478:20 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:478:16:478:20 | SelfParam | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:23:478:30 | _content | | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:47:480:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:22:479:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | +| associated_types.rs:479:22:479:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | +| associated_types.rs:479:22:479:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:22:479:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:485:24:485:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:485:24:485:28 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:485:24:485:28 | SelfParam | TRef.T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:485:47:487:9 | { ... } | | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:486:15:486:18 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:486:15:486:18 | self | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:486:15:486:18 | self | TRef.T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:492:24:492:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:492:24:492:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:492:24:492:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:492:47:495:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:500:24:500:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:500:24:500:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:500:24:500:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:500:47:502:9 | { ... } | | {EXTERNAL LOCATION} | char | +| associated_types.rs:505:33:505:36 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:505:33:505:36 | item | TRef | associated_types.rs:505:20:505:30 | T | +| associated_types.rs:505:56:507:5 | { ... } | | associated_types.rs:505:20:505:30 | T::Output[GetSet] | +| associated_types.rs:506:9:506:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:506:9:506:12 | item | TRef | associated_types.rs:505:20:505:30 | T | +| associated_types.rs:509:35:509:38 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:509:35:509:38 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:509:45:509:46 | c1 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:60:509:61 | c2 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:75:509:76 | c3 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:90:512:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:510:9:510:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:510:9:510:12 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:510:18:510:19 | c1 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:511:9:511:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:511:9:511:12 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:511:25:511:26 | c2 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:511:29:511:30 | c3 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:514:19:523:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:515:28:515:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:518:28:518:31 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:519:37:519:42 | &item2 | | {EXTERNAL LOCATION} | & | +| associated_types.rs:521:29:521:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:29:522:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:536:16:536:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:536:16:536:20 | SelfParam | TRef | associated_types.rs:529:5:529:20 | ST | +| associated_types.rs:536:16:536:20 | SelfParam | TRef.T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:536:39:538:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:536:39:538:9 | { ... } | E | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:536:39:538:9 | { ... } | T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:537:16:537:19 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:537:16:537:19 | self | TRef | associated_types.rs:529:5:529:20 | ST | +| associated_types.rs:537:16:537:19 | self | TRef.T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:541:19:543:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:542:21:542:24 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:550:31:550:31 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:550:31:550:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:550:31:550:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:550:61:558:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:552:21:552:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:552:21:552:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:552:21:552:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:555:19:555:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:555:19:555:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:555:19:555:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:557:23:557:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:557:23:557:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:557:23:557:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:560:36:560:36 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:560:36:560:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:560:36:560:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:560:36:560:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:560:92:566:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:561:21:561:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:561:21:561:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:561:21:561:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:561:21:561:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:562:19:562:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:562:19:562:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:562:19:562:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:562:19:562:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:563:23:563:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:563:23:563:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:563:23:563:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:563:23:563:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:564:21:564:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:564:21:564:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:564:21:564:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:21:564:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:565:19:565:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:565:19:565:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:565:19:565:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:565:19:565:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:569:15:578:1 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:570:5:570:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:571:5:571:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:572:5:572:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:573:5:573:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:574:5:574:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:575:5:575:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:576:5:576:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:577:5:577:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | | blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | | blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | | blanket_impl.rs:15:42:17:9 | { ... } | | {EXTERNAL LOCATION} | & | @@ -5122,344 +5135,366 @@ inferType | associated_types.rs:269:13:269:16 | self | TRef.A | associated_types.rs:264:10:264:11 | TI | | associated_types.rs:269:13:269:18 | self.0 | | associated_types.rs:264:10:264:11 | TI | | associated_types.rs:269:13:269:24 | ... .get() | | associated_types.rs:264:10:264:11 | TI::Output[GetSet] | -| associated_types.rs:273:19:283:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:274:13:274:15 | _o1 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:274:19:274:31 | tp_with_as(...) | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:274:30:274:30 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:275:13:275:15 | _o2 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:275:19:275:34 | tp_without_as(...) | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:275:33:275:33 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:276:13:279:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:276:13:279:9 | TuplePat | T1 | {EXTERNAL LOCATION} | bool | -| associated_types.rs:278:13:278:15 | _o4 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | -| associated_types.rs:279:13:279:39 | tp_assoc_from_supertrait(...) | T1 | {EXTERNAL LOCATION} | bool | -| associated_types.rs:279:38:279:38 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:281:13:281:13 | w | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:281:13:281:13 | w | A | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:281:17:281:26 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:281:17:281:26 | Wrapper(...) | A | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:281:25:281:25 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:282:13:282:22 | _extracted | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:282:26:282:26 | w | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:282:26:282:26 | w | A | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:282:26:282:36 | w.extract() | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:290:26:290:26 | x | | associated_types.rs:290:23:290:23 | T | -| associated_types.rs:293:5:295:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:294:13:294:14 | _a | | {EXTERNAL LOCATION} | char | -| associated_types.rs:294:18:294:18 | x | | associated_types.rs:290:23:290:23 | T | -| associated_types.rs:294:18:294:24 | x.get() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:298:24:298:24 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:301:5:305:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:302:13:302:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:302:19:302:19 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:302:19:302:25 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:303:13:303:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:303:19:303:25 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:303:23:303:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:303:23:303:24 | &x | TRef | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:303:24:303:24 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:304:13:304:14 | _b | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:304:18:304:18 | x | | associated_types.rs:298:21:298:21 | T | -| associated_types.rs:304:18:304:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:308:23:308:23 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:312:5:316:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:313:13:313:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:313:19:313:19 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:313:19:313:25 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:314:13:314:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:314:19:314:25 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:314:23:314:24 | &x | | {EXTERNAL LOCATION} | & | -| associated_types.rs:314:23:314:24 | &x | TRef | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:314:24:314:24 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:315:13:315:14 | _b | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:315:18:315:18 | x | | associated_types.rs:308:20:308:20 | T | -| associated_types.rs:315:18:315:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:322:17:322:21 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:322:17:322:21 | SelfParam | TRef | associated_types.rs:318:5:323:5 | Self [trait AssocNameClash] | -| associated_types.rs:325:34:325:34 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:329:5:332:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:330:13:330:14 | _a | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:330:18:330:18 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:330:18:330:24 | x.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:331:13:331:14 | _b | | {EXTERNAL LOCATION} | char | -| associated_types.rs:331:18:331:18 | x | | associated_types.rs:325:31:325:31 | T | -| associated_types.rs:331:18:331:25 | x.get2() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:342:19:342:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:342:19:342:23 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:342:26:342:26 | a | | associated_types.rs:342:16:342:16 | A | -| associated_types.rs:345:23:345:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:345:23:345:27 | SelfParam | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:345:30:345:30 | a | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:345:36:345:36 | b | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:345:76:348:9 | { ... } | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:346:13:346:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:346:13:346:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:346:13:346:23 | self.put(...) | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:346:22:346:22 | a | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:347:13:347:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:347:13:347:16 | self | TRef | associated_types.rs:338:5:349:5 | Self [trait MyTraitAssoc2] | -| associated_types.rs:347:13:347:23 | self.put(...) | | associated_types.rs:339:9:339:52 | GenericAssociatedType[MyTraitAssoc2] | -| associated_types.rs:347:22:347:22 | b | | associated_types.rs:345:20:345:20 | A | -| associated_types.rs:356:19:356:23 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:356:19:356:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:356:26:356:26 | a | | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:356:46:358:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:356:46:358:9 | { ... } | A | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:357:13:357:22 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:357:13:357:22 | Wrapper(...) | A | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:357:21:357:21 | a | | associated_types.rs:356:16:356:16 | A | -| associated_types.rs:361:19:368:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:362:13:362:13 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:362:17:362:17 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:364:13:364:15 | _g1 | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:364:13:364:15 | _g1 | A | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:364:19:364:19 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:364:19:364:29 | s.put(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:364:19:364:29 | s.put(...) | A | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:364:25:364:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:367:13:367:15 | _g2 | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:367:19:367:19 | s | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:367:19:367:40 | s.put_two(...) | | associated_types.rs:1:1:2:21 | Wrapper | -| associated_types.rs:367:29:367:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:367:35:367:39 | false | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:379:21:379:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:379:21:379:25 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:381:20:381:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:381:20:381:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:383:20:383:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:383:20:383:24 | SelfParam | TRef | associated_types.rs:374:5:384:5 | Self [trait TraitMultipleAssoc] | -| associated_types.rs:390:21:390:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:390:21:390:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:390:34:392:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:391:13:391:14 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:394:20:394:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:394:20:394:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:394:43:396:9 | { ... } | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:395:13:395:13 | S | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:398:20:398:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:398:20:398:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:398:43:400:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:399:13:399:14 | S2 | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:403:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:404:13:404:23 | _assoc_zero | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:404:27:404:28 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:404:27:404:39 | S3.get_zero() | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:405:13:405:22 | _assoc_one | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:405:26:405:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:405:26:405:37 | S3.get_one() | | associated_types.rs:10:1:11:9 | S | -| associated_types.rs:406:13:406:22 | _assoc_two | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:406:26:406:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | -| associated_types.rs:406:26:406:37 | S3.get_two() | | associated_types.rs:13:1:14:10 | S2 | -| associated_types.rs:415:24:415:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:415:24:415:28 | SelfParam | TRef | associated_types.rs:413:5:416:5 | Self [trait Subtrait] | -| associated_types.rs:424:23:424:27 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:424:23:424:27 | SelfParam | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:424:30:424:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:424:48:424:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:424:66:427:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:425:13:425:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:425:13:425:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:425:13:425:24 | self.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:425:22:425:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:426:13:426:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:426:13:426:16 | self | TRef | associated_types.rs:418:5:428:5 | Self [trait Subtrait2] | -| associated_types.rs:426:13:426:24 | self.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:426:22:426:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | -| associated_types.rs:435:16:435:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:435:16:435:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:435:16:435:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:435:39:437:9 | { ... } | | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:436:13:436:16 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:436:13:436:16 | self | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:436:13:436:16 | self | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:436:13:436:18 | self.0 | | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:16:439:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:439:16:439:20 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:439:16:439:20 | SelfParam | TRef.T | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:23:439:30 | _content | | associated_types.rs:432:10:432:16 | T | -| associated_types.rs:439:47:441:9 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:13:440:43 | MacroExpr | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | -| associated_types.rs:440:22:440:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | -| associated_types.rs:440:22:440:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:440:22:440:42 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:446:24:446:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:446:24:446:28 | SelfParam | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:446:24:446:28 | SelfParam | TRef.T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:446:47:448:9 | { ... } | | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:447:13:447:19 | (...) | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:447:13:447:19 | (...) | T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:447:13:447:21 | ... .0 | | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:447:14:447:18 | * ... | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:447:14:447:18 | * ... | T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:447:15:447:18 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:447:15:447:18 | self | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:447:15:447:18 | self | TRef.T | associated_types.rs:444:10:444:16 | T | -| associated_types.rs:453:24:453:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:453:24:453:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:453:24:453:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:453:47:456:9 | { ... } | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:455:13:455:30 | ...::default(...) | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:461:24:461:28 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:461:24:461:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:461:24:461:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:461:47:463:9 | { ... } | | {EXTERNAL LOCATION} | char | -| associated_types.rs:462:13:462:30 | ...::default(...) | | {EXTERNAL LOCATION} | char | -| associated_types.rs:466:33:466:36 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:466:33:466:36 | item | TRef | associated_types.rs:466:20:466:30 | T | -| associated_types.rs:466:56:468:5 | { ... } | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | -| associated_types.rs:467:9:467:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:467:9:467:12 | item | TRef | associated_types.rs:466:20:466:30 | T | -| associated_types.rs:467:9:467:26 | item.get_content() | | associated_types.rs:466:20:466:30 | T::Output[GetSet] | -| associated_types.rs:470:35:470:38 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:470:35:470:38 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:470:45:470:46 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:60:470:61 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:75:470:76 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:470:90:473:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:471:9:471:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:471:9:471:12 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:471:9:471:20 | item.set(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:471:18:471:19 | c1 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:472:9:472:12 | item | | {EXTERNAL LOCATION} | & | -| associated_types.rs:472:9:472:12 | item | TRef | associated_types.rs:470:21:470:32 | T | -| associated_types.rs:472:9:472:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:472:25:472:26 | c2 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:472:29:472:30 | c3 | | associated_types.rs:470:21:470:32 | T::Output[GetSet] | -| associated_types.rs:475:19:484:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:476:13:476:17 | item1 | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:476:13:476:17 | item1 | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:476:21:476:33 | MyType(...) | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:476:21:476:33 | MyType(...) | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:476:28:476:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:477:13:477:21 | _content1 | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:477:25:477:29 | item1 | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:477:25:477:29 | item1 | T | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:477:25:477:43 | item1.get_content() | | {EXTERNAL LOCATION} | i64 | -| associated_types.rs:479:13:479:17 | item2 | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:479:13:479:17 | item2 | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:479:21:479:32 | MyType(...) | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:479:21:479:32 | MyType(...) | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:479:28:479:31 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:480:37:480:42 | &item2 | | {EXTERNAL LOCATION} | & | -| associated_types.rs:480:37:480:42 | &item2 | TRef | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:480:37:480:42 | &item2 | TRef.T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:480:38:480:42 | item2 | | associated_types.rs:430:5:430:24 | MyType | -| associated_types.rs:480:38:480:42 | item2 | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:482:13:482:21 | _content3 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:482:25:482:34 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:482:25:482:34 | Odd(...) | OddT | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:482:25:482:48 | ... .get_content() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:482:29:482:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:483:13:483:21 | _content4 | | {EXTERNAL LOCATION} | char | -| associated_types.rs:483:25:483:33 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | -| associated_types.rs:483:25:483:33 | Odd(...) | OddT | {EXTERNAL LOCATION} | bool | -| associated_types.rs:483:25:483:47 | ... .get_content() | | {EXTERNAL LOCATION} | char | -| associated_types.rs:483:29:483:32 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:497:16:497:20 | SelfParam | | {EXTERNAL LOCATION} | & | -| associated_types.rs:497:16:497:20 | SelfParam | TRef | associated_types.rs:490:5:490:20 | ST | -| associated_types.rs:497:16:497:20 | SelfParam | TRef.T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:497:39:499:9 | { ... } | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:497:39:499:9 | { ... } | E | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:497:39:499:9 | { ... } | T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:498:13:498:22 | Ok(...) | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:498:13:498:22 | Ok(...) | E | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:498:13:498:22 | Ok(...) | T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:498:16:498:19 | self | | {EXTERNAL LOCATION} | & | -| associated_types.rs:498:16:498:19 | self | TRef | associated_types.rs:490:5:490:20 | ST | -| associated_types.rs:498:16:498:19 | self | TRef.T | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:498:16:498:21 | self.0 | | associated_types.rs:492:10:492:21 | Output | -| associated_types.rs:502:19:504:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:503:13:503:14 | _y | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:503:13:503:14 | _y | E | {EXTERNAL LOCATION} | bool | -| associated_types.rs:503:13:503:14 | _y | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:503:18:503:25 | ST(...) | | associated_types.rs:490:5:490:20 | ST | -| associated_types.rs:503:18:503:25 | ST(...) | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:503:18:503:31 | ... .get() | | {EXTERNAL LOCATION} | Result | -| associated_types.rs:503:18:503:31 | ... .get() | E | {EXTERNAL LOCATION} | bool | -| associated_types.rs:503:18:503:31 | ... .get() | T | {EXTERNAL LOCATION} | bool | -| associated_types.rs:503:21:503:24 | true | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:511:31:511:31 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:511:31:511:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:511:31:511:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:511:61:519:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:513:13:513:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:19:513:22 | (...) | | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:513:19:513:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:19:513:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:20:513:21 | * ... | | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:513:20:513:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:513:21:513:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:513:21:513:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:513:21:513:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:516:13:516:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:516:19:516:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:516:19:516:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:516:19:516:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:516:19:516:25 | t.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:518:13:518:15 | _a3 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:518:19:518:24 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:518:23:518:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:518:23:518:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | -| associated_types.rs:518:23:518:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:521:36:521:36 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:521:36:521:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:521:36:521:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:521:36:521:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:521:92:527:5 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:522:13:522:15 | _a1 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:522:19:522:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:522:19:522:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:522:19:522:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:522:19:522:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:522:20:522:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:522:20:522:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:522:20:522:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:522:21:522:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:522:21:522:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:522:21:522:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:522:21:522:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:523:13:523:15 | _a2 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:523:19:523:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:523:19:523:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:523:19:523:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:523:19:523:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:523:19:523:25 | t.get() | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:524:13:524:15 | _a3 | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:524:19:524:24 | get(...) | | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:524:23:524:23 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:524:23:524:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:524:23:524:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:524:23:524:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:525:13:525:15 | _b1 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:19:525:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:525:19:525:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:19:525:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:525:19:525:36 | ... .get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:20:525:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:525:20:525:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:20:525:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:525:21:525:21 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:525:21:525:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:525:21:525:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:525:21:525:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:526:13:526:15 | _b2 | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:526:19:526:19 | t | | {EXTERNAL LOCATION} | & | -| associated_types.rs:526:19:526:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | -| associated_types.rs:526:19:526:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | -| associated_types.rs:526:19:526:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | -| associated_types.rs:526:19:526:33 | t.get_another() | | {EXTERNAL LOCATION} | bool | -| associated_types.rs:530:15:539:1 | { ... } | | {EXTERNAL LOCATION} | () | -| associated_types.rs:531:5:531:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:532:5:532:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:533:5:533:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:534:5:534:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:535:5:535:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:536:5:536:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:537:5:537:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | -| associated_types.rs:538:5:538:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:275:40:275:44 | thing | | associated_types.rs:275:29:275:37 | T | +| associated_types.rs:279:9:279:13 | thing | | associated_types.rs:275:29:275:37 | T | +| associated_types.rs:279:9:279:19 | thing.get() | | associated_types.rs:275:29:275:37 | T::Output[GetSet] | +| associated_types.rs:286:21:286:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:286:21:286:25 | SelfParam | TRef | associated_types.rs:282:5:287:5 | Self [trait GetSetWrap] | +| associated_types.rs:293:21:293:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:293:21:293:25 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:293:43:295:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:294:13:294:13 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:303:21:303:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:303:21:303:25 | SelfParam | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:303:21:303:25 | SelfParam | TRef.A | associated_types.rs:299:10:299:11 | TI | +| associated_types.rs:304:13:304:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:304:13:304:16 | self | TRef | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:304:13:304:16 | self | TRef.A | associated_types.rs:299:10:299:11 | TI | +| associated_types.rs:304:13:304:18 | self.0 | | associated_types.rs:299:10:299:11 | TI | +| associated_types.rs:304:13:304:29 | ... .get_wrap() | | associated_types.rs:299:10:299:11 | TI::Assoc[GetSetWrap] | +| associated_types.rs:308:19:322:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:309:13:309:15 | _o1 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:309:19:309:31 | tp_with_as(...) | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:309:30:309:30 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:310:13:310:15 | _o2 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:310:19:310:34 | tp_without_as(...) | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:310:33:310:33 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:311:13:314:9 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:311:13:314:9 | TuplePat | T1 | {EXTERNAL LOCATION} | bool | +| associated_types.rs:313:13:313:15 | _o4 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:314:13:314:39 | tp_assoc_from_supertrait(...) | | {EXTERNAL LOCATION} | (T_2) | +| associated_types.rs:314:13:314:39 | tp_assoc_from_supertrait(...) | T1 | {EXTERNAL LOCATION} | bool | +| associated_types.rs:314:38:314:38 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:316:40:316:49 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:316:40:316:49 | Wrapper(...) | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:316:48:316:48 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:318:13:318:13 | w | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:318:13:318:13 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:318:17:318:26 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:318:17:318:26 | Wrapper(...) | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:318:25:318:25 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:319:13:319:22 | _extracted | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:319:26:319:26 | w | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:319:26:319:26 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:319:26:319:36 | w.extract() | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:321:27:321:27 | w | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:321:27:321:27 | w | A | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:329:26:329:26 | x | | associated_types.rs:329:23:329:23 | T | +| associated_types.rs:332:5:334:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:333:13:333:14 | _a | | {EXTERNAL LOCATION} | char | +| associated_types.rs:333:18:333:18 | x | | associated_types.rs:329:23:329:23 | T | +| associated_types.rs:333:18:333:24 | x.get() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:337:24:337:24 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:340:5:344:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:341:13:341:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:341:19:341:19 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:341:19:341:25 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:342:13:342:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:342:19:342:25 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:342:23:342:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:342:23:342:24 | &x | TRef | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:342:24:342:24 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:343:13:343:14 | _b | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:343:18:343:18 | x | | associated_types.rs:337:21:337:21 | T | +| associated_types.rs:343:18:343:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:347:23:347:23 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:351:5:355:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:352:13:352:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:352:19:352:19 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:352:19:352:25 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:353:13:353:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:353:19:353:25 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:353:23:353:24 | &x | | {EXTERNAL LOCATION} | & | +| associated_types.rs:353:23:353:24 | &x | TRef | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:353:24:353:24 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:354:13:354:14 | _b | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:354:18:354:18 | x | | associated_types.rs:347:20:347:20 | T | +| associated_types.rs:354:18:354:32 | x.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:361:17:361:21 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:361:17:361:21 | SelfParam | TRef | associated_types.rs:357:5:362:5 | Self [trait AssocNameClash] | +| associated_types.rs:364:34:364:34 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:368:5:371:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:369:13:369:14 | _a | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:369:18:369:18 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:369:18:369:24 | x.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:370:13:370:14 | _b | | {EXTERNAL LOCATION} | char | +| associated_types.rs:370:18:370:18 | x | | associated_types.rs:364:31:364:31 | T | +| associated_types.rs:370:18:370:25 | x.get2() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:381:19:381:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:381:19:381:23 | SelfParam | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:381:26:381:26 | a | | associated_types.rs:381:16:381:16 | A | +| associated_types.rs:384:23:384:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:384:23:384:27 | SelfParam | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:384:30:384:30 | a | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:384:36:384:36 | b | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:384:76:387:9 | { ... } | | associated_types.rs:378:9:378:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:385:13:385:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:385:13:385:16 | self | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:385:13:385:23 | self.put(...) | | associated_types.rs:378:9:378:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:385:22:385:22 | a | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:386:13:386:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:386:13:386:16 | self | TRef | associated_types.rs:377:5:388:5 | Self [trait MyTraitAssoc2] | +| associated_types.rs:386:13:386:23 | self.put(...) | | associated_types.rs:378:9:378:52 | GenericAssociatedType[MyTraitAssoc2] | +| associated_types.rs:386:22:386:22 | b | | associated_types.rs:384:20:384:20 | A | +| associated_types.rs:395:19:395:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:395:19:395:23 | SelfParam | TRef | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:395:26:395:26 | a | | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:395:46:397:9 | { ... } | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:395:46:397:9 | { ... } | A | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:396:13:396:22 | Wrapper(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:396:13:396:22 | Wrapper(...) | A | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:396:21:396:21 | a | | associated_types.rs:395:16:395:16 | A | +| associated_types.rs:400:19:407:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:401:13:401:13 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:401:17:401:17 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:403:13:403:15 | _g1 | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:403:13:403:15 | _g1 | A | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:403:19:403:19 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:403:19:403:29 | s.put(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:403:19:403:29 | s.put(...) | A | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:403:25:403:28 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:406:13:406:15 | _g2 | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:406:19:406:19 | s | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:406:19:406:40 | s.put_two(...) | | associated_types.rs:1:1:2:21 | Wrapper | +| associated_types.rs:406:29:406:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:406:35:406:39 | false | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:418:21:418:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:418:21:418:25 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:420:20:420:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:420:20:420:24 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:422:20:422:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:422:20:422:24 | SelfParam | TRef | associated_types.rs:413:5:423:5 | Self [trait TraitMultipleAssoc] | +| associated_types.rs:429:21:429:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:429:21:429:25 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:429:34:431:9 | { ... } | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:430:13:430:14 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:433:20:433:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:433:20:433:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:433:43:435:9 | { ... } | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:434:13:434:13 | S | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:437:20:437:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:437:20:437:24 | SelfParam | TRef | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:437:43:439:9 | { ... } | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:438:13:438:14 | S2 | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:442:19:446:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:443:13:443:23 | _assoc_zero | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:443:27:443:28 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:443:27:443:39 | S3.get_zero() | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:444:13:444:22 | _assoc_one | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:444:26:444:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:444:26:444:37 | S3.get_one() | | associated_types.rs:10:1:11:9 | S | +| associated_types.rs:445:13:445:22 | _assoc_two | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:445:26:445:27 | S3 | | associated_types.rs:16:1:17:10 | S3 | +| associated_types.rs:445:26:445:37 | S3.get_two() | | associated_types.rs:13:1:14:10 | S2 | +| associated_types.rs:454:24:454:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:454:24:454:28 | SelfParam | TRef | associated_types.rs:452:5:455:5 | Self [trait Subtrait] | +| associated_types.rs:463:23:463:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:463:23:463:27 | SelfParam | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:463:30:463:31 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:463:48:463:49 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:463:66:466:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:464:13:464:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:464:13:464:16 | self | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:464:13:464:24 | self.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:464:22:464:23 | c1 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:465:13:465:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:465:13:465:16 | self | TRef | associated_types.rs:457:5:467:5 | Self [trait Subtrait2] | +| associated_types.rs:465:13:465:24 | self.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:465:22:465:23 | c2 | | associated_types.rs:20:5:20:16 | Output[Subtrait2] | +| associated_types.rs:474:16:474:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:474:16:474:20 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:474:16:474:20 | SelfParam | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:474:39:476:9 | { ... } | | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:475:13:475:16 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:475:13:475:16 | self | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:475:13:475:16 | self | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:475:13:475:18 | self.0 | | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:16:478:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:478:16:478:20 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:478:16:478:20 | SelfParam | TRef.T | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:23:478:30 | _content | | associated_types.rs:471:10:471:16 | T | +| associated_types.rs:478:47:480:9 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:13:479:43 | MacroExpr | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:22:479:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | +| associated_types.rs:479:22:479:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | +| associated_types.rs:479:22:479:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:22:479:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:479:22:479:42 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:485:24:485:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:485:24:485:28 | SelfParam | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:485:24:485:28 | SelfParam | TRef.T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:485:47:487:9 | { ... } | | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:486:13:486:19 | (...) | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:486:13:486:19 | (...) | T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:486:13:486:21 | ... .0 | | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:486:14:486:18 | * ... | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:486:14:486:18 | * ... | T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:486:15:486:18 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:486:15:486:18 | self | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:486:15:486:18 | self | TRef.T | associated_types.rs:483:10:483:16 | T | +| associated_types.rs:492:24:492:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:492:24:492:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:492:24:492:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:492:47:495:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:494:13:494:30 | ...::default(...) | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:500:24:500:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:500:24:500:28 | SelfParam | TRef | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:500:24:500:28 | SelfParam | TRef.OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:500:47:502:9 | { ... } | | {EXTERNAL LOCATION} | char | +| associated_types.rs:501:13:501:30 | ...::default(...) | | {EXTERNAL LOCATION} | char | +| associated_types.rs:505:33:505:36 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:505:33:505:36 | item | TRef | associated_types.rs:505:20:505:30 | T | +| associated_types.rs:505:56:507:5 | { ... } | | associated_types.rs:505:20:505:30 | T::Output[GetSet] | +| associated_types.rs:506:9:506:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:506:9:506:12 | item | TRef | associated_types.rs:505:20:505:30 | T | +| associated_types.rs:506:9:506:26 | item.get_content() | | associated_types.rs:505:20:505:30 | T::Output[GetSet] | +| associated_types.rs:509:35:509:38 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:509:35:509:38 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:509:45:509:46 | c1 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:60:509:61 | c2 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:75:509:76 | c3 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:509:90:512:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:510:9:510:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:510:9:510:12 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:510:9:510:20 | item.set(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:510:18:510:19 | c1 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:511:9:511:12 | item | | {EXTERNAL LOCATION} | & | +| associated_types.rs:511:9:511:12 | item | TRef | associated_types.rs:509:21:509:32 | T | +| associated_types.rs:511:9:511:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:511:25:511:26 | c2 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:511:29:511:30 | c3 | | associated_types.rs:509:21:509:32 | T::Output[GetSet] | +| associated_types.rs:514:19:523:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:515:13:515:17 | item1 | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:515:13:515:17 | item1 | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:515:21:515:33 | MyType(...) | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:515:21:515:33 | MyType(...) | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:515:28:515:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:516:13:516:21 | _content1 | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:516:25:516:29 | item1 | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:516:25:516:29 | item1 | T | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:516:25:516:43 | item1.get_content() | | {EXTERNAL LOCATION} | i64 | +| associated_types.rs:518:13:518:17 | item2 | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:518:13:518:17 | item2 | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:518:21:518:32 | MyType(...) | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:518:21:518:32 | MyType(...) | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:518:28:518:31 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:519:37:519:42 | &item2 | | {EXTERNAL LOCATION} | & | +| associated_types.rs:519:37:519:42 | &item2 | TRef | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:519:37:519:42 | &item2 | TRef.T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:519:38:519:42 | item2 | | associated_types.rs:469:5:469:24 | MyType | +| associated_types.rs:519:38:519:42 | item2 | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:521:13:521:21 | _content3 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:521:25:521:34 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:521:25:521:34 | Odd(...) | OddT | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:521:25:521:48 | ... .get_content() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:521:29:521:33 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:522:13:522:21 | _content4 | | {EXTERNAL LOCATION} | char | +| associated_types.rs:522:25:522:33 | Odd(...) | | associated_types.rs:67:1:67:23 | Odd | +| associated_types.rs:522:25:522:33 | Odd(...) | OddT | {EXTERNAL LOCATION} | bool | +| associated_types.rs:522:25:522:47 | ... .get_content() | | {EXTERNAL LOCATION} | char | +| associated_types.rs:522:29:522:32 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:536:16:536:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| associated_types.rs:536:16:536:20 | SelfParam | TRef | associated_types.rs:529:5:529:20 | ST | +| associated_types.rs:536:16:536:20 | SelfParam | TRef.T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:536:39:538:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:536:39:538:9 | { ... } | E | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:536:39:538:9 | { ... } | T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:537:13:537:22 | Ok(...) | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:537:13:537:22 | Ok(...) | E | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:537:13:537:22 | Ok(...) | T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:537:16:537:19 | self | | {EXTERNAL LOCATION} | & | +| associated_types.rs:537:16:537:19 | self | TRef | associated_types.rs:529:5:529:20 | ST | +| associated_types.rs:537:16:537:19 | self | TRef.T | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:537:16:537:21 | self.0 | | associated_types.rs:531:10:531:21 | Output | +| associated_types.rs:541:19:543:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:542:13:542:14 | _y | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:542:13:542:14 | _y | E | {EXTERNAL LOCATION} | bool | +| associated_types.rs:542:13:542:14 | _y | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:542:18:542:25 | ST(...) | | associated_types.rs:529:5:529:20 | ST | +| associated_types.rs:542:18:542:25 | ST(...) | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:542:18:542:31 | ... .get() | | {EXTERNAL LOCATION} | Result | +| associated_types.rs:542:18:542:31 | ... .get() | E | {EXTERNAL LOCATION} | bool | +| associated_types.rs:542:18:542:31 | ... .get() | T | {EXTERNAL LOCATION} | bool | +| associated_types.rs:542:21:542:24 | true | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:550:31:550:31 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:550:31:550:31 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:550:31:550:31 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:550:61:558:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:552:13:552:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:552:19:552:22 | (...) | | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:552:19:552:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:552:19:552:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:552:20:552:21 | * ... | | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:552:20:552:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:552:21:552:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:552:21:552:21 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:552:21:552:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:555:13:555:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:555:19:555:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:555:19:555:19 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:555:19:555:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:555:19:555:25 | t.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:557:13:557:15 | _a3 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:557:19:557:24 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:557:23:557:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:557:23:557:23 | t | TRef | associated_types.rs:19:1:27:1 | dyn GetSet | +| associated_types.rs:557:23:557:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:560:36:560:36 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:560:36:560:36 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:560:36:560:36 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:560:36:560:36 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:560:92:566:5 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:561:13:561:15 | _a1 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:561:19:561:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:561:19:561:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:561:19:561:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:561:19:561:28 | ... .get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:561:20:561:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:561:20:561:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:561:20:561:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:561:21:561:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:561:21:561:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:561:21:561:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:561:21:561:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:562:13:562:15 | _a2 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:562:19:562:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:562:19:562:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:562:19:562:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:562:19:562:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:562:19:562:25 | t.get() | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:563:13:563:15 | _a3 | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:563:19:563:24 | get(...) | | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:563:23:563:23 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:563:23:563:23 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:563:23:563:23 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:563:23:563:23 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:564:13:564:15 | _b1 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:19:564:22 | (...) | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:564:19:564:22 | (...) | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:19:564:22 | (...) | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:564:19:564:36 | ... .get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:20:564:21 | * ... | | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:564:20:564:21 | * ... | dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:20:564:21 | * ... | dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:564:21:564:21 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:564:21:564:21 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:564:21:564:21 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:564:21:564:21 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:565:13:565:15 | _b2 | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:565:19:565:19 | t | | {EXTERNAL LOCATION} | & | +| associated_types.rs:565:19:565:19 | t | TRef | associated_types.rs:33:1:38:1 | dyn AnotherGet | +| associated_types.rs:565:19:565:19 | t | TRef.dyn(AnotherOutput) | {EXTERNAL LOCATION} | bool | +| associated_types.rs:565:19:565:19 | t | TRef.dyn(Output) | {EXTERNAL LOCATION} | i32 | +| associated_types.rs:565:19:565:33 | t.get_another() | | {EXTERNAL LOCATION} | bool | +| associated_types.rs:569:15:578:1 | { ... } | | {EXTERNAL LOCATION} | () | +| associated_types.rs:570:5:570:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:571:5:571:48 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:572:5:572:59 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:573:5:573:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:574:5:574:35 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:575:5:575:37 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:576:5:576:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| associated_types.rs:577:5:577:46 | ...::test(...) | | {EXTERNAL LOCATION} | () | | blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | | blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | | blanket_impl.rs:15:42:17:9 | { ... } | | {EXTERNAL LOCATION} | & | From 89e9a253eb142a25da6462cd23b87ac54df93ad3 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 6 Feb 2026 10:57:56 +0100 Subject: [PATCH 18/25] Rust: Distinguish path resolution expectations from type inference expectations --- .../PathResolutionInlineExpectationsTest.qll | 28 +++++++-- .../library-tests/path-resolution/main.rs | 62 +++++++++---------- .../test/library-tests/path-resolution/my.rs | 2 +- 3 files changed, 55 insertions(+), 37 deletions(-) diff --git a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll index bde96ace1a4..f4544cafacc 100644 --- a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll +++ b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll @@ -8,7 +8,7 @@ private import codeql.rust.internal.typeinference.TypeInference private import utils.test.InlineExpectationsTest private module ResolveTest implements TestSig { - string getARelevantTag() { result = "item" } + string getARelevantTag() { result = ["item", "target", "item_not_target"] } private predicate itemAt(ItemNode i, string filepath, int line) { i.getLocation().hasLocationInfo(filepath, _, _, line, _) @@ -36,19 +36,37 @@ private module ResolveTest implements TestSig { ) } + private Item getCallExprTarget(Path p) { + exists(CallExpr ce | + p = ce.getFunction().(PathExpr).getPath() and + result = ce.getResolvedTarget() + ) + } + predicate hasActualResult(Location location, string element, string tag, string value) { - exists(AstNode n | + exists(AstNode n, ItemNode i | not n = any(Path parent).getQualifier() and location = n.getLocation() and n.fromSource() and not location.getFile().getAbsolutePath().matches("%proc_macro.rs") and not n.isFromMacroExpansion() and element = n.toString() and - tag = "item" + item(i, value) | - item(resolvePath(n), value) + i = resolvePath(n) and + ( + if exists(getCallExprTarget(n)) and not i = getCallExprTarget(n) + then tag = "item_not_target" + else tag = "item" + ) or - item(n.(MethodCallExpr).getStaticTarget(), value) + tag = "target" and + ( + i = n.(MethodCallExpr).getStaticTarget() + or + i = getCallExprTarget(n) and + not i = resolvePath(n) + ) ) } } diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs index 773b082cd02..c96f9ef30f0 100644 --- a/rust/ql/test/library-tests/path-resolution/main.rs +++ b/rust/ql/test/library-tests/path-resolution/main.rs @@ -189,18 +189,18 @@ mod m8 { #[rustfmt::skip] pub fn g() { let x = MyStruct {}; // $ item=I50 - MyTrait::f(&x); // $ item=I48 + MyTrait::f(&x); // $ item_not_target=I48 target=I53 MyStruct::f(&x); // $ item=I53 // $ MISSING: item=52 - ::f(&x); // $ item=I48 + ::f(&x); // $ item_not_target=I48 target=I53 let x = MyStruct {}; // $ item=I50 - x.f(); // $ item=I53 + x.f(); // $ target=I53 let x = MyStruct {}; // $ item=I50 - x.g(); // $ item=I54 + x.g(); // $ target=I54 MyStruct::h(&x); // $ item=I74 - x.h(); // $ item=I74 + x.h(); // $ target=I74 } // I55 } // I46 @@ -316,7 +316,7 @@ mod m15 { fn f(&self) { println!("m15::Trait2::f"); // $ item=println Self::g(self); // $ item=I80 - self.g(); // $ item=I80 + self.g(); // $ target=I80 } // Trait2::f } // I82 @@ -331,7 +331,7 @@ mod m15 { fn f(&self, tt: TT) { // $ item=ITT Self::g(self); // $ item=I80 TT::g(&tt); // $ item=I80 - self.g(); // $ item=I80 + self.g(); // $ target=I80 } } // ITrait3 @@ -343,7 +343,7 @@ mod m15 { fn f(&self) { println!("m15::::f"); // $ item=println Self::g(self); // $ item=I77 - self.g(); // $ item=I77 + self.g(); // $ target=I77 } // I76 fn g(&self) { @@ -365,12 +365,12 @@ mod m15 { let x = S; // $ item=I81 ::f(&x); // $ item=Trait1::f + >::f(&x); // $ item_not_target=Trait1::f target=I76 ::f(&x); // $ item=Trait2::f + >::f(&x); // $ item_not_target=Trait2::f target=I78 S::g(&x); // $ item=I77 - x.g(); // $ item=I77 + x.g(); // $ target=I77 } // I75 } @@ -383,12 +383,12 @@ mod m16 { ; // Trait1::f fn g(&self) -> T {// $ item=I84 - self.f() // $ item=Trait1::f + self.f() // $ target=Trait1::f } // I85 fn h(&self) -> T { // $ item=I84 Self::g(&self); // $ item=I85 - self.g() // $ item=I85 + self.g() // $ target=I85 } // I96 const c: T // $ item=I84 @@ -405,7 +405,7 @@ mod m16 { fn f(&self) -> T { // $ item=I87 println!("m16::Trait2::f"); // $ item=println Self::g(self); // $ item=I85 - self.g(); // $ item=I85 + self.g(); // $ target=I85 Self::c // $ item=I94 } // Trait2::f } // I89 @@ -420,7 +420,7 @@ mod m16 { fn f(&self) -> S { // $ item=I90 println!("m16::>::f"); // $ item=println Self::g(self); // $ item=I92 - self.g() // $ item=I92 + self.g() // $ target=I92 } // I91 fn g(&self) -> S { // $ item=I90 @@ -452,16 +452,16 @@ mod m16 { as Trait1< S // $ item=I90 > // $ item=I86 - >::f(&x); // $ item=Trait1::f + >::f(&x); // $ item_not_target=Trait1::f target=I91 // $ item=I89 - >::f(&x); // $ item=Trait2::f + >::f(&x); // $ item_not_target=Trait2::f target=I93 S::g(&x); // $ item=I92 - x.g(); // $ item=I92 + x.g(); // $ target=I92 S::h(&x); // $ item=I96 - x.h(); // $ item=I96 + x.h(); // $ target=I96 S::c; // $ item=I95 :: // $ item=i32 - Assoc(); // $ item=S3i32AssocFunc $ SPURIOUS: item=S3boolAssocFunc (the spurious target is later filtered away by type inference) + Assoc(); // $ item=S3i32AssocFunc item_not_target=S3boolAssocFunc S3:::: // $ item=bool - f1(); // $ item=S3boolf1 $ SPURIOUS: item=S3i32f1 (the spurious target is later filtered away by type inference) + f1(); // $ item=S3boolf1 item_not_target=S3i32f1 S3:::: // $ item=i32 - f1(); // $ item=S3i32f1 $ SPURIOUS: item=S3boolf1 (the spurious target is later filtered away by type inference) + f1(); // $ item=S3i32f1 item_not_target=S3boolf1 } } @@ -628,7 +628,7 @@ mod trait_visibility { { // The `Bar` trait is not visible, but we can refer to its method // with a full path. - m::Bar::a_method(&x); // $ item=Bar::a_method + m::Bar::a_method(&x); // $ item_not_target=Bar::a_method target=X_Bar::a_method } } // trait_visibility::f } @@ -652,7 +652,7 @@ mod m17 { fn g(x: T) { // $ item=I5 - x.f(); // $ item=I1 + x.f(); // $ target=I1 T::f(&x); // $ item=I1 MyTrait::f(&x); // $ item=I1 } // I6 @@ -735,7 +735,7 @@ mod m23 { #[rustfmt::skip] pub fn f() { let x = S; // $ item=I4 - x.f(); // $ item=I5 + x.f(); // $ target=I5 } // I108 } @@ -760,7 +760,7 @@ mod m24 { T: TraitA // $ item=I111 item=I1151 { fn call_trait_a(&self) { - self.data.trait_a_method(); // $ item=I110 + self.data.trait_a_method(); // $ target=I110 } // I116 } @@ -772,8 +772,8 @@ mod m24 { T: TraitA, // $ item=I111 item=I1161 { fn call_both(&self) { - self.data.trait_a_method(); // $ item=I110 - self.data.trait_b_method(); // $ item=I112 + self.data.trait_a_method(); // $ target=I110 + self.data.trait_b_method(); // $ target=I112 } // I117 } @@ -798,8 +798,8 @@ mod m24 { let impl_obj = Implementor; // $ item=I118 let generic = GenericStruct { data: impl_obj }; // $ item=I115 - generic.call_trait_a(); // $ item=I116 - generic.call_both(); // $ item=I117 + generic.call_trait_a(); // $ target=I116 + generic.call_both(); // $ target=I117 // Access through where clause type parameter constraint GenericStruct::::call_trait_a(&generic); // $ item=I116 item=I118 @@ -1132,7 +1132,7 @@ fn main() { zelf::h(); // $ item=I25 z_changed(); // $ item=I122 AStruct::z_on_type(); // $ item=I124 - AStruct {}.z_on_instance(); // $ item=I123 item=I125 + AStruct {}.z_on_instance(); // $ item=I123 target=I125 impl_with_attribute_macro::test(); // $ item=impl_with_attribute_macro::test patterns::test(); // $ item=patterns::test } diff --git a/rust/ql/test/library-tests/path-resolution/my.rs b/rust/ql/test/library-tests/path-resolution/my.rs index 612e40d493f..c506ba3c196 100644 --- a/rust/ql/test/library-tests/path-resolution/my.rs +++ b/rust/ql/test/library-tests/path-resolution/my.rs @@ -30,7 +30,7 @@ fn int_div( ) -> Result // $ item=my::Result $ item=i32 { if y == 0 { - return Err("Div by zero".to_string()); // $ item=Err item=to_string + return Err("Div by zero".to_string()); // $ item=Err target=to_string } Ok(x / y) // $ item=Ok } From 287a8717a883b63ca699c81cce9eabfdda7e096d Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 11 Feb 2026 12:19:22 +0100 Subject: [PATCH 19/25] Rust: Apply suggestions from code review Co-authored-by: Tom Hvitved --- .../codeql/rust/internal/typeinference/AssociatedTypes.qll | 4 ++-- rust/ql/lib/codeql/rust/internal/typeinference/Type.qll | 2 +- .../ql/lib/codeql/rust/internal/typeinference/TypeMention.qll | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll index 546bdad6169..b53f6177ab9 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll @@ -21,7 +21,7 @@ final class AssocType extends TypeAlias { /** Gets an associated type of `trait` or of a supertrait of `trait`. */ AssocType getTraitAssocType(Trait trait) { - result = trait.getSupertrait*().getAssocItemList().getAnAssocItem() + result.getTrait() = trait.getSupertrait*() } /** Holds if `path` is of the form `::name` */ @@ -44,7 +44,7 @@ predicate tpAssociatedType(TypeParam tp, AssocType assoc, Path path) { resolvePath(path.getQualifier()) = tp and resolvePath(path) = assoc or - exists(TypeRepr typeRepr, Path traitPath, string name | + exists(PathTypeRepr typeRepr, Path traitPath, string name | asTraitPath(path, typeRepr, traitPath, name) and tp = resolvePath(typeRepr.(PathTypeRepr).getPath()) and assoc = resolvePath(traitPath).(TraitItemNode).getAssocItem(name) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll index f9cebef3523..4a4f00d7eba 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll @@ -496,7 +496,7 @@ class TypeParamAssociatedTypeTypeParameter extends TypeParameter, AssocType getTypeAlias() { result = assoc } /** Gets a path that accesses this type parameter. */ - Path getPath() { tpAssociatedType(typeParam, assoc, result) } + Path getAPath() { tpAssociatedType(typeParam, assoc, result) } override ItemNode getDeclaringItem() { result.getTypeParam(_) = typeParam } diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll index 0c71b03c637..70e1b0d7e91 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll @@ -322,7 +322,7 @@ private module MkTypeMention Date: Wed, 11 Feb 2026 12:24:16 +0100 Subject: [PATCH 20/25] Rust: Minor tweaks in type inference --- .../{AssociatedTypes.qll => AssociatedType.qll} | 11 +++++------ .../lib/codeql/rust/internal/typeinference/Type.qll | 2 +- .../rust/internal/typeinference/TypeMention.qll | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) rename rust/ql/lib/codeql/rust/internal/typeinference/{AssociatedTypes.qll => AssociatedType.qll} (85%) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedType.qll similarity index 85% rename from rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll rename to rust/ql/lib/codeql/rust/internal/typeinference/AssociatedType.qll index b53f6177ab9..6bd0db33158 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedTypes.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/AssociatedType.qll @@ -20,12 +20,11 @@ final class AssocType extends TypeAlias { } /** Gets an associated type of `trait` or of a supertrait of `trait`. */ -AssocType getTraitAssocType(Trait trait) { - result.getTrait() = trait.getSupertrait*() -} +AssocType getTraitAssocType(Trait trait) { result.getTrait() = trait.getSupertrait*() } /** Holds if `path` is of the form `::name` */ -predicate asTraitPath(Path path, TypeRepr typeRepr, Path traitPath, string name) { +pragma[nomagic] +predicate pathTypeAsTraitAssoc(Path path, TypeRepr typeRepr, Path traitPath, string name) { exists(PathSegment segment | segment = path.getQualifier().getSegment() and typeRepr = segment.getTypeRepr() and @@ -45,8 +44,8 @@ predicate tpAssociatedType(TypeParam tp, AssocType assoc, Path path) { resolvePath(path) = assoc or exists(PathTypeRepr typeRepr, Path traitPath, string name | - asTraitPath(path, typeRepr, traitPath, name) and - tp = resolvePath(typeRepr.(PathTypeRepr).getPath()) and + pathTypeAsTraitAssoc(path, typeRepr, traitPath, name) and + tp = resolvePath(typeRepr.getPath()) and assoc = resolvePath(traitPath).(TraitItemNode).getAssocItem(name) ) } diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll index 4a4f00d7eba..05b6557522a 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/Type.qll @@ -8,7 +8,7 @@ private import codeql.rust.elements.internal.generated.Raw private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.frameworks.stdlib.Stdlib private import codeql.rust.frameworks.stdlib.Builtins as Builtins -private import AssociatedTypes +private import AssociatedType /** * Holds if a dyn trait type for the trait `trait` should have a type parameter diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll index 70e1b0d7e91..ef54fe18bb9 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeMention.qll @@ -6,7 +6,7 @@ private import codeql.rust.frameworks.stdlib.Stdlib private import Type private import TypeAbstraction private import TypeInference -private import AssociatedTypes +private import AssociatedType bindingset[trait, name] pragma[inline_late] @@ -390,7 +390,7 @@ private module MkTypeMention::AssocType` // ^^^ tm ^^^^^^^^^ name exists(string name, Path traitPath | - asTraitPath(path, tm, traitPath, name) and + pathTypeAsTraitAssoc(path, tm, traitPath, name) and trait = resolvePath(traitPath) and getTraitAssocType(trait, name) = alias ) From bed1ec89816dacf1fddc92afb1d09b38fd4a1363 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 11 Feb 2026 12:10:08 +0000 Subject: [PATCH 21/25] Enhance path validation recommendations Expanded recommendations for validating user input when constructing file paths, including normalization and using allowlists. --- .../src/Security/CWE-022/PathInjection.qhelp | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/python/ql/src/Security/CWE-022/PathInjection.qhelp b/python/ql/src/Security/CWE-022/PathInjection.qhelp index ed12b74b6d9..ebe267a462c 100644 --- a/python/ql/src/Security/CWE-022/PathInjection.qhelp +++ b/python/ql/src/Security/CWE-022/PathInjection.qhelp @@ -13,21 +13,26 @@ attacker being able to influence behavior by modifying unexpected files.

-Validate user input before using it to construct a file path, either using an off-the-shelf library function -like werkzeug.utils.secure_filename, or by performing custom validation. +Validate paths constructed from untrusted user input before using them to access files.

-Ideally, follow these rules: +The choice of validation depends on the use case.

-
    -
  • Do not allow more than a single "." character.
  • -
  • Do not allow directory separators such as "/" or "\" (depending on the file system).
  • -
  • Do not rely on simply replacing problematic sequences such as "../". For example, after -applying this filter to ".../...//", the resulting string would still be "../".
  • -
  • Use an allowlist of known good patterns.
  • -
+

+If you want to allow paths spanning multiple folders, a common strategy is to make sure that the constructed +file path is contained within a safe root folder. First, normalize the path using os.path.normpath or +os.path.realpath to remove any ".." segments. Then check that the normalized path starts with the +root folder. Note that the normalization step is important, since otherwise even a path that starts with the root +folder could be used to access files outside the root folder. +

+ +

+More restrictive options include using a library function like werkzeug.utils.secure_filename to eliminate +any special characters from the file path, or restricting the path to an allow list of safe paths. These options are +safe, but can only be used in particular circumstances. +

From 9596b7b921d11f14f02f4768ad004468a2a58245 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 11 Feb 2026 20:18:03 +0000 Subject: [PATCH 22/25] C++: No need to compute this TC. --- .../lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index c66c76e60d7..9bc3a80e3e0 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -1726,9 +1726,7 @@ private module Cached { SsaImpl::ssaFlow(n, succ) and bb1 = n.getBasicBlock() and bb2 = succ.getBasicBlock() and - bb1 != bb2 and - bb2.dominates(bb1) and - bb1.getASuccessor+() = bb2 + bb2.strictlyDominates(bb1) ) } From fea07ebfcba2f4fc125ffe6329b914f781fb2734 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:32:08 +0000 Subject: [PATCH 23/25] Add changed framework coverage reports --- csharp/documentation/library-coverage/coverage.csv | 2 +- csharp/documentation/library-coverage/coverage.rst | 4 ++-- go/documentation/library-coverage/coverage.csv | 6 +++--- go/documentation/library-coverage/coverage.rst | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/csharp/documentation/library-coverage/coverage.csv b/csharp/documentation/library-coverage/coverage.csv index c75661cc3dd..5dbefc4c816 100644 --- a/csharp/documentation/library-coverage/coverage.csv +++ b/csharp/documentation/library-coverage/coverage.csv @@ -44,5 +44,5 @@ NHibernate,3,,,,,,,,,,,,3,,,,,,,,,, Newtonsoft.Json,,,91,,,,,,,,,,,,,,,,,,,73,18 ServiceStack,194,,7,27,,,,,75,,,,92,,,,,,,,,7, SourceGenerators,,,5,,,,,,,,,,,,,,,,,,,,5 -System,59,47,12491,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6378,6113 +System,59,47,12495,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6382,6113 Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,,,,,, diff --git a/csharp/documentation/library-coverage/coverage.rst b/csharp/documentation/library-coverage/coverage.rst index 3f67bec413d..4061f675b85 100644 --- a/csharp/documentation/library-coverage/coverage.rst +++ b/csharp/documentation/library-coverage/coverage.rst @@ -8,7 +8,7 @@ C# framework & library support Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting` `ServiceStack `_,"``ServiceStack.*``, ``ServiceStack``",,7,194, - System,"``System.*``, ``System``",47,12491,59,5 + System,"``System.*``, ``System``",47,12495,59,5 Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.AspNetCore.Components``, ``Microsoft.AspNetCore.Http``, ``Microsoft.AspNetCore.Mvc``, ``Microsoft.AspNetCore.WebUtilities``, ``Microsoft.CSharp``, ``Microsoft.Data.SqlClient``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.DotNet.PlatformAbstractions``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.JSInterop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``NHibernate``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",60,2406,162,4 - Totals,,107,14904,415,9 + Totals,,107,14908,415,9 diff --git a/go/documentation/library-coverage/coverage.csv b/go/documentation/library-coverage/coverage.csv index 2826d79047d..2c76dcf1155 100644 --- a/go/documentation/library-coverage/coverage.csv +++ b/go/documentation/library-coverage/coverage.csv @@ -1,9 +1,9 @@ package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:log-injection,sink:nosql-injection,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:sql-injection,sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:commandargs,source:database,source:environment,source:file,source:remote,source:stdin,summary:taint,summary:value -,,,8,,,,,,,,,,,,,,,,,,,,,,,3,5 +,,,9,,,,,,,,,,,,,,,,,,,,,,,3,6 archive/tar,,,5,,,,,,,,,,,,,,,,,,,,,,,5, archive/zip,,,6,,,,,,,,,,,,,,,,,,,,,,,6, bufio,,,17,,,,,,,,,,,,,,,,,,,,,,,17, -bytes,,,43,,,,,,,,,,,,,,,,,,,,,,,43, +bytes,,,44,,,,,,,,,,,,,,,,,,,,,,,44, clevergo.tech/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,,,, cloud.google.com/go/bigquery,1,,,,,,,,,,,,,,1,,,,,,,,,,,, compress/bzip2,,,1,,,,,,,,,,,,,,,,,,,,,,,1, @@ -18,7 +18,7 @@ context,,,5,,,,,,,,,,,,,,,,,,,,,,,5, crypto,,,10,,,,,,,,,,,,,,,,,,,,,,,10, database/sql,30,18,12,,,,,,,,,,,,30,,,,,,18,,,,,12, encoding,,,81,,,,,,,,,,,,,,,,,,,,,,,81, -errors,,,3,,,,,,,,,,,,,,,,,,,,,,,3, +errors,,,4,,,,,,,,,,,,,,,,,,,,,,,4, expvar,,,6,,,,,,,,,,,,,,,,,,,,,,,6, fmt,3,,16,,,,3,,,,,,,,,,,,,,,,,,,16, github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,,,,3,,,,,,,, diff --git a/go/documentation/library-coverage/coverage.rst b/go/documentation/library-coverage/coverage.rst index b54a425300f..80330c3715e 100644 --- a/go/documentation/library-coverage/coverage.rst +++ b/go/documentation/library-coverage/coverage.rst @@ -32,7 +32,7 @@ Go framework & library support `Revel `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4 `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, `Squirrel `_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",81,,96 - `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,609,104 + `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,612,104 `XORM `_,"``github.com/go-xorm/xorm*``, ``xorm.io/xorm*``",,,68 `XPath `_,``github.com/antchfx/xpath*``,,,4 `appleboy/gin-jwt `_,``github.com/appleboy/gin-jwt*``,,,1 @@ -74,5 +74,5 @@ Go framework & library support `xpathparser `_,``github.com/santhosh-tekuri/xpathparser*``,,,2 `yaml `_,``gopkg.in/yaml*``,,9, `zap `_,``go.uber.org/zap*``,,11,33 - Totals,,688,1069,1557 + Totals,,688,1072,1557 From 5c53677051ab4c8c194371406200002a7061e007 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 12 Feb 2026 11:02:54 +0100 Subject: [PATCH 24/25] Java: Deprecate UnreachableBlocks. --- .../2026-02-12-deprecate-unreachableblocks.md | 4 +++ .../java/controlflow/UnreachableBlocks.qll | 4 ++- .../ExcludeDebuggingProfilingLogging.qll | 5 ++- .../UnreachableBlocks.expected | 12 ------- .../unreachableblocks/UnreachableBlocks.ql | 5 --- .../unreachableblocks/Unreachable.java | 35 ------------------- 6 files changed, 11 insertions(+), 54 deletions(-) create mode 100644 java/ql/lib/change-notes/2026-02-12-deprecate-unreachableblocks.md delete mode 100644 java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected delete mode 100644 java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.ql delete mode 100644 java/ql/test/library-tests/unreachableblocks/unreachableblocks/Unreachable.java diff --git a/java/ql/lib/change-notes/2026-02-12-deprecate-unreachableblocks.md b/java/ql/lib/change-notes/2026-02-12-deprecate-unreachableblocks.md new file mode 100644 index 00000000000..24748cbb09e --- /dev/null +++ b/java/ql/lib/change-notes/2026-02-12-deprecate-unreachableblocks.md @@ -0,0 +1,4 @@ +--- +category: deprecated +--- +* The `UnreachableBlocks.qll` library has been deprecated. diff --git a/java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll b/java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll index dfc9fc2833b..6ac7668266e 100644 --- a/java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll +++ b/java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll @@ -1,8 +1,10 @@ /** + * DEPRECATED: This module is no longer maintained, and will be removed in a future release. + * * Provides classes and predicates for identifying unreachable blocks under a "closed-world" assumption. */ overlay[local?] -module; +deprecated module; import java import semmle.code.java.controlflow.Guards diff --git a/java/ql/lib/semmle/code/java/controlflow/unreachableblocks/ExcludeDebuggingProfilingLogging.qll b/java/ql/lib/semmle/code/java/controlflow/unreachableblocks/ExcludeDebuggingProfilingLogging.qll index bda7f9bee74..8958ceedb32 100644 --- a/java/ql/lib/semmle/code/java/controlflow/unreachableblocks/ExcludeDebuggingProfilingLogging.qll +++ b/java/ql/lib/semmle/code/java/controlflow/unreachableblocks/ExcludeDebuggingProfilingLogging.qll @@ -1,5 +1,8 @@ +/** + * DEPRECATED: This module is no longer maintained, and will be removed in a future release. + */ overlay[local?] -module; +deprecated module; import java import semmle.code.java.controlflow.UnreachableBlocks diff --git a/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected b/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected deleted file mode 100644 index acf240ae313..00000000000 --- a/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected +++ /dev/null @@ -1,12 +0,0 @@ -| unreachableblocks/Unreachable.java:3:14:3:24 | Exceptional Exit | -| unreachableblocks/Unreachable.java:3:14:3:24 | Exceptional Exit | -| unreachableblocks/Unreachable.java:5:14:5:19 | Exceptional Exit | -| unreachableblocks/Unreachable.java:6:14:8:3 | { ... } | -| unreachableblocks/Unreachable.java:9:21:11:3 | { ... } | -| unreachableblocks/Unreachable.java:12:22:14:3 | { ... } | -| unreachableblocks/Unreachable.java:17:3:17:9 | case ... | -| unreachableblocks/Unreachable.java:19:3:19:9 | case ... | -| unreachableblocks/Unreachable.java:24:3:24:9 | case ... | -| unreachableblocks/Unreachable.java:26:3:26:10 | case ... | -| unreachableblocks/Unreachable.java:27:3:27:10 | default | -| unreachableblocks/Unreachable.java:32:18:32:28 | Exceptional Exit | diff --git a/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.ql b/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.ql deleted file mode 100644 index b7229c059f3..00000000000 --- a/java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.ql +++ /dev/null @@ -1,5 +0,0 @@ -import default -import semmle.code.java.controlflow.UnreachableBlocks - -from UnreachableBasicBlock unreachableBasicBlock -select unreachableBasicBlock diff --git a/java/ql/test/library-tests/unreachableblocks/unreachableblocks/Unreachable.java b/java/ql/test/library-tests/unreachableblocks/unreachableblocks/Unreachable.java deleted file mode 100644 index a8dc419975b..00000000000 --- a/java/ql/test/library-tests/unreachableblocks/unreachableblocks/Unreachable.java +++ /dev/null @@ -1,35 +0,0 @@ -package unreachableblocks; - -public class Unreachable { - private boolean privateFalse = false; - public void method() { - if (false) { - // unreachable - } - if (privateFalse) { - // unreachable - } - if (methodFalse()) { - // unreachable - } - - switch (7) { - case 5: // unreachable - break; - case 6: // unreachable - System.out.println("dead"); // unreachable - case 7: - case 8: // reachable from 7 - break; // reachable - case 9: //unreachable - break; - case 10: // unreachable - default: - break; //unreachable - } - } - - private boolean methodFalse() { - return privateFalse; - } -} \ No newline at end of file From 5f970d9f2fc9de4a41cca594bf06ba494e2527e9 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 12 Feb 2026 12:01:33 +0000 Subject: [PATCH 25/25] Rewordings per copilot --- python/ql/src/Security/CWE-022/PathInjection.qhelp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-022/PathInjection.qhelp b/python/ql/src/Security/CWE-022/PathInjection.qhelp index ebe267a462c..53653abb12e 100644 --- a/python/ql/src/Security/CWE-022/PathInjection.qhelp +++ b/python/ql/src/Security/CWE-022/PathInjection.qhelp @@ -23,14 +23,15 @@ The choice of validation depends on the use case.

If you want to allow paths spanning multiple folders, a common strategy is to make sure that the constructed file path is contained within a safe root folder. First, normalize the path using os.path.normpath or -os.path.realpath to remove any ".." segments. Then check that the normalized path starts with the +os.path.realpath (make sure to use the latter if symlinks are a consideration) +to remove any internal ".." segments and/or follow links. Then check that the normalized path starts with the root folder. Note that the normalization step is important, since otherwise even a path that starts with the root folder could be used to access files outside the root folder.

More restrictive options include using a library function like werkzeug.utils.secure_filename to eliminate -any special characters from the file path, or restricting the path to an allow list of safe paths. These options are +any special characters from the file path, or restricting the path to a known list of safe paths. These options are safe, but can only be used in particular circumstances.