-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust: Implement basic type inference in QL #18632
base: main
Are you sure you want to change the base?
Conversation
66bea42
to
2d0e953
Compare
c88c9fe
to
a8540b1
Compare
02184af
to
4f723dd
Compare
486f813
to
a254679
Compare
@@ -27,6 +27,13 @@ | |||
class RecordExpr extends Generated::RecordExpr { | |||
override string toString() { result = this.getPath().toString() + " {...}" } | |||
|
|||
/** Gets the record expression for the field `field`. */ | |||
pragma[nomagic] | |||
RecordExprField getFieldExpr(string name) { |
Check warning
Code scanning / CodeQL
Missing QLDoc for parameter Warning
42e5970
to
be2ec0f
Compare
5a1567c
to
3f1a6c3
Compare
// | ||
// We get that the type path "0" resolves to `T1` for the `impl` block, | ||
// which is considered a base type mention of `S`. | ||
exists(PathMention selfPath, PathMention p, TypeParameter tp, int i | |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
exists(int i | | ||
result = path.getPart().getGenericArgList().getTypeArgument(i) and | ||
tp = resolvePath(path).getTypeParam(i) | ||
) | ||
or | ||
exists(ImplItemNode i, Function f, TypeParam mid | | ||
result = getExplicitTypeArgMention(path.getQualifier(), mid) and | ||
f = resolvePath(path) and | ||
f = i.getAnAssocItem() | ||
) |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable tp
tp = resolvePath(path).getTypeParam(i) | ||
) | ||
or | ||
exists(ImplItemNode i, Function f, TypeParam mid | |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
3f1a6c3
to
54ae28d
Compare
No description provided.