Commit Graph

3818 Commits

Author SHA1 Message Date
Tom Hvitved
224e5dece4 Merge pull request #21170 from paldepind/rust/type-inference-fns
Rust: Improve type inference for closures and function traits
2026-01-20 11:52:10 +01:00
Simon Friis Vindum
dd73399238 Rust: Tweak a comment
Co-authored-by: Tom Hvitved <hvitved@github.com>
2026-01-20 09:57:27 +01:00
Simon Friis Vindum
8e6f920ae2 Rust: Fix naming of mention_dyn_fn 2026-01-20 08:50:58 +01:00
Simon Friis Vindum
75cab960e2 Rust: Make AnyTraitFn abstract 2026-01-20 08:50:57 +01:00
github-actions[bot]
48475e66af Post-release preparation for codeql-cli-2.24.0 2026-01-19 15:49:08 +00:00
github-actions[bot]
4142b9c4ce Release preparation for version 2.24.0 2026-01-19 14:49:14 +00:00
Tom Hvitved
06b99b2ce9 Merge pull request #21180 from hvitved/rust/fix-bad-join2
Rust: Fix bad join
2026-01-19 08:22:32 +01:00
Tom Hvitved
1c689d060b Merge pull request #21179 from hvitved/rust/fix-bad-join
Rust: Fix bad join
2026-01-16 17:20:19 +01:00
Tom Hvitved
43e20176f0 Rust: Fix bad join
Before
```
Evaluated relational algebra for predicate _ElementImpl::Impl::MacroExpansion::isAttributeMacroExpansionSourceLocation/2#3429148c_Locatable::Lo__#antijoin_rhs@9f4aa4rk with tuple counts:
        5127263380  ~4%    {3} r1 = JOIN `_AstNodeImpl::Impl::AstNode#22e758cf_ElementImpl::Impl::MacroExpansion::getATokenTreeNode/1#a2df59a3__#shared` WITH `ElementImpl::Impl::MacroExpansion::isAttributeMacroExpansionSourceLocation/2#3429148c` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0
            305226  ~0%    {2}    | JOIN WITH `Locatable::Locatable.getLocation/0#dispred#f3f7e2b2` ON FIRST 2 OUTPUT Lhs.0, Lhs.2
                           return r1
```

(No After; the predicate is no longer generated)
2026-01-16 13:30:10 +01:00
Tom Hvitved
767acb8ff4 Rust: Fix bad join
Before
```
Evaluated relational algebra for predicate TypeMention::RefTypeReprMention.resolveRootType/0#dispred#091b949a#fb@4bd8a49g with tuple counts:
            124419   ~0%    {1} r1 = RefTypeRepr::Generated::RefTypeRepr#422893fa AND NOT `RefTypeRepr::Generated::RefTypeRepr.isMut/0#dispred#e2b9988f`(FIRST 1)
        6621454761   ~1%    {3}    | JOIN WITH `Type::DataType.getTypeItem/0#dispred#83467854` CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0, Rhs.1
         915101745   ~0%    {4}    | JOIN WITH `project#Type::DataType.getPositionalTypeParameter/1#dispred#3bf49cbe` ON FIRST 1 OUTPUT Lhs.2, _, Lhs.1, Lhs.0
         915101745   ~3%    {4}    | REWRITE WITH Out.1 := "Ref"
            124419   ~0%    {2}    | JOIN WITH `Builtins::BuiltinType.getName/0#dispred#8f62ab0a` ON FIRST 2 OUTPUT Lhs.2, Lhs.3

             76728   ~0%    {1} r2 = JOIN RefTypeRepr::Generated::RefTypeRepr#422893fa WITH `RefTypeRepr::Generated::RefTypeRepr.isMut/0#dispred#e2b9988f` ON FIRST 1 OUTPUT Lhs.0
        4083387432   ~1%    {3}    | JOIN WITH `Type::DataType.getTypeItem/0#dispred#83467854` CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0, Rhs.1
         564334440   ~3%    {4}    | JOIN WITH `project#Type::DataType.getPositionalTypeParameter/1#dispred#3bf49cbe` ON FIRST 1 OUTPUT Lhs.2, _, Lhs.1, Lhs.0
         564334440   ~0%    {4}    | REWRITE WITH Out.1 := "RefMut"
             76728   ~2%    {2}    | JOIN WITH `Builtins::BuiltinType.getName/0#dispred#8f62ab0a` ON FIRST 2 OUTPUT Lhs.2, Lhs.3

            201147   ~1%    {2} r3 = r1 UNION r2
                            return r3
