-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Rust: upgrade to rust-analyzer 0.0.300 #20055
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?
Conversation
@@ -4,6 +4,20 @@ | |||
|
|||
query predicate instances(AsmExpr x) { toBeTested(x) and not x.isUnknown() } | |||
|
|||
query predicate getExtendedCanonicalPath(AsmExpr x, string getExtendedCanonicalPath) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() | ||
} | ||
|
||
query predicate getCrateOrigin(AsmExpr x, string getCrateOrigin) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() | ||
} | ||
|
||
query predicate getAttributeMacroExpansion(AsmExpr x, MacroItems getAttributeMacroExpansion) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
import codeql.rust.elements.FieldExpr | ||
import codeql.rust.elements.FieldList | ||
import codeql.rust.elements.FnPtrTypeRepr | ||
import codeql.rust.elements.ForBinder |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.rust.elements.ClosureExpr
Redundant import, the module is already imported inside
codeql.rust.elements.ForTypeRepr
Redundant import, the module is already imported inside
codeql.rust.elements.TypeBound
Redundant import, the module is already imported inside
codeql.rust.elements.WherePred
@@ -4,6 +4,20 @@ | |||
|
|||
query predicate instances(AsmExpr x) { toBeTested(x) and not x.isUnknown() } | |||
|
|||
query predicate getExtendedCanonicalPath(AsmExpr x, string getExtendedCanonicalPath) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() | ||
} | ||
|
||
query predicate getCrateOrigin(AsmExpr x, string getCrateOrigin) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() | ||
} | ||
|
||
query predicate getAttributeMacroExpansion(AsmExpr x, MacroItems getAttributeMacroExpansion) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
@@ -37,8 +37,8 @@ | |||
toBeTested(x) and not x.isUnknown() and getBody = x.getBody() | |||
} | |||
|
|||
query predicate getClosureBinder(ClosureExpr x, ClosureBinder getClosureBinder) { | |||
toBeTested(x) and not x.isUnknown() and getClosureBinder = x.getClosureBinder() | |||
query predicate getForBinder(ClosureExpr x, ForBinder getForBinder) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
|
||
query predicate instances(ForBinder x) { toBeTested(x) and not x.isUnknown() } | ||
|
||
query predicate getGenericParamList(ForBinder x, GenericParamList getGenericParamList) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
@@ -4,8 +4,8 @@ | |||
|
|||
query predicate instances(ForTypeRepr x) { toBeTested(x) and not x.isUnknown() } | |||
|
|||
query predicate getGenericParamList(ForTypeRepr x, GenericParamList getGenericParamList) { | |||
toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() | |||
query predicate getForBinder(ForTypeRepr x, ForBinder getForBinder) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
@@ -13,6 +13,10 @@ | |||
if x.isConst() then isConst = "yes" else isConst = "no" | |||
} | |||
|
|||
query predicate getForBinder(TypeBound x, ForBinder getForBinder) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
@@ -4,8 +4,8 @@ | |||
|
|||
query predicate instances(WherePred x) { toBeTested(x) and not x.isUnknown() } | |||
|
|||
query predicate getGenericParamList(WherePred x, GenericParamList getGenericParamList) { | |||
toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() | |||
query predicate getForBinder(WherePred x, ForBinder getForBinder) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning generated test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the rust-analyzer version from 0.0.299 to 0.0.300 as indicated by the title. The upgrade brings updates to the Rust AST schema and affects test expectations across various CodeQL test suites due to improved location precision and renamed AST nodes.
- Updates the Rust AST schema with structural changes including renaming
ClosureBinder
toForBinder
- Introduces the
ForBinder
as a more general construct for closure and type parameter bindings - Updates dependency versions and test expectations to match the improved rust-analyzer output
Reviewed Changes
Copilot reviewed 204 out of 251 changed files in this pull request and generated no comments.
File | Description |
---|---|
shared/tree-sitter-extractor/Cargo.toml | Updates the rand dependency from version 0.9.1 to 0.9.2 |
rust/schema/ast.py | Major AST schema changes: renames ClosureBinder to ForBinder , adds Item inheritance to AsmExpr , and updates field references |
rust/schema/annotations.py | Updates documentation and annotations to reflect the renaming from ClosureBinder to ForBinder |
Multiple .expected files | Updates test expectations to reflect improved location precision from the rust-analyzer upgrade |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
No description provided.