codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Rust: Fix type inference for library parameters

Open hvitved opened this issue 5 months ago • 0 comments
trafficstars

The old logic relied on parameters having a pattern, which is not the case for parameters extracted from library code.

The updated test output reveals that we do not handle operator calls correctly. For example, i32 implements both Add and Add<Rhs = &i32>, and currently we resolve 1 + 2 to both add methods, which means that 2 will have reverse-propagated type &i32 in addition to i32.

hvitved avatar Jun 03 '25 17:06 hvitved