```

After
```
Evaluated relational algebra for predicate TypeMention::RefTypeReprMention.resolveRootType/0#dispred#091b949a#fb@8f12aa2a with tuple counts:
        124419   ~0%    {1} r1 = RefTypeRepr::Generated::RefTypeRepr#422893fa AND NOT `RefTypeRepr::Generated::RefTypeRepr.isMut/0#dispred#e2b9988f`(FIRST 1)
        124419   ~0%    {2}    | JOIN WITH Type::RefSharedType#090df68e CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0
        124419   ~0%    {2}    | JOIN WITH `project#Type::DataType.getPositionalTypeParameter/1#dispred#3bf49cbe` ON FIRST 1 OUTPUT Lhs.1, Lhs.0

         76728   ~0%    {1} r2 = JOIN RefTypeRepr::Generated::RefTypeRepr#422893fa WITH `RefTypeRepr::Generated::RefTypeRepr.isMut/0#dispred#e2b9988f` ON FIRST 1 OUTPUT Lhs.0
         76728   ~0%    {2}    | JOIN WITH Type::RefMutType#c67a1837 CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0
         76728   ~2%    {2}    | JOIN WITH `project#Type::DataType.getPositionalTypeParameter/1#dispred#3bf49cbe` ON FIRST 1 OUTPUT Lhs.1, Lhs.0

        201147   ~1%    {2} r3 = r1 UNION r2
                        return r3
