Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
840ef5c
Rust: Add test cases for type inference in loops.
geoffw0 Jun 12, 2025
f76b562
Rust: Implement type inference for 'for' loops on arrays.
geoffw0 Jun 12, 2025
51343a5
Rust: Implement type inference for ArrayListExprs.
geoffw0 Jun 13, 2025
b89d6d3
Rust: Implement type inference for ArrayRepeatExprs.
geoffw0 Jun 13, 2025
62e3cc5
Merge branch 'main' into typeinfer
geoffw0 Jun 13, 2025
6194676
Rust: Accept consistency failures (for now).
geoffw0 Jun 13, 2025
69da4e7
Rust: Move inferArrayExprType logic into typeEquality predicate.
geoffw0 Jun 17, 2025
66d6770
Rust: If we're inferring both ways, it should really be to any element.
geoffw0 Jun 17, 2025
4292b03
Rust: Add logic for Vecs and slices.
geoffw0 Jun 17, 2025
dec0deb
Rust: Add some more test cases for type inference on Vecs.
geoffw0 Jun 17, 2025
639f85a
Merge branch 'main' into typeinfer
geoffw0 Jun 19, 2025
1622d08
Rust: Add inferArrayExprType.
geoffw0 Jun 19, 2025
f670fcb
Rust: Add a Vec test case that we actually get (explicit type).
geoffw0 Jun 19, 2025
7170e97
Rust: Update test expectations format (type=...).
geoffw0 Jun 19, 2025
d55e8b7
Rust: Add another test case for ranges.
geoffw0 Jun 19, 2025
26e7b2d
Rust: Accept path resolution consistency changes.
geoffw0 Jun 19, 2025
7a25596
Merge branch 'main' into typeinfer
geoffw0 Jun 19, 2025
bfaabab
Rust: Update more expectations.
geoffw0 Jun 23, 2025
34cd976
Rust: Run rustfmt --edition 2024 on the test.
geoffw0 Jun 23, 2025
d02a728
Update rust/ql/lib/codeql/rust/internal/TypeInference.qll
geoffw0 Jun 23, 2025
8c848ac
Rust: Effects of rustfmt on .expected.
geoffw0 Jun 23, 2025
4530e85
Rust: Repair the test annotations.
geoffw0 Jun 23, 2025
530ded1
Merge branch 'main' into typeinfer
geoffw0 Jun 23, 2025
21bea7e
Merge branch 'main' into typeinfer
geoffw0 Jun 24, 2025
96dcdf9
Rust: Change note.
geoffw0 Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rust: Add another test case for ranges.
  • Loading branch information
geoffw0 committed Jun 19, 2025
commit d55e8b70109c2a9fac209a5a489f34bc50ba9dec
2 changes: 2 additions & 0 deletions rust/ql/test/library-tests/type-inference/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,8 @@ mod loops {

for i in 0..10 { } // $ MISSING: type=i:i32
for u in [0u8 .. 10] { } // $ MISSING: type=u:u8
let range = 0..10; // $ MISSING: type=range:Range type=range:Idx.i32
for i in range { } // $ MISSING: type=i:i32

let range1 = std::ops::Range { start: 0u16, end: 10u16 }; // $ type=range1:Range type=range1:Idx.u16
for u in range1 { } // $ MISSING: type=u:u16
Expand Down
Loading