codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Rust: Type inference for `for` loops and array expressions

Open geoffw0 opened this issue 5 months ago • 2 comments
trafficstars

Adds type inference for for loops and array expressions. Currently for for loops this is limited to loops iterating through arrays.

@hvitved please advise.

  • I think for the more general cases we will need to decode the Iterator type and perhaps understand IntoIterator.
  • I'm not sure whether I should be attempting to model implicit dereferences, or perhaps a more general solution for that problem might be in the works?

geoffw0 avatar Jun 13 '25 12:06 geoffw0

@hvitved do you think this is heading in the right direction?

geoffw0 avatar Jun 17 '25 07:06 geoffw0

Ready for review: there are gaps (and apparently a conflict with main), but we get some useful results and I'd like to push towards merging this ASAP.

geoffw0 avatar Jun 19 '25 13:06 geoffw0

:tada:

geoffw0 avatar Jun 24 '25 12:06 geoffw0