Skip to content

Commit 153e91b

Browse files
committed
Rust: Re-enable special casing in indexing for Vec
1 parent 326c7de commit 153e91b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/ql/lib/codeql/rust/internal/TypeInference.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,8 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) {
11321132
) and
11331133
result = inferType(ie.getBase(), exprPath)
11341134
|
1135+
exprPath.isCons(any(Vec v).getElementTypeParameter(), path)
1136+
or
11351137
exprPath.isCons(any(ArrayTypeParameter tp), path)
11361138
or
11371139
exists(TypePath path0 |

0 commit comments

Comments
 (0)