diff --git a/rust/ql/consistency-queries/PathResolutionConsistency.ql b/rust/ql/consistency-queries/PathResolutionConsistency.ql index 3b2165b712f3..bc1f572eedb3 100644 --- a/rust/ql/consistency-queries/PathResolutionConsistency.ql +++ b/rust/ql/consistency-queries/PathResolutionConsistency.ql @@ -15,8 +15,8 @@ class SourceLocatable extends Locatable { SourceLocatable() { this.fromSource() } } -query predicate multipleCallTargets(SourceLocatable a) { - PathResolutionConsistency::multipleCallTargets(a, _) +query predicate multipleResolvedTargets(SourceLocatable a) { + PathResolutionConsistency::multipleResolvedTargets(a, _) } query predicate multiplePathResolutions(SourceLocatable a) { diff --git a/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll b/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll index 857afc1f5522..807225d1615a 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll @@ -24,17 +24,10 @@ query predicate multiplePathResolutions(Path p, ItemNode i) { strictcount(ItemNode i0 | i0 = resolvePath(p) and not i0 instanceof Crate) > 1 } -// TODO: Take other calls into account -abstract private class CallExprBase extends InvocationExpr { } - -private class CallExprCallExprBase extends CallExpr, CallExprBase { } - -private class MethodCallExprCallExprBase extends MethodCallExpr, CallExprBase { } - -/** Holds if `call` has multiple static call targets including `target`. */ -query predicate multipleCallTargets(CallExprBase call, Callable target) { - target = call.getResolvedTarget() and - strictcount(call.getResolvedTarget()) > 1 +/** Holds if `ie` has multiple resolved targets including `target`. */ +query predicate multipleResolvedTargets(InvocationExpr ie, Addressable target) { + target = ie.getResolvedTarget() and + strictcount(ie.getResolvedTarget()) > 1 } /** Holds if `fe` resolves to multiple record fields including `field`. */ @@ -62,8 +55,8 @@ int getPathResolutionInconsistencyCounts(string type) { type = "Multiple path resolutions" and result = count(Path p | multiplePathResolutions(p, _) | p) or - type = "Multiple static call targets" and - result = count(CallExprBase call | multipleCallTargets(call, _) | call) + type = "Multiple resolved targets" and + result = count(InvocationExpr ie | multipleResolvedTargets(ie, _) | ie) or type = "Multiple record fields" and result = count(FieldExpr fe | multipleStructFields(fe, _) | fe) diff --git a/rust/ql/src/queries/telemetry/DatabaseQuality.qll b/rust/ql/src/queries/telemetry/DatabaseQuality.qll index 553783498ae1..c4c6341d3c22 100644 --- a/rust/ql/src/queries/telemetry/DatabaseQuality.qll +++ b/rust/ql/src/queries/telemetry/DatabaseQuality.qll @@ -20,25 +20,25 @@ private class RelevantFile extends File { } module CallTargetStats implements StatsSig { - // TODO: Take other calls into account - abstract private class CallExprBase extends InvocationExpr { } - - private class CallExprCallExprBase extends CallExpr, CallExprBase { } - - private class MethodCallExprCallExprBase extends MethodCallExpr, CallExprBase { } - - int getNumberOfOk() { - result = - count(CallExprBase c | c.getFile() instanceof RelevantFile and exists(c.getResolvedTarget())) + /** + * A call-like expression that is relevant for call target statistics. + * + * Note that this also includes tuple struct instantiations and tuple + * variant instantiations. + */ + private class RelevantInvocationExpr extends InvocationExpr { + RelevantInvocationExpr() { + this.getFile() instanceof RelevantFile and + not this instanceof CallExprImpl::DynamicCallExpr and + not this = any(Operation o | not o.isOverloaded(_, _, _)) + } } - additional predicate isNotOkCall(CallExprBase c) { - c.getFile() instanceof RelevantFile and - not exists(c.getResolvedTarget()) and - not c instanceof CallExprImpl::DynamicCallExpr - } + int getNumberOfOk() { result = count(RelevantInvocationExpr e | exists(e.getResolvedTarget())) } + + additional predicate isNotOkCall(RelevantInvocationExpr e) { not exists(e.getResolvedTarget()) } - int getNumberOfNotOk() { result = count(CallExprBase c | isNotOkCall(c)) } + int getNumberOfNotOk() { result = count(RelevantInvocationExpr e | isNotOkCall(e)) } string getOkText() { result = "calls with call target" } diff --git a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected index 141cfc355b9f..f5a5b9b7b194 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | proc_macro.rs:44:27:44:30 | ...::to_tokens(...) | diff --git a/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..97a93c16a2d7 --- /dev/null +++ b/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,4 @@ +multipleResolvedTargets +| test.rs:419:34:419:35 | * ... | +| test.rs:420:26:420:27 | * ... | +| test.rs:597:9:597:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..10c2285e621e --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,3 @@ +multipleResolvedTargets +| main.rs:236:11:236:15 | * ... | +| main.rs:272:13:272:29 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..f99062c73d14 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| main.rs:562:10:562:15 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..9ec1dde87a0a --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| main.rs:115:14:115:35 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..3610f0614060 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,26 @@ +multipleResolvedTargets +| main.rs:19:17:19:18 | * ... | +| main.rs:53:14:53:15 | * ... | +| main.rs:59:33:59:34 | * ... | +| main.rs:72:14:72:15 | * ... | +| main.rs:73:9:73:10 | * ... | +| main.rs:74:14:74:15 | * ... | +| main.rs:75:9:75:10 | * ... | +| main.rs:76:14:76:15 | * ... | +| main.rs:83:9:83:10 | * ... | +| main.rs:90:9:90:17 | * ... | +| main.rs:97:9:97:10 | * ... | +| main.rs:105:9:105:10 | * ... | +| main.rs:106:14:106:15 | * ... | +| main.rs:113:14:113:15 | * ... | +| main.rs:114:9:114:10 | * ... | +| main.rs:115:14:115:15 | * ... | +| main.rs:122:9:122:10 | * ... | +| main.rs:125:9:125:10 | * ... | +| main.rs:135:17:135:18 | * ... | +| main.rs:136:17:136:18 | * ... | +| main.rs:201:9:201:10 | * ... | +| main.rs:209:14:209:15 | * ... | +| main.rs:211:14:211:15 | * ... | +| main.rs:224:13:224:17 | * ... | +| main.rs:229:9:229:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected index ca5c386b720c..5dfb62baf4b3 100644 --- a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,4 @@ -multipleCallTargets +multipleResolvedTargets | test.rs:59:62:59:77 | ...::from(...) | | test.rs:66:58:66:73 | ...::from(...) | | test.rs:389:30:389:67 | pinned.poll_read(...) | diff --git a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected index ccda75006f94..a8f80f6f39cf 100644 --- a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:52:14:52:29 | ...::from(...) | diff --git a/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..8ebb39522b36 --- /dev/null +++ b/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,5 @@ +multipleResolvedTargets +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | diff --git a/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..cb94b0abf165 --- /dev/null +++ b/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| test.rs:52:2:52:5 | * ... | diff --git a/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..93e644c9abbc --- /dev/null +++ b/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,45 @@ +multipleResolvedTargets +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | diff --git a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected index cc34dfd2b7d6..23ac5e722d5c 100644 --- a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,4 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:126:9:126:11 | f(...) | | main.rs:366:9:368:16 | ...::f(...) | | main.rs:369:9:371:16 | ...::f(...) | diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index 16db4f5c0903..38a68818c75b 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -1,13 +1,34 @@ -multipleCallTargets +multipleResolvedTargets +| blanket_impl.rs:33:13:33:17 | * ... | | dereference.rs:69:15:69:24 | e1.deref() | +| dereference.rs:73:15:73:17 | * ... | +| dereference.rs:77:16:77:18 | * ... | | dereference.rs:182:17:182:26 | ... .foo() | | dereference.rs:183:17:183:23 | S.foo() | | dereference.rs:184:17:184:30 | ... .foo() | | dereference.rs:186:17:186:25 | S.bar(...) | | dereference.rs:187:17:187:29 | S.bar(...) | +| dyn_type.rs:65:20:65:23 | * ... | +| dyn_type.rs:69:21:69:24 | * ... | +| dyn_type.rs:90:10:90:13 | * ... | +| invalid/main.rs:69:13:69:17 | * ... | +| invalid/main.rs:76:13:76:17 | * ... | +| main.rs:1077:14:1077:18 | * ... | +| main.rs:1159:26:1159:30 | * ... | +| main.rs:1504:14:1504:21 | * ... | +| main.rs:1504:16:1504:20 | * ... | +| main.rs:1509:14:1509:18 | * ... | +| main.rs:1540:27:1540:29 | * ... | +| main.rs:1654:17:1654:24 | * ... | +| main.rs:1654:18:1654:24 | * ... | +| main.rs:1792:17:1792:21 | * ... | +| main.rs:1807:28:1807:32 | * ... | +| main.rs:2440:13:2440:18 | * ... | | main.rs:2634:13:2634:31 | ...::from(...) | | main.rs:2635:13:2635:31 | ...::from(...) | | main.rs:2636:13:2636:31 | ...::from(...) | | main.rs:2642:13:2642:31 | ...::from(...) | | main.rs:2643:13:2643:31 | ...::from(...) | | main.rs:2644:13:2644:31 | ...::from(...) | +| pattern_matching.rs:273:13:273:27 | * ... | +| pattern_matching.rs:273:14:273:27 | * ... | diff --git a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected index 6b4022b86e57..8dfdad04adf5 100644 --- a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected @@ -1,3 +1,17 @@ -multipleCallTargets +multipleResolvedTargets +| main.rs:16:15:16:16 | * ... | | main.rs:91:19:91:40 | ...::from(...) | | main.rs:113:19:113:40 | ...::from(...) | +| main.rs:507:5:507:10 | * ... | +| main.rs:512:5:512:6 | * ... | +| main.rs:513:9:513:10 | * ... | +| main.rs:514:9:514:10 | * ... | +| main.rs:519:5:519:6 | * ... | +| main.rs:520:9:520:10 | * ... | +| main.rs:521:9:521:10 | * ... | +| main.rs:522:5:522:6 | * ... | +| main.rs:530:5:530:6 | * ... | +| main.rs:542:5:542:7 | * ... | +| main.rs:542:6:542:7 | * ... | +| main.rs:552:5:552:6 | * ... | +| main.rs:699:9:699:13 | * ... | diff --git a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected index bb60014263b3..fbf9238f366e 100644 --- a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | my_struct.rs:25:19:25:37 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected index 34a867e09173..3187982b20e0 100644 --- a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,4 @@ -multipleCallTargets +multipleResolvedTargets | mysql.rs:15:24:15:39 | ...::from(...) | | mysql.rs:16:26:16:85 | ...::from(...) | | mysql.rs:18:13:18:66 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected index c25043e0ef65..698af5a02797 100644 --- a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:9:43:9:63 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected index 078bce75133f..260e09db470e 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,20 @@ -multipleCallTargets +multipleResolvedTargets +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | | test_storage.rs:13:10:13:33 | ...::from(...) | | test_storage.rs:17:10:17:35 | ...::from(...) | | test_storage.rs:21:10:21:35 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected index b9925a323cc8..18400b7ab59b 100644 --- a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | test_cipher.rs:114:23:114:50 | ...::new(...) | diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected index ae227c22e5ae..c581cd273e60 100644 --- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,12 @@ -multipleCallTargets +multipleResolvedTargets | deallocation.rs:354:11:354:29 | ...::from(...) | | deallocation.rs:355:11:355:29 | ...::from(...) | +| lifetime.rs:217:17:217:25 | * ... | | lifetime.rs:610:13:610:31 | ...::from(...) | | lifetime.rs:611:13:611:31 | ...::from(...) | | lifetime.rs:628:13:628:31 | ...::from(...) | +| lifetime.rs:630:11:630:25 | * ... | +| lifetime.rs:692:12:692:14 | * ... | +| lifetime.rs:693:12:693:14 | * ... | +| lifetime.rs:694:12:694:14 | * ... | +| lifetime.rs:734:11:734:13 | * ... | diff --git a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected index 4d2cdee53ce5..be3b445209d5 100644 --- a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,31 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:14:13:14:29 | ...::from(...) | | main.rs:15:13:15:29 | ...::from(...) | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:539:13:539:14 | * ... | +| main.rs:544:19:544:20 | * ... | +| more.rs:34:11:34:19 | * ... | +| more.rs:45:20:45:26 | * ... | +| more.rs:56:20:56:30 | * ... | +| more.rs:56:21:56:30 | * ... | +| more.rs:61:20:61:30 | * ... | +| more.rs:61:21:61:30 | * ... | +| more.rs:67:20:67:25 | * ... | +| more.rs:71:5:71:10 | * ... | +| more.rs:75:5:75:10 | * ... | +| more.rs:80:5:80:10 | * ... | +| more.rs:82:20:82:26 | * ... | | unreachable.rs:165:20:165:42 | ...::from(...) | | unreachable.rs:171:9:171:15 | ...::from(...) | | unreachable.rs:177:17:177:25 | ...::from(...) | diff --git a/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 000000000000..b9195fc15f0a --- /dev/null +++ b/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,9 @@ +multipleResolvedTargets +| option.rs:34:18:34:22 | * ... | +| option.rs:61:15:61:19 | * ... | +| option.rs:69:15:69:19 | * ... | +| option.rs:306:9:306:13 | * ... | +| option.rs:335:13:335:17 | * ... | +| option.rs:483:27:483:29 | * ... | +| summaries.rs:87:5:87:6 | * ... | +| summaries.rs:92:5:92:6 | * ... |