Commit Graph

1353 Commits

Author SHA1 Message Date
Simon Friis Vindum
f138f77cc1 Rust: Only adjust access type for method call expressions 2025-06-12 11:16:30 +02:00
Simon Friis Vindum
03c9a78bfb Rust: Simplify accessDeclarationPositionMatch 2025-06-12 11:16:29 +02:00
Simon Friis Vindum
3463ebd8ce Rust: Adapt data flow consistency queries to ! being a call
The exact same problem occurs in Ruby, hence the `multipleArgumentCallExclude` implementation is adapted from Ruby's.
2025-06-12 11:16:28 +02:00
Simon Friis Vindum
fecd445e78 Rust: Use Call in data flow 2025-06-12 11:16:26 +02:00
Simon Friis Vindum
5642445e1d Rust: Fix canonical path for Deref trait 2025-06-12 11:16:25 +02:00
Simon Friis Vindum
7684e01c3a Rust: Use Call in type inference 2025-06-12 11:16:19 +02:00
Simon Friis Vindum
47864781c1 Rust: Add abstraction over all kinds of calls 2025-06-12 11:12:06 +02:00
Simon Friis Vindum
ce1c9fbec1 Rust: Account for arity in operator overloading
For instance the binary `&` is overloadable but the prefix `&` is not. Similarly, `*` has a different target depending on if it's prefix or infix.
2025-06-12 11:12:04 +02:00
Tom Hvitved
d667f7d411 Merge pull request #19732 from hvitved/rust/builtin-canonical-paths
Rust: Generate canonical paths for builtins
2025-06-12 10:47:00 +02:00
Tom Hvitved
649481e279 Merge pull request #19657 from hvitved/rust/type-inference-index-expr-simple
Rust: Simple type inference for index expressions
2025-06-12 10:27:09 +02:00
Geoffrey White
fdf1dca28f Merge pull request #19735 from geoffw0/canonical
Rust: Update RegexInjectionExtensions to use getCanonicalPath.
2025-06-12 09:14:52 +01:00
Paolo Tranquilli
326ddd6625 Merge branch 'main' into redsun82/rust-mad 2025-06-12 09:24:44 +02:00
Tom Hvitved
383cc5c2a7 Rust: Rename Bultins.qll -> Builtins.qll 2025-06-12 09:12:32 +02:00
Tom Hvitved
69e549f400 Rust: Generate canonical paths for builtins 2025-06-11 21:14:56 +02:00
Paolo Tranquilli
bea5381420 Rust: replace last hand-written instances of Field[crate:: 2025-06-11 16:48:39 +02:00
Paolo Tranquilli
051704e59d Merge branch 'main' into redsun82/rust-mad 2025-06-11 16:39:10 +02:00
Geoffrey White
0c05fa48eb Rust: Update RegexInjectionExtensions to use getCanonicalPath. 2025-06-11 15:32:23 +01:00
Tom Hvitved
31770edc26 Merge pull request #19725 from hvitved/rust/fix-bad-joins
Rust: Fix various bad joins
2025-06-11 14:51:20 +02:00
Tom Hvitved
133aca0773 Rust: Simple type inference for index expressions 2025-06-11 13:15:21 +02:00
Tom Hvitved
9f8a3abcff Rust: Add another type inference debug predicate 2025-06-11 12:44:17 +02:00
Simon Friis Vindum
75caa182f5 Merge pull request #19724 from github/rust/type-inference-borrow
Rust: Implement type inference for ref expression as type equality
2025-06-11 12:36:43 +02:00
Paolo Tranquilli
fbcd9eaf09 Merge pull request #19674 from github/redsun82/mad
Rust: regenerate MaD files using DCA
2025-06-11 11:10:08 +02:00
Tom Hvitved
8c956647de Rust: Fix bad join in fileImport
Before
```
Evaluated relational algebra for predicate PathResolution::fileImport/2#d9e57816@c790f609 with tuple counts:
           241   ~0%    {3} r1 = JOIN `_Locatable::Locatable.getFile/0#dispred#f7e24934_PathResolution::isSourceFile/1#803de032#shared` WITH `FileSystem::Folder::Append<PathResolution::shouldAppend>::append/2#beb8f79a_201#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.1
           291   ~0%    {2}    | JOIN WITH `PathResolution::pathAttrImport/3#88463ffa_021#join_rhs` ON FIRST 2 OUTPUT Rhs.2, Lhs.2

         14978   ~8%    {2} r2 = SCAN `PathResolution::modImport0/3#03cccf2a` OUTPUT In.0, In.1
         14978   ~8%    {2}    | STREAM DEDUP

         14392   ~9%    {2} r3 = r2 AND NOT `PathResolution::modImportNested/3#991244df_0#antijoin_rhs`(FIRST 1)
         14392   ~0%    {3}    | JOIN WITH `PathResolution::modImport0/3#03cccf2a` ON FIRST 2 OUTPUT Lhs.1, Rhs.2, Lhs.0
         14355   ~0%    {4}    | JOIN WITH `PathResolution::fileModule/3#d6c6ceef#fbf_120#join_rhs` ON FIRST 2 OUTPUT Rhs.2, Lhs.0, Lhs.1, Lhs.2

         14978   ~0%    {2} r4 = JOIN r2 WITH `PathResolution::modImport0/3#03cccf2a` ON FIRST 2 OUTPUT Lhs.1, Lhs.0
        329862   ~0%    {5}    | JOIN WITH `PathResolution::fileModule/3#d6c6ceef#fbf_102#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Lhs.1, Rhs.2, Lhs.0, Rhs.1
           577   ~3%    {4}    | JOIN WITH `PathResolution::modImportNestedLookup/3#6cc4b913#ffb` ON FIRST 3 OUTPUT Lhs.4, Lhs.3, Lhs.2, Lhs.0

         14932   ~0%    {4} r5 = r3 UNION r4
         14932   ~0%    {2}    | JOIN WITH `PathResolution::fileModule/3#d6c6ceef#fbf` ON FIRST 3 OUTPUT Lhs.0, Lhs.3
         14932   ~0%    {2}    | JOIN WITH `PathResolution::isSourceFile/1#803de032` ON FIRST 1 OUTPUT Lhs.1, Lhs.0

         15223   ~0%    {2} r6 = r1 UNION r5
                        return r6
```

Afer
```
Evaluated relational algebra for predicate PathResolution::fileImport/2#d9e57816@007bd81i with tuple counts:
          241   ~0%    {3} r1 = JOIN `_Locatable::Locatable.getFile/0#dispred#f7e24934_PathResolution::isSourceFile/1#803de032#shared` WITH `FileSystem::Folder::Append<PathResolution::shouldAppend>::append/2#beb8f79a_201#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Lhs.1
          291   ~0%    {2}    | JOIN WITH `PathResolution::pathAttrImport/3#88463ffa_021#join_rhs` ON FIRST 2 OUTPUT Rhs.2, Lhs.2

        14978   ~8%    {2} r2 = SCAN `PathResolution::modImport0/3#03cccf2a` OUTPUT In.0, In.1
        14978   ~8%    {2}    | STREAM DEDUP

        14392   ~9%    {2} r3 = r2 AND NOT `PathResolution::modImportNested/3#991244df_0#antijoin_rhs`(FIRST 1)
        14392   ~0%    {3}    | JOIN WITH `PathResolution::modImport0/3#03cccf2a` ON FIRST 2 OUTPUT Lhs.1, Rhs.2, Lhs.0

        14978   ~9%    {3} r4 = JOIN r2 WITH `PathResolution::modImport0/3#03cccf2a` ON FIRST 2 OUTPUT Lhs.0, Lhs.0, Lhs.1
          577   ~0%    {3}    | JOIN WITH `PathResolution::modImportNestedLookup/3#6cc4b913#ffb` ON FIRST 2 OUTPUT Lhs.2, Rhs.2, Lhs.0

        14969   ~1%    {3} r5 = r3 UNION r4
        14932   ~0%    {2}    | JOIN WITH `PathResolution::fileModule/3#d6c6ceef_120#join_rhs` ON FIRST 2 OUTPUT Rhs.2, Lhs.2
        14932   ~0%    {2}    | JOIN WITH `PathResolution::isSourceFile/1#803de032` ON FIRST 1 OUTPUT Lhs.1, Lhs.0

        15223   ~0%    {2} r6 = r1 UNION r5
                       return r6
```
2025-06-11 09:15:14 +02:00
Tom Hvitved
63aac1babb Rust: Fix bad join in getCanonicalPath
Before
```
Pipeline standard for PathResolution::ItemNode.getCanonicalPath/1#dispred#f52ac1c6@5132b1w8 was evaluated in 107 iterations totaling 1217ms (delta sizes total: 870557).
           568160   ~1%    {2} r1 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::AssocItemNode.hasCanonicalPath/1#dispred#120fa1ad_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
           564597   ~1%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

            68670   ~1%    {2} r2 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::VariantItemNode.hasCanonicalPath/1#dispred#12012145_project#PathResolution::ItemNod__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
            68670   ~0%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#5` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

            49047   ~1%    {2} r3 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::StructItemNode.hasCanonicalPath/1#dispred#f482e99c_project#PathResolution::ItemNode__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
            49047   ~2%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#2` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

              229   ~0%    {2} r4 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::UnionItemNode.hasCanonicalPath/1#dispred#f67c4b73_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
              229   ~0%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#4` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

            12207   ~0%    {2} r5 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::EnumItemNode.hasCanonicalPath/1#dispred#03ce35b1_project#PathResolution::ItemNode.g__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
            12207   ~0%    {3}    | JOIN WITH `__PathResolution::EnumItemNode.getName/0#dispred#f21ce0ed_PathResolution::ItemNode.getCanonicalPathP__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

            26698   ~2%    {2} r6 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::ModuleItemNode.hasCanonicalPath/1#dispred#2fee2540_project#PathResolution::ItemNode__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
            26698   ~0%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#1` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

             6315   ~1%    {2} r7 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::TraitItemNode.hasCanonicalPath/1#dispred#824f98e3_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
             6315   ~1%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#3` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

           112374   ~0%    {3} r8 = JOIN `PathResolution::ImplItemNode.getCanonicalPathTraitPart/1#dispred#009a7fd0#prev_delta` WITH `_PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6_PathResolution::ImplItemNode.hasCanoni__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, _
           112374   ~3%    {3}    | REWRITE WITH Out.2 := 3

           872046   ~1%    {2} r9 = SCAN `PathResolution::ItemNode.getCanonicalPath/1#dispred#f52ac1c6#prev_delta` OUTPUT In.1, In.0
        777662505   ~2%    {3}    | JOIN WITH `PathResolution::ImplItemNode.hasCanonicalPath/1#dispred#4e7c51c6_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
           150127   ~1%    {3}    | JOIN WITH `PathResolution::ImplItemNode.resolveSelfTy/0#dispred#cf157d04` ON FIRST 2 OUTPUT Lhs.0, Lhs.2, _
           150127   ~0%    {3}    | REWRITE WITH Out.2 := 1

           262501   ~1%    {3} r10 = r8 UNION r9

           230996   ~1%    {5} r11 = JOIN r10 WITH `PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6` ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, _, _
           230996   ~0%    {5}    | REWRITE WITH Out.3 := 4, Out.4 := 0

                           {3} r12 = r10 AND NOT `PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6_0#antijoin_rhs`(FIRST 1)
            31487   ~0%    {5}    | SCAN OUTPUT In.0, In.1, In.2, _, _
            31487   ~1%    {5}    | REWRITE WITH Out.3 := 2, Out.4 := 0

           262483   ~0%    {5} r13 = r11 UNION r12
           262483   ~0%    {5}    | JOIN WITH PRIMITIVE range#bbb ON Lhs.4,Lhs.3,Lhs.2
           262483   ~0%    {3}    | SCAN OUTPUT In.3, In.0, In.1
           142807   ~1%    {3}    | JOIN WITH `__PathResolution::ImplItemNode.getCanonicalPathTraitPart/1#dispred#009a7fd0#prev_PathResolution::Imp__#join_rhs` ON FIRST 3 OUTPUT Lhs.1, Lhs.2, Rhs.3

           870570   ~1%    {3} r14 = r1 UNION r2 UNION r3 UNION r4 UNION r5 UNION r6 UNION r7 UNION r13
           870566   ~1%    {3}    | AND NOT `PathResolution::ItemNode.getCanonicalPath/1#dispred#f52ac1c6#prev`(FIRST 3)
                           return r14
```

After
```
Pipeline standard for PathResolution::ItemNode.getCanonicalPath/1#dispred#f52ac1c6@90aba2wd was evaluated in 100 iterations totaling 28ms (delta sizes total: 870531).
        568160   ~0%    {2} r1 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::AssocItemNode.hasCanonicalPath/1#dispred#120fa1ad_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
        564597   ~1%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

         68670   ~0%    {2} r2 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::VariantItemNode.hasCanonicalPath/1#dispred#12012145_project#PathResolution::ItemNod__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
         68670   ~1%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#5` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

         49047   ~0%    {2} r3 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::StructItemNode.hasCanonicalPath/1#dispred#f482e99c_project#PathResolution::ItemNode__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
         49047   ~1%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#2` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

           229   ~0%    {2} r4 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::UnionItemNode.hasCanonicalPath/1#dispred#f67c4b73_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
           229   ~0%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#4` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

         12207   ~1%    {2} r5 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::EnumItemNode.hasCanonicalPath/1#dispred#03ce35b1_project#PathResolution::ItemNode.g__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
         12207   ~0%    {3}    | JOIN WITH `__PathResolution::EnumItemNode.getName/0#dispred#f21ce0ed_PathResolution::ItemNode.getCanonicalPathP__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

         26698   ~0%    {2} r6 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::ModuleItemNode.hasCanonicalPath/1#dispred#2fee2540_project#PathResolution::ItemNode__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
         26698   ~4%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#1` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

          6315   ~1%    {2} r7 = JOIN `PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_delta` WITH `_PathResolution::TraitItemNode.hasCanonicalPath/1#dispred#824f98e3_project#PathResolution::ItemNode.__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1
          6315   ~2%    {3}    | JOIN WITH `__PathResolution::ItemNode.getCanonicalPathPrefix/1#dispred#a1d9332d#prev_PathResolution::ItemNode.g__#join_rhs#3` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, Rhs.2

        150127   ~0%    {3} r8 = JOIN `PathResolution::ImplItemNode.getSelfCanonicalPath/1#dispred#8ed81fbe#prev_delta` WITH `PathResolution::ImplItemNode.hasCanonicalPath/1#dispred#4e7c51c6` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, _
        150127   ~0%    {3}    | REWRITE WITH Out.2 := 1

        112374   ~1%    {3} r9 = JOIN `PathResolution::ImplItemNode.getCanonicalPathTraitPart/1#dispred#009a7fd0#prev_delta` WITH `_PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6_PathResolution::ImplItemNode.hasCanoni__#join_rhs` ON FIRST 2 OUTPUT Lhs.0, Lhs.1, _
        112374   ~0%    {3}    | REWRITE WITH Out.2 := 3

        262501   ~0%    {3} r10 = r8 UNION r9

        230996   ~1%    {5} r11 = JOIN r10 WITH `PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6` ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, _, _
        230996   ~1%    {5}    | REWRITE WITH Out.3 := 4, Out.4 := 0

                        {3} r12 = r10 AND NOT `PathResolution::ImplItemNode.getTraitPath/0#dispred#3b7d1cb6_0#antijoin_rhs`(FIRST 1)
         31487   ~0%    {5}    | SCAN OUTPUT In.0, In.1, In.2, _, _
         31487   ~0%    {5}    | REWRITE WITH Out.3 := 2, Out.4 := 0

        262483   ~1%    {5} r13 = r11 UNION r12
        262483   ~1%    {5}    | JOIN WITH PRIMITIVE range#bbb ON Lhs.4,Lhs.3,Lhs.2
        262483   ~0%    {3}    | SCAN OUTPUT In.3, In.0, In.1
        142772   ~0%    {3}    | JOIN WITH `__PathResolution::ImplItemNode.getCanonicalPathTraitPart/1#dispred#009a7fd0#prev_PathResolution::Imp__#join_rhs` ON FIRST 3 OUTPUT Lhs.1, Lhs.2, Rhs.3

        870535   ~1%    {3} r14 = r1 UNION r2 UNION r3 UNION r4 UNION r5 UNION r6 UNION r7 UNION r13
        870531   ~1%    {3}    | AND NOT `PathResolution::ItemNode.getCanonicalPath/1#dispred#f52ac1c6#prev`(FIRST 3)
                        return r14
```
2025-06-11 09:15:13 +02:00
Simon Friis Vindum
01701de4a7 Rust: Implement type inference for ref expression as type equality 2025-06-11 09:09:22 +02:00
Tom Hvitved
3fed7f5397 Merge pull request #19714 from hvitved/rust/fix-bad-join
Rust: Fix bad join
2025-06-11 09:08:52 +02:00
Tom Hvitved
64ab7c78c8 Merge pull request #19717 from hvitved/rust/use-get-arg-param
Rust: Use `get(An){Arg,Param}` helper predicates
2025-06-10 18:48:51 +02:00
Geoffrey White
652d32d4ff Merge pull request #19626 from geoffw0/futures
Rust: Model futures-io, rustls, futures-rustls
2025-06-10 15:23:43 +01:00
Tom Hvitved
e41b4f4022 Rust: Use get(An){Arg,Param} helper predicates 2025-06-10 15:45:34 +02:00
Paolo Tranquilli
8f0f2006a8 Merge pull request #19708 from github/redsun82/rust-getArg-getParam
Rust: add `Callable::getParam` and `CallExprBase::getArg` shortcuts
2025-06-10 15:31:05 +02:00
Tom Hvitved
209cfb78a3 Rust: Fix bad join
```
[2025-06-10 15:21:37] (83s) Tuple counts for TypeMention::PathTypeReprMention.aliasResolveTypeAt/1#dispred#ae16f47b#fbf#cpe#13/2@i5#5a5451wi after 57.7s:
                      205999      ~1028%     {3} r1 = JOIN `TypeMention::TypeMention.resolveTypeAt/1#dispred#a125c821#bff#reorder_1_0_2#prev_delta` WITH `_TypeAlias::Generated::TypeAlias.getTypeRepr/0#dispred#5fd7e521_TypeMention::PathTypeReprMention#a35__#join_rhs#1` ON FIRST 2 OUTPUT Rhs.2, Lhs.2 'result', Rhs.3 'this'
                                             {3}    | AND NOT `project#TypeMention::pathGetTypeParameter/2#fd301eed#2`(FIRST 2)
                      204000      ~982%      {2}    | SCAN OUTPUT In.2 'this', In.1 'result'

                      5499        ~448%      {7} r2 = JOIN `TypeMention::TypeMention.resolveTypeAt/1#dispred#a125c821#bff#reorder_0_2_1#prev_delta` WITH `_GenericArgList::GenericArgList.getTypeArg/1#dispred#1c780027_PathSegment::Generated::PathSegment.ge__#join_rhs#1` ON FIRST 1 OUTPUT Rhs.1, Rhs.2 'this', Rhs.3, Lhs.1 'result', _, Lhs.2, _
                                             {5}    | REWRITE WITH Tmp.4 := "", Tmp.6 := "", Out.4 := InverseAppend(Tmp.4,In.5,Tmp.6) KEEPING 5
                      2500        ~398%      {5}    | SCAN OUTPUT In.0, In.2, In.4, In.1 'this', In.3 'result'
                      0           ~0%        {2}    | JOIN WITH `TypeMention::TypeMention.resolveTypeAt/1#dispred#a125c821#bff#reorder_0_2_1#prev` ON FIRST 3 OUTPUT Lhs.3 'this', Lhs.4 'result'

                      9000        ~489%      {7} r3 = JOIN `TypeMention::TypeMention.resolveTypeAt/1#dispred#a125c821#bff#reorder_0_2_1#prev_delta` WITH `_PathSegment::Generated::PathSegment.getGenericArgList/0#dispred#e072653b__Path::Generated::Path.get__#join_rhs#1` ON FIRST 1 OUTPUT Rhs.1, Rhs.2 'this', Rhs.3, Lhs.1, _, Lhs.2, _
                                             {5}    | REWRITE WITH Tmp.4 := "", Tmp.6 := "", Out.4 := InverseAppend(In.5,Tmp.4,Tmp.6) KEEPING 5
                      5000        ~411%      {5}    | SCAN OUTPUT In.4, In.0, In.1 'this', In.2, In.3
                      10461919500 ~610%      {6}    | JOIN WITH `TypeMention::TypeMention.resolveTypeAt/1#dispred#a125c821#bff#reorder_1_0_2#prev` ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2 'this', Lhs.4, Rhs.2 'result'
                      500         ~0%        {5}    | JOIN WITH `GenericArgList::GenericArgList.getTypeArg/1#dispred#1c780027_021#join_rhs` ON FIRST 2 OUTPUT Lhs.2, Rhs.2, Lhs.4, Lhs.3 'this', Lhs.5 'result'
                      0           ~0%        {2}    | JOIN WITH `TypeMention::pathGetTypeParameter/2#fd301eed` ON FIRST 3 OUTPUT Lhs.3 'this', Lhs.4 'result'

                      204000      ~982%      {2} r4 = r1 UNION r2 UNION r3
                      203964      ~982%      {2}    | AND NOT `TypeMention::PathTypeReprMention.aliasResolveTypeAt/1#dispred#ae16f47b#fbf#cpe#13#prev`(FIRST 2)
                                             return r4
```
2025-06-10 15:25:05 +02:00
Geoffrey White
fd2154d389 Merge branch 'main' into futures 2025-06-10 14:16:06 +01:00
Geoffrey White
918fa3684f Merge branch 'main' into futures 2025-06-10 13:24:09 +01:00
Paolo Tranquilli
0d036992e0 Merge branch 'main' into redsun82/mad 2025-06-10 13:39:10 +02:00
Tom Hvitved
3d395dde47 Address review comments 2025-06-10 13:38:31 +02:00
Paolo Tranquilli
3562c48068 Merge branch 'main' into redsun82/rust-getArg-getParam 2025-06-10 13:15:37 +02:00
Tom Hvitved
c6efc05de1 Rust: Reimplement type inference for impl Traits and await expressions 2025-06-10 12:39:20 +02:00
Tom Hvitved
821f2fd681 Rust: Type inference for .await expressions 2025-06-10 12:38:39 +02:00
Tom Hvitved
79a8942b0f Merge pull request #19614 from hvitved/rust/path-resolution-extern-crate
Rust: Path resolution for `extern crate`s
2025-06-10 12:37:46 +02:00
Paolo Tranquilli
bcfc009228 Merge branch 'main' into redsun82/mad 2025-06-10 10:53:52 +02:00
Paolo Tranquilli
a405a12e93 Rust: add Callable::getParam and CallExprBase::getArg shortcuts 2025-06-10 09:51:26 +02:00
github-actions[bot]
21463a9653 Post-release preparation for codeql-cli-2.22.0 2025-06-09 18:50:20 +00:00
github-actions[bot]
88ba02edf8 Release preparation for version 2.22.0 2025-06-09 18:14:51 +00:00
Geoffrey White
b3330b5636 Rust: Allow parameter accesses as sources. 2025-06-09 17:58:42 +01:00
Geoffrey White
858eec390d Rust: Exclude results where the source is a reference. 2025-06-09 17:58:40 +01:00
Geoffrey White
fe20fb403d Rust: More robust fix for closures. 2025-06-09 16:41:31 +01:00
Chuan-kai Lin
631502e129 Merge branch 'main' into cklin/rc-3.18-mergeback 2025-06-09 07:19:40 -07:00
Geoffrey White
21b4baeb42 Rust: Have the alert message cite the variable, so it's easier to understand whether the alert is correct. 2025-06-09 10:28:25 +01:00
Geoffrey White
79f8584efb Rust: Fix spurious results involving closures. 2025-06-09 10:25:48 +01:00
Geoffrey White
bf4ea02dd2 Rust: Implement the query. 2025-06-09 10:25:40 +01:00