Skip to content

Commit 11a726d

Browse files
committed
Address review comments
1 parent de9b1ad commit 11a726d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

rust/ql/lib/codeql/rust/elements/internal/InvocationExprImpl.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ module Impl {
2222
/**
2323
* Holds if this call position is a type qualifier, that is, not an actual
2424
* argument, but rather an annotation that is needed to resolve the call target,
25-
* just like actual arguments may be need to resolve the call target.
25+
* just like actual arguments may be needed to resolve the call target.
26+
*
27+
* Example:
28+
* ```rust
29+
* Vec<i64>::new();
30+
* // ^^^^^^^^ type qualifier
31+
* ```
2632
*/
2733
predicate isTypeQualifier() { this = TTypeQualifierArgumentPosition() }
2834

rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private newtype TAssocFunctionType =
8686
// through `i`. This ensures that `parent` is either a supertrait of `i` or
8787
// `i` in an `impl` block implementing `parent`.
8888
(parent = i or BaseTypes::rootTypesSatisfaction(_, TTrait(parent), i, _, _)) and
89-
// We always include the type qualifer position, even for non-methods, where it is used
89+
// We always include the type qualifier position, even for non-methods, where it is used
9090
// to match type qualifiers against the `impl` or trait type, such as in `Vec::new`.
9191
(exists(pos.getTypeMention(f)) or pos.isTypeQualifier())
9292
}

0 commit comments

Comments
 (0)