-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Improve type inference for closures #21206
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
base: main
Are you sure you want to change the base?
Rust: Improve type inference for closures #21206
Conversation
| ) | ||
| } | ||
|
|
||
| private Method testresolveCallTarget( |
Check warning
Code scanning / CodeQL
Dead code Warning
| result = this.getInferredNonSelfType(apos, path) | ||
| } | ||
|
|
||
| private Type testgetInferredType(string derefChainBorrow, AccessPosition apos, TypePath path) { |
Check warning
Code scanning / CodeQL
Dead code Warning
| isReturn = false | ||
| } | ||
|
|
||
| private Type testinferMethodCallTypePreCheck(AstNode n, boolean isReturn, TypePath path) { |
Check warning
Code scanning / CodeQL
Dead code Warning
| } | ||
|
|
||
| pragma[nomagic] | ||
| private Type inferNonMethodCallType1(AstNode n, boolean isReturn, TypePath path) { |
Check warning
Code scanning / CodeQL
Dead code Warning
| filepath.matches("%/sqlx.rs") and | ||
| startline = [56 .. 60] | ||
| filepath.matches("%/closure.rs") and | ||
| startline = [10] |
Check warning
Code scanning / CodeQL
Singleton set literal Warning
| ) { | ||
| // not exists(getTypeArgument(a, target, tp, _)) and | ||
| exists( | ||
| Type constraint, TypePath pathToTypeParamInSub, TypePath pathToTp, TypePath pathToTp2, |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
| // not exists(getTypeArgument(a, target, tp, _)) and | ||
| exists( | ||
| Type constraint, TypePath pathToTypeParamInSub, TypePath pathToTp, TypePath pathToTp2, | ||
| TypePath suffix, TypeParameter tp2, TypePath path3, TypePath path4, TypePath prefix |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
| ) { | ||
| // not exists(getTypeArgument(a, target, tp, _)) and | ||
| exists( | ||
| Type constraint, TypePath pathToTypeParamInSub, TypePath pathToT, TypeParameter tp2, |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
b5bd829 to
29951e8
Compare
No description provided.