```
2026-01-16 13:11:45 +01:00
Simon Friis Vindum
78b88d3a44 Rust: Fix grammar in QLDoc
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-16 11:26:05 +01:00
Simon Friis Vindum
6b3d863f70 Rust: Remove trait parameter from canonicalDynTraitTypeAbstraction 2026-01-16 11:12:34 +01:00
Simon Friis Vindum
a11693268b Rust: Avoid duplicated entries in conditionSatisfiesConstraint for dyn trait types 2026-01-16 10:46:23 +01:00
Simon Friis Vindum
c0b3569473 Rust: Move TypeAbstraction into separate file 2026-01-16 10:45:50 +01:00
Simon Friis Vindum
9ab29f9be0 Rust: Add a change note for type inference improvements for closures 2026-01-16 10:05:45 +01:00
Simon Friis Vindum
dabc5d54c9 Rust: Improve type inference for closures and function traits 2026-01-16 10:01:00 +01:00
Simon Friis Vindum
196f6e1931 Rust: Add type inference tests for closures and function traits 2026-01-15 12:00:41 +01:00
Simon Friis Vindum
d8061c17cc Merge pull request #21165 from paldepind/rust/associated-types
Rust: Associated types are inherited as type parameters by traits and dyn traits
2026-01-15 11:50:00 +01:00
Simon Friis Vindum
15f3c38041 Rust: QLDoc fixes 2026-01-15 11:34:58 +01:00
Simon Friis Vindum
8cbe17a62b Rust: Fix bad join on name column 2026-01-15 07:23:34 +01:00
Simon Friis Vindum
ca3e2db217 Rust: Accept changes to expected files 2026-01-14 16:00:59 +01:00
Simon Friis Vindum
465400115f Rust: Adapt type inference consistency query exceptions 2026-01-14 15:36:35 +01:00
Simon Friis Vindum
a19ad5e557 Rust: Associated types are inherited as type parameters by traits and dyn traits 2026-01-14 14:44:31 +01:00
Simon Friis Vindum
62193540f7 Rust: Add additional tests for associated types 2026-01-14 14:44:30 +01:00
Simon Friis Vindum
fd5658dfe8 Rust: Tweak tests for associated types 2026-01-14 14:44:23 +01:00
Simon Friis Vindum
e0c36c758d Rust: Move associated types tests into separate file 2026-01-14 14:39:59 +01:00
Tom Hvitved
991d30f7aa Merge pull request #21161 from hvitved/rust/restrict-implicit-deref-borrow-nodes
Rust: Restrict `ImplicitDerefBorrowNode` to nodes with enclosing CFG scope
2026-01-14 14:37:40 +01:00
Tom Hvitved
cc4926ad37 Merge pull request #21148 from hvitved/rust/remove-macro-block-expr
Rust: Remove `MacroBlockExpr` class
2026-01-14 10:11:22 +01:00
Tom Hvitved
55d4902751 Rust: Restrict ImplicitDerefBorrowNode to nodes with enclosing CFG scope 2026-01-13 20:23:28 +01:00
Simon Friis Vindum
76a1e22ddc Rust: Remove manual models that are now generated 2026-01-13 16:11:18 +01:00
Simon Friis Vindum
da43e8cad8 Rust: Regenerate models 2026-01-13 16:02:32 +01:00
Simon Friis Vindum
d78491294a Rust: Exclude reqwest response timeout field as a taint step 2026-01-13 15:58:27 +01:00
Simon Friis Vindum
862adec081 Rust: Disable dynamic dispatch when generating models 2026-01-13 15:58:25 +01:00
Simon Friis Vindum
1fbf0387f5 Rust: Skip model generation for Rocket due to performance issue 2026-01-13 15:58:24 +01:00
Simon Friis Vindum
8bfce6b284 Shared, rust: Add option to disable reads steps as taint steps in model generator 2026-01-13 15:58:23 +01:00
Simon Friis Vindum
9cdf63e175 Rust: Skip model generation for functions with a ; in their canonical path 2026-01-13 15:58:22 +01:00
Ian Lynagh
63f78e7609 Merge pull request #21156 from igfoo/igfoo/mb
Merge rc/3.20 into main
2026-01-13 12:11:37 +00:00
Geoffrey White
69de17ecf2 Merge pull request #21153 from geoffw0/splitoff
Rust: Add barrier for split_off
2026-01-13 10:44:31 +00:00
Tom Hvitved
31b4f88824 Rust: Add DB downgrade script 2026-01-13 10:24:40 +01:00
Tom Hvitved
4cc4717381 Rust: Add DB upgrade script 2026-01-13 10:24:39 +01:00
Tom Hvitved
5d5bad6cd4 Rust: Update expected test output 2026-01-13 10:24:10 +01:00
Tom Hvitved
5fb425fd67 Rust: Update extractor and QL code after removing MacroBlockExpr 2026-01-13 10:24:04 +01:00
Tom Hvitved
3eafca0550 Rust: Run codegen 2026-01-13 10:22:16 +01:00
Tom Hvitved
d6ec174e0c Rust: Remove MacroBlockExpr class 2026-01-13 10:20:47 +01:00
Geoffrey White
b2d19b610e Rust: US spelling. 2026-01-13 09:01:12 +00:00
Simon Friis Vindum
e7791120fa Rust: Address review comments 2026-01-13 07:53:39 +01:00
Ian Lynagh
dcd0a69759 Merge remote-tracking branch 'upstream/main' into igfoo/mb 2026-01-13 01:01:35 +00:00
Simon Friis Vindum
9e74a7869a Rust: Move everything type inference related into the typeinference directory 2026-01-12 16:31:34 +01:00
Geoffrey White
a78756ff8b Merge branch 'main' into splitoff 2026-01-12 14:21:01 +00:00
Geoffrey White
479c58bef5 Rust: Add a barrier. 2026-01-12 13:52:54 +00:00