Skip to content

Rust: Upgrade to rust-analyzer 0.328#21714

Draft
tausbn wants to merge 10 commits intomainfrom
tausbn/rust-upgrade-to-rust-analyzer-0.0.328
Draft

Rust: Upgrade to rust-analyzer 0.328#21714
tausbn wants to merge 10 commits intomainfrom
tausbn/rust-upgrade-to-rust-analyzer-0.0.328

Conversation

@tausbn
Copy link
Copy Markdown
Contributor

@tausbn tausbn commented Apr 15, 2026

WIP. Let's see what the CI thinks of this. (For the avoidance of doubt, Copilot wrote all of the code, and I'm still working my way through the changes themselves.)

tausbn and others added 6 commits April 15, 2026 12:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…scripts

- Fix Meta usage: Meta is now abstract with subtypes (PathMeta, KeyValueMeta, TokenTreeMeta, etc.)
- Fix FormatArgsArg: getName() replaced by getArgName() returning FormatArgsArgName
- Add upgrade script (old → new) and downgrade script (new → old)
- Update Definitions.qll, PathResolution.qll, BadCtorInitialization.ql, FormatTemplateVariableAccessConstructor.qll

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added Ruby Rust Pull requests that update Rust code labels Apr 15, 2026
@tausbn tausbn changed the title Rust: Upgrade to rusts-analyzer 0.328 Rust: Upgrade to rust-analyzer 0.328 Apr 15, 2026
import codeql.rust.elements.ForTypeRepr
import codeql.rust.elements.Format
import codeql.rust.elements.FormatArgsArg
import codeql.rust.elements.FormatArgsArgName
@@ -125,6 +132,7 @@ import codeql.rust.elements.Path
import codeql.rust.elements.PathAstNode
import codeql.rust.elements.PathExpr
import codeql.rust.elements.PathExprBase
Comment thread rust/ql/lib/codeql/rust/elements.qll Outdated
*/

private import internal.TryBlockModifierImpl
import codeql.rust.elements.AstNode
private import codeql.rust.elements.Locatable
private import codeql.rust.elements.FormatArgsExpr
private import codeql.rust.elements.FormatArgsArg
private import codeql.rust.elements.FormatArgsArgName
@@ -4,10 +4,10 @@

query predicate instances(FormatArgsArg x) { toBeTested(x) and not x.isUnknown() }

query predicate getExpr(FormatArgsArg x, Expr getExpr) {
toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr()
query predicate getArgName(FormatArgsArg x, FormatArgsArgName getArgName) {
@@ -4,10 +4,10 @@

query predicate instances(FormatArgsArg x) { toBeTested(x) and not x.isUnknown() }

query predicate getExpr(FormatArgsArg x, Expr getExpr) {
toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr()
query predicate getArgName(FormatArgsArg x, FormatArgsArgName getArgName) {
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
}

query predicate getDefault(StructField x, Expr getDefault) {
toBeTested(x) and not x.isUnknown() and getDefault = x.getDefault()
query predicate getDefaultVal(StructField x, ConstArg getDefaultVal) {
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
}

query predicate getDiscriminant(Variant x, Expr getDiscriminant) {
toBeTested(x) and not x.isUnknown() and getDiscriminant = x.getDiscriminant()
query predicate getConstArg(Variant x, ConstArg getConstArg) {
tausbn and others added 4 commits April 15, 2026 15:12
Re-run cargo fmt after clippy --fix to ensure consistent formatting.
Re-run codegen to update generated file tracking for MetaImpl.qll.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Setting proc_macro_processes to 0 causes an index-out-of-bounds panic
in ProcMacroServerPool::new when the proc macro server is enabled.
Use the same defaults as rust-analyzer itself (1 each).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove format_args_arg_names from upgrade delete list (table exists in both schemas with different columns)
- Accept updated .expected files for schema changes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ruby Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants