Skip to content

Commit ff31f0e

Browse files
committed
Address review comments
1 parent 65b706a commit ff31f0e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
619619
)
620620
)
621621
or
622-
// an array list expression (`[1, 2, 3]`) has the type of the element
622+
// an array list expression with only one element (such as `[1]`) has type from that element
623623
n1 =
624624
any(ArrayListExpr ale |
625625
ale.getAnExpr() = n2 and

rust/ql/test/library-tests/type-inference/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,8 +2730,8 @@ mod if_expr {
27302730
S(2)
27312731
};
27322732

2733-
// This code exhibits an explosion in type inference when type information is propagated
2734-
// from an `if` expression to its branches.
2733+
// This code would result in an explosion in type inference, if type information was
2734+
// propagated between branches.
27352735
let x = S(1);
27362736
if b {
27372737
let x = x.m2(); // $ target=m2

0 commit comments

Comments
 (0)